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

Loading…
Cancel
Save