From 98d9db22d1c0cdb588f9beb3c08c8c5d0dabf613 Mon Sep 17 00:00:00 2001 From: "396572590@qq.com" Date: Thu, 23 Jun 2022 16:25:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20bug=20#5?= =?UTF-8?q?5680=20=E5=9B=9B=E4=B8=AA=E4=B8=8D=E5=9B=9E=E6=98=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=97=AE=E9=A2=98=20=E5=A4=9A=E9=80=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzrk/step2.vue | 18 +++++++++++---- .../pages/creatProcess/bzrk/step3.vue | 19 +++++++++++---- .../pages/creatProcess/bzrk/step4.vue | 23 +++++++++++++++++-- .../pages/creatProcess/bzrk/step5.vue | 18 +++++++++++---- 4 files changed, 64 insertions(+), 14 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue index 5a8797813..23ef0725e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue @@ -1190,6 +1190,16 @@ export default { }) }) }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, /** * @description: 动态表单读取 */ @@ -1198,10 +1208,10 @@ export default { this.form = JSON.parse(JSON.stringify(item)) let wssmrName = this.form.wssmrname || this.form.wssmr this.form.wssmr = wssmrName - this.form.sycpx = this.form.sycpx && this.form.sycpx !== [] ? this.form.sycpx : '' - this.form.nylx = this.form.nylx && this.form.nylx !== [] ? this.form.nylx : '' - this.form.cllx = this.form.cllx && this.form.cllx !== [] ? this.form.cllx: '' - this.form.syrz = this.form.syrz && this.form.syrz !== [] ? this.form.syrz : '' + this.form['sycpx'] = this.filterObj(this.form['sycpx']) + this.form['nylx'] = this.filterObj(this.form['nylx']) + this.form['cllx'] = this.filterObj(this.form['cllx']) + this.form['syrz'] = this.filterObj(this.form['syrz']) this.defaultCheckedKeys = [this.form.standSystem] this.defaultCheckedKeys1 = [this.form.cycvppsbm] this.defaultCheckedKeys2 = [this.form.kccvppsbm] diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step3.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step3.vue index 6de66f6b4..f63a72d6a 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step3.vue @@ -1156,6 +1156,16 @@ export default { }) }) }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, /** * @description: 动态表单读取 */ @@ -1163,12 +1173,13 @@ export default { console.log(item); this.$nextTick(() => { this.form = JSON.parse(JSON.stringify(item)) + console.log(this.form) let wssmrName = this.form.wssmrname || this.form.wssmr this.form.wssmr = wssmrName - this.form.sycpx = this.form.sycpx && this.form.sycpx !== [] ? this.form.sycpx : '' - this.form.nylx = this.form.nylx && this.form.nylx !== [] ? this.form.nylx : '' - this.form.cllx = this.form.cllx && this.form.cllx !== [] ? this.form.cllx: '' - this.form.syrz = this.form.syrz && this.form.syrz !== [] ? this.form.syrz: '' + this.form['sycpx'] = this.filterObj(this.form['sycpx']) + this.form['nylx'] = this.filterObj(this.form['nylx']) + this.form['cllx'] = this.filterObj(this.form['cllx']) + this.form['syrz'] = this.filterObj(this.form['syrz']) this.form.country = this.form.country && this.form.country !== [] ? this.form.country: '' this.defaultCheckedKeys = [this.form.standSystem] this.defaultCheckedKeys1 = [this.form.cycvppsbm] diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step4.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step4.vue index f21e9e5c1..6320d00ae 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step4.vue @@ -2649,6 +2649,16 @@ export default { }) }) }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, /** * @description: 动态表单读取 */ @@ -2662,6 +2672,10 @@ export default { this.initializeFileList(p, this.form[p]); } } + this.form['sycpx'] = this.filterObj(this.form['sycpx']) + this.form['nylx'] = this.filterObj(this.form['nylx']) + this.form['cllx'] = this.filterObj(this.form['cllx']) + this.form['syrz'] = this.filterObj(this.form['syrz']) this.defaultCheckedKeys = [this.form.standSystem]; this.defaultCheckedKeys1 = [this.form.cycvppsbm]; this.defaultCheckedKeys2 = [this.form.kccvppsbm]; @@ -2789,6 +2803,7 @@ export default { //表单文件处理 this.fileInfoHandle(); this.form.commentText = this.commentText; + this.isSubmit = true this.saveLoading = true let _formData = new FormData() _formData.append("id", this.bpnId || ""); @@ -2805,11 +2820,13 @@ export default { // taskIds:this.taskIds })) saveTaskForPub(_formData).then(res => { + this.isSubmit = false this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result }).catch(e => { - this.saveLoading = false + this.isSubmit = false + this.saveLoading = false }) }, fileInfoHandle() { @@ -2869,6 +2886,7 @@ export default { if (res.ok) { this.fileInfoHandle(); this.isSubmit = true + this.saveLoading = true this.form.submitType = this.submitType this.form.commentText = this.commentText this.form.approvalOpinion = this.approvalOpinion @@ -2887,7 +2905,8 @@ export default { } else { this.$message.success(res.message) } - this.isSubmit = false + this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('标准号重复') diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step5.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step5.vue index 5838987eb..23abc4899 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step5.vue @@ -1162,6 +1162,16 @@ export default { }) }) }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, /** * @description: 动态表单读取 */ @@ -1170,10 +1180,10 @@ export default { this.form = JSON.parse(JSON.stringify(item)) let wssmrName = this.form.wssmrname || this.form.wssmr this.form.wssmr = wssmrName - this.form.sycpx = this.form.sycpx && this.form.sycpx !== [] ? this.form.sycpx : '' - this.form.nylx = this.form.nylx && this.form.nylx !== [] ? this.form.nylx : '' - this.form.cllx = this.form.cllx && this.form.cllx !== [] ? this.form.cllx: '' - this.form.syrz = this.form.syrz && this.form.syrz !== [] ? this.form.syrz : '' + this.form['sycpx'] = this.filterObj(this.form['sycpx']) + this.form['nylx'] = this.filterObj(this.form['nylx']) + this.form['cllx'] = this.filterObj(this.form['cllx']) + this.form['syrz'] = this.filterObj(this.form['syrz']) this.defaultCheckedKeys = [this.form.standSystem] this.defaultCheckedKeys1 = [this.form.cycvppsbm] this.defaultCheckedKeys2 = [this.form.kccvppsbm]