1. 重复任务

main
赵培友 3 years ago
parent 73c9d59125
commit 3246a8a717
  1. 47
      src/views/plugin/workflow/mixins/ex-form.js

@ -245,15 +245,38 @@ export default {
}
startProcess(form)
.then((res) => {
console.log(res)
// let item = 1;
// if (item === 1) {
// this.visible = true;
// done();
// this.loading = false;
// } else {
// }
if (res.data.data === "类似任务已经发起过,是否要强制发起") {
this.$confirm(res.data.data + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
// 强制发起重复任务
startProcess({ ...form, forcestart: true })
.then((res) => {
if (isExForm === true) {
resolve(done);
} else {
this.$message.success("发起成功");
this.handleCloseTag(
"/plugin/workflow/process/workorder"
);
done();
this.loading = false;
}
})
.catch(() => {
done();
this.loading = false;
});
})
.catch(() => {
done();
this.loading = false;
return;
});
} else {
if (isExForm === true) {
resolve(done);
} else {
@ -262,6 +285,7 @@ export default {
done();
this.loading = false;
}
}
})
.catch(() => {
done();
@ -315,9 +339,10 @@ export default {
*/
handleCompleteTask(pass, variables) {
return new Promise((resolve, reject) => {
const { comment, copyUser, assignee, attachment } = this.$refs.examineForm.examineForm;
const { comment, copyUser, assignee, attachment } =
this.$refs.examineForm.examineForm;
// false隐藏 判断是否需要选择审批人
let flag = this.$refs.examineForm.flag
let flag = this.$refs.examineForm.flag;
if (flag && assignee === undefined) {
this.$message.error("请指定审批人!");
reject();

Loading…
Cancel
Save