From 32370c07e73096fa482fcc24ddd2b58e661b9556 Mon Sep 17 00:00:00 2001 From: zyd Date: Wed, 13 Jul 2022 22:22:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E5=BD=93=E5=8F=91=E8=B5=B7=E6=B5=81=E7=A8=8B=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84BUG=EF=BC=8C=E6=AD=A4=E5=A4=84=E5=9C=A8?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91=E9=98=B2=E6=AD=A2=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=8D=89=E7=A8=BF=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzdy/step1-1.vue | 31 ++++++---- .../pages/creatProcess/bzdy/step1.vue | 8 ++- .../pages/creatProcess/bzjd/step1-1.vue | 33 ++++++----- .../pages/creatProcess/bzzqyj/step1-1.vue | 59 ++++++++++--------- 4 files changed, 74 insertions(+), 57 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue index b289e98ff..bada5a265 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue @@ -373,20 +373,23 @@ this.foldFormFlag = !this.foldFormFlag }, getData () { + const queryId = this.$route.query.bpnId + if(queryId !== null && queryId !== undefined && queryId !==''){ queryTaskFirst({ - bpnId: this.$route.query.bpnId + bpnId: this.$route.query.bpnId }).then(res => { - this.bpnId = this.$route.query.bpnId - let mes = JSON.parse(res.mes) - if (mes.form.date) { - mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) - } else { - mes.form.date = '' - } - this.form = mes.form - this.roleForm = mes.roleForm - this.commentText1 = mes.commentText1 || '' + this.bpnId = this.$route.query.bpnId + let mes = JSON.parse(res.mes) + if (mes.form.date) { + mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) + } else { + mes.form.date = '' + } + this.form = mes.form + this.roleForm = mes.roleForm + this.commentText1 = mes.commentText1 || '' }) + } }, checkedRole2 (data) { var idList = '' @@ -597,9 +600,11 @@ let taskId = { id: this.$route.query.bpnId } - taskDel(taskId).then(res=>{ + if(taskId !=='' && taskId !== undefined && taskId !== null){ + taskDel(taskId).then(res=>{ return res - }) + }) + } this.$router.push('/processCenter') } this.isSubmit = false diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue index e66caa4d8..d84ba991e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue @@ -589,9 +589,11 @@ export default { let taskId = { id: this.$route.query.bpnId } - taskDel(taskId).then(res=>{ - return res - }) + if(taskId !== '' && taskId !== undefined && taskId !== null){ + taskDel(taskId).then(res=>{ + return res + }) + } this.$router.push('/processCenter') } this.isSubmit = false diff --git a/src/pages/processCenter/pages/creatProcess/bzjd/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzjd/step1-1.vue index 0013bbc1e..f6bc18db4 100644 --- a/src/pages/processCenter/pages/creatProcess/bzjd/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzjd/step1-1.vue @@ -862,22 +862,25 @@ this.itermsConditionsTitle = row.replace(/''/g, '\'') }, getData () { + const queryId =this.$route.query.bpnId + if(queryId !== null && queryId !== undefined && queryId !==''){ queryTaskFirst({ - bpnId: this.$route.query.bpnId + bpnId: this.$route.query.bpnId }).then(res => { - let mes = JSON.parse(res.mes) - this.bpnId = this.$route.query.bpnId - if (mes.form.date) { - mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) - } else { - mes.form.date = '' - } - this.form = mes.form - this.roleForm = mes.roleForm - this.commentText1 = mes.commentText1 || '' - this.itemList = mes.itemList - this.sarType = mes.sarType + let mes = JSON.parse(res.mes) + this.bpnId = this.$route.query.bpnId + if (mes.form.date) { + mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) + } else { + mes.form.date = '' + } + this.form = mes.form + this.roleForm = mes.roleForm + this.commentText1 = mes.commentText1 || '' + this.itemList = mes.itemList + this.sarType = mes.sarType }) + } }, setMap(data){ data.forEach(item => { @@ -1136,9 +1139,11 @@ let taskId = { id: this.$route.query.bpnId } + if(taskId !== '' && taskId !== undefined && taskId !== null){ taskDel(taskId).then(res=>{ - return res + return res }) + } this.$router.push('/processCenter') } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue index 438013ff4..c00cdd9b2 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue @@ -661,30 +661,33 @@ export default { window.open(routeUrl.href, '_blank') }, getData() { - queryTaskFirst({ - bpnId: this.$route.query.bpnId - }).then(res => { - let mes = JSON.parse(res.mes) - console.log(mes); - this.bpnId = this.$route.query.bpnId - if (mes.form.endTime) { - mes.form.endTime = new Date(this.$moment(mes.form.endTime).format('YYYY-MM-DD')) - } else { - mes.form.endTime = '' - } - this.addFjList = mes.filesId || mes.form.filesId || '' - this.form.fjListName = mes.filesName - this.form = mes.form - this.roleForm = mes.roleForm - this.commentText1 = mes.commentText1 || '' - if (this.form.standId) { - this.$http.get('SarStandItems/sar-stand-items/getFileTypeHG', { - standId: this.form.standId - }, {}, res => { - this.textTypeList = res.data - }) - } - }) + const queryId = this.$route.query.bpnId + if(queryId !== null && queryId !== undefined && queryId !==''){ + queryTaskFirst({ + bpnId: this.$route.query.bpnId + }).then(res => { + let mes = JSON.parse(res.mes) + console.log(mes); + this.bpnId = this.$route.query.bpnId + if (mes.form.endTime) { + mes.form.endTime = new Date(this.$moment(mes.form.endTime).format('YYYY-MM-DD')) + } else { + mes.form.endTime = '' + } + this.addFjList = mes.filesId || mes.form.filesId || '' + this.form.fjListName = mes.filesName + this.form = mes.form + this.roleForm = mes.roleForm + this.commentText1 = mes.commentText1 || '' + if (this.form.standId) { + this.$http.get('SarStandItems/sar-stand-items/getFileTypeHG', { + standId: this.form.standId + }, {}, res => { + this.textTypeList = res.data + }) + } + }) + } }, addZqyjList() { this.title = '国内外标准库' @@ -860,9 +863,11 @@ export default { let taskId = { id: this.$route.query.bpnId } - taskDel(taskId).then(res=>{ - return res - }) + if(taskId !== '' && taskId !== undefined && taskId !== null){ + taskDel(taskId).then(res=>{ + return res + }) + } this.$router.push('/processCenter') } })