From 93abb615d0667b1f3cb979a2b95aa909434f5619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Wed, 11 Nov 2020 11:20:18 +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 --- .../workbench/assessmentGroup/edit/index.vue | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/views/kpi/workbench/assessmentGroup/edit/index.vue b/src/views/kpi/workbench/assessmentGroup/edit/index.vue index 67a6ed6..1dfc645 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/index.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/index.vue @@ -104,16 +104,17 @@ export default { this.loadings = true try { this.$loadingStart() - let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1})) - console.log('res1: ', res1) + let res12 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1})) + console.log('res1: ', res12) let res = await saveBaseSet(this.basisForm) if (res.code !== 200) { + this.loadings = false this.$loadingEnd() return this.$message.error(res.msg) } res = res.data this.basisForm = res - this.templateForm.evaluationGroupId = res.id + this.templateForm.evaluationGroupId = this.basisForm.id for (let i in this.processInfo) { try { if (this.$route.query.copy) { @@ -122,27 +123,40 @@ export default { return i }) } - let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: res.id})) + let res1 = await saveDetailProcs(Object.assign({}, this.processInfo[i].chartDetails, {evaluationGroupId: this.basisForm.id})) + if (res1.code !== 200) { + this.loadings = false + this.$loadingEnd() + this.$message.error(res1.msg) + return + } console.log('res: ', res1) } catch (error) { - console.log('error: ', error) + this.loadings = false + this.$loadingEnd() + return this.$message.error(error.msg) } } console.log('res: ', res) } catch (error) { - this.$message.error(error.msg) + this.loadings = false + this.$loadingEnd() + return this.$message.error(error.msg) } console.log('this.templateForm: ', JSON.stringify(this.templateForm)) try { let res = await saveTemSet(this.templateForm) + this.loadings = false this.$loadingEnd() res = res.data // this.basisForm = res console.log('res: ', res) } catch (error) { - this.$message.error(error.msg) + this.loadings = false + this.$loadingEnd() + return this.$message.error(error.msg) } - this.loadings = false + this.$message({ message: '保存成功', type: 'success',