From 0d8104a3040dd0166f819f4d9e637ef0cccb712f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Fri, 6 Nov 2020 16:42:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kpi/workbench/assessmentGroup/edit/index.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/views/kpi/workbench/assessmentGroup/edit/index.vue b/src/views/kpi/workbench/assessmentGroup/edit/index.vue index 97c3b9e..bf970a6 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/index.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/index.vue @@ -91,17 +91,33 @@ export default { return this.$message.error('权重评分总和不得大于100!') } } + if (this.$route.query.copy) { + this.templateForm.modelItems = this.templateForm.modelItems.map(i => { + delete i.id + return i + }) + } this.loadings = true try { this.$loadingStart() let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1})) console.log('res1: ', res1) let res = await saveBaseSet(this.basisForm) + if (res.code !== 200) { + this.$loadingEnd() + return this.$message.error(res.msg) + } res = res.data this.basisForm = res this.templateForm.evaluationGroupId = res.id for (let i in this.processInfo) { try { + if (this.$route.query.copy) { + this.processInfo[i].chartDetails.recordSimpleDtos = this.processInfo[i].chartDetails.recordSimpleDtos.map(i => { + delete i.id + return i + }) + } let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id})) console.log('res: ', res1) } catch (error) {