seimin 1 year ago
parent
commit
0d84360ccd
3 changed files with 128 additions and 38 deletions
  1. 8 8
      src/components/showModel/showModel.vue
  2. 60 15
      src/views/IncidentNewList.vue
  3. 60 15
      src/views/incidentList.vue

+ 8 - 8
src/components/showModel/showModel.vue

@@ -39,7 +39,7 @@
39
             @change="changeGroup($event)"
39
             @change="changeGroup($event)"
40
             style="margin-top:0.2rem;"
40
             style="margin-top:0.2rem;"
41
           ></cube-select>
41
           ></cube-select>
42
-          <cube-switch v-model="isRadioUser" style="margin-top:0.2rem;" @input="changeRadioUser" v-if="isShowRadioUser">是否指派到人</cube-switch>
42
+          <cube-switch v-model="isRadioUser" style="margin-top:0.2rem;" @input="changeRadioUser">是否指派到人</cube-switch>
43
           <cube-select
43
           <cube-select
44
             v-model="selectUserId"
44
             v-model="selectUserId"
45
             :options="selectDataUser"
45
             :options="selectDataUser"
@@ -441,13 +441,13 @@ export default {
441
       this.getZpBranch();
441
       this.getZpBranch();
442
       // this.getZpGroup();
442
       // this.getZpGroup();
443
       // this.getZpUser();
443
       // this.getZpUser();
444
-      if(this.dataObj.state.id == 1544){
445
-        this.isShowRadioUser = false;
446
-        this.isRadioUser = true;
447
-      }else{
448
-        this.isShowRadioUser = true;
449
-        this.isRadioUser = false;
450
-      }
444
+      // if(this.dataObj.state.id == 1544){
445
+      //   this.isShowRadioUser = false;
446
+      //   this.isRadioUser = true;
447
+      // }else{
448
+      //   this.isShowRadioUser = true;
449
+      //   this.isRadioUser = false;
450
+      // }
451
     }
451
     }
452
     if (this.textName === "textarea") {
452
     if (this.textName === "textarea") {
453
       this.getLogs();
453
       this.getLogs();

+ 60 - 15
src/views/IncidentNewList.vue

@@ -444,23 +444,68 @@ export default {
444
       });
444
       });
445
       toast.show();
445
       toast.show();
446
       let postData = {};
446
       let postData = {};
447
-      if(isRadioUser){
448
-        postData = {
449
-          assginee: selectUserId,
450
-          incId: this.modelsData.assignee ? this.modelsData.id : undefined,
451
-          handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
452
-          incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
453
-          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
454
-        };
455
-      }else{
456
-        postData = {
457
-          group: selectGroupId,
458
-          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
459
-        };
460
-        console.log(postData)
447
+      if(selectUserId){
448
+          // 派人
449
+          // 接单
450
+          if(this.modelsData.state.value == 'pending'){
451
+              postData = {
452
+                  type: 'receiveAssginee',
453
+                  userId: selectUserId,
454
+                  taskId: this.modelsData.taskId,
455
+                  incidentId: this.modelsData.id,
456
+              }
457
+          }
458
+          // 处理中
459
+          if(this.modelsData.state.value == 'handler'){
460
+              postData = {
461
+                  type: 'handlerAssginee',
462
+                  userId: selectUserId,
463
+                  taskId: this.modelsData.taskId,
464
+                  incidentId: this.modelsData.id,
465
+              }
466
+          }
467
+      } else if(selectGroupId){
468
+          // 派组
469
+          // 接单,派组
470
+          if(this.modelsData.state.value == 'pending'){
471
+              postData = {
472
+                  type: 'receiveGroup',
473
+                  groupId: selectGroupId,
474
+                  taskId: this.modelsData.taskId,
475
+                  activityId: 'usertask5',
476
+                  executionId: this.modelsData.processInstanceId,
477
+                  incidentId: this.modelsData.id,
478
+              }
479
+          }
480
+          // 处理中
481
+          if(this.modelsData.state.value == 'handler'){
482
+              postData = {
483
+                  type: 'handlerGroup',
484
+                  groupId: selectGroupId,
485
+                  taskId: this.modelsData.taskId,
486
+                  activityId: 'usertask5',
487
+                  executionId: this.modelsData.processInstanceId,
488
+                  incidentId: this.modelsData.id,
489
+              }
490
+          }
461
       }
491
       }
