瀏覽代碼

事件操作

seimin 4 月之前
父節點
當前提交
c8fa8a5b8d

+ 9 - 0
src/app/components/incidentManagement/incident-create/incident-create.component.ts

@@ -129,6 +129,14 @@ export class IncidentCreateComponent implements OnInit {
129
       });
129
       });
130
   }
130
   }
131
 
131
 
132
+  // 判断工单当前状态
133
+  compareStateValue(incidentData){
134
+    if(incidentData.state.value !== 'pending' || incidentData.state.value !== 'handler' || incidentData.state.value !== 'reassign' || incidentData.state.value !== 'close'){
135
+      this.msg.warning('工单状态异常!请刷新页面再重试');
136
+      this.newOrderCancel();
137
+    }
138
+  }
139
+
132
   // 事件详情
140
   // 事件详情
133
   incidentData:any = {};
141
   incidentData:any = {};
134
   getDetail(){
142
   getDetail(){
@@ -141,6 +149,7 @@ export class IncidentCreateComponent implements OnInit {
141
         this.msg.remove(this.maskFlag);
149
         this.msg.remove(this.maskFlag);
142
         this.maskFlag = false;
150
         this.maskFlag = false;
143
         this.incidentData = result.data || {};
151
         this.incidentData = result.data || {};
152
+        this.compareStateValue(this.incidentData);
144
         this.edit(this.incidentData);
153
         this.edit(this.incidentData);
145
       });
154
       });
146
   }
155
   }

+ 10 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.component.ts

@@ -103,6 +103,14 @@ export class IncidentHandleComponent implements OnInit {
103
       });
103
       });
104
   }
104
   }
105
 
105
 
106
+  // 判断工单当前状态
107
+  compareStateValue(incidentData){
108
+    if(incidentData.state.value !== 'handler'){
109
+      this.message.warning('工单状态异常!请刷新页面再重试');
110
+      this.hideModal();
111
+    }
112
+  }
113
+
106
   // 获取详情数据
114
   // 获取详情数据
107
   incidentData:any;
115
   incidentData:any;
108
   maskFlag:any = false;
116
   maskFlag:any = false;
@@ -117,6 +125,8 @@ export class IncidentHandleComponent implements OnInit {
117
         this.maskFlag = false;
125
         this.maskFlag = false;
118
         this.incidentData = result.data || {};
126
         this.incidentData = result.data || {};
119
 
127
 
128
+        this.compareStateValue(this.incidentData);
129
+
120
         this.getDictionaryList();
130
         this.getDictionaryList();
121
         this.getHospitalConfig();
131
         this.getHospitalConfig();
122
       });
132
       });

+ 9 - 0
src/app/components/incidentManagement/incident-postpone/incident-postpone.component.ts

@@ -74,6 +74,14 @@ export class IncidentPostponeComponent implements OnInit {
74
 		})
74
 		})
75
   }
75
   }
76
 
76
 
77
+  // 判断工单当前状态
78
+  compareStateValue(incidentData){
79
+    if(incidentData.state.value !== 'handler'){
80
+      this.message.warning('工单状态异常!请刷新页面再重试');
81
+      this.hideModal();
82
+    }
83
+  }
84
+
77
   // 操作权限
85
   // 操作权限
78
   incidentData:any = {};
86
   incidentData:any = {};
79
   getDetail(){
87
   getDetail(){
@@ -86,6 +94,7 @@ export class IncidentPostponeComponent implements OnInit {
86
         this.message.remove(this.maskFlag);
94
         this.message.remove(this.maskFlag);
87
         this.maskFlag = false;
95
         this.maskFlag = false;
88
         this.incidentData = result.data || {};
96
         this.incidentData = result.data || {};
97
+        this.compareStateValue(this.incidentData);
89
       });
98
       });
90
   }
99
   }
91
 
100
 

+ 10 - 0
src/app/components/incidentManagement/incident-substitution/incident-substitution.component.ts

@@ -61,6 +61,14 @@ export class IncidentSubstitutionComponent implements OnInit {
61
     this.activeTabValue = item.value;
61
     this.activeTabValue = item.value;
62
   }
62
   }
63
 
63
 
64
+  // 判断工单当前状态
65
+  compareStateValue(incidentData){
66
+    if(incidentData.state.value !== 'pending' && incidentData.state.value !== 'handler' && incidentData.state.value !== 'reassign'){
67
+      this.message.warning('工单状态异常!请刷新页面再重试');
68
+      this.hideModal();
69
+    }
70
+  }
71
+
64
   // 操作权限
72
   // 操作权限
65
   incidentData:any = {};
73
   incidentData:any = {};
66
   maskFlag:any = false;
74
   maskFlag:any = false;
@@ -75,6 +83,8 @@ export class IncidentSubstitutionComponent implements OnInit {
75
         this.maskFlag = false;
83
         this.maskFlag = false;
76
         this.incidentData = result.data || {};
84
         this.incidentData = result.data || {};
77
 
85
 
86
+        this.compareStateValue(this.incidentData);
87
+
78
         // 转派
88
         // 转派
79
         if(this.incidentData.state.value == 'handler' && this.incidentData.handlingPersonnelUser && this.incidentData.handlingPersonnelUser.id == this.tool.getCurrentUserId() && !this.coopBtns.assign && this.coopBtns.transfer){
89
         if(this.incidentData.state.value == 'handler' && this.incidentData.handlingPersonnelUser && this.incidentData.handlingPersonnelUser.id == this.tool.getCurrentUserId() && !this.coopBtns.assign && this.coopBtns.transfer){
80
           this.tabs.splice(0, 0, {id: 1, name: '转派', value: 'redeploy', num: ''});
90
           this.tabs.splice(0, 0, {id: 1, name: '转派', value: 'redeploy', num: ''});

+ 9 - 0
src/app/components/incidentManagement/incident-visit/incident-visit.component.ts

@@ -82,6 +82,14 @@ export class IncidentVisitComponent implements OnInit {
82
     });
82
     });
83
   }
83
   }
84
 
84
 
85
+  // 判断工单当前状态
86
+  compareStateValue(incidentData){
87
+    if(incidentData.state.value !== 'close'){
88
+      this.message.warning('工单状态异常!请刷新页面再重试');
89
+      this.hideModal();
90
+    }
91
+  }
92
+
85
   // 事件详情
93
   // 事件详情
86
   incidentData:any = {};
94
   incidentData:any = {};
87
   getDetail(){
95
   getDetail(){
@@ -94,6 +102,7 @@ export class IncidentVisitComponent implements OnInit {
94
         this.message.remove(this.maskFlag);
102
         this.message.remove(this.maskFlag);
95
         this.maskFlag = false;
103
         this.maskFlag = false;
96
         this.incidentData = result.data || {};
104
         this.incidentData = result.data || {};
105
+        this.compareStateValue(this.incidentData);
97
       });
106
       });
98
   }
107
   }
99
 
108