|
|
|
@ -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()
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|