492
+      // if(isRadioUser){
493
+      //   postData = {
494
+      //     assginee: selectUserId,
495
+      //     incId: this.modelsData.assignee ? this.modelsData.id : undefined,
496
+      //     handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
497
+      //     incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
498
+      //     taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
499
+      //   };
500
+      // }else{
501
+      //   postData = {
502
+      //     group: selectGroupId,
503
+      //     taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
504
+      //   };
505
+      //   console.log(postData)
506
+      // }
462
       this.$http
507
       this.$http
463
-        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, postData)
508
+        .post("service/bpm/bpm/delegateTask2", postData)
464
         .then(res => {
509
         .then(res => {
465
           toast.hide();
510
           toast.hide();
466
           this.models.disjunctor = false;
511
           this.models.disjunctor = false;

+ 60 - 15
src/views/incidentList.vue

@@ -418,23 +418,68 @@ export default {
418
       });
418
       });
419
       toast.show();
419
       toast.show();
420
       let postData = {};
420
       let postData = {};
421
-      if(isRadioUser){
422
-        postData = {
423
-          assginee: selectUserId,
424
-          incId: this.modelsData.assignee ? this.modelsData.id : undefined,
425
-          handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
426
-          incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
427
-          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
428
-        };
429
-      }else{
430
-        postData = {
431
-          group: selectGroupId,
432
-          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
433
-        };
434
-        console.log(postData)
421
+      if(selectUserId){
422
+          // 派人
423
+          // 接单
424
+          if(this.modelsData.state.value == 'pending'){
425
+              postData = {
426
+                  type: 'receiveAssginee',
427
+                  userId: selectUserId,
428
+                  taskId: this.modelsData.taskId,
429
+                  incidentId: this.modelsData.id,
430
+              }
431
+          }
432
+          // 处理中
433
+          if(this.modelsData.state.value == 'handler'){
434
+              postData = {
435
+                  type: 'handlerAssginee',
436
+                  userId: selectUserId,
437
+                  taskId: this.modelsData.taskId,
438
+                  incidentId: this.modelsData.id,
439
+              }
440
+          }
441
+      } else if(selectGroupId){
442
+          // 派组
443
+          // 接单,派组
444
+          if(this.modelsData.state.value == 'pending'){
445
+              postData = {
446
+                  type: 'receiveGroup',
447
+                  groupId: selectGroupId,
448
+                  taskId: this.modelsData.taskId,
449
+                  activityId: 'usertask5',
450
+                  executionId: this.modelsData.processInstanceId,
451
+                  incidentId: this.modelsData.id,
452
+              }
453
+          }
454
+          // 处理中
455
+          if(this.modelsData.state.value == 'handler'){
456
+              postData = {
457
+                  type: 'handlerGroup',
458
+                  groupId: selectGroupId,
459
+                  taskId: this.modelsData.taskId,
460
+                  activityId: 'usertask5',
461
+                  executionId: this.modelsData.processInstanceId,
462
+                  incidentId: this.modelsData.id,
463
+              }
464
+          }
435
       }
465
       }
466
+      // if(isRadioUser){
467
+      //   postData = {
468
+      //     assginee: selectUserId,
469
+      //     incId: this.modelsData.assignee ? this.modelsData.id : undefined,
470
+      //     handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
471
+      //     incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
472
+      //     taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
473
+      //   };
474
+      // }else{
475
+      //   postData = {
476
+      //     group: selectGroupId,
477
+      //     taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
478
+      //   };
479
+      //   console.log(postData)
480
+      // }
436
       this.$http
481
       this.$http
437
-        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, postData)
482
+        .post("service/bpm/bpm/delegateTask2", postData)
438
         .then(res => {
483
         .then(res => {
439
           toast.hide();
484
           toast.hide();
440
           this.models.disjunctor = false;
485
           this.models.disjunctor = false;