Przeglądaj źródła

任务类型BUG

seimin 3 lat temu
rodzic
commit
a66eb115f8

+ 17 - 10
src/app/views/task-type-management/task-type-management.component.ts

@@ -883,7 +883,7 @@ export class TaskTypeManagementComponent implements OnInit {
883
       return;
883
       return;
884
     }
884
     }
885
     if (this.tabModalName == "ysgc") {
885
     if (this.tabModalName == "ysgc") {
886
-      if (!this.departmentStrategy.id) {
886
+      if (!this.departmentStrategy.idv) {
887
         that.showPromptModal(
887
         that.showPromptModal(
888
           that.add ? "新增" : "编辑",
888
           that.add ? "新增" : "编辑",
889
           false,
889
           false,
@@ -900,7 +900,8 @@ export class TaskTypeManagementComponent implements OnInit {
900
         );
900
         );
901
         return;
901
         return;
902
       }
902
       }
903
-      if (this.departmentStrategy.value == 2) {
903
+      let vv = this.departmentStrategy.idv.split('__')[1];
904
+      if (vv == 2) {
904
         if (!this.departmentIds && this.departments.length === 0) {
905
         if (!this.departmentIds && this.departments.length === 0) {
905
           that.showPromptModal(
906
           that.showPromptModal(
906
             that.add ? "新增" : "编辑",
907
             that.add ? "新增" : "编辑",
@@ -910,7 +911,7 @@ export class TaskTypeManagementComponent implements OnInit {
910
           return;
911
           return;
911
         }
912
         }
912
       }
913
       }
913
-      if (this.departmentStrategy.value == 5) {
914
+      if (vv == 5) {
914
         if (!this.departmentTypeIds) {
915
         if (!this.departmentTypeIds) {
915
           that.showPromptModal(
916
           that.showPromptModal(
916
             that.add ? "新增" : "编辑",
917
             that.add ? "新增" : "编辑",
@@ -920,7 +921,7 @@ export class TaskTypeManagementComponent implements OnInit {
920
           return;
921
           return;
921
         }
922
         }
922
       }
923
       }
923
-      if (this.departmentStrategy.value == 3) {
924
+      if (vv == 3) {
924
         if (!this.departmentIds && this.departments.length === 0) {
925
         if (!this.departmentIds && this.departments.length === 0) {
925
           that.showPromptModal(
926
           that.showPromptModal(
926
             that.add ? "新增" : "编辑",
927
             that.add ? "新增" : "编辑",
@@ -984,9 +985,9 @@ export class TaskTypeManagementComponent implements OnInit {
984
       };
985
       };
985
     }
986
     }
986
     this.taskData.taskType["specialCloseButton"] = this.specialCloseButton;
987
     this.taskData.taskType["specialCloseButton"] = this.specialCloseButton;
987
-    if (this.departmentStrategy.id) {
988
+    if (this.departmentStrategy.idv) {
988
       this.taskData.taskType.carryingCourses[this.indexs].departmentStrategy = {
989
       this.taskData.taskType.carryingCourses[this.indexs].departmentStrategy = {
989
-        id: this.departmentStrategy.id,
990
+        id: this.departmentStrategy.idv.split('__')[0],
990
       };
991
       };
991
     }
992
     }
992
     if (!this.departments || !this.departments.length) {
993
     if (!this.departments || !this.departments.length) {
@@ -1151,7 +1152,7 @@ export class TaskTypeManagementComponent implements OnInit {
1151
       taskType: {},
1152
       taskType: {},
1152
     };
1153
     };
1153
     this.checkoutMethod.id = null;
1154
     this.checkoutMethod.id = null;
1154
-    this.departmentStrategy.id = null;
1155
+    this.departmentStrategy.idv = null;
1155
     this.departmentIds = "";
1156
     this.departmentIds = "";
1156
     this.departmentTypeIds = "";
1157
     this.departmentTypeIds = "";
1157
     this.allAssociation; //关联类型
1158
     this.allAssociation; //关联类型
@@ -1927,9 +1928,15 @@ export class TaskTypeManagementComponent implements OnInit {
1927
     console.log(e, "-----------------------1111");
1928
     console.log(e, "-----------------------1111");
1928
     let arr = e.split("__");
1929
     let arr = e.split("__");
1929
     if (doing === "clear") {
1930
     if (doing === "clear") {
1930
-      data.idv = e;
1931
-      data.id = arr[0] - 0;
1932
-      data.value = arr[1] - 0;
1931
+      if(e){
1932
+        data.idv = e;
1933
+        data.id = arr[0] - 0;
1934
+        data.value = arr[1] - 0;
1935
+      }else{
1936
+        data.idv = null;
1937
+        data.id = null;
1938
+        data.value = null;
1939
+      }
1933
     }
1940
     }
1934
     let value = arr[1];
1941
     let value = arr[1];
1935
     if (value) {
1942
     if (value) {