From 1b8200e94fd247b198a362818ac123d121a61dd4 Mon Sep 17 00:00:00 2001 From: danshihao Date: Fri, 26 Jul 2024 15:27:23 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E6=A0=87=E5=87=86=E8=A7=A3=E8=AF=BB?= =?UTF-8?q?=E6=B5=81=E7=A8=8B]=20=E6=B1=87=E6=80=BB=E8=8A=82=E7=82=B9=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E4=B8=8E=E4=B8=8A=E4=B8=80=E7=89=88=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E9=9C=80=E8=A6=81=E6=98=AF=E5=8D=95=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/lang/workCenter/en.js | 3 ++- src/common/lang/workCenter/zh.js | 3 ++- src/views/dashboard/modules/QuickEnterCard.vue | 2 +- .../modules/InterpretationClauseTable.vue | 4 ++++ .../modules/InterpretationClauseTableModal.vue | 9 +++++++++ .../InterpretationInterpreterFillInfo.vue | 16 ++++++++++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index 945ca9a..326510b 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -124,7 +124,8 @@ module.exports = { pleaseSelectClause: 'Please select terms', interpretationDistribution: 'Interpretation and Distribution', interpretationTable: 'Interpretation Table', - interpretationAttributes: 'Interpretation of attributes' + interpretationAttributes: 'Interpretation of attributes', + summarySingleChoiceTip: 'Need to summarize as single choice' }, // 流程配置 processConfig: { diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index c96f68c..2f8eade 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -124,7 +124,8 @@ module.exports = { pleaseSelectClause: '请选择条款', interpretationDistribution: '解读分发', interpretationTable: '解读表', - interpretationAttributes: '解读属性' + interpretationAttributes: '解读属性', + summarySingleChoiceTip: '需要汇总为单选' }, // 流程配置 processConfig: { diff --git a/src/views/dashboard/modules/QuickEnterCard.vue b/src/views/dashboard/modules/QuickEnterCard.vue index 518791b..cd1b955 100644 --- a/src/views/dashboard/modules/QuickEnterCard.vue +++ b/src/views/dashboard/modules/QuickEnterCard.vue @@ -7,7 +7,7 @@
- + diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue index 9c6e825..bd1a452 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable.vue @@ -561,6 +561,10 @@ export default { delete item.id delete item[uuidFlag] } + // 是否与上一版相同是单选,如果不选是undefined,发请求undefined会被过滤,后端接收不到,导致值不会被清空,设置成空字符串 + if (item.isSameAsPrevVersion === undefined) { + item.isSameAsPrevVersion = '' + } return item }) }, diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTableModal.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTableModal.vue index 145d729..5d46a6b 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTableModal.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTableModal.vue @@ -70,6 +70,7 @@ :disabled="disabled" multi treeOpera + @change="departChange($event, 'responsibleDepartment')" @back="departNameChange($event, 'responsibleDepartment')" v-decorator="['responsibleDepartment']" /> @@ -88,6 +89,7 @@ :disabled="disabled" multi treeOpera + @change="departChange($event, 'relatedDepartment')" @back="departNameChange($event, 'relatedDepartment')" v-decorator="['relatedDepartment']" /> @@ -347,6 +349,13 @@ export default { nameChange (name, field) { this.model[field + '_dictText'] = name }, + // 部门选择改变 + departChange (depart, field) { + // 如果没有值就清空名字 + if (!depart) { + this.model[field + '_dictText'] = '' + } + }, // 部门名称 departNameChange (departList, field) { this.model[field + '_dictText'] = departList.map(item => item.text).join(',') diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInterpreterFillInfo.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInterpreterFillInfo.vue index c5645c1..72721db 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInterpreterFillInfo.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInterpreterFillInfo.vue @@ -130,6 +130,22 @@ export default { } // 汇总节点,处理表单 if (this.isStandardInterpreterSummary) { + // 需要处理汇总节点的表单,是否与上一版相同不能多选(汇总会变成多选逗号分隔这是个单选框) + const list = this.$refs.interpretationClauseTable.getData() || [] + const rowIndex = list.findIndex(row => { + const isSame = row.isSameAsPrevVersion + if (isSame && typeof isSame === 'string' && isSame.split(',').length > 1) { + return true + } + }) + if (rowIndex !== -1) { + // 提示,是否与上一版相同需要汇总为单选 + this.$message.warn( + `"${this.$t('workCenter.standardInterpretationProcess.sameAsPreviousVersion')}"` + + this.$t('workCenter.standardInterpretationProcess.summarySingleChoiceTip') + ) + obj._flag = true + } obj.formData = await new Promise((resolve) => { this.form.validateFields((err, values) => { if (err) { obj._flag = true }