diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue index 0d700ec36..c3f8f788b 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step1.vue @@ -52,6 +52,9 @@ v-model="form.cycleTime" type="daterange" range-separator="—" + align="right" + unlink-panels + value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"> @@ -461,6 +464,16 @@ export default { this.roleForm = mes.roleForm }); }, + filterObj(obj){ + if(obj && obj !== ''){ + if(obj instanceof Array){ + return obj; + }else { + return obj.split(",") + } + } + return ""; + }, handleProcessStandardNext(status) { switch (status) { // 新增 @@ -484,12 +497,20 @@ export default { const bringData = res.data const json = Object.assign(bringData, bringData.attrInfoMap); this.form = JSON.parse(JSON.stringify(json)) - this.form.TGRLAWS = JSON.parse(JSON.stringify(json)).TGRLAWS && JSON.parse(JSON.stringify(json)).TGRLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGRLAWS.split(',') : [] - this.form.TGDWLAWS = JSON.parse(JSON.stringify(json)).TGDWLAWS && JSON.parse(JSON.stringify(json)).TGDWLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGDWLAWS.split(',') : [] - this.form.NYLXLAWS = JSON.parse(JSON.stringify(json)).NYLXLAWS && JSON.parse(JSON.stringify(json)).NYLXLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).NYLXLAWS.split(',') : [] - this.form.YYRZLAWS = JSON.parse(JSON.stringify(json)).YYRZLAWS && JSON.parse(JSON.stringify(json)).YYRZLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).YYRZLAWS.split(',') : [] - this.form.ZRBMLAWS = JSON.parse(JSON.stringify(json)).ZRBMLAWS && JSON.parse(JSON.stringify(json)).ZRBMLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRBMLAWS.split(',') : [] - this.form.ZRGCSLAWS = JSON.parse(JSON.stringify(json)).ZRGCSLAWS && JSON.parse(JSON.stringify(json)).ZRGCSLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRGCSLAWS.split(',') : [] + const dateArr = [] + if(this.form.commentCycleStart && this.form.commentCycleEnd){ + dateArr[0] = this.form.commentCycleStart + dateArr[1] = this.form.commentCycleEnd + this.form.cycleTime = dateArr + } + this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy']) + this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx']) + this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel']) + this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS']) + this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS']) + this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS']) + this.form['ZRBMLAWS'] = this.filterObj(this.form['ZRBMLAWS']) + this.form['TGDWLAWS'] = this.filterObj(this.form['TGDWLAWS']) this.form.prcNum = this.prcNum this.form.prcName = this.prcName this.form['id'] = bringData.id @@ -650,6 +671,7 @@ export default { json.filesId = this.addFjList json.filesName = this.form.fjListName this.isSubmit = true + this.saveLoading = true; this.$http.post('lawss/activiti/startProcessRollBack', { createUser: this.$store.getters.userInfo.userId, createUserName: this.$store.getters.userInfo.userName, @@ -679,10 +701,12 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }) } else { this.$message.warning('流程启动失败') this.isSubmit = false + this.saveLoading = false; } }) } else { diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue index df87b96d6..f413a4844 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step2.vue @@ -201,6 +201,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -209,6 +211,8 @@ export default { }).then(res => { if (res.success) { this.drawerModal = false + this.isSubmit = false + this.saveLoading = false this.$message.success('调整成功') this.processNum() this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) @@ -306,6 +310,7 @@ export default { this.$refs["zczqyjForm"].validate((valid) => { if (valid) { this.isSubmit = true; + this.saveLoading = true; var json = this.json; json.commentText = this.commentText; json.responUserList = this.form.responUserList; @@ -323,6 +328,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }); } else { return this.$message.warning("请完善基础信息"); @@ -336,7 +342,6 @@ export default { pId: this.pId }).then(res => { let data = JSON.parse(res.mesg) - 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 diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue index 23655e4b9..64a44d4f9 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step3.vue @@ -277,6 +277,8 @@ export default { department: '',//提出部门 fjList: [], fjListId: '', + commentUser: this.$store.getters.userInfo.userId, + commentUserName: this.$store.getters.userInfo.userName, }, formRules: { responUserList: [ @@ -387,6 +389,7 @@ export default { handleAccept() { this.isSubmit = true + this.saveLoading = true; execTask({ todoId: this.todoId // 当前节点ID }).then(res => { @@ -395,9 +398,12 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false; + }) }, handleSave() { + this.isSubmit = true; this.saveLoading = true; let json = this.json json.commentText = this.commentText @@ -414,10 +420,13 @@ export default { })); saveTaskForPub(_formData).then(res => { this.saveLoading = false; + this.isSubmit = false; + this.$message.success("保存成功"); this.bpnId = res.result; }).catch(e => { this.saveLoading = false; + this.isSubmit = false; }); }, handleSubmit() { @@ -448,6 +457,7 @@ export default { // } else { this.isSubmit = true + this.saveLoading = true; var json = this.json json.commentText = this.commentText json.info = this.data @@ -466,6 +476,8 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false; + }) } } @@ -512,6 +524,8 @@ export default { console.log(item); this.$nextTick(() => { this.form = item.form ? JSON.parse(JSON.stringify(item.form.form)) : JSON.parse(JSON.stringify(item)); + this.form.commentUser = this.$store.getters.userInfo.userId + this.form.commentUserName = this.$store.getters.userInfo.userName this.data = item.form ? item.dataList : [] this.commentText = item.form ? item.commentText : '' }); diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step4.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step4.vue index da5b3a1e8..56f66d246 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step4.vue @@ -264,7 +264,10 @@ export default { this.drawerModal = true }, checkedRole (data) { - changeAssigneeNew({ + this.isSubmit = true + this.saveLoading = true + + changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 assignee: data[0].id, // 被委托人 @@ -272,11 +275,15 @@ export default { }).then(res => { if (res.success) { this.drawerModal = false + this.isSubmit = false + this.saveLoading = false this.$message.success('调整成功') this.processNum() this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) } else { this.$message.warning(res.message) + this.isSubmit = false + this.saveLoading = false } }) }, @@ -308,6 +315,7 @@ export default { }, handleSubmit() { this.isSubmit = true + this.saveLoading = true var json = this.json //这个就是原来的actionFlag,用来表示流程是驳回还是同意 json.actionFlag = 0 @@ -322,6 +330,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { @@ -362,6 +371,8 @@ export default { this.form.lawsName = data.lawsName || data.form.lawsName this.form.endTime = data.endTime || data.form.endTime this.form.cname = data.cname || data.form.cname + this.form.commentUser = data.commentUser || data.form.commentUser + this.form.commentUserName = data.commentUserName || data.form.commentUserName this.json = data this.data = data.info || data.data }).catch(e => { diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step5.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step5.vue index 010b78a48..411f36dc7 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step5.vue @@ -391,6 +391,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -405,6 +407,8 @@ export default { } else { this.$message.warning(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -464,6 +468,7 @@ export default { this.$message.warning("请输入征求意见稿"); } else { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.actionFlag = 0; json.commentText = this.commentText; @@ -479,6 +484,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } }, diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step6.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step6.vue index 6fa31cc4f..13240b30c 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step6.vue @@ -273,6 +273,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -287,6 +289,8 @@ export default { } else { this.$message.warning(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -351,7 +355,8 @@ export default { if (this.data.length < 1) { this.$message.warning("请输入征求意见搞"); } else { - this.isSubmit = true; + this.isSubmit = true + this.saveLoading = true var json = this.json; json.actionFlag = 0; json.commentText = this.commentText; @@ -365,6 +370,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } }, diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step7.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step7.vue index 1f00d6fbd..050108c52 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step7.vue @@ -273,6 +273,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -287,6 +289,8 @@ export default { } else { this.$message.warning(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -352,6 +356,7 @@ export default { this.$message.warning("请输入征求意见搞"); } else { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.actionFlag = 0; json.commentText = this.commentText; @@ -365,6 +370,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } }, diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step8.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step8.vue index 0ee3b2d5e..56564b82f 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step8.vue @@ -273,6 +273,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -287,6 +289,8 @@ export default { } else { this.$message.warning(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -352,6 +356,7 @@ export default { this.$message.warning("请输入征求意见搞"); } else { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.actionFlag = 0; json.commentText = this.commentText; @@ -365,6 +370,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } }, diff --git a/src/pages/processCenter/pages/creatProcess/zczqyj/step9.vue b/src/pages/processCenter/pages/creatProcess/zczqyj/step9.vue index 6db46a379..02f0c86ed 100644 --- a/src/pages/processCenter/pages/creatProcess/zczqyj/step9.vue +++ b/src/pages/processCenter/pages/creatProcess/zczqyj/step9.vue @@ -273,6 +273,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -287,6 +289,8 @@ export default { } else { this.$message.warning(res.message) } + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -351,7 +355,8 @@ export default { if (this.data.length < 1) { this.$message.warning("请输入征求意见搞"); } else { - this.isSubmit = true; + this.isSubmit = true + this.saveLoading = true var json = this.json; json.actionFlag = 0; json.commentText = this.commentText; @@ -365,6 +370,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } }, @@ -403,9 +409,9 @@ export default { this.form.endTime = data.endTime || data.form.endTime; this.form.cname = data.cname || data.form.cname; this.oldData = JSON.parse(JSON.stringify(data.info)) - var arr = [] + const arr = []; data.info.forEach(item => { - if (item.state != '3') { + if (item.state !== '3') { arr.push(item) } })