From ff5d1c0a627fed6d536e92143236e2c28dc55977 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 25 Dec 2023 14:44:51 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E8=AE=A2=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnterpriseStandardRevisionFlow.vue | 3 ++- .../modules/ScorerMarkBaseInfo.vue | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index 8bcca041..ac799bff 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -395,7 +395,7 @@ export default { prcObj.commitText = this.model.handleText prcObj.commitFile = this.model.handleFile this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile')) - this.model.data = JSON.parse(this.model.infoJsonStr).data + this.model.data = (JSON.parse(this.model.infoJsonStr)).data // 如果是节点1的保存回显人员信息 if (this.currentNode === 1) { this.draftInitPersonInfo(JSON.parse(this.model.infoJsonStr).personnelObj) @@ -598,6 +598,7 @@ export default { param.common = Object.assign({}, approvalValues) param.common.taskId = this.$route.query.taskId param.data = data + this.loading = true enStandardEditAgree(param).then(res => { if (res.success) { this.$message.success(res.message) diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue index c897579b..ab23b796 100644 --- a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue @@ -275,20 +275,23 @@ export default { } }, mounted () { - this.dataSource = fixDataSourse + this.dataSource = [] }, methods: { // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 initData (data) { + console.log(data) // 给表格赋值,在线编辑不知道要怎么赋值? - if (data.reviewMeetingDetails) { + if (data.reviewMeetingDetails && data.reviewMeetingDetails.length > 0) { + this.dataSource = Array.from(fixDataSourse) for (const i in fixDataSourse) { - this.dataSource[i] = { ...fixDataSourse[i] } if (i % 3 === 0) { this.dataSource[i].evaluateScore = data.reviewMeetingDetails[Math.floor(i / 3)].evaluateScore || '' this.dataSource[i].deductionScoreReason = data.reviewMeetingDetails[Math.floor(i / 3)].deductionScoreReason || '' } } + } else { + this.dataSource = Array.from(fixDataSourse) } // 给表单赋值 this.$nextTick(() => { @@ -310,6 +313,7 @@ export default { } } data.reviewMeetingDetails = arr + data.businessJson = JSON.stringify(this.$refs.baseInfoForm.formInline) return data }, // 外层获取数据要过校验,返回false表示没有通过校验