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 1/2] =?UTF-8?q?52297=20=E6=94=BF=E7=AD=96=E5=BE=81?= =?UTF-8?q?=E6=B1=82=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B=EF=BC=9A=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E4=BA=BA=E4=BB=BB=E5=8A=A1=E5=88=86=E5=8F=91=E8=8A=82?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E7=BC=BA=E5=B0=91=E4=BF=9D=E5=AD=98=E6=8C=89?= =?UTF-8?q?=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 } From f302bda2ffb08f62a71eae1615ebcd102c629d44 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:36:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=98=BB=E6=96=AD=E3=80=91=E6=94=BF?= =?UTF-8?q?=E7=AD=96=E5=BE=81=E6=B1=82=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=EF=BC=9A=E8=B4=A3=E4=BB=BB=E4=BA=BA(=E8=B4=A3=E4=BB=BB?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=B8=88)=E5=A1=AB=E5=86=99=E6=84=8F?= =?UTF-8?q?=E8=A7=81=EF=BC=8C=E5=A1=AB=E5=86=99=E5=9B=9E=E6=89=A7=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=90=8E=E7=82=B9=E5=87=BB=E4=BF=9D=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E7=84=B6=E5=90=8E=E8=BD=AC=E5=8A=9E=E7=BB=99=E8=83=A1=E5=9B=BD?= =?UTF-8?q?=E9=94=90=EF=BC=8C=E8=83=A1=E5=9B=BD=E9=94=90=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=90=8E=EF=BC=8C=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E6=8A=A5500=2052301?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/zczqyj/step2.vue | 2 +- .../pages/creatProcess/zczqyj/step3.vue | 49 +++++++++++-------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue index 60f6d66ab..df87b96d6 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue @@ -287,7 +287,7 @@ export default { json.responUserAndInstitutionNameMap = this.form.responUserAndInstitutionNameMap; let _formData = new FormData(); _formData.append("id", this.bpnId || ""); - _formData.append("prcType", "12"); + _formData.append("prcType", "laws2"); _formData.append("taskIds", this.taskIds); _formData.append("json", JSON.stringify({ form: json, diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue index fec7ffee5..23655e4b9 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue @@ -384,26 +384,7 @@ export default { handleTabs(name) { this.active = name }, - handleSave() { - this.saveLoading = true; - let _formData = new FormData(); - let json = this.form - json.data = this.data - _formData.append("id", this.bpnId || ""); - _formData.append("prcType", "3"); - _formData.append("taskIds", this.taskIds); - _formData.append("json", JSON.stringify({ - form: json, - commentText: this.commentText - })); - saveTaskForPub(_formData).then(res => { - this.saveLoading = false; - this.$message.success("保存成功"); - this.bpnId = res.result; - }).catch(e => { - this.saveLoading = false; - }); - }, + handleAccept() { this.isSubmit = true execTask({ @@ -416,6 +397,29 @@ export default { this.isSubmit = false }) }, + handleSave() { + this.saveLoading = true; + let json = this.json + json.commentText = this.commentText + json.info = this.data + json.form = this.form + let _formData = new FormData(); + _formData.append("id", this.bpnId || ""); + _formData.append("prcType", "laws2"); + _formData.append("taskIds", this.taskIds); + _formData.append("json", JSON.stringify({ + form: json, + dataList: this.data, + commentText: this.commentText + })); + saveTaskForPub(_formData).then(res => { + this.saveLoading = false; + this.$message.success("保存成功"); + this.bpnId = res.result; + }).catch(e => { + this.saveLoading = false; + }); + }, handleSubmit() { if (this.data.length < 1) { this.$message.warning('请输入征求意见') @@ -505,8 +509,11 @@ export default { * @description: 动态表单读取 */ getFormFieldList(item) { + console.log(item); this.$nextTick(() => { - this.form = JSON.parse(JSON.stringify(item)); + this.form = item.form ? JSON.parse(JSON.stringify(item.form.form)) : JSON.parse(JSON.stringify(item)); + this.data = item.form ? item.dataList : [] + this.commentText = item.form ? item.commentText : '' }); }, },