fix(流程任务): 优化代码

1.任务意见校验
2.部分字段增加注释
approve-sys
tony 3 years ago
parent 6cfec4ef7f
commit 5f3d4ca76c

@ -122,10 +122,11 @@ export default {
rules: {}, // rules: {}, //
variablesForm: {}, // variablesForm: {}, //
taskForm:{ taskForm:{
returnTaskShow: false, returnTaskShow: false, // 退
defaultTaskShow: true, defaultTaskShow: true, //
comment:"", // comment:"", //
procInsId: "", // procInsId: "", //
instanceId: "", //
deployId: "", // deployId: "", //
taskId: "" ,// taskId: "" ,//
procDefId: "", // procDefId: "", //
@ -141,6 +142,7 @@ export default {
}, },
created() { created() {
this.taskForm.procInsId = this.$route.query && this.$route.query.procInsId; this.taskForm.procInsId = this.$route.query && this.$route.query.procInsId;
this.taskForm.instanceId = this.$route.query && this.$route.query.procInsId;
// //
this.taskForm.deployId = this.$route.query && this.$route.query.deployId; this.taskForm.deployId = this.$route.query && this.$route.query.deployId;
this.taskForm.procDefId = this.$route.query && this.$route.query.procDefId; this.taskForm.procDefId = this.$route.query && this.$route.query.procDefId;
@ -215,15 +217,19 @@ export default {
getProcessVariables(taskId).then(res => { getProcessVariables(taskId).then(res => {
this.variables = res.data.variables; this.variables = res.data.variables;
this.variableOpen = true this.variableOpen = true
}) });
} }
}, },
/** 审批任务 */ /** 审批任务 */
handleComplete() { handleComplete() {
this.$refs["taskForm"].validate(valid => {
if (valid) {
complete(this.taskForm).then(response => { complete(this.taskForm).then(response => {
this.msgSuccess(response.msg); this.msgSuccess(response.msg);
this.goBack(); this.goBack();
}) });
}
});
}, },
/** 返回页面 */ /** 返回页面 */
goBack() { goBack() {
@ -286,10 +292,14 @@ export default {
}, },
/** 驳回任务 */ /** 驳回任务 */
handleReject() { handleReject() {
this.$refs["taskForm"].validate(valid => {
if (valid) {
rejectTask(this.taskForm).then(res => { rejectTask(this.taskForm).then(res => {
this.msgSuccess(res.msg); this.msgSuccess(res.msg);
this.goBack(); this.goBack();
}) });
}
});
}, },
/** 可退回任务列表 */ /** 可退回任务列表 */
handleReturn() { handleReturn() {
@ -307,10 +317,14 @@ export default {
}, },
/** 提交退回任务 */ /** 提交退回任务 */
submitReturnTask() { submitReturnTask() {
this.$refs["taskForm"].validate(valid => {
if (valid) {
returnTask(this.taskForm).then(res => { returnTask(this.taskForm).then(res => {
this.msgSuccess(res.msg); this.msgSuccess(res.msg);
this.goBack() this.goBack()
}) });
}
});
} }
} }
}; };

Loading…
Cancel
Save