Ver código fonte

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

余思翰 1 ano atrás
pai
commit
3d21e1944d

+ 552
- 195
oa-ui/src/views/flowable/form/scTable.vue
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


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

29
           </el-col>
29
           </el-col>
30
         </el-tab-pane> -->
30
         </el-tab-pane> -->
31
         <el-tab-pane label="表单信息" name="1">
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
             <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
34
             <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
35
               @click="handleComplete">审核通过
35
               @click="handleComplete">审核通过
36
             </el-button>
36
             </el-button>
37
             <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
37
             <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
38
             <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
38
             <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
39
           </el-row>
39
           </el-row>
40
-
41
         </el-tab-pane>
40
         </el-tab-pane>
42
         <!--流程流转记录-->
41
         <!--流程流转记录-->
43
         <el-tab-pane label="流转记录" name="2">
42
         <el-tab-pane label="流转记录" name="2">
159
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
158
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
160
 import { listUser } from "@/api/system/user";
159
 import { listUser } from "@/api/system/user";
161
 import ScTable from "../../../form/scTable.vue";
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
 export default {
164
 export default {
164
   name: "Record",
165
   name: "Record",
355
         this.tableForm = data;
356
         this.tableForm = data;
356
         this.tableForm.taskId = this.$route.query.taskId;
357
         this.tableForm.taskId = this.$route.query.taskId;
357
         this.tableForm.taskName = this.$route.query.taskName;
358
         this.tableForm.taskName = this.$route.query.taskName;
358
-        console.log(data);
359
       })
359
       })
360
     },
360
     },
361
     /** 加载审批任务弹框 */
361
     /** 加载审批任务弹框 */
366
       let formData = new FormData();
366
       let formData = new FormData();
367
       let form = JSON.stringify(this.tableForm);
367
       let form = JSON.stringify(this.tableForm);
368
       formData.append("form", form);
368
       formData.append("form", form);
369
+      debugger
369
       this.submitForm(formData);
370
       this.submitForm(formData);
370
     },
371
     },
371
     /** 用户审批任务 */
372
     /** 用户审批任务 */
419
     },
420
     },
420
     /** 驳回任务 */
421
     /** 驳回任务 */
421
     taskReject() {
422
     taskReject() {
423
+      if (this.taskForm.variables === null) {
424
+        this.taskForm.variables = {};
425
+      }
422
       this.$set(this.taskForm.variables, "pass", "驳回");
426
       this.$set(this.taskForm.variables, "pass", "驳回");
423
       complete(this.taskForm).then(response => {
427
       complete(this.taskForm).then(response => {
424
         this.$modal.msgSuccess(response.msg);
428
         this.$modal.msgSuccess(response.msg);
480
     submitForm(formData) {
484
     submitForm(formData) {
481
       modifyAssess(formData).then(res => {
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
       //排他网关,表达式,多节点情况下,审核通过,先将流程表达式pass变量存入,便于查找流程下一节点
490
       //排他网关,表达式,多节点情况下,审核通过,先将流程表达式pass变量存入,便于查找流程下一节点
487
       this.$set(this.taskForm.variables, "pass", "通过");
491
       this.$set(this.taskForm.variables, "pass", "通过");
488
       complete(this.taskForm).then(response => {
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
 </script>
524
 </script>

Carregando…
Cancelar
Salvar