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

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

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

Loading…
Cancel
Save