|
@@ -103,8 +103,11 @@
|
103
|
103
|
</span>
|
104
|
104
|
</el-dialog>
|
105
|
105
|
<!--驳回流程-->
|
106
|
|
- <el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="40%" append-to-body>
|
107
|
|
- <el-form ref="taskForm" :model="taskForm" label-width="80px">
|
|
106
|
+ <el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="60%" append-to-body>
|
|
107
|
+ <el-form ref="taskForm" :model="taskForm">
|
|
108
|
+ <el-form-item prop="targetKey">
|
|
109
|
+ <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
|
|
110
|
+ </el-form-item>
|
108
|
111
|
<el-form-item label="驳回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
109
|
112
|
<el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
|
110
|
113
|
</el-form-item>
|
|
@@ -398,17 +401,62 @@ export default {
|
398
|
401
|
handleReject() {
|
399
|
402
|
this.rejectOpen = true;
|
400
|
403
|
this.rejectTitle = "驳回流程";
|
401
|
|
- },
|
402
|
|
- /** 驳回任务 */
|
403
|
|
- taskReject() {
|
404
|
404
|
if (this.taskForm.variables === null) {
|
405
|
405
|
this.taskForm.variables = {};
|
406
|
406
|
}
|
|
407
|
+ //排他网关,表达式,多节点情况下,审核通过,先将流程表达式pass变量存入,便于查找流程下一节点
|
407
|
408
|
this.$set(this.taskForm.variables, "pass", "驳回");
|
408
|
409
|
complete(this.taskForm).then(response => {
|
409
|
|
- this.$modal.msgSuccess(response.msg);
|
410
|
|
- this.goBack();
|
|
410
|
+ const params = { taskId: this.taskForm.taskId }
|
|
411
|
+ // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况(todo已在上一步实现)
|
|
412
|
+ getNextFlowNode(params).then(res => {
|
|
413
|
+ const data = res.data;
|
|
414
|
+ if (data) {
|
|
415
|
+ if (data.dataType === 'dynamic') {
|
|
416
|
+ if (data.type === 'assignee') { // 指定人员
|
|
417
|
+ this.checkSendUser = true;
|
|
418
|
+ this.checkType = "single";
|
|
419
|
+ } else if (data.type === 'candidateUsers') { // 候选人员(多个)
|
|
420
|
+ this.checkSendUser = true;
|
|
421
|
+ this.checkType = "multiple";
|
|
422
|
+ } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
|
|
423
|
+ this.checkSendRole = true;
|
|
424
|
+ } else { // 会签
|
|
425
|
+ // 流程设计指定的 elementVariable 作为会签人员列表
|
|
426
|
+ this.multiInstanceVars = data.vars;
|
|
427
|
+ this.checkSendUser = true;
|
|
428
|
+ this.checkType = "multiple";
|
|
429
|
+ }
|
|
430
|
+ }
|
|
431
|
+ }
|
|
432
|
+ })
|
411
|
433
|
});
|
|
434
|
+ },
|
|
435
|
+ /** 驳回任务 */
|
|
436
|
+ taskReject() {
|
|
437
|
+ if (!this.taskForm.variables && this.checkSendUser) {
|
|
438
|
+ this.$modal.msgError("请选择流程接收人员!");
|
|
439
|
+ return;
|
|
440
|
+ }
|
|
441
|
+ this.$delete(this.taskForm.variables, "pass");
|
|
442
|
+ if (this.taskForm && this.formKeyExist) {
|
|
443
|
+ // 表单是否禁用
|
|
444
|
+ this.taskForm.formData.formData.disabled = true;
|
|
445
|
+ // 是否显示按钮
|
|
446
|
+ this.taskForm.formData.formData.formBtns = false;
|
|
447
|
+ this.taskForm.variables = Object.assign({}, this.taskForm.variables, this.taskForm.formData.valData);
|
|
448
|
+ this.taskForm.variables.variables = this.taskForm.formData.formData;
|
|
449
|
+ complete(this.taskForm).then(response => {
|
|
450
|
+ this.$modal.msgSuccess(response.msg);
|
|
451
|
+ this.goBack();
|
|
452
|
+ });
|
|
453
|
+ } else {
|
|
454
|
+ // 流程设计人员类型配置为固定人员接收任务时,直接提交任务到下一步
|
|
455
|
+ complete(this.taskForm).then(response => {
|
|
456
|
+ this.$modal.msgSuccess(response.msg);
|
|
457
|
+ this.goBack();
|
|
458
|
+ });
|
|
459
|
+ }
|
412
|
460
|
// this.$refs["taskForm"].validate(valid => {
|
413
|
461
|
// if (valid) {
|
414
|
462
|
// rejectTask(this.taskForm).then(res => {
|