feature(标准跟踪清单): 详情

This commit is contained in:
zyn
2024-01-30 17:56:13 +08:00
parent c65caf247d
commit cb56c58999
3 changed files with 38 additions and 6 deletions
@@ -4,6 +4,7 @@
type="primary"
size="mini"
style="margin-bottom: 10px;"
:disabled="disabled"
@click="handleSearchStandard"
>
手动查找
@@ -12,6 +13,7 @@
type="danger"
size="mini"
style="margin-bottom: 10px;"
:disabled="disabled"
@click="handleDeleteStandard"
>
批量删除
@@ -67,6 +69,7 @@
placeholder="请选择产品类型"
size="mini"
clearable
:disabled="disabled"
>
<el-option
v-for="item in dict.trackingChecklistProductType"
@@ -90,6 +93,7 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:disabled="disabled"
/>
</template>
</el-table-column>
@@ -105,6 +109,7 @@
placeholder="请选择实施要求"
clearable
size="mini"
:disabled="disabled"
>
<el-option
v-for="item in dict.trackingChecklistPutDemand"
@@ -132,7 +137,11 @@ export default {
value: {
type: Array,
default: () => []
}
},
disabled: {
type: Boolean,
default: false
},
},
data () {
return {
@@ -21,19 +21,31 @@
class="form-item-first"
prop="checkListName"
label="核查清单名称"
:disabled="disabled"
/>
<UploadFormItem
v-if="reloadForm"
label="模板"
:ids.sync="form.checklistTemplate"
:names.sync="form.checklistTemplateName"
:disabled="disabled"
/>
<el-tabs v-model="activeName">
<el-tab-pane label="核查清单" name="1" />
<el-tab-pane label="人员信息" name="2" />
</el-tabs>
<Inventory v-show="activeName === '1'" v-model="form.issueTrackList" />
<PersonInfo v-show="activeName === '2'" ref="roleForm" :roleForm="roleForm" :roleRules="roleRules" />
<Inventory
v-show="activeName === '1'"
v-model="form.issueTrackList"
:disabled="disabled"
/>
<PersonInfo
v-show="activeName === '2'"
ref="roleForm"
:roleForm="roleForm"
:roleRules="roleRules"
:disabled="disabled"
/>
<loading :loading="loading">数据获取中...</loading>
</el-form>
</div>
@@ -43,6 +55,7 @@
type="primary"
size="mini"
:loading="isSubmit"
:disabled="disabled"
@click="onSubmit"
>
提交
@@ -146,6 +159,7 @@ export default {
},
loading: false,
reloadForm: true,
disabled: false,
}
},
methods: {
@@ -167,8 +181,14 @@ export default {
})
this.showDrawer = true
},
edit (id) {
this.title = '编辑'
edit (id, type) {
if (type && type === 'detail') {
this.title = '详情'
this.disabled = true
} else {
this.title = '编辑'
this.disabled = false
}
this.showDrawer = true
const config = { _this: this, loading: 'loading' }
this.$http._getData(this.url.getById, { checklistId: id }, config).then(res => {
@@ -131,7 +131,7 @@
sortable="custom"
>
<template slot-scope="{row, column, $index}">
<a class="table-jump" style="color: #2d8cf0" @click="handlePreview(row.id)">{{ row.checkListName }}</a>
<a class="table-jump" style="color: #2d8cf0" @click="detail(row.id)">{{ row.checkListName }}</a>
</template>
</el-table-column>
<el-table-column
@@ -344,6 +344,9 @@ export default {
}
this.$refs.addModel.edit(this.selectedList[0])
},
detail (id) {
this.$refs.addModel.edit(id, 'detail')
},
downTemplate () {
window.open(`${this.url.exportTemplateFile}?fileName=标准跟踪清单导入模板`)
},