From a5ef6d362535738f86cc25f380832cf75ca03533 Mon Sep 17 00:00:00 2001 From: "zhaokaiyao@91isoft.com" <6922339zky> Date: Tue, 26 Oct 2021 17:21:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=A6=E5=85=A5=E6=A0=87=E5=87=86,=E5=8B=98?= =?UTF-8?q?=E8=AF=AF=E4=BB=B6=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA.switch?= =?UTF-8?q?=E6=B2=A1=E5=86=99break(=EF=BC=A0=5F=EF=BC=A0;)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzrk/step1.vue | 86 ++++++++++--------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue index da2503594..90c8e7b01 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue @@ -1814,47 +1814,52 @@ // 带入 case 2: if (this.standardCheckedList.length === 1) { - const bringData = this.standardCheckedList[0] - bringData.signFlag = this.form.signFlag && this.form.signFlag != '' ? this.form.signFlag : '0' - bringData.standInData = this.form.standInData && this.form.standInData != '' ? this.form.standInData : '0' + this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, { + _this: this + }, res => { + if(res && res.data){ + const bringData = res.data + bringData.signFlag = this.form.signFlag && this.form.signFlag != '' ? this.form.signFlag : '0' + bringData.standInData = this.form.standInData && this.form.standInData != '' ? this.form.standInData : '0' - const json = Object.assign(bringData, bringData.attrInfoCaseMap); - this.form = JSON.parse(JSON.stringify(json)) + const json = Object.assign(bringData, bringData.attrInfoCaseMap); + this.form = JSON.parse(JSON.stringify(json)) - this.form.qcdw = JSON.parse(JSON.stringify(json)).qcdw && JSON.parse(JSON.stringify(json)).qcdw !== '[]' ? JSON.parse(JSON.stringify(json)).qcdw.split(',') : [] - this.form.wssmr = JSON.parse(JSON.stringify(json)).wssmr && JSON.parse(JSON.stringify(json)).wssmr !== '[]' ? JSON.parse(JSON.stringify(json)).wssmr.split(',') : [] - this.form.zrgcs = JSON.parse(JSON.stringify(json)).zrgcs && JSON.parse(JSON.stringify(json)).zrgcs !== '[]' ? JSON.parse(JSON.stringify(json)).zrgcs.split(',') : [] - this.form.zrbm = JSON.parse(JSON.stringify(json)).zrbm && JSON.parse(JSON.stringify(json)).zrbm !== '[]' ? JSON.parse(JSON.stringify(json)).zrbm.split(',') : [] - this.form.syrz = JSON.parse(JSON.stringify(json)).syrz && JSON.parse(JSON.stringify(json)).syrz !== '[]' ? JSON.parse(JSON.stringify(json)).syrz.split(',') : [] - this.form.sycpx = JSON.parse(JSON.stringify(json)).sycpx && JSON.parse(JSON.stringify(json)).sycpx !== '[]' ? JSON.parse(JSON.stringify(json)).sycpx.split(',') : [] - this.form.nylx = JSON.parse(JSON.stringify(json)).nylx && JSON.parse(JSON.stringify(json)).nylx !== '[]' ? JSON.parse(JSON.stringify(json)).nylx.split(',') : [] - this.form.cllx = JSON.parse(JSON.stringify(json)).cllx && JSON.parse(JSON.stringify(json)).cllx !== '[]' ? JSON.parse(JSON.stringify(json)).cllx.split(',') : [] - this.defaultCheckedKeys = [this.form.standSystem]; - this.defaultCheckedKeys1 = [this.form.cycvppsbm]; - this.defaultCheckedKeys2 = [this.form.kccvppsbm]; - this.defaultCheckedKeys3 = [this.form.dybxh]; - this.key++ - this.key1++ - this.key2++ - this.key3++ - this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN' - this.form.standYear = bringData.standYear ? parseInt(bringData.standYear) : '' - this.form.prcNum = this.prcNum - this.form.prcName = this.prcName - this.form['id'] = bringData.id - this.standardDrawer = false - this.verifySarStandard = true - this.busVsFunc() - this.modelFunc() - this.$forceUpdate() - - console.log("this.form",this.form); - // 遍历对象初始化文件信息 - for(const p in this.form) { - if (typeof (this.form[p]) != "function") { - this.initializeFileList(p,this.form[p]); + this.form.qcdw = JSON.parse(JSON.stringify(json)).qcdw && JSON.parse(JSON.stringify(json)).qcdw !== '[]' ? JSON.parse(JSON.stringify(json)).qcdw.split(',') : [] + this.form.wssmr = JSON.parse(JSON.stringify(json)).wssmr && JSON.parse(JSON.stringify(json)).wssmr !== '[]' ? JSON.parse(JSON.stringify(json)).wssmr.split(',') : [] + this.form.zrgcs = JSON.parse(JSON.stringify(json)).zrgcs && JSON.parse(JSON.stringify(json)).zrgcs !== '[]' ? JSON.parse(JSON.stringify(json)).zrgcs.split(',') : [] + this.form.zrbm = JSON.parse(JSON.stringify(json)).zrbm && JSON.parse(JSON.stringify(json)).zrbm !== '[]' ? JSON.parse(JSON.stringify(json)).zrbm.split(',') : [] + this.form.syrz = JSON.parse(JSON.stringify(json)).syrz && JSON.parse(JSON.stringify(json)).syrz !== '[]' ? JSON.parse(JSON.stringify(json)).syrz.split(',') : [] + this.form.sycpx = JSON.parse(JSON.stringify(json)).sycpx && JSON.parse(JSON.stringify(json)).sycpx !== '[]' ? JSON.parse(JSON.stringify(json)).sycpx.split(',') : [] + this.form.nylx = JSON.parse(JSON.stringify(json)).nylx && JSON.parse(JSON.stringify(json)).nylx !== '[]' ? JSON.parse(JSON.stringify(json)).nylx.split(',') : [] + this.form.cllx = JSON.parse(JSON.stringify(json)).cllx && JSON.parse(JSON.stringify(json)).cllx !== '[]' ? JSON.parse(JSON.stringify(json)).cllx.split(',') : [] + this.defaultCheckedKeys = [this.form.standSystem]; + this.defaultCheckedKeys1 = [this.form.cycvppsbm]; + this.defaultCheckedKeys2 = [this.form.kccvppsbm]; + this.defaultCheckedKeys3 = [this.form.dybxh]; + this.key++ + this.key1++ + this.key2++ + this.key3++ + this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN' + this.form.standYear = bringData.standYear ? parseInt(bringData.standYear) : '' + this.form.prcNum = this.prcNum + this.form.prcName = this.prcName + this.form['id'] = bringData.id + this.standardDrawer = false + this.verifySarStandard = true + this.busVsFunc() + this.modelFunc() + this.$forceUpdate() } - } + // 遍历对象初始化文件信息 + for(const p in this.form) { + if (typeof (this.form[p ]) != "function") { + this.initializeFileList(p,this.form[p]); + } + } + console.log("res",res); + }) } else if (this.standardCheckedList.length > 1) { this.$message.warning('最多可以带入一条标准信息') @@ -1890,8 +1895,8 @@ this.getFileList(value,this.kwjFileList); break; case 'jdwj': - debugger this.getFileList(value,this.jdwjFileList); + console.log("初始",this.jdwjFileList) break; case 'bpg': this.getFileList(value,this.bpgFileList); @@ -1909,7 +1914,7 @@ }, { _this: this }, res => { - debugger + let fileList = res.data if (fileList != null && fileList.length > 0) { for (let i = 0; i < fileList.length; i++) { @@ -2454,6 +2459,7 @@ break; case 'jdwj': this.fileList=this.jdwjFileList + break; case 'kwj': this.fileList=this.kwjFileList break;