Browse Source

新增根据节点控制人员的可写

余思翰 1 year ago
parent
commit
3d21e1944d
2 changed files with 588 additions and 228 deletions
  1. 552
    195
      oa-ui/src/views/flowable/form/scTable.vue
  2. 36
    33
      oa-ui/src/views/flowable/task/todo/detail/index.vue

+ 552
- 195
oa-ui/src/views/flowable/form/scTable.vue
File diff suppressed because it is too large
View File


+ 36
- 33
oa-ui/src/views/flowable/task/todo/detail/index.vue View File

@@ -29,15 +29,14 @@
29 29
           </el-col>
30 30
         </el-tab-pane> -->
31 31
         <el-tab-pane label="表单信息" name="1">
32
-          <ScTable :tableForm="tableForm"></ScTable>
33
-          <el-row type="flex" justify="center">
32
+          <ScTable :tableForm="tableForm" @submit="handleComplete"></ScTable>
33
+          <el-row type="flex" justify="center" v-if="taskName != '员工修改'">
34 34
             <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
35 35
               @click="handleComplete">审核通过
36 36
             </el-button>
37 37
             <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
38 38
             <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
39 39
           </el-row>
40
-
41 40
         </el-tab-pane>
42 41
         <!--流程流转记录-->
43 42
         <el-tab-pane label="流转记录" name="2">
@@ -159,6 +158,8 @@ import flow from '@/views/flowable/task/todo/detail/flow'
159 158
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
160 159
 import { listUser } from "@/api/system/user";
161 160
 import ScTable from "../../../form/scTable.vue";
161
+import { submitAssess } from '@/api/oa/assess/assess.js'
162
+import { MessageBox } from 'element-ui'
162 163
 
163 164
 export default {
164 165
   name: "Record",
@@ -355,7 +356,6 @@ export default {
355 356
         this.tableForm = data;
356 357
         this.tableForm.taskId = this.$route.query.taskId;
357 358
         this.tableForm.taskName = this.$route.query.taskName;
358
-        console.log(data);
359 359
       })
360 360
     },
361 361
     /** 加载审批任务弹框 */
@@ -366,6 +366,7 @@ export default {
366 366
       let formData = new FormData();
367 367
       let form = JSON.stringify(this.tableForm);
368 368
       formData.append("form", form);
369
+      debugger
369 370
       this.submitForm(formData);
370 371
     },
371 372
     /** 用户审批任务 */
@@ -419,6 +420,9 @@ export default {
419 420
     },
420 421
     /** 驳回任务 */
421 422
     taskReject() {
423
+      if (this.taskForm.variables === null) {
424
+        this.taskForm.variables = {};
425
+      }
422 426
       this.$set(this.taskForm.variables, "pass", "驳回");
423 427
       complete(this.taskForm).then(response => {
424 428
         this.$modal.msgSuccess(response.msg);
@@ -480,42 +484,41 @@ export default {
480 484
     submitForm(formData) {
481 485
       modifyAssess(formData).then(res => {
482 486
       });
483
-      if(this.taskForm.variables === null){
484
-        this.taskForm.variables= {};
487
+      if (this.taskForm.variables === null) {
488
+        this.taskForm.variables = {};
485 489
       }
486 490
       //排他网关,表达式,多节点情况下,审核通过,先将流程表达式pass变量存入,便于查找流程下一节点
487 491
       this.$set(this.taskForm.variables, "pass", "通过");
488 492
       complete(this.taskForm).then(response => {
489
-      });
490
-      // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况(todo已在上一步实现)
491
-      const params = { taskId: this.taskForm.taskId }
492
-      getNextFlowNode(params).then(res => {
493
-        const data = res.data;
494
-        debugger
495
-        this.taskForm.formData = formData;
496
-        if (data) {
497
-          if (data.dataType === 'dynamic') {
498
-            if (data.type === 'assignee') { // 指定人员
499
-              this.checkSendUser = true;
500
-              this.checkType = "single";
501
-            } else if (data.type === 'candidateUsers') {  // 候选人员(多个)
502
-              this.checkSendUser = true;
503
-              this.checkType = "multiple";
504
-            } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
505
-              this.checkSendRole = true;
506
-            } else { // 会签
507
-              // 流程设计指定的 elementVariable 作为会签人员列表
508
-              this.multiInstanceVars = data.vars;
509
-              this.checkSendUser = true;
510
-              this.checkType = "multiple";
493
+        const params = { taskId: this.taskForm.taskId }
494
+        // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况(todo已在上一步实现)
495
+        getNextFlowNode(params).then(res => {
496
+          const data = res.data;
497
+          debugger
498
+          this.taskForm.formData = formData;
499
+          if (data) {
500
+            if (data.dataType === 'dynamic') {
501
+              if (data.type === 'assignee') { // 指定人员
502
+                this.checkSendUser = true;
503
+                this.checkType = "single";
504
+              } else if (data.type === 'candidateUsers') {  // 候选人员(多个)
505
+                this.checkSendUser = true;
506
+                this.checkType = "multiple";
507
+              } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
508
+                this.checkSendRole = true;
509
+              } else { // 会签
510
+                // 流程设计指定的 elementVariable 作为会签人员列表
511
+                this.multiInstanceVars = data.vars;
512
+                this.checkSendUser = true;
513
+                this.checkType = "multiple";
514
+              }
511 515
             }
512 516
           }
513
-        }
514
-        this.completeOpen = true;
515
-        this.completeTitle = "流程审批";
516
-      })
517
+          this.completeOpen = true;
518
+          this.completeTitle = "流程审批";
519
+        })
520
+      });
517 521
     },
518
-
519 522
   },
520 523
 };
521 524
 </script>

Loading…
Cancel
Save