Browse Source

增加模板列对应模板配置显示

master
李磊 3 years ago
parent
commit
89e0188192
  1. 42
      src/components/drawerDialog/index.vue

42
src/components/drawerDialog/index.vue

@ -262,12 +262,12 @@
<div class="boxRoot">
<div class="left">
<div class="funbox">
<span>模板详情</span>
<span>模板配置</span>
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="addTemFn"
@click="addTemplateSettingFn"
>
新增
</el-button>
@ -373,7 +373,7 @@
icon="el-icon-edit"
circle
title="编辑"
@click="editFnTem(scope.row)"
@click="editTemplateSettingFn(scope.row)"
/>
<el-button
type="danger"
@ -381,7 +381,7 @@
icon="el-icon-delete"
circle
title="删除"
@click="deleteModelFn(scope.row)"
@click="deleteTemplateSettingFn(scope.row)"
/>
</template>
</el-table-column>
@ -398,12 +398,12 @@
</div>
<div class="right">
<div class="funbox">
<span>模板详情</span>
<span>检验项目列配置<el-tag>{{ templateSettingLabel }}</el-tag></span>
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="addtemFn"
@click="addTemplateJyxmFn"
>
新增
</el-button>
@ -441,7 +441,7 @@
icon="el-icon-edit"
circle
title="编辑"
@click="editFn(scope.row)"
@click="editTemplateJyxmFn(scope.row)"
/>
<el-button
type="danger"
@ -449,7 +449,7 @@
icon="el-icon-delete"
circle
title="删除"
@click="deleteFn(scope.row)"
@click="deleteTemplateJyxmFn(scope.row)"
/>
</template>
</el-table-column>
@ -883,7 +883,8 @@ export default {
total1: 0,
jyxmModes: ['检验项目', '附表', '不合格整改检验项目', '大型起重机械检验项目', '报告检验项目'],
writeModes: ['CN模式', 'DN模式', 'KV模式', 'CFI模式', 'SA模式'],
affiliatedAddModes: ['固定表格', '附页文件', 'word自动切换']
affiliatedAddModes: ['固定表格', '附页文件', 'word自动切换'],
templateSettingLabel: ''
}
},
mounted() {},
@ -957,15 +958,24 @@ export default {
affiliatedAddMode: 0
}
},
addTemFn() {
addTemplateSettingFn() {
this.initTemplateSettingForm()
this.dialogVisible1 = true
},
editFnTem(row) {
editTemplateSettingFn(row) {
this.form = this.common.deepCopy(row)
this.dialogVisible1 = true
},
addtemFn() {
addTemplateJyxmFn() {
this.$set(this, 'formLabelAlign', {
field: '',
fieldMode: 0,
indexFromRight: '',
templateId: '', // id
templateSettingId: '', // id
alias: '',
underlineStitching: false
})
this.dialogVisible = true
},
getList() {
@ -988,14 +998,14 @@ export default {
}
})
},
deleteModelFn(row) {
deleteTemplateSettingFn(row) {
TemplateApi.deleteModuleFn({
ids: [row.id]
}).then((data) => {
this.getList()
})
},
deleteFn(row, index) {
deleteTemplateJyxmFn(row, index) {
const arr = []
arr.push(row.id)
TemplateApi.deleteTemplateJyxm({
@ -1037,7 +1047,7 @@ export default {
toggleFn(val) {
this.multipleSelection = val
},
editFn(row) {
editTemplateJyxmFn(row) {
this.dialogVisible = true
this.formLabelAlign = this.common.deepCopy(row)
},
@ -1260,6 +1270,7 @@ export default {
return false
}
this.templateSettingId = row.id
this.templateSettingLabel = this.jyxmModes[row.jyxmMode] + '-' + row.sort
this.$refs.settingList.toggleRowSelection(row)
this.getDemoList()
},
@ -1286,6 +1297,7 @@ export default {
beforeClose(done) {
this.list.length = 0
this.gridData.length = 0
this.templateSettingLabel = ''
this.clearForm()
this.$emit('closeTemplateDrawer')
}

Loading…
Cancel
Save