From bb6df0220cebab5916efa6fc91be36b18e3064ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Fri, 22 Dec 2023 14:33:25 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A1=B9=E7=9B=AE=E5=90=88=E8=A7=84?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E6=B5=81=E7=A8=8B\=E5=BE=81=E6=B1=82?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/lang/workCenter/en.js | 1 + src/common/lang/workCenter/zh.js | 1 + .../ProjectComplianceEvaluationProcess.vue | 64 +++++++++++++++---- .../StandardConsultationProcess.vue | 20 +++++- 4 files changed, 71 insertions(+), 15 deletions(-) diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index 7000a13d..fc4d25ec 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -1,6 +1,7 @@ module.exports = { basicInformation: '基础信息', personalInformation: '人员信息', + checkTableRequired: '请检查表格必填项是否已填写', // 新建流程页 newProcess: { externalStandardsManagementProcess: '外部标准管理流程', diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index 54255674..2ccaa018 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -2,6 +2,7 @@ module.exports = { basicInformation: '基础信息', personalInformation: '人员信息', dispatchInformation: '业务分派信息', + checkTableRequired: '请检查表格必填项是否已填写', // 新建流程页 newProcess: { externalStandardsManagementProcess: '外部标准管理流程', diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue index 1993919c..dccd60c8 100644 --- a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue +++ b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue @@ -193,7 +193,8 @@
- tt.dbFieldName) + deleteField = [...deleteField, ...fields] + } + } + for (const fieldName of deleteField) { + delete record[fieldName] + } this.$set(this.dataSource, index, record) }, dealFormData () { @@ -1130,6 +1165,11 @@ export default { processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList } } else { + // 设计工程师评估节点,expand-table校验 + if ((this.currentNode === ProjectComplianceEvaluationProcessNode.designEngineerEvaluation.value || this.currentNode === ProjectComplianceEvaluationProcessNode.moduleOwnerModification.value) && !this.$refs.expandTable.submit()) { + this.$message.warning(this.$t('workCenter.checkTableRequired')) + flag = false + } const data = JSON.parse(JSON.stringify(this.dataSource)) formData.businessInfoDTO = { processProjectAssessTermList: data diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue index 5171e995..f1d63750 100644 --- a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue +++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue @@ -226,7 +226,7 @@ class="opinion-select" dict-code="consultation_opinion" :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionPlan.opinion')" - @change="value => {handleOpinionChange(value, index)}" /> + @change="value => {handleOpinionChange(value, index, record)}" /> @@ -1191,9 +1191,23 @@ export default { * 修改意见 * @param value * @param index + * @param record */ - handleOpinionChange (value, index) { - this.$set(this.dataSource[index], 'isAdopt', value) + handleOpinionChange (value, index, record) { + record.isAdopt = value + // 处理变化之后清空之前的数据 + const extraFormKeys = Object.keys(this.extraForm) + let deleteField = [] + for (const key of extraFormKeys) { + if (key !== value) { + const fields = this.extraForm[key].formArr.map(tt => tt.dbFieldName) + deleteField = [...deleteField, ...fields] + } + } + for (const fieldName of deleteField) { + delete record[fieldName] + } + this.$set(this.dataSource, index, record) }, showContent (text) { this.$refs.textContentModal.open(text)