From 0f3bcd0b9629e80b0b91ad745bf8851e296ab42f Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 10 Aug 2022 17:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/initiatingProcess.vue | 17 +++++++++++-- .../components/initiatingProcess.vue | 6 +++++ .../processForm/evaluationProcess/index.vue | 9 ++++++- .../processForm/handshakeProcess/index.vue | 25 ++++++++++++++++--- .../processForm/regulatoryProcess/index.vue | 9 ++++++- .../processForm/taskListProcess/index.vue | 6 +++++ .../components/listOfRegulations.vue | 6 +++++ 7 files changed, 71 insertions(+), 7 deletions(-) diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue index 8201e8ed5..c2042a3c1 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue @@ -350,13 +350,23 @@ } postAction('/workFlow/startProcess', query).then((res) => { if (res.success) { - this.completeTask(value, res.result) + this.completeTask(value, res.result, true) } else { this.JLoading = false } }) }, - completeTask(value, taskId) { + deleteProcessInstanceByTask(taskId) { + getAction('/workFlow/deleteProcessInstanceByTaskId', { taskId: taskId }).then((res) => { + }) + }, + completeTask(value, taskId, isTrue) { + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: taskId, @@ -375,6 +385,9 @@ } else { this.JLoading = false this.$message.warning(this.$t('operationFailed')) + if (isTrue) { + this.deleteProcessInstanceByTask(taskId) + } } }) } diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue index 8cdb5103a..1ef583d29 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue @@ -564,6 +564,12 @@ }) }, completeTask(value, taskId) { + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: taskId, diff --git a/jero-web/src/views/processCenter/processForm/evaluationProcess/index.vue b/jero-web/src/views/processCenter/processForm/evaluationProcess/index.vue index 59f0fa530..ac1f757f6 100644 --- a/jero-web/src/views/processCenter/processForm/evaluationProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/evaluationProcess/index.vue @@ -307,11 +307,18 @@ } }, completeTask() { + let value = JSON.parse(JSON.stringify(this.queryProject)) + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: this.$route.query.taskIds, flag: this.queryProject.flag, - json: JSON.stringify(this.queryProject).replace(/\"/g, '\'') + json: JSON.stringify(value).replace(/\"/g, '\'') } postAction('/workFlow/completeTask', query).then((res) => { if (res.success) { diff --git a/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue b/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue index c5390aa79..533a748a9 100644 --- a/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/handshakeProcess/index.vue @@ -186,6 +186,12 @@ completeTask(value, handlingTime) { let json = Object.assign(this.queryBy, { handlingTime: handlingTime }, value) let data = JSON.stringify(json).replace(/\"/g, '\'') + Object.keys(data).forEach(res => { + if (data[res] && data[res] instanceof String) { + data[res] = data[res].replace(/\"/g, '“') + data[res] = data[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: this.$route.query.taskId || this.$route.query.taskIds, @@ -248,15 +254,24 @@ } postAction('/workFlow/startProcess', query).then((res) => { if (res.success) { - this.completeTaskDesign(value, res.result) + this.completeTaskDesign(value, res.result,true) } }) }, - - completeTaskDesign(value, taskId) { + deleteProcessInstanceByTask(taskId) { + getAction('/workFlow/deleteProcessInstanceByTaskId', { taskId: taskId }).then((res) => { + }) + }, + completeTaskDesign(value, taskId,isTrue) { value.reviewResult = 'launch' let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') value.operatorTime = operatorTime + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: taskId, @@ -272,6 +287,10 @@ // this.$router.push({ // path: '/ProcessCenter' // }) + }else{ + if (isTrue) { + this.deleteProcessInstanceByTask(taskId) + } } }) }, diff --git a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue index 503b8409d..604e429ce 100644 --- a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue @@ -171,10 +171,17 @@ // this.insertBatch(dataList, 2) }, completeTask() { + let value = JSON.parse(JSON.stringify(this.queryProject)) + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: this.$route.query.taskIds, - json: JSON.stringify(this.queryProject).replace(/\"/g, '\'') + json: JSON.stringify(value).replace(/\"/g, '\'') } postAction('/workFlow/completeTask', query).then((res) => { if (res.success) { diff --git a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue index 20412f416..efb58fae4 100644 --- a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue @@ -342,6 +342,12 @@ completeTask(value) { let json = Object.assign(this.queryBy, value) let data = JSON.stringify(json).replace(/\"/g, '\'') + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: this.$route.query.taskId || this.$route.query.taskIds, diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index dbf4800e9..e289457ce 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1697,6 +1697,12 @@ completeTask(value, taskId, index) { let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') value.handlingTime = handlingTime + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) let query = { userid: this.userInfo().id, taskId: taskId,