From 8fa40add27a1a0813661c4eb815b790093306b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Thu, 31 Mar 2022 17:19:45 +0800 Subject: [PATCH] =?UTF-8?q?52297=20=E6=94=BF=E7=AD=96=E5=BE=81=E6=B1=82?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B=EF=BC=9A=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E4=BA=BA=E4=BB=BB=E5=8A=A1=E5=88=86=E5=8F=91=E8=8A=82=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E7=BC=BA=E5=B0=91=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/zczqyj/step1.vue | 49 ++++++++++++------- .../pages/creatProcess/zczqyj/step2.vue | 30 ++++++++---- .../tabComponents/taskDraft/index.vue | 4 +- 3 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue index 46d713d54..0d700ec36 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue @@ -328,7 +328,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import { queryTaskFirst, saveTaskFirst } from "api/process"; +import { queryTaskFirst, saveTaskFirst, taskDel } from "api/process"; export default { name: "zczqyjStep1", @@ -620,13 +620,15 @@ export default { handleSave() { this.saveLoading = true; let _formData = new FormData(); - this.form.commentText = this.commentText - this.form.filesId = this.addFjList + let json = this.form + json.commentText = this.commentText + json.filesId = this.addFjList + json.filesName = this.form.fjListName _formData.append("createUser", this.$store.getters.userInfo.userId); _formData.append("createUserName", this.$store.getters.userInfo.userName); - _formData.append("prcType", "12"); + _formData.append("prcType", "laws2"); _formData.append("json", JSON.stringify({ - form: this.form, + form: json, roleForm: this.roleForm, commentText: this.commentText })); @@ -643,29 +645,40 @@ export default { if (valid) { this.$refs['Form'].validate((valid) => { if (valid) { + var json = Object.assign(this.form, this.roleForm) + json.commentText = this.commentText + json.filesId = this.addFjList + json.filesName = this.form.fjListName this.isSubmit = true - this.$http.get('lawss/activiti/startProcess', { - type: 'laws2' + this.$http.post('lawss/activiti/startProcessRollBack', { + createUser: this.$store.getters.userInfo.userId, + createUserName: this.$store.getters.userInfo.userName, + type: 'laws2', + json: JSON.stringify({ + form: json, + roleForm: this.roleForm, + commentText: this.commentText + }) }, {_this: this}, res => { if (res.ok) { - var json = Object.assign(this.form, this.roleForm) - console.log('644',json) - json.commentText = this.commentText - json.filesId = this.addFjList - json.filesName = this.form.fjListName this.$http.post('lawss/activiti/completeTask', { json: JSON.stringify(json), taskId: res.data, userId: this.$store.getters.userInfo.userId }, {_this: this}, res => { if (res.success) { - this.$message.success('流程发起成功') - this.$router.push('/processCenter') - this.isSubmit = false - } else { - this.$message.warning('流程启动失败') - this.isSubmit = false + this.$message.success(res.message); + if (this.bpnId !== '') { + let taskId = { + id: this.bpnId + } + taskDel(taskId).then(res=>{ + return res + }) + } + this.$router.push("/processCenter"); } + this.isSubmit = false; }) } else { this.$message.warning('流程启动失败') diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue index cc612e5ec..60f6d66ab 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue @@ -124,6 +124,7 @@ { @@ -329,14 +336,17 @@ export default { pId: this.pId }).then(res => { let data = JSON.parse(res.mesg) - console.log('335',data) - this.form.lawsNumber = data.lawsNumber - this.form.lawsName = data.lawsName - this.form.endTime = data.endTime - this.form.cname = data.cname - this.form.fjList = data.fjList - this.form.fjListId = data.fjListId - this.json = data + console.log(data); + this.form.lawsNumber = data.form ? data.form.lawsNumber : data.lawsNumber + this.form.responUserAndInstitutionNameMap = data.form ? data.form.responUserAndInstitutionNameMap : '' + this.form.lawsName = data.form ? data.form.lawsName : data.lawsName + this.form.responUserList = data.form ? data.form.responUserList: '' + this.form.responUserListName = data.form ? data.form.responUserListName : '' + this.form.endTime = data.form ? data.form.endTime : data.endTime + this.form.cname = data.form ? data.form.cname : data.cname + this.form.fjList = data.form ? data.form.fjList : data.fjList + this.form.fjListId = data.form ? data.form.fjListId : data.fjListId + this.json = data.form ? data.form : data }).catch(e => { }); }); diff --git a/src/pages/processCenter/pages/processList/tabComponents/taskDraft/index.vue b/src/pages/processCenter/pages/processList/tabComponents/taskDraft/index.vue index 522e7161c..ff3bb2a95 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/taskDraft/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/taskDraft/index.vue @@ -724,11 +724,11 @@ export default { } }) break - case '12': + case 'laws2': this.$router.push({ name: 'zczqyjStep1', query: { - type: '12', + type: 'laws2', processName: '政策征求意见流程', bpnId: id }