seimin 8 mesi fa
parent
commit
0e0245326e
63 ha cambiato i file con 5070 aggiunte e 458 eliminazioni
  1. 4 0
      src/app/components/configurationCenter/configuration-category/configuration-category.component.html
  2. 2 1
      src/app/components/configurationCenter/configuration-category/configuration-category.component.ts
  3. 15 14
      src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts
  4. 13 1
      src/app/components/configurationCenter/configuration-message/configuration-message.component.html
  5. 8 0
      src/app/components/configurationCenter/configuration-message/configuration-message.component.less
  6. 70 51
      src/app/components/configurationCenter/configuration-message/configuration-message.component.ts
  7. 2 2
      src/app/components/configurationCenter/configuration-priority/configuration-priority.component.html
  8. 59 0
      src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.html
  9. 54 0
      src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.less
  10. 60 0
      src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts
  11. 109 0
      src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.html
  12. 54 0
      src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.less
  13. 60 0
      src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts
  14. 105 0
      src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.html
  15. 338 0
      src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.less
  16. 218 0
      src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.ts
  17. 91 0
      src/app/components/incidentManagement/incident-handle/incident-handle.component.html
  18. 183 0
      src/app/components/incidentManagement/incident-handle/incident-handle.component.less
  19. 234 0
      src/app/components/incidentManagement/incident-handle/incident-handle.component.ts
  20. 31 0
      src/app/components/incidentManagement/incident-handle/incident-handle.module.ts
  21. 65 0
      src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.html
  22. 303 0
      src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.less
  23. 189 0
      src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.ts
  24. 11 0
      src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.html
  25. 309 0
      src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.less
  26. 30 0
      src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.ts
  27. 65 0
      src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.html
  28. 303 0
      src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.less
  29. 190 0
      src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.ts
  30. 1 0
      src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.html
  31. 0 0
      src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.less
  32. 24 0
      src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.ts
  33. 31 0
      src/app/components/incidentManagement/incident-substitution/incident-substitution.component.html
  34. 161 0
      src/app/components/incidentManagement/incident-substitution/incident-substitution.component.less
  35. 193 0
      src/app/components/incidentManagement/incident-substitution/incident-substitution.component.ts
  36. 28 0
      src/app/components/incidentManagement/incident-substitution/incident-substitution.module.ts
  37. 73 0
      src/app/components/knowledge-look/knowledge-look.component.html
  38. 343 0
      src/app/components/knowledge-look/knowledge-look.component.less
  39. 118 0
      src/app/components/knowledge-look/knowledge-look.component.ts
  40. 20 0
      src/app/components/knowledge-look/knowledge-look.module.ts
  41. 15 0
      src/app/pipes/strip-html.pipe..ts
  42. 38 2
      src/app/services/main.service.ts
  43. 40 2
      src/app/services/tool.service.ts
  44. 3 2
      src/app/share/assets-product-management-prompt-modal/assets-product-management-prompt-modal.component.ts
  45. 2 4
      src/app/share/image-viewer/image-viewer.component.html
  46. 2 6
      src/app/share/image-viewer/image-viewer.component.less
  47. 11 3
      src/app/share/image-viewer/image-viewer.component.ts
  48. 3 0
      src/app/share/share.module.ts
  49. 3 2
      src/app/views/assets-consumable/assets-consumable.component.ts
  50. 3 2
      src/app/views/assets-info/assets-info.component.ts
  51. 75 35
      src/app/views/incident-management/incident-management.component.html
  52. 43 97
      src/app/views/incident-management/incident-management.component.less
  53. 378 193
      src/app/views/incident-management/incident-management.component.ts
  54. 6 2
      src/app/views/incident-management/incident-management.module.ts
  55. 31 30
      src/app/views/repository-manage-add/repository-manage-add.component.ts
  56. 164 3
      src/assets/iconfont/demo_index.html
  57. 31 3
      src/assets/iconfont/iconfont.css
  58. 1 1
      src/assets/iconfont/iconfont.js
  59. 49 0
      src/assets/iconfont/iconfont.json
  60. BIN
      src/assets/iconfont/iconfont.ttf
  61. BIN
      src/assets/iconfont/iconfont.woff
  62. BIN
      src/assets/iconfont/iconfont.woff2
  63. 5 2
      src/common.less

+ 4 - 0
src/app/components/configurationCenter/configuration-category/configuration-category.component.html

@@ -210,3 +210,7 @@
210 210
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
211 211
   [info]="promptInfo">
212 212
 </app-prompt-modal>
213
+
214
+<!-- 删除模态框 -->
215
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
216
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>

+ 2 - 1
src/app/components/configurationCenter/configuration-category/configuration-category.component.ts

@@ -70,7 +70,8 @@ export class ConfigurationCategoryComponent implements OnInit {
70 70
     setTimeout(() => {
71 71
       this.tableCategoryHeight = document.querySelector('#categoryTable').clientHeight - 8 - document.querySelector('#categoryTable .thead').clientHeight;
72 72
     }, 0)
73
-    if(this.currentHospital.type && this.currentHospital.type.value === '6'){
73
+    let { hospital, type } = this.tool.getHospitalOrDuty();
74
+    if(type === 'duty'){
74 75
       // 是责任部门
75 76
       let flag = this.hospitalConfigList.some(v => v.id === 1);
76 77
       !flag && this.hospitalConfigList.unshift({ id: 1, name: '部门设置',});

+ 15 - 14
src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts

@@ -34,7 +34,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
34 34
 	malfunctionData:any = [];
35 35
 	allUserGroup:any = [];
36 36
 	userData:any = [];
37
-	
37
+
38 38
   formatterMinute = (value: number) => `${value} 分钟`;
39 39
   parserMinute = (value: string) => value.replace(' 分钟', '');
40 40
 
@@ -47,7 +47,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
47 47
 			// this.isDeptLoading = true;
48 48
 			// this.getUser(e);
49 49
 		});
50
-		
50
+
51 51
     // 优先级
52 52
     setTimeout(() => {
53 53
       this.tablePriorityHeight = document.querySelector('#priorityTable').clientHeight - document.querySelector('#priorityTable .list-template__top').clientHeight - 8 - document.querySelector('#priorityTable .thead').clientHeight;
@@ -75,15 +75,15 @@ export class ConfigurationDeptUserComponent implements OnInit {
75 75
   hidePriorityModal() {
76 76
     this.modalPriority = false;
77 77
   }
78
-	
78
+
79 79
 	changeInp(e) {
80 80
 	  this.searchParentDeptSubject.next(e);
81 81
 	}
82
-	
82
+
83 83
 	changeInp3(e){
84 84
 		this.searchParentUserSubject.next(e);
85 85
 	}
86
-	
86
+
87 87
 	// 获取所有科室
88 88
 	getDeparts(dept) {
89 89
 	  var that = this;
@@ -104,17 +104,18 @@ export class ConfigurationDeptUserComponent implements OnInit {
104 104
 				},100)
105 105
 		  });
106 106
 	}
107
-	
107
+
108 108
 	// 获取故障现象数据
109 109
 	getMalfunction(){
110
-		if(!this.currentHospital.type || (this.currentHospital.type && this.currentHospital.type.value !== '6')){
110
+    let { hospital, type } = this.tool.getHospitalOrDuty();
111
+		if(type === 'hospital' || type === 'department'){
111 112
 		  this.malfunctionData = [];
112 113
 		  return;
113 114
 		};
114 115
 		let postData = {
115 116
 			hasThird: 'true',
116 117
 		  category: {
117
-		    dutyIds: this.currentHospital.type.value === '6' ? this.currentHospital.id.toString()  : undefined,
118
+		    dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
118 119
 		  },
119 120
 		};
120 121
 		this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
@@ -133,13 +134,13 @@ export class ConfigurationDeptUserComponent implements OnInit {
133 134
 			}
134 135
 		})
135 136
 	}
136
-	
137
+
137 138
 	// 选择处理组
138 139
 	changeGroup(e){
139 140
 		this.validatePriorityForm.controls.handleUser.setValue(null)
140 141
 		this.getUser(e)
141 142
 	}
142
-	
143
+
143 144
 	// 获取处理组
144 145
 	getGrop(){
145 146
 		let groupData = {
@@ -156,7 +157,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
156 157
 		    this.allUserGroup = data.list;
157 158
 		  });
158 159
 	}
159
-	
160
+
160 161
 	// 获取处理人
161 162
 	getUser(groupId){
162 163
 		let data = {
@@ -177,7 +178,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
177 178
 				},100)
178 179
 			});
179 180
 	}
180
-	
181
+
181 182
   // 编辑
182 183
   editPriority(data) {
183 184
     console.log(data);
@@ -262,7 +263,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
262 263
         }
263 264
       });
264 265
   }
265
-	
266
+
266 267
 	changeRadio(e){
267 268
 		if(this.validatePriorityForm.value.binding=='1'){
268 269
 			this.validatePriorityForm = this.fb.group({
@@ -282,7 +283,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
282 283
 			});
283 284
 		}
284 285
 	}
285
-	
286
+
286 287
   // 初始化新增form表单
287 288
   validatePriorityForm: FormGroup; //新增/编辑表单
288 289
   initPriorityForm() {

+ 13 - 1
src/app/components/configurationCenter/configuration-message/configuration-message.component.html

@@ -71,9 +71,21 @@
71 71
             <span>通知内容:</span><textarea class="wd" rows="10" nz-input placeholder="请输入通知内容" [(ngModel)]="item.processContent" [disabled]="item.disable"></textarea>
72 72
           </div>
73 73
           <div class="message_body_list_configure">
74
-            <span style="visibility: hidden">变量名称:</span>
74
+            <span style="visibility: hidden">变量名称{{currentIndex}}:</span>
75 75
             <p>备注:[$变量名称$]可添加<em *ngFor="let v of varArr;let first = first;let last = last;"><span (click)="writeIn(item, v, $event, 'processContent')">{{v}}</span><i *ngIf="!last">、</i><i *ngIf="last">。</i></em></p>
76 76
           </div>
77
+          <div class="message_body_list_wechatConfig" *ngIf="currentIndex == 2">
78
+            <span><i class="icon_transport transport-required red"></i>配置类型:</span>
79
+            <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzAllowClear [(ngModel)]="editData.wechatConfigTypeId"
80
+              nzPlaceHolder="请选择微信配置类型" nzServerSearch>
81
+              <ng-container *ngFor="let data of wechatConfigTypeList">
82
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
83
+              </ng-container>
84
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
85
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
86
+              </nz-option>
87
+            </nz-select>
88
+          </div>
77 89
           <div class="message_body_list_title">
78 90
             <span><i class="icon_transport transport-required red"></i>是否开启:</span>
79 91
             <nz-radio-group [(ngModel)]="editData.flag">

+ 8 - 0
src/app/components/configurationCenter/configuration-message/configuration-message.component.less

@@ -313,6 +313,14 @@
313 313
                   cursor: pointer;
314 314
                 }
315 315
               }
316
+              .message_body_list_wechatConfig{
317
+                display: flex;
318
+                align-items: center;
319
+                margin-bottom: 8px;
320
+                span{
321
+                  flex-shrink: 0;
322
+                }
323
+              }
316 324
             }
317 325
           }
318 326
         }

+ 70 - 51
src/app/components/configurationCenter/configuration-message/configuration-message.component.ts

@@ -25,6 +25,7 @@ export class ConfigurationMessageComponent implements OnInit {
25 25
     setTimeout(() => {
26 26
       this.tableHeight = document.querySelector('#wechatTable').clientHeight - 8 - document.querySelector('#wechatTable .thead').clientHeight;
27 27
     }, 0)
28
+    this.getWechatConfigTypeList();
28 29
     this.getList();
29 30
   }
30 31
 
@@ -119,7 +120,8 @@ export class ConfigurationMessageComponent implements OnInit {
119 120
         wechatMessageFlag: data.wechatMessageFlag == 1 ? true : false,//微信是否开启
120 121
         messageStationTitle: data.messageStationTitle,//站内消息标题
121 122
         wechatMessageTitle: data.wechatMessageTitle,//微信标题
122
-        flag: data.flag == 1 ? true : false//总开关是否开启,0为关闭,1为开启
123
+        flag: data.flag == 1 ? true : false,//总开关是否开启,0为关闭,1为开启
124
+        wechatConfigTypeId: data.wechatConfigType ? data.wechatConfigType.id : null,//微信配置类型
123 125
     };
124 126
 
125 127
     this.tabs = [
@@ -128,21 +130,21 @@ export class ConfigurationMessageComponent implements OnInit {
128 130
         processTitle: this.editData.messageStationTitle,
129 131
         processContent: this.editData.messageStationContent,
130 132
         checkboxFlag: this.editData.messageStationFlag,
131
-        disable: !this.editData.messageStationFlag
133
+        disable: !this.editData.messageStationFlag,
132 134
       },
133 135
       {
134
-          tabName: "短信",
135
-          processTitle: '',
136
-          processContent: this.editData.shortMessageContent,
137
-          checkboxFlag: this.editData.shortMessageFlag,
138
-          disable: !this.editData.shortMessageFlag
136
+        tabName: "短信",
137
+        processTitle: '',
138
+        processContent: this.editData.shortMessageContent,
139
+        checkboxFlag: this.editData.shortMessageFlag,
140
+        disable: !this.editData.shortMessageFlag,
139 141
       },
140 142
       {
141
-          tabName: "微信",
142
-          processTitle: this.editData.wechatMessageTitle,
143
-          processContent: this.editData.wechatMessageContent,
144
-          checkboxFlag: this.editData.wechatMessageFlag,
145
-          disable: !this.editData.wechatMessageFlag
143
+        tabName: "微信",
144
+        processTitle: this.editData.wechatMessageTitle,
145
+        processContent: this.editData.wechatMessageContent,
146
+        checkboxFlag: this.editData.wechatMessageFlag,
147
+        disable: !this.editData.wechatMessageFlag,
146 148
       }
147 149
     ];
148 150
 
@@ -167,55 +169,62 @@ export class ConfigurationMessageComponent implements OnInit {
167 169
   // 新增/编辑表单提交
168 170
   btnLoading: boolean = false; //提交按钮loading状态
169 171
   submitMessageForm(): void {
170
-    this.btnLoading = true;
172
+    // 微信-微信配置类型
173
+    if(this.tabs[2].checkboxFlag && !this.editData.wechatConfigTypeId) {
174
+      this.showPromptModal('保存', false, "请选择微信配置类型");
175
+      return;
176
+    }
171 177
     var filterArr = this.tabs.filter(item => {
172 178
       return item.checkboxFlag;
173 179
     });
174 180
     for (var i = 0; i < filterArr.length; i++) {
175
-        if (filterArr[i].processContent == '') {
176
-            alert("通知内容【" + filterArr[i].tabName + "】不能为空!");
177
-            return;
178
-        } else {
179
-            var nowArr = [...new Set([...(filterArr[i].processContent.match(/\[\$[^\$\[\]]*?\$\]/g) || []), ...this.varArr])];
180
-            if (nowArr.length !== this.varArr.length) {
181
-                alert("【" + filterArr[i].tabName + "】请填写有效的变量名称!");
182
-                return;
183
-            }
181
+      if (filterArr[i].processContent == '') {
182
+        this.showPromptModal('保存', false, "通知内容【" + filterArr[i].tabName + "】不能为空!");
183
+        return;
184
+      } else {
185
+        var nowArr = [...new Set([...(filterArr[i].processContent.match(/\[\$[^\$\[\]]*?\$\]/g) || []), ...this.varArr])];
186
+        if (nowArr.length !== this.varArr.length) {
187
+          this.showPromptModal('保存', false, "【" + filterArr[i].tabName + "】请填写有效的变量名称!");
188
+          return;
184 189
         }
190
+      }
185 191
     }
192
+    this.btnLoading = true;
186 193
     let postData:any = {};
187 194
     //请求参数处理(是否有输入数字控件)
188 195
     if (this.editData.noticeRule !== 'no') {
189
-        postData = {
190
-            // "messageManager": {
191
-                "id": this.editData.id,
192
-                "noticeRule": this.editData.noticeRule,
193
-                "messageStationFlag": this.tabs[0].checkboxFlag ? 1 : 0,
194
-                "messageStationTitle": this.tabs[0].processTitle,
195
-                "messageStationContent": this.tabs[0].processContent,
196
-                "shortMessageFlag": this.tabs[1].checkboxFlag ? 1 : 0,
197
-                "shortMessageContent": this.tabs[1].processContent,
198
-                "wechatMessageFlag": this.tabs[2].checkboxFlag ? 1 : 0,
199
-                "wechatMessageTitle": this.tabs[2].processTitle,
200
-                "wechatMessageContent": this.tabs[2].processContent,
201
-                "flag": this.editData.flag ? 1 : 0
202
-            // }
203
-        };
196
+      postData = {
197
+        // "messageManager": {
198
+          "id": this.editData.id,
199
+          "noticeRule": this.editData.noticeRule,
200
+          "messageStationFlag": this.tabs[0].checkboxFlag ? 1 : 0,
201
+          "messageStationTitle": this.tabs[0].processTitle,
202
+          "messageStationContent": this.tabs[0].processContent,
203
+          "shortMessageFlag": this.tabs[1].checkboxFlag ? 1 : 0,
204
+          "shortMessageContent": this.tabs[1].processContent,
205
+          "wechatMessageFlag": this.tabs[2].checkboxFlag ? 1 : 0,
206
+          "wechatMessageTitle": this.tabs[2].processTitle,
207
+          "wechatMessageContent": this.tabs[2].processContent,
208
+          "flag": this.editData.flag ? 1 : 0,
209
+          "wechatConfigType": this.editData.wechatConfigTypeId ? { id: this.editData.wechatConfigTypeId } : undefined,
210
+        // }
211
+      };
204 212
     } else {
205
-        postData = {
206
-            // "messageManager": {
207
-                "id": this.editData.id,
208
-                "messageStationFlag": this.tabs[0].checkboxFlag ? 1 : 0,
209
-                "messageStationTitle": this.tabs[0].processTitle,
210
-                "messageStationContent": this.tabs[0].processContent,
211
-                "shortMessageFlag": this.tabs[1].checkboxFlag ? 1 : 0,
212
-                "shortMessageContent": this.tabs[1].processContent,
213
-                "wechatMessageFlag": this.tabs[2].checkboxFlag ? 1 : 0,
214
-                "wechatMessageTitle": this.tabs[2].processTitle,
215
-                "wechatMessageContent": this.tabs[2].processContent,
216
-                "flag": this.editData.flag ? 1 : 0
217
-            // }
218
-        };
213
+      postData = {
214
+        // "messageManager": {
215
+          "id": this.editData.id,
216
+          "messageStationFlag": this.tabs[0].checkboxFlag ? 1 : 0,
217
+          "messageStationTitle": this.tabs[0].processTitle,
218
+          "messageStationContent": this.tabs[0].processContent,
219
+          "shortMessageFlag": this.tabs[1].checkboxFlag ? 1 : 0,
220
+          "shortMessageContent": this.tabs[1].processContent,
221
+          "wechatMessageFlag": this.tabs[2].checkboxFlag ? 1 : 0,
222
+          "wechatMessageTitle": this.tabs[2].processTitle,
223
+          "wechatMessageContent": this.tabs[2].processContent,
224
+          "flag": this.editData.flag ? 1 : 0,
225
+          "wechatConfigType": this.editData.wechatConfigTypeId ? { id: this.editData.wechatConfigTypeId } : undefined,
226
+        // }
227
+      };
219 228
     }
220 229
     // 关闭模态窗口并传递一个结果
221 230
     postData = Object.assign({}, this.coopData, postData);
@@ -238,6 +247,16 @@ export class ConfigurationMessageComponent implements OnInit {
238 247
       });
239 248
   }
240 249
 
250
+  //获取微信配置类型
251
+  wechatConfigTypeList:any[] = [];
252
+  getWechatConfigTypeList() {
253
+    this.mainService
254
+    .getDictionary('list', 'wechat_config_type')
255
+    .subscribe((data) => {
256
+      this.wechatConfigTypeList = data || [];
257
+    });
258
+  }
259
+
241 260
   // 获取列表
242 261
   loading1:boolean = false;
243 262
   messageList: any[] = []; //表格数据

+ 2 - 2
src/app/components/configurationCenter/configuration-priority/configuration-priority.component.html

@@ -5,7 +5,7 @@
5 5
         <div class="list-template__bottom">
6 6
           <div class="list-template__top" nz-row>
7 7
             <div nz-col nzLg="24" class="list-template__btns">
8
-              <button nz-button class="btn default" (click)="addPriorityModal()">新增</button>
8
+              <!-- <button nz-button class="btn default" (click)="addPriorityModal()">新增</button> -->
9 9
             </div>
10 10
           </div>
11 11
           <nz-table class="list-template__nzTable" [nzData]="priorityList" nzSize="middle" [nzShowPagination]="false"
@@ -31,7 +31,7 @@
31 31
                 <td>{{data.workdayClassDTO?.name}}</td>
32 32
                 <td>
33 33
                   <div class="coop">
34
-                    <span (click)="showDelModal(data,'您确认要删除吗?','删除','delPriority')">删除</span>
34
+                    <!-- <span (click)="showDelModal(data,'您确认要删除吗?','删除','delPriority')">删除</span> -->
35 35
                     <span (click)="editPriority(data)">编辑</span>
36 36
                   </div>
37 37
                 </td>

+ 59 - 0
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.html

@@ -0,0 +1,59 @@
1
+<div class="incident_handle_info">
2
+  <div class="row">
3
+    <div class="formItem">
4
+      <div class="name"><i class="icon_transport transport-required red"></i>处理方式:</div>
5
+      <div class="value w100">
6
+        <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择处理方式">
7
+          <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
8
+          <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
9
+          <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
10
+        </nz-select>
11
+      </div>
12
+    </div>
13
+  </div>
14
+
15
+  <div class="row">
16
+    <div class="formItem">
17
+      <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>协同人员:</div>
18
+      <div class="value w100">
19
+        <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择协同人员">
20
+          <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
21
+          <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
22
+          <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
23
+        </nz-select>
24
+      </div>
25
+    </div>
26
+  </div>
27
+
28
+  <div class="formItem">
29
+    <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>关联资产:</div>
30
+    <div class="value w100">
31
+      <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择关联资产">
32
+        <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
33
+        <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
34
+        <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
35
+      </nz-select>
36
+    </div>
37
+  </div>
38
+
39
+  <div class="formItem">
40
+    <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>处理图片:</div>
41
+    <div class="value w100 upload">
42
+      <nz-upload
43
+        nzAction="https://jsonplaceholder.typicode.com/posts/"
44
+        nzName="avatar"
45
+        nzListType="picture-card"
46
+        [nzShowUploadList]="false"
47
+        [nzBeforeUpload]="beforeUpload"
48
+        (nzChange)="handleChange($event)"
49
+      >
50
+        <ng-container *ngIf="!avatarUrl">
51
+          <i class="upload-icon" nz-icon [nzType]="loading ? 'loading' : 'plus'"></i>
52
+          <div class="ant-upload-text">上传图片</div>
53
+        </ng-container>
54
+        <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar" />
55
+      </nz-upload>
56
+      <div class="tips">只支持jpg,png 格式</div>
57
+    </div>
58
+  </div>
59
+</div>

+ 54 - 0
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.less

@@ -0,0 +1,54 @@
1
+@import "../../../../../src/theme.less";
2
+:host{
3
+  display: inline-block;
4
+  width: 100%;
5
+  .incident_handle_info{
6
+    padding: 16px;
7
+    .row{
8
+      display: flex;
9
+      gap: 16px;
10
+      .formItem{
11
+        flex: 1;
12
+      }
13
+    }
14
+    .upload-icon{
15
+      font-size: 30px;
16
+      color: #898989;
17
+      margin-bottom: 8px;
18
+    }
19
+    .ant-upload-text{
20
+      color: #898989;
21
+    }
22
+    .formItem{
23
+      margin-bottom: 16px;
24
+      position: relative;
25
+      display: flex;
26
+      &.column{
27
+        flex-direction: column;
28
+        .name{
29
+          margin-bottom: 8px;
30
+        }
31
+      }
32
+      .name{
33
+        display: flex;
34
+        align-items: center;
35
+        flex-shrink: 0;
36
+        .transport-required{
37
+          font-size: 10px;
38
+          margin-right: 2px;
39
+        }
40
+      }
41
+      .value{
42
+        display: flex;
43
+        align-items: center;
44
+        &.upload{
45
+          flex-direction: column;
46
+          align-items: flex-start;
47
+          .tips{
48
+            color: rgba(0,0,0,0.45);
49
+          }
50
+        }
51
+      }
52
+    }
53
+  }
54
+}

+ 60 - 0
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts

@@ -0,0 +1,60 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router } from '@angular/router';
4
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+
7
+@Component({
8
+  selector: 'app-incident-handle-info-simple',
9
+  templateUrl: './incident-handle-info-simple.component.html',
10
+  styleUrls: ['./incident-handle-info-simple.component.less']
11
+})
12
+export class IncidentHandleInfoSimpleComponent implements OnInit {
13
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
14
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
15
+
16
+  constructor(
17
+    private mainService: MainService,
18
+    private router: Router,
19
+    public tool: ToolService,
20
+  ) { }
21
+
22
+  isLoading = false;
23
+  formDTO:any =  {};
24
+
25
+  ngOnInit() {
26
+    this.getOrders();
27
+  }
28
+  // 关闭弹窗
29
+  hideModal() {
30
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
31
+  }
32
+  // 获取列表数据
33
+  getOrders(idx?) {
34
+    // if (idx) {
35
+    //   this.historySpecimenPageIndex = 1;
36
+    // }
37
+    // let postData = {
38
+    //   idx: this.historySpecimenPageIndex - 1,
39
+    //   sum: this.historySpecimenPageSize,
40
+    //   workOrder: {
41
+    //     hosId: JSON.parse(localStorage.getItem("user")).user.currentHospital.id,
42
+    //     gdState: {id: "72"},
43
+    //     taskType: {associationType: {id: 256}},
44
+    //   }
45
+    // }
46
+    // this.mainService.getFetchDataList('data','workOrder',postData).subscribe(data => {
47
+    //   this.historySpecimenList = data.list || [];
48
+    //   this.historySpecimenListLength = data.totalNum || 0;
49
+    // })
50
+  }
51
+
52
+  // 表单提交
53
+  submitForm(): void {
54
+    this.confirmModelHs.emit();
55
+  }
56
+}
57
+
58
+
59
+
60
+

+ 109 - 0
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.html

@@ -0,0 +1,109 @@
1
+<div class="incident_handle_info">
2
+  <div class="formItem column">
3
+    <div class="name"><i class="icon_transport transport-required red"></i>解决方案:</div>
4
+    <div class="value">
5
+      <textarea rows="4" nz-input [(ngModel)]="formDTO.description" placeholder="请输入解决方案"></textarea>
6
+    </div>
7
+  </div>
8
+
9
+  <div class="formItem">
10
+    <div class="name"><i class="icon_transport transport-required red"></i>故障现象:</div>
11
+    <div class="value w100">
12
+      <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择故障现象">
13
+        <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
14
+        <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
15
+        <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
16
+      </nz-select>
17
+    </div>
18
+  </div>
19
+
20
+  <div class="row">
21
+    <div class="formItem">
22
+      <div class="name"><i class="icon_transport transport-required red"></i>处理方式:</div>
23
+      <div class="value w100">
24
+        <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择处理方式">
25
+          <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
26
+          <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
27
+          <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
28
+        </nz-select>
29
+      </div>
30
+    </div>
31
+
32
+    <div class="formItem">
33
+      <div class="name"><i class="icon_transport transport-required red"></i>处理结果:</div>
34
+      <div class="value w100">
35
+        <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择处理结果">
36
+          <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
37
+          <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
38
+          <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
39
+        </nz-select>
40
+      </div>
41
+    </div>
42
+  </div>
43
+
44
+  <div class="row">
45
+    <div class="formItem">
46
+      <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>协同人员:</div>
47
+      <div class="value w100">
48
+        <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择协同人员">
49
+          <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
50
+          <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
51
+          <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
52
+        </nz-select>
53
+      </div>
54
+    </div>
55
+
56
+    <div class="formItem">
57
+      <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>是否转换知识库:</div>
58
+      <div class="value w100">
59
+        <nz-radio-group [(ngModel)]="radioValue">
60
+          <label nz-radio [nzValue]="1">是</label>
61
+          <label nz-radio [nzValue]="0">否</label>
62
+        </nz-radio-group>
63
+      </div>
64
+    </div>
65
+  </div>
66
+
67
+  <div class="formItem">
68
+    <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>关联资产:</div>
69
+    <div class="value w100">
70
+      <nz-select class="w100" [(ngModel)]="selectedValue" nzAllowClear nzPlaceHolder="请选择关联资产">
71
+        <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
72
+        <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
73
+        <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
74
+      </nz-select>
75
+    </div>
76
+  </div>
77
+
78
+  <div class="formItem">
79
+    <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>处理图片:</div>
80
+    <div class="value w100 upload">
81
+      <nz-upload
82
+        nzAction="https://jsonplaceholder.typicode.com/posts/"
83
+        nzName="avatar"
84
+        nzListType="picture-card"
85
+        [nzShowUploadList]="false"
86
+        [nzBeforeUpload]="beforeUpload"
87
+        (nzChange)="handleChange($event)"
88
+      >
89
+        <ng-container *ngIf="!avatarUrl">
90
+          <i class="upload-icon" nz-icon [nzType]="loading ? 'loading' : 'plus'"></i>
91
+          <div class="ant-upload-text">上传图片</div>
92
+        </ng-container>
93
+        <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar" />
94
+      </nz-upload>
95
+      <div class="tips">只支持jpg,png 格式</div>
96
+    </div>
97
+  </div>
98
+
99
+  <div class="formItem">
100
+    <div class="name"><i class="icon_transport transport-required red" style="visibility: hidden;"></i>上传附件:</div>
101
+    <div class="value w100 upload">
102
+      <nz-upload class="w100" nzAction="https://jsonplaceholder.typicode.com/posts/" [nzFileType]="tool.attachmentsTypes">
103
+        <button nz-button><i nz-icon nzType="upload"></i><span>上传文件</span></button>
104
+      </nz-upload>
105
+      <div class="tips mt8">只支持word,excel,pdf,txt,ppt 格式</div>
106
+    </div>
107
+  </div>
108
+
109
+</div>

+ 54 - 0
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.less

@@ -0,0 +1,54 @@
1
+@import "../../../../../src/theme.less";
2
+:host{
3
+  display: inline-block;
4
+  width: 100%;
5
+  .incident_handle_info{
6
+    padding: 16px;
7
+    .row{
8
+      display: flex;
9
+      gap: 16px;
10
+      .formItem{
11
+        flex: 1;
12
+      }
13
+    }
14
+    .upload-icon{
15
+      font-size: 30px;
16
+      color: #898989;
17
+      margin-bottom: 8px;
18
+    }
19
+    .ant-upload-text{
20
+      color: #898989;
21
+    }
22
+    .formItem{
23
+      margin-bottom: 16px;
24
+      position: relative;
25
+      display: flex;
26
+      &.column{
27
+        flex-direction: column;
28
+        .name{
29
+          margin-bottom: 8px;
30
+        }
31
+      }
32
+      .name{
33
+        display: flex;
34
+        align-items: center;
35
+        flex-shrink: 0;
36
+        .transport-required{
37
+          font-size: 10px;
38
+          margin-right: 2px;
39
+        }
40
+      }
41
+      .value{
42
+        display: flex;
43
+        align-items: center;
44
+        &.upload{
45
+          flex-direction: column;
46
+          align-items: flex-start;
47
+          .tips{
48
+            color: rgba(0,0,0,0.45);
49
+          }
50
+        }
51
+      }
52
+    }
53
+  }
54
+}

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

@@ -0,0 +1,60 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router } from '@angular/router';
4
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+
7
+@Component({
8
+  selector: 'app-incident-handle-info',
9
+  templateUrl: './incident-handle-info.component.html',
10
+  styleUrls: ['./incident-handle-info.component.less']
11
+})
12
+export class IncidentHandleInfoComponent implements OnInit {
13
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
14
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
15
+
16
+  constructor(
17
+    private mainService: MainService,
18
+    private router: Router,
19
+    public tool: ToolService,
20
+  ) { }
21
+
22
+  isLoading = false;
23
+  formDTO:any =  {};
24
+
25
+  ngOnInit() {
26
+    this.getOrders();
27
+  }
28
+  // 关闭弹窗
29
+  hideModal() {
30
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
31
+  }
32
+  // 获取列表数据
33
+  getOrders(idx?) {
34
+    // if (idx) {
35
+    //   this.historySpecimenPageIndex = 1;
36
+    // }
37
+    // let postData = {
38
+    //   idx: this.historySpecimenPageIndex - 1,
39
+    //   sum: this.historySpecimenPageSize,
40
+    //   workOrder: {
41
+    //     hosId: JSON.parse(localStorage.getItem("user")).user.currentHospital.id,
42
+    //     gdState: {id: "72"},
43
+    //     taskType: {associationType: {id: 256}},
44
+    //   }
45
+    // }
46
+    // this.mainService.getFetchDataList('data','workOrder',postData).subscribe(data => {
47
+    //   this.historySpecimenList = data.list || [];
48
+    //   this.historySpecimenListLength = data.totalNum || 0;
49
+    // })
50
+  }
51
+
52
+  // 表单提交
53
+  submitForm(): void {
54
+    this.confirmModelHs.emit();
55
+  }
56
+}
57
+
58
+
59
+
60
+

+ 105 - 0
src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.html

@@ -0,0 +1,105 @@
1
+<div class="incident_handle_order" [hidden]="summaryLoading">
2
+  <!-- 耗材 -->
3
+  <div class="orderList consumable">
4
+    <div class="title">耗材清单</div>
5
+    <ng-container *ngIf="summaryObj.consumableList.length">
6
+      <div class="orderItem" *ngFor="let item of summaryObj.consumableList">
7
+        <div class="row">
8
+          <div class="name">{{ item.consumableName }}<ng-container v-if="item.consumableBrandModel">({{ item.consumableBrandModel }})</ng-container></div>
9
+          <div class="value">
10
+            <span class="unitPrice">单价:{{ item.consumableEndPrice }}元</span>
11
+            <button nz-button class="btn default ml8" (click)="editConsumable(item)">编辑</button>
12
+          </div>
13
+        </div>
14
+
15
+        <div class="row">
16
+          <div class="name"></div>
17
+          <div class="value">
18
+            <div class="num">
19
+              <span>X{{ item.consumablesNum }}{{ item.consumablesUnit }}</span>
20
+              <span class="unitPrice">总价:{{item.consumablesNum * item.consumableEndPrice}}元</span>
21
+            </div>
22
+            <button nz-button class="btn default ml8" (click)="delConsumable(item)">删除</button>
23
+          </div>
24
+        </div>
25
+      </div>
26
+    </ng-container>
27
+
28
+
29
+    <div class="totalPrice">耗材总价:{{summaryObj.consumablePrice}}元</div>
30
+    <div class="add" (click)="addConsumable()"><i class="icon_transport transport-tag27fuben"></i></div>
31
+  </div>
32
+  <!-- 工时 -->
33
+  <div class="orderList manHour">
34
+    <div class="title">工时清单</div>
35
+    <ng-container *ngIf="summaryObj.workHourManagementList.length">
36
+      <div class="orderItem" *ngFor="let item of summaryObj.workHourManagementList" (click)="numberClick(item, 'editWorkHourManagement')">
37
+        <div class="row">
38
+          <div class="name">{{ item.workName }}</div>
39
+          <div class="value">
40
+            <span class="unitPrice">单价:{{ item.wage }}元</span>
41
+            <button nz-button class="btn default ml8" (click)="numberClick(item, 'editWorkHourManagement')">编辑</button>
42
+          </div>
43
+        </div>
44
+
45
+        <div class="row">
46
+          <div class="name"></div>
47
+          <div class="value">
48
+            <div class="num">
49
+              <span>X{{ item.workHourNum2 }}{{ item.workUnit }}</span>
50
+              <span class="unitPrice">总价:{{item.workHourNum2 * item.wage}}元</span>
51
+            </div>
52
+            <button nz-button class="btn default ml8" (click)="numberClick(item, 'delWorkHourManagement')">删除</button>
53
+          </div>
54
+        </div>
55
+      </div>
56
+    </ng-container>
57
+    <div class="totalPrice">工时总价:{{summaryObj.workHourPrice}}元</div>
58
+    <div class="add" (click)="addWorkHourManagement()"><i class="icon_transport transport-tag27fuben"></i></div>
59
+  </div>
60
+
61
+  <div class="allTotalPrice">维修单总价:{{summaryObj.totalMaintenancePrice}}元</div>
62
+</div>
63
+<nz-spin nzSimple [nzSpinning]="summaryLoading" class="mt8 text_align_center"></nz-spin>
64
+
65
+<!-- 新增/编辑耗材模态框 -->
66
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalConsumable">
67
+  <div class="modalBody">
68
+    <div class="title">{{modelName}}耗材<i class="icon_transport transport-guanbi" (click)="hideConsumableModal()"></i></div>
69
+    <div class="content">
70
+      <form nz-form [formGroup]="validateConsumableForm" class="addForm">
71
+
72
+        <nz-form-item>
73
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="consumablesId">耗&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;材</nz-form-label>
74
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择耗材!">
75
+            <nz-select (nzOnSearch)="changeInp('consumable', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="consumablesId" nzPlaceHolder="请选择耗材">
76
+              <ng-container *ngFor="let option of consumableList">
77
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
78
+              </ng-container>
79
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
80
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
81
+              </nz-option>
82
+            </nz-select>
83
+          </nz-form-control>
84
+        </nz-form-item>
85
+        <nz-form-item>
86
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="consumablesNum">数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</nz-form-label>
87
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入数量!">
88
+            <nz-input-group>
89
+              <nz-input-number class="w100" formControlName="consumablesNum" nzPlaceHolder="请输入数量" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
90
+            </nz-input-group>
91
+          </nz-form-control>
92
+        </nz-form-item>
93
+      </form>
94
+    </div>
95
+    <div class=" display_flex justify-content_flex-center">
96
+      <button nzType="primary" nz-button (click)="submitConsumableForm()" [nzLoading]="btnLoading">确认</button>
97
+      <button class="btn cancel" nz-button nzType="default" (click)="hideConsumableModal()">取消</button>
98
+    </div>
99
+  </div>
100
+</div>
101
+
102
+<!-- 操作成功/失败提示框 -->
103
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
104
+  [info]="promptInfo">
105
+</app-prompt-modal>

+ 338 - 0
src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.less

@@ -0,0 +1,338 @@
1
+@import "../../../../../src/theme.less";
2
+:host{
3
+  display: inline-block;
4
+  width: 100%;
5
+  color: #333;
6
+  .incident_handle_order{
7
+    .orderList{
8
+      .title{
9
+        color: @primary-color;
10
+        padding: 8px 16px;
11
+        border-bottom: 1px solid #E9E9E9;
12
+      }
13
+      .orderItem{
14
+        padding: 8px 8px 16px 24px;
15
+        border-bottom: 1px solid #E9E9E9;
16
+        .row{
17
+          display: flex;
18
+          justify-content: space-between;
19
+          align-items: center;
20
+          margin-top: 8px;
21
+          &:first-of-type{
22
+            margin-top: 0;
23
+          }
24
+          .value{
25
+            display: flex;
26
+            align-items: center;
27
+          }
28
+          .num{
29
+            width: 162px;
30
+            display: flex;
31
+            align-items: center;
32
+            justify-content: space-between;
33
+          }
34
+          .btn{
35
+            min-width: 65px;
36
+            width: 65px;
37
+            height: 30px;
38
+            line-height: 30px;
39
+          }
40
+        }
41
+      }
42
+
43
+      .totalPrice{
44
+        padding: 8px;
45
+        display: flex;
46
+        justify-content: flex-end;
47
+        align-items: center;
48
+      }
49
+
50
+      .add{
51
+        text-align: center;
52
+        background: #FAFAFA;
53
+        border: 1px dashed rgba(0,0,0,0.25);
54
+        cursor: pointer;
55
+      }
56
+    }
57
+
58
+    .allTotalPrice{
59
+      font-size: 20px;
60
+      color: @primary-color;
61
+      font-weight: bold;
62
+      padding: 16px;
63
+      text-align: center;
64
+    }
65
+  }
66
+
67
+  .content{
68
+    flex: 1;
69
+    min-height: 0;
70
+    display: flex;
71
+    flex-direction: column;
72
+    justify-content: space-between;
73
+    border: 1px solid #EEF3F9;
74
+    &.priority{
75
+      margin: 24px 118px 0;
76
+      background-color: #fff;
77
+      .contentInner{
78
+        padding: 48px 206px;
79
+        border: 1px solid #E8EBEF;
80
+      }
81
+    }
82
+    .contentItem{
83
+      padding: 4px 16px;
84
+      cursor: pointer;
85
+      overflow: hidden;
86
+      text-overflow: ellipsis;
87
+      white-space: nowrap;
88
+      &.active{
89
+        color: @primary-color;
90
+        background-color: #F0F6ED;
91
+        border-radius: 4px;
92
+      }
93
+    }
94
+    .contentInner{
95
+      flex: 1;
96
+      display: flex;
97
+      justify-content: space-between;
98
+      align-items: center;
99
+      padding: 0 16px;
100
+      gap: 16px;
101
+      .contentHead{
102
+        height: 45px;
103
+        display: flex;
104
+        justify-content: space-between;
105
+        align-items: center;
106
+        gap: 16px;
107
+        padding: 0 16px;
108
+        font-size: 16px;
109
+        font-weight: bold;
110
+        border-bottom: 1px solid #D9D9D9;
111
+        .title{
112
+          overflow: hidden;
113
+          text-overflow: ellipsis;
114
+          white-space: nowrap;
115
+        }
116
+        .btns{
117
+          flex-shrink: 0;
118
+        }
119
+      }
120
+      .contentBody{
121
+        padding: 0 8px;
122
+        margin: 4px 0;
123
+        flex: 1;
124
+      }
125
+      .address{
126
+        flex: 1;
127
+        height: 100%;
128
+        background: #FFFFFF;
129
+        border: 1px solid #E8EBEF;
130
+        display: flex;
131
+        flex-direction: column;
132
+        width: 0;
133
+      }
134
+      .addressAssign{
135
+        flex: 3;
136
+        height: 100%;
137
+        background: #FFFFFF;
138
+        border: 1px solid #E8EBEF;
139
+        display: flex;
140
+        flex-direction: column;
141
+        width: 0;
142
+      }
143
+      .list-template__searchItem {
144
+        margin-bottom: 16px;
145
+        .label {
146
+          color: #333;
147
+          display: inline-block;
148
+          width: 70px;
149
+          text-align-last: justify;
150
+          text-align: justify;
151
+          &.label--big {
152
+            width: 100px;
153
+          }
154
+        }
155
+        .formItem {
156
+          width: 135px;
157
+        }
158
+      }
159
+    }
160
+    .contentBtns{
161
+      margin-bottom: 16px;
162
+      display: flex;
163
+      justify-content: center;
164
+      align-items: center;
165
+    }
166
+  }
167
+
168
+  .save {
169
+    position: fixed;
170
+    left: 0;
171
+    top: 0;
172
+    width: 100%;
173
+    height: 100%;
174
+    background: rgba(0, 0, 0, 0.4);
175
+    z-index: 99;
176
+
177
+    .tips{
178
+      margin-bottom: 16px!important;
179
+    }
180
+
181
+    .modalBody {
182
+      width: 350px;
183
+      background: #fff;
184
+      border-radius: 5px;
185
+      padding: 10px 20px;
186
+      color: #333;
187
+
188
+      .title {
189
+        width: 100%;
190
+        text-align: center;
191
+        font-size: 18px;
192
+        position: relative;
193
+
194
+        i {
195
+          position: absolute;
196
+          right: 0;
197
+          top: 0;
198
+          font-size: 20px;
199
+          color: #666;
200
+          cursor: pointer;
201
+          padding: 0 5px;
202
+        }
203
+      }
204
+
205
+      .content {
206
+        width: 310px;
207
+        background: #f9fafb;
208
+        border: 1px solid #e5e9ed;
209
+        border-radius: 5px;
210
+        overflow: hidden;
211
+        margin-top: 12px;
212
+        padding: 16px 0;
213
+
214
+        .busyList{
215
+          display: flex;
216
+          margin-bottom: 8px;
217
+          .busyContent{
218
+            margin-right: 8px;
219
+            flex: 1;
220
+          }
221
+        }
222
+
223
+        & > div {
224
+          text-align: center;
225
+          margin: 0;
226
+
227
+          &.icon {
228
+            // margin-top: 17px;
229
+
230
+            i {
231
+              color: #34b349;
232
+              font-size: 30px !important;
233
+
234
+              &.transport-wenhao {
235
+                color: #f5a523;
236
+              }
237
+
238
+              &.transport-shibai {
239
+                color: #ff3a52;
240
+              }
241
+            }
242
+          }
243
+
244
+          &.defeat {
245
+            color: #333;
246
+            font-size: 14px;
247
+          }
248
+
249
+          &:nth-child(3) {
250
+            font-size: 14px;
251
+            color: #666;
252
+          }
253
+        }
254
+        .workAssignmentTips {
255
+          font-size: 12px;
256
+        }
257
+      }
258
+
259
+      button {
260
+        margin-top: 10px;
261
+
262
+        &.btn {
263
+          margin-left: 8px;
264
+        }
265
+      }
266
+    }
267
+
268
+    // 新增
269
+    &.add {
270
+      .modalBody {
271
+        width: 480px;
272
+        height: auto;
273
+
274
+        .content {
275
+          width: 100%;
276
+          height: auto;
277
+          padding: 16px;
278
+          max-height: 497px;
279
+          overflow-y: auto;
280
+
281
+          .addForm {
282
+            .ant-form-item {
283
+              margin-bottom: 0;
284
+
285
+              .ant-form-item-label {
286
+                text-align: left;
287
+              }
288
+
289
+              .desc {
290
+                margin-top: 5px;
291
+              }
292
+            }
293
+
294
+            .datesControl {
295
+              margin-top: -16px;
296
+
297
+              .ant-form-item-label {
298
+                line-height: 40px;
299
+              }
300
+            }
301
+
302
+            .timer {
303
+              .ant-form-item-label {
304
+                width: 100%;
305
+                text-align: left;
306
+              }
307
+
308
+              .numInp {
309
+                margin-right: 5px;
310
+              }
311
+
312
+              .line {
313
+                margin-right: 5px;
314
+              }
315
+            }
316
+
317
+            .timer2 {
318
+              .ant-form-item-label {
319
+                line-height: 20px;
320
+              }
321
+            }
322
+          }
323
+
324
+          .editForm {
325
+            .ant-form-item {
326
+              margin-bottom: 15px;
327
+
328
+              .ant-form-item-label {
329
+                line-height: 14px;
330
+                text-align: left;
331
+              }
332
+            }
333
+          }
334
+        }
335
+      }
336
+    }
337
+  }
338
+}

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

@@ -0,0 +1,218 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ViewEncapsulation } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router } from '@angular/router';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { FormGroup, Validators, FormBuilder } from '@angular/forms';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+import { Subject } from 'rxjs';
8
+import { debounceTime } from 'rxjs/operators';
9
+
10
+@Component({
11
+  selector: 'app-incident-handle-order',
12
+  templateUrl: './incident-handle-order.component.html',
13
+  styleUrls: ['./incident-handle-order.component.less'],
14
+})
15
+export class IncidentHandleOrderComponent implements OnInit {
16
+  @Input() id: any;
17
+
18
+  constructor(
19
+    private mainService: MainService,
20
+    private router: Router,
21
+    private message: NzMessageService,
22
+    private tool: ToolService,
23
+    private fb: FormBuilder,
24
+  ) { }
25
+
26
+  hosId:any;
27
+  changeInpSubject = new Subject(); //防抖
28
+
29
+  ngOnInit() {
30
+    //防抖
31
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
32
+      if(v[0] === 'consumable'){
33
+        this.getConsumableList(v[1]);
34
+      }
35
+    });
36
+    this.hosId = this.tool.getCurrentHospital().id;
37
+    this.getSummaryList();
38
+    this.getConsumableList();
39
+  }
40
+
41
+  // 新增耗材/工时弹框
42
+  modelName = ""; //模态框名称
43
+  modalConsumable: boolean = false; //新增/编辑模态框
44
+  add: boolean; //true:新增;false:编辑
45
+  addConsumable() {
46
+    this.modelName = "新增";
47
+    this.add = true; //新增
48
+    this.modalConsumable = true;
49
+    this.initConsumableForm();
50
+  }
51
+  //关闭新增/编辑弹框
52
+  hideConsumableModal() {
53
+    this.modalConsumable = false;
54
+  }
55
+
56
+  // 编辑
57
+  coopData: any = {}; //当前操作列
58
+  editConsumable(data) {
59
+    console.log(data);
60
+    this.modelName = "编辑";
61
+    this.add = false;
62
+    this.modalConsumable = true;
63
+    this.initConsumableForm();
64
+    this.coopData = data;
65
+    this.validateConsumableForm.controls.orders.setValue(data.orders);
66
+    this.validateConsumableForm.controls.workdayClassId.setValue(data.workdayClassId);
67
+  }
68
+
69
+  // 新增/编辑表单提交
70
+  btnLoading: boolean = false; //提交按钮loading状态
71
+  submitConsumableForm(): void {
72
+    for (const i in this.validateConsumableForm.controls) {
73
+      this.validateConsumableForm.controls[i].markAsDirty();
74
+      this.validateConsumableForm.controls[i].updateValueAndValidity();
75
+    }
76
+    if (this.validateConsumableForm.invalid) {
77
+      return;
78
+    }
79
+    console.log(this.validateConsumableForm.value);
80
+    this.btnLoading = true;
81
+    let postData:any = {};
82
+
83
+    if (this.add) {
84
+      //增加
85
+      postData = {
86
+        "consumableList": [
87
+          {
88
+            "consumablesId": this.validateConsumableForm.value.consumablesId,
89
+            "consumablesNum": this.validateConsumableForm.value.consumablesNum,
90
+          }
91
+        ],
92
+        "summaryId": this.summaryId,
93
+      };
94
+    } else {
95
+      //编辑
96
+      postData = {
97
+        // priority: {
98
+          ...this.coopData,
99
+          ...{
100
+            name: this.validateConsumableForm.value.name,
101
+            orders: this.validateConsumableForm.value.orders,
102
+            responseTime: this.validateConsumableForm.value.responseTime,
103
+            handleTime: this.validateConsumableForm.value.handleTime,
104
+            holidayClassId: this.validateConsumableForm.value.holidayClassId,
105
+            workdayClassId: this.validateConsumableForm.value.workdayClassId,
106
+          }
107
+        // }
108
+      };
109
+    }
110
+    this.mainService
111
+      .addSummaryDoc(postData)
112
+      .subscribe((result) => {
113
+        this.btnLoading = false;
114
+        this.hideConsumableModal();
115
+        let msg = "";
116
+        if (this.add) {
117
+          msg = "新增";
118
+        } else {
119
+          msg = "修改";
120
+        }
121
+        if (result.status == 200) {
122
+          this.showPromptModal(msg, true, '');
123
+        } else {
124
+          this.showPromptModal(msg, false, result.msg);
125
+        }
126
+      });
127
+  }
128
+
129
+  // 初始化新增form表单
130
+  validateConsumableForm: FormGroup; //新增/编辑表单
131
+  initConsumableForm() {
132
+    this.validateConsumableForm = this.fb.group({
133
+      consumablesId: [null, [Validators.required]],
134
+      consumablesNum: [1, [Validators.required]],
135
+    });
136
+    console.log(this.validateConsumableForm.controls)
137
+  }
138
+
139
+  // 边输边搜节流阀
140
+  isLoading = false;
141
+  changeInp(model, e) {
142
+    this.isLoading = true;
143
+    this.changeInpSubject.next([model, e]);
144
+  }
145
+
146
+  // 获取耗材
147
+  consumableList: any = [];
148
+  getConsumableList(keyword = '', isShowValue = false) {
149
+    let postData = {
150
+      consumable: {
151
+        name: keyword,
152
+        hosId: this.hosId,
153
+      },
154
+      idx: 0,
155
+      sum: 20,
156
+    };
157
+    this.mainService
158
+      .getFetchDataList("simple/data", "consumable", postData)
159
+      .subscribe((data) => {
160
+        this.isLoading = false;
161
+        let consumableList = data.list || [];
162
+        if(isShowValue && this.coopData && this.coopData.groupId){
163
+          consumableList = consumableList.filter(v => v.id !== this.coopData.id)
164
+          consumableList.unshift(this.coopData);
165
+        }
166
+        this.consumableList = consumableList;
167
+      });
168
+  }
169
+
170
+  // 获取汇总单信息
171
+  summaryObj:any = {
172
+    consumableList: [],//耗材列表
173
+    workHourManagementList: [],//工时列表
174
+  };
175
+  summaryId = undefined;//汇总单Id
176
+  summaryLoading:boolean = false;
177
+  getSummaryList() {
178
+    this.summaryLoading = true;
179
+    let postData = {
180
+      "incidentId": this.id,
181
+    };
182
+    this.mainService
183
+      .querySummaryDocNew(postData)
184
+      .subscribe((res:any) => {
185
+        this.summaryLoading = false;
186
+        if(res.status == 200){
187
+          this.summaryObj = {...{consumableList:[], workHourManagementList: []}, ...res };
188
+          console.log(this.summaryObj)
189
+          this.summaryId = res.summaryId;
190
+        }else if(res.status == 201){
191
+          // 事件第一次绑定汇总单
192
+          this.summaryId = res.summaryId;
193
+        }else{
194
+          this.message.error(res.msg || '请求数据失败!');
195
+        }
196
+      });
197
+  }
198
+
199
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
200
+  promptContent: string; //操作提示框提示信息
201
+  ifSuccess: boolean; //操作成功/失败
202
+  promptInfo: string; //操作结果提示信息
203
+  promptModalShow: boolean; //操作提示框是否展示
204
+  showPromptModal(con, success, promptInfo?) {
205
+    this.promptModalShow = false;
206
+    this.promptContent = con;
207
+    this.ifSuccess = success;
208
+    this.promptInfo = promptInfo;
209
+    setTimeout(() => {
210
+      this.promptModalShow = true;
211
+    }, 100);
212
+    this.getSummaryList();
213
+  }
214
+}
215
+
216
+
217
+
218
+

+ 91 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.component.html

@@ -0,0 +1,91 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody">
3
+    <div class="title">详细处理<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <overlay-scrollbars #osComponentRef1 class="detail">
6
+        <div class="detailItem">
7
+          <div class="name">申请时间:</div>
8
+          <div class="value">{{incidentData.startDate | date:'yyyy-MM-dd HH:mm'}}</div>
9
+        </div>
10
+        <div class="detailItem">
11
+          <div class="name">登记时间:</div>
12
+          <div class="value">{{incidentData.acceptDate | date:'yyyy-MM-dd HH:mm'}}</div>
13
+        </div>
14
+        <div class="detailItem">
15
+          <div class="name">故障描述:</div>
16
+          <div class="value">{{incidentData.description}}</div>
17
+        </div>
18
+        <div class="detailItem">
19
+          <div class="name">报修科室:</div>
20
+          <div class="value">{{incidentData.department?.dept}}</div>
21
+        </div>
22
+        <div class="detailItem">
23
+          <div class="name">详细地址:</div>
24
+          <div class="value">{{ incidentData.place ? incidentData.place.building.buildingName : '' }}{{ incidentData.place ? incidentData.place.floorName : '' }}{{ incidentData.houseNumber }}</div>
25
+        </div>
26
+        <div class="detailItem">
27
+          <div class="name">报修图片:</div>
28
+          <div class="value thumbs">
29
+            <div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
30
+          </div>
31
+        </div>
32
+        <div class="detailItem">
33
+          <div class="name">联系人:</div>
34
+          <div class="value">{{incidentData.contacts}}</div>
35
+        </div>
36
+        <div class="detailItem">
37
+          <div class="name">联系电话:</div>
38
+          <div class="value">{{incidentData.contactsInformation}}</div>
39
+        </div>
40
+        <div class="detailItem">
41
+          <div class="name">来电电话:</div>
42
+          <div class="value">{{incidentData.incomingPhone}}</div>
43
+        </div>
44
+        <div class="detailItem">
45
+          <div class="name">电话录音:</div>
46
+          <div class="value">
47
+            <audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID">
48
+              <source [src]="audioSrc">
49
+            </audio>
50
+          </div>
51
+        </div>
52
+      </overlay-scrollbars>
53
+      <overlay-scrollbars #osComponentRef2 class="workingArea">
54
+        <div class="tabs">
55
+          <div class="tab" *ngFor="let item of tabs" (click)="clickTbab(item)" [ngClass]="{ active: activeTabValue === item.value }">{{ item.name }}</div>
56
+        </div>
57
+        <ng-container *ngIf="activeTabValue === 1">
58
+          <app-incident-handle-info [id]="id"></app-incident-handle-info>
59
+          <!-- <app-incident-handle-info-simple [id]="id"></app-incident-handle-info-simple> -->
60
+        </ng-container>
61
+        <ng-container *ngIf="activeTabValue === 2">
62
+          <app-incident-handle-order [id]="id"></app-incident-handle-order>
63
+        </ng-container>
64
+      </overlay-scrollbars>
65
+      <overlay-scrollbars #osComponentRef3 class="knowage">
66
+        <div [hidden]="knowageLoading" class="knowageItem" *ngFor="let item of knowageList">
67
+          <div class="knowageTitle">{{item.title}}</div>
68
+          <div class="knowageDescription">{{item.content | stripHtml}}</div>
69
+          <div class="knowageBtns">
70
+            <button nz-button nzType="primary" (click)="submitForm()">引用</button>
71
+            <button class="ml8" nz-button nzType="primary" (click)="showKnowledgeModal(item)">查看</button>
72
+          </div>
73
+        </div>
74
+        <nz-spin nzSimple [nzSpinning]="knowageLoading" class="mt8 text_align_center"></nz-spin>
75
+      </overlay-scrollbars>
76
+    </div>
77
+    <div class="display_flex justify-content_flex-center">
78
+      <button nz-button nzType="primary" (click)="submitForm()"[nzLoading]="isLoading">确认</button>
79
+      <button nz-button nzType="default" class="btn cancel" (click)="hideModal()">取消</button>
80
+    </div>
81
+  </div>
82
+</div>
83
+
84
+<!-- 图片预览 -->
85
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>
86
+
87
+<!-- 知识库查看 -->
88
+<app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>
89
+
90
+<!-- 遮罩 -->
91
+<app-mask *ngIf="maskFlag"></app-mask>

+ 183 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.component.less

@@ -0,0 +1,183 @@
1
+@import "../../../../../src/theme.less";
2
+:host{
3
+  ::ng-deep .os-padding{
4
+    z-index: auto!important;
5
+  }
6
+}
7
+.coop span {
8
+  display: inline-block;
9
+  padding: 0 8px;
10
+  cursor: pointer;
11
+  position: relative;
12
+}
13
+.modal {
14
+  position: fixed;
15
+  left: 0;
16
+  top: 0;
17
+  width: 100%;
18
+  height: 100%;
19
+  background: rgba(0, 0, 0, 0.4);
20
+  z-index: 8;
21
+  .ji {
22
+    position: absolute;
23
+    right: 0px;
24
+    top: -3px;
25
+    width: 30px;
26
+  }
27
+  .hospitalTable {
28
+    width: 100%;
29
+    td {
30
+      text-align: center !important;
31
+      position: relative;
32
+    }
33
+    .thead {
34
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
35
+      th {
36
+        text-align: center !important;
37
+        color: #fff;
38
+        background: transparent;
39
+      }
40
+    }
41
+  }
42
+
43
+  .modalBody {
44
+    width: 1320px;
45
+    min-height: 220px;
46
+    background: #fff;
47
+    border-radius: 5px;
48
+    padding: 10px 20px;
49
+    color: #333;
50
+    &.modalBody-search {
51
+      width: 480px;
52
+      min-height: 250px;
53
+    }
54
+
55
+    .title {
56
+      width: 100%;
57
+      text-align: center;
58
+      font-size: 18px;
59
+      position: relative;
60
+
61
+      i {
62
+        position: absolute;
63
+        right: 0;
64
+        top: 0;
65
+        font-size: 20px;
66
+        color: #666;
67
+        cursor: pointer;
68
+        padding: 0 5px;
69
+      }
70
+    }
71
+
72
+    .content {
73
+      height: 655px;
74
+      min-height: 117px;
75
+      border: 1px solid #e5e9ed;
76
+      border-radius: 5px;
77
+      overflow: hidden;
78
+      margin-top: 12px;
79
+      display: flex;
80
+      .detail{
81
+        width: 366px;
82
+        height: 100%;
83
+        padding: 16px;
84
+        border-right: 1px solid #E9E9E9;
85
+        .detailItem{
86
+          display: flex;
87
+          margin-bottom: 16px;
88
+          .name{
89
+            width: 5em;
90
+            flex-shrink: 0;
91
+          }
92
+          .value{
93
+            flex: 1;
94
+            text-align: justify;
95
+          }
96
+          .thumbs{
97
+            display: flex;
98
+            align-items: center;
99
+            flex-wrap: wrap;
100
+            gap: 8px;
101
+            .thumb{
102
+              width: 64px;
103
+              height: 64px;
104
+              padding: 4px;
105
+              border-radius: 4px;
106
+              border: 1px solid rgba(0,0,0,0.15);
107
+              img{
108
+                width: 100%;
109
+                height: 100%;
110
+                object-fit: cover;
111
+                object-position: center;
112
+                cursor: pointer;
113
+              }
114
+            }
115
+          }
116
+
117
+          .audio{
118
+            width: 264px;
119
+            height: 1.5em;
120
+          }
121
+        }
122
+      }
123
+      .workingArea{
124
+        flex: 1;
125
+        height: 100%;
126
+        .tabs{
127
+          height: 60px;
128
+          border-bottom: 1px solid #D9D9D9;
129
+          display: flex;
130
+          align-items: center;
131
+          .tab{
132
+            flex: 1;
133
+            display: flex;
134
+            height: 100%;
135
+            justify-content: center;
136
+            align-items: center;
137
+            border-right: 1px solid #D9D9D9;
138
+            font-size: #333;
139
+            cursor: pointer;
140
+            &:last-of-type{
141
+              border-right: none;
142
+            }
143
+            &.active{
144
+              background-color: #F0F6ED;
145
+            }
146
+          }
147
+        }
148
+      }
149
+      .knowage{
150
+        width: 354px;
151
+        height: 100%;
152
+        border-left: 1px solid #E9E9E9;
153
+        .knowageItem{
154
+          padding: 16px 16px 0;
155
+          &:last-of-type{
156
+            padding-bottom: 16px;
157
+          }
158
+        }
159
+        .knowageTitle{
160
+          font-size: 16px;
161
+        }
162
+        .knowageDescription{
163
+          font-size: 12px;
164
+          margin-top: 8px;
165
+          line-height: 22px;
166
+          color: #555555;
167
+        }
168
+        .knowageBtns{
169
+          text-align: right;
170
+        }
171
+      }
172
+    }
173
+
174
+    button {
175
+      margin-top: 10px;
176
+
177
+      &.btn {
178
+        margin-left: 8px;
179
+      }
180
+    }
181
+  }
182
+
183
+}

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

@@ -0,0 +1,234 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router } from '@angular/router';
4
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+import { forkJoin } from 'rxjs';
8
+
9
+@Component({
10
+  selector: 'app-incident-handle',
11
+  templateUrl: './incident-handle.component.html',
12
+  styleUrls: ['./incident-handle.component.less']
13
+})
14
+export class IncidentHandleComponent implements OnInit {
15
+  @ViewChild("osComponentRef1", {
16
+    read: OverlayScrollbarsComponent,
17
+    static: false,
18
+  })
19
+  osComponentRef1: OverlayScrollbarsComponent;
20
+  @ViewChild("osComponentRef2", {
21
+    read: OverlayScrollbarsComponent,
22
+    static: false,
23
+  })
24
+  osComponentRef2: OverlayScrollbarsComponent;
25
+  @ViewChild("osComponentRef3", {
26
+    read: OverlayScrollbarsComponent,
27
+    static: false,
28
+  })
29
+  osComponentRef3: OverlayScrollbarsComponent;
30
+
31
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
32
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
33
+
34
+  @Input() id: any;
35
+
36
+  constructor(
37
+    private mainService: MainService,
38
+    private router: Router,
39
+    private message: NzMessageService,
40
+    private tool: ToolService,
41
+  ) { }
42
+
43
+  isLoading = false;
44
+  hosId:any;
45
+
46
+  tabs:any[] = [
47
+    { name: '处理信息', value: 1 },
48
+    // { name: '汇总单', value: 2 },
49
+  ]
50
+
51
+  // 点击tab
52
+  activeTabValue:any = 1;
53
+  clickTbab(item){
54
+    this.activeTabValue = item.value;
55
+  }
56
+
57
+  ngOnInit() {
58
+    this.hosId = this.tool.getCurrentHospital().id;
59
+    this.getDetail();
60
+    this.getHospitalConfig();
61
+  }
62
+  // 关闭弹窗
63
+  hideModal() {
64
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
65
+  }
66
+  // 是否进入汇总单
67
+  get isInSummaryOrder(){
68
+    return this.incidentData.duty && this.itsmSummarySheet.value == 1 && (this.incidentData.handlingPersonnelUser.id == this.tool.getCurrentUserId());
69
+  }
70
+
71
+  // 获取院区配置信息
72
+  itsmSummarySheet:any = {};
73
+  getHospitalConfig() {
74
+    let postData = {
75
+      idx: 0,
76
+      sum: 9999,
77
+      hospitalConfig: {
78
+        model: "itsm",
79
+        hosId: this.hosId,
80
+      },
81
+    }
82
+    this.mainService
83
+      .getFetchDataList("simple/data", "hospitalConfig", postData)
84
+      .subscribe((result) => {
85
+        let list = result.list || [];
86
+        this.itsmSummarySheet = list.find(v => v.key == 'itsmSummarySheet') || {};
87
+        if(this.isInSummaryOrder){
88
+          let summary = this.tabs.some(v => v.value == 2);
89
+          !summary && this.tabs.push({ name: '汇总单', value: 2 });
90
+        }
91
+      });
92
+  }
93
+
94
+  // 获取详情数据
95
+  incidentData:any = {};
96
+  maskFlag:any = false;
97
+  getDetail() {
98
+    this.maskFlag = this.message.loading("正在加载中..", {
99
+      nzDuration: 0,
100
+    }).messageId;
101
+    this.mainService
102
+      .getFetchData("simple/data", "incident", this.id)
103
+      .subscribe((result) => {
104
+        this.message.remove(this.maskFlag);
105
+        this.maskFlag = false;
106
+        this.incidentData = result.data || {};
107
+        this.incidentData.callID && this.getCallrecord();
108
+        this.incidentData.reqAttachment && this.getRepairImgs();
109
+
110
+        this.getDictionaryList();
111
+      });
112
+  }
113
+
114
+  // 获取通话音频
115
+  audioSrc =  '';//音频
116
+  getCallrecord() {
117
+    let postData = {
118
+      idx: 0,
119
+      sum: 1,
120
+      callrecord: {callAccept: this.incidentData.callID},
121
+    };
122
+    this.mainService
123
+      .getFetchDataList('simple/data', 'callrecord', postData)
124
+      .subscribe((result) => {
125
+        if(result.status == 200){
126
+          result.list = result.list || [];
127
+          if(result.list.length){
128
+            this.audioSrc = location.origin + result.list[0].recordingFileName;
129
+          }else{
130
+            this.audioSrc = '';
131
+          }
132
+        }else{
133
+          this.message.error(result.msg || '请求数据失败!');
134
+        }
135
+      });
136
+  }
137
+
138
+  //获取知识库状态/类型
139
+  knowageLoading:boolean = false;
140
+  getDictionaryList() {
141
+    this.knowageLoading = true;
142
+    let solutionStatus$ = this.mainService.getDictionary('list', 'solution_status', true);
143
+    let solutionType$ = this.mainService.getDictionary('list', 'solution_type', true);
144
+    forkJoin(solutionStatus$, solutionType$).subscribe((data:any[]) => {
145
+      let solutionStatusList = data[0] || [];
146
+      let solutionTypeList = data[1] || [];
147
+
148
+      let solutionStatus = solutionStatusList.find(item => item.value == 2);
149
+      	console.log('solutionStatus:', solutionStatus)
150
+      let solutionType = solutionTypeList.find(item => item.value == 1);
151
+      	console.log('solutionType:', solutionType)
152
+
153
+      if(solutionStatus && solutionType){
154
+        this.getKnowledgeList(solutionStatus, solutionType);
155
+      }
156
+    })
157
+  }
158
+
159
+  // 获取知识库
160
+  knowageList:any[] =  [];
161
+  getKnowledgeList(solutionStatus, solutionType) {
162
+    let postData:any = {
163
+      idx: 0,
164
+      sum: 9999,
165
+      solution: {
166
+        category: this.incidentData.category,
167
+				status: solutionStatus,
168
+				type: solutionType,
169
+      },
170
+    };
171
+
172
+    this.mainService
173
+      .getFetchDataList('simple/data', 'solution', postData)
174
+      .subscribe((result) => {
175
+        this.knowageLoading = false;
176
+        if(result.status == 200){
177
+          this.knowageList = result.list || [];
178
+        }else{
179
+          this.message.error(result.msg || '请求数据失败!');
180
+        }
181
+      });
182
+  }
183
+
184
+  // 知识库查看-知道了
185
+  coopData:any = {};
186
+  isShowKnowledge:boolean = false;
187
+  showKnowledgeModal(data) {
188
+    this.coopData = data || {};
189
+    this.isShowKnowledge = true;
190
+  }
191
+
192
+  cancelKnowledgeModal(flag) {
193
+    this.isShowKnowledge = false;
194
+  }
195
+
196
+  // 获取报修图片
197
+  repairImgs:any[] = [];//报修图片
198
+  getRepairImgs() {
199
+    this.mainService
200
+      .getPreviewImage('wechatRequesterIncident', this.id)
201
+      .subscribe((res:any) => {
202
+        res.data = res.data || [];
203
+        res.data.forEach(v => {
204
+          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
205
+          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
206
+        })
207
+        this.repairImgs = res.data;
208
+      });
209
+  }
210
+
211
+  // 预览图片
212
+  imgs = [];
213
+  isPreview = false;
214
+  initialViewIndex:number = 0;
215
+  previewImageHandler(data = [], index = 0) {
216
+    this.initialViewIndex = index;
217
+    console.log(index)
218
+    this.isPreview = false;
219
+    data = data || [];
220
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
221
+    setTimeout(() => {
222
+      this.isPreview = true;
223
+    }, 0)
224
+  }
225
+
226
+  // 表单提交
227
+  submitForm(): void {
228
+    this.confirmModelHs.emit();
229
+  }
230
+}
231
+
232
+
233
+
234
+

+ 31 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.module.ts

@@ -0,0 +1,31 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { IncidentHandleComponent } from './incident-handle.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { IncidentHandleInfoComponent } from '../incident-handle-info/incident-handle-info.component';
7
+import { IncidentHandleInfoSimpleComponent } from '../incident-handle-info-simple/incident-handle-info-simple.component';
8
+import { IncidentHandleOrderComponent } from '../incident-handle-order/incident-handle-order.component';
9
+import { KnowledgeLookModule } from '../../knowledge-look/knowledge-look.module';
10
+
11
+
12
+@NgModule({
13
+  declarations: [
14
+    IncidentHandleComponent,
15
+    IncidentHandleInfoComponent,
16
+    IncidentHandleInfoSimpleComponent,
17
+    IncidentHandleOrderComponent,
18
+  ],
19
+  imports: [
20
+    CommonModule,
21
+    ShareModule,
22
+    KnowledgeLookModule,
23
+  ],
24
+  exports: [
25
+    IncidentHandleComponent,
26
+    IncidentHandleInfoComponent,
27
+    IncidentHandleInfoSimpleComponent,
28
+    IncidentHandleOrderComponent,
29
+  ]
30
+})
31
+export class IncidentHandleModule { }

+ 65 - 0
src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.html

@@ -0,0 +1,65 @@
1
+<form nz-form [formGroup]="validateForm" class="addForm">
2
+  <nz-form-item>
3
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="hosId">院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</nz-form-label>
4
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择院区!">
5
+      <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="hosId" nzShowSearch
6
+        nzPlaceHolder="请选择院区" nzServerSearch (ngModelChange)="changeHospital($event)">
7
+        <ng-container *ngFor="let data of hospitalList">
8
+          <nz-option *ngIf="!isLoading" [nzLabel]="data.hosName" [nzValue]="data.id"></nz-option>
9
+        </ng-container>
10
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
11
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
12
+        </nz-option>
13
+      </nz-select>
14
+    </nz-form-control>
15
+  </nz-form-item>
16
+  <nz-form-item>
17
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="dutyId">责任部门</nz-form-label>
18
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择责任部门!">
19
+      <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="dutyId" nzShowSearch
20
+        nzPlaceHolder="请选择责任部门" nzServerSearch (ngModelChange)="changeDuty($event)">
21
+        <ng-container *ngFor="let data of dutyList">
22
+          <nz-option *ngIf="!isLoading" [nzLabel]="data.hosName" [nzValue]="data.id"></nz-option>
23
+        </ng-container>
24
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
25
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
26
+        </nz-option>
27
+      </nz-select>
28
+    </nz-form-control>
29
+  </nz-form-item>
30
+  <nz-form-item>
31
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="groupId">工&nbsp;&nbsp;作&nbsp;&nbsp;组</nz-form-label>
32
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择工作组!">
33
+      <nz-select (nzOnSearch)="changeInp('group', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="groupId" nzPlaceHolder="请选择工作组" (ngModelChange)="changeGroup($event)">
34
+        <ng-container *ngFor="let option of groupList">
35
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
36
+        </ng-container>
37
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
38
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
39
+        </nz-option>
40
+      </nz-select>
41
+    </nz-form-control>
42
+  </nz-form-item>
43
+  <nz-form-item>
44
+    <nz-form-label [nzSpan]="7" nzFor="userGroup">是否指派到人</nz-form-label>
45
+    <nz-form-control [nzSpan]="17" nzErrorTip="请选择是否指派到人!">
46
+      <nz-radio-group formControlName="userGroup" (ngModelChange)="changeUserGroup($event)">
47
+        <label nz-radio [nzValue]="1">是</label>
48
+        <label nz-radio [nzValue]="0">否</label>
49
+      </nz-radio-group>
50
+    </nz-form-control>
51
+  </nz-form-item>
52
+  <nz-form-item *ngIf="validateForm.value.userGroup === 1">
53
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="userId">指派对象</nz-form-label>
54
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择指派对象!">
55
+      <nz-select (nzOnSearch)="changeInp('user', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="userId" nzPlaceHolder="请选择指派对象">
56
+        <ng-container *ngFor="let option of userList">
57
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
58
+        </ng-container>
59
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
60
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
61
+        </nz-option>
62
+      </nz-select>
63
+    </nz-form-control>
64
+  </nz-form-item>
65
+</form>

+ 303 - 0
src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.less

@@ -0,0 +1,303 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  ::ng-deep .ant-form-item{
5
+    margin-top: 8px;
6
+    margin-bottom: 0!important;
7
+  }
8
+  ::ng-deep .ant-form-item-label{
9
+    text-align: left!important;
10
+  }
11
+  .addForm{
12
+    padding: 0 24px 8px;
13
+  }
14
+  .list-template__nzTable,
15
+  .list-template__bottom{
16
+    padding: 0!important;
17
+    border: none!important;
18
+    background: #fff!important;
19
+  }
20
+  .list-template{
21
+    width: 100%!important;
22
+    height: 100%!important;
23
+  }
24
+
25
+  .hospitalConfig{
26
+    height: 60px;
27
+    display: flex;
28
+    justify-content: center;
29
+    align-items: center;
30
+    gap: 72px;
31
+  }
32
+  .content{
33
+    flex: 1;
34
+    min-height: 0;
35
+    display: flex;
36
+    flex-direction: column;
37
+    justify-content: space-between;
38
+    border: 1px solid #EEF3F9;
39
+    &.priority{
40
+      margin: 24px 118px 0;
41
+      background-color: #fff;
42
+      .contentInner{
43
+        padding: 48px 206px;
44
+        border: 1px solid #E8EBEF;
45
+      }
46
+    }
47
+    .contentItem{
48
+      padding: 4px 16px;
49
+      cursor: pointer;
50
+      overflow: hidden;
51
+      text-overflow: ellipsis;
52
+      white-space: nowrap;
53
+      &.active{
54
+        color: @primary-color;
55
+        background-color: #F0F6ED;
56
+        border-radius: 4px;
57
+      }
58
+    }
59
+    .contentInner{
60
+      flex: 1;
61
+      display: flex;
62
+      justify-content: space-between;
63
+      align-items: center;
64
+      padding: 0 16px;
65
+      gap: 16px;
66
+      .contentHead{
67
+        height: 45px;
68
+        display: flex;
69
+        justify-content: space-between;
70
+        align-items: center;
71
+        gap: 16px;
72
+        padding: 0 16px;
73
+        font-size: 16px;
74
+        font-weight: bold;
75
+        border-bottom: 1px solid #D9D9D9;
76
+        .title{
77
+          overflow: hidden;
78
+          text-overflow: ellipsis;
79
+          white-space: nowrap;
80
+        }
81
+        .btns{
82
+          flex-shrink: 0;
83
+        }
84
+      }
85
+      .contentBody{
86
+        padding: 0 8px;
87
+        margin: 4px 0;
88
+        flex: 1;
89
+      }
90
+      .address{
91
+        flex: 1;
92
+        height: 100%;
93
+        background: #FFFFFF;
94
+        border: 1px solid #E8EBEF;
95
+        display: flex;
96
+        flex-direction: column;
97
+        width: 0;
98
+      }
99
+      .addressAssign{
100
+        flex: 3;
101
+        height: 100%;
102
+        background: #FFFFFF;
103
+        border: 1px solid #E8EBEF;
104
+        display: flex;
105
+        flex-direction: column;
106
+        width: 0;
107
+      }
108
+      .list-template__searchItem {
109
+        margin-bottom: 16px;
110
+        .label {
111
+          color: #333;
112
+          display: inline-block;
113
+          width: 70px;
114
+          text-align-last: justify;
115
+          text-align: justify;
116
+          &.label--big {
117
+            width: 100px;
118
+          }
119
+        }
120
+        .formItem {
121
+          width: 135px;
122
+        }
123
+      }
124
+    }
125
+    .contentBtns{
126
+      margin-bottom: 16px;
127
+      display: flex;
128
+      justify-content: center;
129
+      align-items: center;
130
+    }
131
+  }
132
+
133
+  .save {
134
+    position: fixed;
135
+    left: 0;
136
+    top: 0;
137
+    width: 100%;
138
+    height: 100%;
139
+    background: rgba(0, 0, 0, 0.4);
140
+    z-index: 99;
141
+
142
+    .tips{
143
+      margin-bottom: 16px!important;
144
+    }
145
+
146
+    .modalBody {
147
+      width: 350px;
148
+      background: #fff;
149
+      border-radius: 5px;
150
+      padding: 10px 20px;
151
+      color: #333;
152
+
153
+      .title {
154
+        width: 100%;
155
+        text-align: center;
156
+        font-size: 18px;
157
+        position: relative;
158
+
159
+        i {
160
+          position: absolute;
161
+          right: 0;
162
+          top: 0;
163
+          font-size: 20px;
164
+          color: #666;
165
+          cursor: pointer;
166
+          padding: 0 5px;
167
+        }
168
+      }
169
+
170
+      .content {
171
+        width: 310px;
172
+        background: #f9fafb;
173
+        border: 1px solid #e5e9ed;
174
+        border-radius: 5px;
175
+        overflow: hidden;
176
+        margin-top: 12px;
177
+        padding: 16px 0;
178
+
179
+        .busyList{
180
+          display: flex;
181
+          margin-bottom: 8px;
182
+          .busyContent{
183
+            margin-right: 8px;
184
+            flex: 1;
185
+          }
186
+        }
187
+
188
+        & > div {
189
+          text-align: center;
190
+          margin: 0;
191
+
192
+          &.icon {
193
+            // margin-top: 17px;
194
+
195
+            i {
196
+              color: #34b349;
197
+              font-size: 30px !important;
198
+
199
+              &.transport-wenhao {
200
+                color: #f5a523;
201
+              }
202
+
203
+              &.transport-shibai {
204
+                color: #ff3a52;
205
+              }
206
+            }
207
+          }
208
+
209
+          &.defeat {
210
+            color: #333;
211
+            font-size: 14px;
212
+          }
213
+
214
+          &:nth-child(3) {
215
+            font-size: 14px;
216
+            color: #666;
217
+          }
218
+        }
219
+        .workAssignmentTips {
220
+          font-size: 12px;
221
+        }
222
+      }
223
+
224
+      button {
225
+        margin-top: 10px;
226
+
227
+        &.btn {
228
+          margin-left: 8px;
229
+        }
230
+      }
231
+    }
232
+
233
+    // 新增
234
+    &.add {
235
+      .modalBody {
236
+        width: 480px;
237
+        height: auto;
238
+
239
+        .content {
240
+          width: 100%;
241
+          height: auto;
242
+          padding: 16px;
243
+          max-height: 497px;
244
+          overflow-y: auto;
245
+
246
+          .addForm {
247
+            .ant-form-item {
248
+              margin-bottom: 0;
249
+
250
+              .ant-form-item-label {
251
+                text-align: left;
252
+              }
253
+
254
+              .desc {
255
+                margin-top: 5px;
256
+              }
257
+            }
258
+
259
+            .datesControl {
260
+              margin-top: -16px;
261
+
262
+              .ant-form-item-label {
263
+                line-height: 40px;
264
+              }
265
+            }
266
+
267
+            .timer {
268
+              .ant-form-item-label {
269
+                width: 100%;
270
+                text-align: left;
271
+              }
272
+
273
+              .numInp {
274
+                margin-right: 5px;
275
+              }
276
+
277
+              .line {
278
+                margin-right: 5px;
279
+              }
280
+            }
281
+
282
+            .timer2 {
283
+              .ant-form-item-label {
284
+                line-height: 20px;
285
+              }
286
+            }
287
+          }
288
+
289
+          .editForm {
290
+            .ant-form-item {
291
+              margin-bottom: 15px;
292
+
293
+              .ant-form-item-label {
294
+                line-height: 14px;
295
+                text-align: left;
296
+              }
297
+            }
298
+          }
299
+        }
300
+      }
301
+    }
302
+  }
303
+}

+ 189 - 0
src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.ts

@@ -0,0 +1,189 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+
8
+@Component({
9
+  selector: 'app-incident-substitution-assign',
10
+  templateUrl: './incident-substitution-assign.component.html',
11
+  styleUrls: ['./incident-substitution-assign.component.less']
12
+})
13
+export class IncidentSubstitutionAssignComponent implements OnInit {
14
+  constructor(
15
+    private mainService: MainService,
16
+    private fb: FormBuilder,
17
+    private tool: ToolService,
18
+  ) { }
19
+
20
+  changeInpSubject = new Subject(); //防抖
21
+
22
+  ngOnInit() {
23
+    //防抖
24
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
25
+      if(v[0] === 'user'){
26
+        this.getUsers(v[1]);
27
+      } else if(v[0] === 'group'){
28
+        this.getGroups(v[1]);
29
+      }
30
+    });
31
+    this.initForm();
32
+    this.getHospitals(1);
33
+  }
34
+
35
+  // 初始化新增form表单
36
+  validateForm: FormGroup; //新增/编辑表单
37
+  initForm() {
38
+    this.validateForm = this.fb.group({
39
+      hosId: [null, [Validators.required]],//院区
40
+      dutyId: [null, [Validators.required]],//责任部门
41
+      userGroup: [0, [Validators.required]],//分配方式
42
+      userId: [null],//人
43
+      groupId: [null, [Validators.required]],//组
44
+    });
45
+    console.log(this.validateForm.controls)
46
+  }
47
+
48
+  // 修改院区
49
+  changeHospital(id){
50
+    this.validateForm.controls.dutyId.setValue(null);
51
+    this.validateForm.controls.userId.setValue(null);
52
+    this.validateForm.controls.groupId.setValue(null);
53
+
54
+    this.dutyList = [];
55
+    this.userList = [];
56
+    this.groupList = [];
57
+    this.getHospitals(2, id);
58
+  }
59
+
60
+  // 修改责任部门
61
+  changeDuty(id){
62
+    this.validateForm.controls.userId.setValue(null);
63
+    this.validateForm.controls.groupId.setValue(null);
64
+
65
+    this.userList = [];
66
+    this.groupList = [];
67
+    this.getGroups();
68
+  }
69
+
70
+  // 修改组
71
+  changeGroup(id){
72
+    this.validateForm.controls.userId.setValue(null);
73
+    this.getUsers();
74
+  }
75
+
76
+  // 选择人|组
77
+  changeUserGroup(id){
78
+    this.validateForm.controls.userId.setValue(null);
79
+    if(id === 1){
80
+      // 人
81
+      this.requiredConfigChange('userId', true);
82
+    }else if(id === 2){
83
+      // 组
84
+      this.requiredConfigChange('userId', false);
85
+    }
86
+  }
87
+
88
+  requiredConfigChange(name: string, required: boolean): void {
89
+    if (!required) {
90
+      this.validateForm.get(name)!.clearValidators();
91
+      this.validateForm.get(name)!.markAsPristine();
92
+    } else {
93
+      this.validateForm.get(name)!.setValidators(Validators.required);
94
+      this.validateForm.get(name)!.markAsDirty();
95
+    }
96
+    this.validateForm.get(name)!.updateValueAndValidity();
97
+  }
98
+
99
+  // 边输边搜节流阀
100
+  isLoading = false;
101
+  changeInp(model, e) {
102
+    this.isLoading = true;
103
+    this.changeInpSubject.next([model, e]);
104
+  }
105
+
106
+  // 获取院区
107
+  hospitalList: any = [];
108
+  dutyList: any = [];
109
+  getHospitals(type:number, parentId?) {
110
+    if(type === 1){
111
+      this.hospitalList = this.tool.getHospitalList().filter(v => !v.parent);
112
+      return;
113
+    }
114
+    if(type === 2 && !parentId){
115
+      this.dutyList = [];
116
+      return;
117
+    }
118
+    let postData = {
119
+      hospital: {
120
+        parent: { id: parentId },
121
+        type: { key: 'hospital_type', value: '6' },
122
+      },
123
+      idx: 0,
124
+      sum: 9999,
125
+    };
126
+    this.mainService
127
+      .getFetchDataList("data", "hospital", postData)
128
+      .subscribe((data) => {
129
+        this.isLoading = false;
130
+        this.dutyList = data.list || [];
131
+      });
132
+  }
133
+
134
+  // 搜索
135
+  // 获取用户
136
+  userList: any = [];
137
+  getUsers(keyword = '') {
138
+    if(!this.validateForm.value.groupId){
139
+      this.userList = [];
140
+      return;
141
+    }
142
+    let postData = {
143
+      user: {
144
+        hospital: { id: this.validateForm.value.dutyId },
145
+        name: keyword,
146
+        simpleQuery: true,
147
+        groupdata: { id: this.validateForm.value.groupId },
148
+      },
149
+      idx: 0,
150
+      sum: 10,
151
+    };
152
+    this.mainService
153
+      .getFetchDataList("data", "user", postData)
154
+      .subscribe((data) => {
155
+        this.isLoading = false;
156
+        let userList = data.list || [];
157
+        this.userList = userList;
158
+      });
159
+  }
160
+
161
+  // 获取组
162
+  groupList: any = []; //所有所属科室(搜索)
163
+  getGroups(keyword = '') {
164
+    if(!this.validateForm.value.dutyId){
165
+      this.groupList = [];
166
+      return;
167
+    }
168
+    let postData = {
169
+      group2: {
170
+        groupName: keyword,
171
+        hospitals: this.validateForm.value.dutyId,
172
+        type: 1,
173
+      },
174
+      idx: 0,
175
+      sum: 10,
176
+    };
177
+    this.mainService
178
+      .getFetchDataList("data", "group2", postData)
179
+      .subscribe((data) => {
180
+        this.isLoading = false;
181
+        let groupList = data.list || [];
182
+        this.groupList = groupList;
183
+      });
184
+  }
185
+}
186
+
187
+
188
+
189
+

+ 11 - 0
src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.html

@@ -0,0 +1,11 @@
1
+<form nz-form [formGroup]="validateForm" class="addForm">
2
+  <nz-form-item>
3
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="reassignRemark">退回原因</nz-form-label>
4
+    <nz-form-control [nzSpan]="18" nzErrorTip="请输入退回原因!">
5
+      <nz-input-group>
6
+        <textarea formControlName="reassignRemark" nz-input rows="3" placeholder="请输入退回原因"></textarea>
7
+      </nz-input-group>
8
+    </nz-form-control>
9
+  </nz-form-item>
10
+  <div class="tips">注:退回后,由调度台重新指派。</div>
11
+</form>

+ 309 - 0
src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.less

@@ -0,0 +1,309 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  ::ng-deep .ant-form-item{
5
+    margin-top: 16px;
6
+    margin-bottom: 0!important;
7
+  }
8
+  ::ng-deep .ant-form-item-label{
9
+    text-align: left!important;
10
+  }
11
+  .addForm{
12
+    padding: 0 24px 16px;
13
+  }
14
+  .list-template__nzTable,
15
+  .list-template__bottom{
16
+    padding: 0!important;
17
+    border: none!important;
18
+    background: #fff!important;
19
+  }
20
+  .list-template{
21
+    width: 100%!important;
22
+    height: 100%!important;
23
+  }
24
+
25
+  .tips{
26
+    color: rgba(0,0,0,0.25);
27
+    text-align: center;
28
+    margin-top: 8px;
29
+  }
30
+
31
+  .hospitalConfig{
32
+    height: 60px;
33
+    display: flex;
34
+    justify-content: center;
35
+    align-items: center;
36
+    gap: 72px;
37
+  }
38
+  .content{
39
+    flex: 1;
40
+    min-height: 0;
41
+    display: flex;
42
+    flex-direction: column;
43
+    justify-content: space-between;
44
+    border: 1px solid #EEF3F9;
45
+    &.priority{
46
+      margin: 24px 118px 0;
47
+      background-color: #fff;
48
+      .contentInner{
49
+        padding: 48px 206px;
50
+        border: 1px solid #E8EBEF;
51
+      }
52
+    }
53
+    .contentItem{
54
+      padding: 4px 16px;
55
+      cursor: pointer;
56
+      overflow: hidden;
57
+      text-overflow: ellipsis;
58
+      white-space: nowrap;
59
+      &.active{
60
+        color: @primary-color;
61
+        background-color: #F0F6ED;
62
+        border-radius: 4px;
63
+      }
64
+    }
65
+    .contentInner{
66
+      flex: 1;
67
+      display: flex;
68
+      justify-content: space-between;
69
+      align-items: center;
70
+      padding: 0 16px;
71
+      gap: 16px;
72
+      .contentHead{
73
+        height: 45px;
74
+        display: flex;
75
+        justify-content: space-between;
76
+        align-items: center;
77
+        gap: 16px;
78
+        padding: 0 16px;
79
+        font-size: 16px;
80
+        font-weight: bold;
81
+        border-bottom: 1px solid #D9D9D9;
82
+        .title{
83
+          overflow: hidden;
84
+          text-overflow: ellipsis;
85
+          white-space: nowrap;
86
+        }
87
+        .btns{
88
+          flex-shrink: 0;
89
+        }
90
+      }
91
+      .contentBody{
92
+        padding: 0 8px;
93
+        margin: 4px 0;
94
+        flex: 1;
95
+      }
96
+      .address{
97
+        flex: 1;
98
+        height: 100%;
99
+        background: #FFFFFF;
100
+        border: 1px solid #E8EBEF;
101
+        display: flex;
102
+        flex-direction: column;
103
+        width: 0;
104
+      }
105
+      .addressAssign{
106
+        flex: 3;
107
+        height: 100%;
108
+        background: #FFFFFF;
109
+        border: 1px solid #E8EBEF;
110
+        display: flex;
111
+        flex-direction: column;
112
+        width: 0;
113
+      }
114
+      .list-template__searchItem {
115
+        margin-bottom: 16px;
116
+        .label {
117
+          color: #333;
118
+          display: inline-block;
119
+          width: 70px;
120
+          text-align-last: justify;
121
+          text-align: justify;
122
+          &.label--big {
123
+            width: 100px;
124
+          }
125
+        }
126
+        .formItem {
127
+          width: 135px;
128
+        }
129
+      }
130
+    }
131
+    .contentBtns{
132
+      margin-bottom: 16px;
133
+      display: flex;
134
+      justify-content: center;
135
+      align-items: center;
136
+    }
137
+  }
138
+
139
+  .save {
140
+    position: fixed;
141
+    left: 0;
142
+    top: 0;
143
+    width: 100%;
144
+    height: 100%;
145
+    background: rgba(0, 0, 0, 0.4);
146
+    z-index: 99;
147
+
148
+    .tips{
149
+      margin-bottom: 16px!important;
150
+    }
151
+
152
+    .modalBody {
153
+      width: 350px;
154
+      background: #fff;
155
+      border-radius: 5px;
156
+      padding: 10px 20px;
157
+      color: #333;
158
+
159
+      .title {
160
+        width: 100%;
161
+        text-align: center;
162
+        font-size: 18px;
163
+        position: relative;
164
+
165
+        i {
166
+          position: absolute;
167
+          right: 0;
168
+          top: 0;
169
+          font-size: 20px;
170
+          color: #666;
171
+          cursor: pointer;
172
+          padding: 0 5px;
173
+        }
174
+      }
175
+
176
+      .content {
177
+        width: 310px;
178
+        background: #f9fafb;
179
+        border: 1px solid #e5e9ed;
180
+        border-radius: 5px;
181
+        overflow: hidden;
182
+        margin-top: 12px;
183
+        padding: 16px 0;
184
+
185
+        .busyList{
186
+          display: flex;
187
+          margin-bottom: 8px;
188
+          .busyContent{
189
+            margin-right: 8px;
190
+            flex: 1;
191
+          }
192
+        }
193
+
194
+        & > div {
195
+          text-align: center;
196
+          margin: 0;
197
+
198
+          &.icon {
199
+            // margin-top: 17px;
200
+
201
+            i {
202
+              color: #34b349;
203
+              font-size: 30px !important;
204
+
205
+              &.transport-wenhao {
206
+                color: #f5a523;
207
+              }
208
+
209
+              &.transport-shibai {
210
+                color: #ff3a52;
211
+              }
212
+            }
213
+          }
214
+
215
+          &.defeat {
216
+            color: #333;
217
+            font-size: 14px;
218
+          }
219
+
220
+          &:nth-child(3) {
221
+            font-size: 14px;
222
+            color: #666;
223
+          }
224
+        }
225
+        .workAssignmentTips {
226
+          font-size: 12px;
227
+        }
228
+      }
229
+
230
+      button {
231
+        margin-top: 10px;
232
+
233
+        &.btn {
234
+          margin-left: 8px;
235
+        }
236
+      }
237
+    }
238
+
239
+    // 新增
240
+    &.add {
241
+      .modalBody {
242
+        width: 480px;
243
+        height: auto;
244
+
245
+        .content {
246
+          width: 100%;
247
+          height: auto;
248
+          padding: 16px;
249
+          max-height: 497px;
250
+          overflow-y: auto;
251
+
252
+          .addForm {
253
+            .ant-form-item {
254
+              margin-bottom: 0;
255
+
256
+              .ant-form-item-label {
257
+                text-align: left;
258
+              }
259
+
260
+              .desc {
261
+                margin-top: 5px;
262
+              }
263
+            }
264
+
265
+            .datesControl {
266
+              margin-top: -16px;
267
+
268
+              .ant-form-item-label {
269
+                line-height: 40px;
270
+              }
271
+            }
272
+
273
+            .timer {
274
+              .ant-form-item-label {
275
+                width: 100%;
276
+                text-align: left;
277
+              }
278
+
279
+              .numInp {
280
+                margin-right: 5px;
281
+              }
282
+
283
+              .line {
284
+                margin-right: 5px;
285
+              }
286
+            }
287
+
288
+            .timer2 {
289
+              .ant-form-item-label {
290
+                line-height: 20px;
291
+              }
292
+            }
293
+          }
294
+
295
+          .editForm {
296
+            .ant-form-item {
297
+              margin-bottom: 15px;
298
+
299
+              .ant-form-item-label {
300
+                line-height: 14px;
301
+                text-align: left;
302
+              }
303
+            }
304
+          }
305
+        }
306
+      }
307
+    }
308
+  }
309
+}

+ 30 - 0
src/app/components/incidentManagement/incident-substitutio-reassign/incident-substitution-reassign.component.ts

@@ -0,0 +1,30 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
3
+
4
+@Component({
5
+  selector: 'app-incident-substitution-reassign',
6
+  templateUrl: './incident-substitution-reassign.component.html',
7
+  styleUrls: ['./incident-substitution-reassign.component.less']
8
+})
9
+export class IncidentSubstitutionReassignComponent implements OnInit {
10
+  constructor(
11
+    private fb: FormBuilder,
12
+  ) { }
13
+
14
+  ngOnInit() {
15
+    this.initForm();
16
+  }
17
+
18
+  // 初始化新增form表单
19
+  validateForm: FormGroup; //新增/编辑表单
20
+  initForm() {
21
+    this.validateForm = this.fb.group({
22
+      reassignRemark: [null, [Validators.required]],//院区
23
+    });
24
+    console.log(this.validateForm.controls)
25
+  }
26
+}
27
+
28
+
29
+
30
+

+ 65 - 0
src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.html

@@ -0,0 +1,65 @@
1
+<form nz-form [formGroup]="validateForm" class="addForm">
2
+  <nz-form-item>
3
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="hosId">院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</nz-form-label>
4
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择院区!">
5
+      <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="hosId" nzShowSearch
6
+        nzPlaceHolder="请选择院区" nzServerSearch (ngModelChange)="changeHospital($event)">
7
+        <ng-container *ngFor="let data of hospitalList">
8
+          <nz-option *ngIf="!isLoading" [nzLabel]="data.hosName" [nzValue]="data.id"></nz-option>
9
+        </ng-container>
10
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
11
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
12
+        </nz-option>
13
+      </nz-select>
14
+    </nz-form-control>
15
+  </nz-form-item>
16
+  <nz-form-item>
17
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="dutyId">责任部门</nz-form-label>
18
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择责任部门!">
19
+      <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="dutyId" nzShowSearch
20
+        nzPlaceHolder="请选择责任部门" nzServerSearch (ngModelChange)="changeDuty($event)">
21
+        <ng-container *ngFor="let data of dutyList">
22
+          <nz-option *ngIf="!isLoading" [nzLabel]="data.hosName" [nzValue]="data.id"></nz-option>
23
+        </ng-container>
24
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
25
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
26
+        </nz-option>
27
+      </nz-select>
28
+    </nz-form-control>
29
+  </nz-form-item>
30
+  <nz-form-item>
31
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="groupId">工&nbsp;&nbsp;作&nbsp;&nbsp;组</nz-form-label>
32
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择工作组!">
33
+      <nz-select (nzOnSearch)="changeInp('group', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="groupId" nzPlaceHolder="请选择工作组" (ngModelChange)="changeGroup($event)">
34
+        <ng-container *ngFor="let option of groupList">
35
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
36
+        </ng-container>
37
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
38
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
39
+        </nz-option>
40
+      </nz-select>
41
+    </nz-form-control>
42
+  </nz-form-item>
43
+  <nz-form-item>
44
+    <nz-form-label [nzSpan]="7" nzFor="userGroup">是否指派到人</nz-form-label>
45
+    <nz-form-control [nzSpan]="17" nzErrorTip="请选择是否指派到人!">
46
+      <nz-radio-group formControlName="userGroup" (ngModelChange)="changeUserGroup($event)">
47
+        <label nz-radio [nzValue]="1">是</label>
48
+        <label nz-radio [nzValue]="0">否</label>
49
+      </nz-radio-group>
50
+    </nz-form-control>
51
+  </nz-form-item>
52
+  <nz-form-item *ngIf="validateForm.value.userGroup === 1">
53
+    <nz-form-label [nzSpan]="6" nzRequired nzFor="userId">指派对象</nz-form-label>
54
+    <nz-form-control [nzSpan]="18" nzErrorTip="请选择指派对象!">
55
+      <nz-select (nzOnSearch)="changeInp('user', $event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="userId" nzPlaceHolder="请选择指派对象">
56
+        <ng-container *ngFor="let option of userList">
57
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
58
+        </ng-container>
59
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
60
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
61
+        </nz-option>
62
+      </nz-select>
63
+    </nz-form-control>
64
+  </nz-form-item>
65
+</form>

+ 303 - 0
src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.less

@@ -0,0 +1,303 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  ::ng-deep .ant-form-item{
5
+    margin-top: 8px;
6
+    margin-bottom: 0!important;
7
+  }
8
+  ::ng-deep .ant-form-item-label{
9
+    text-align: left!important;
10
+  }
11
+  .addForm{
12
+    padding: 0 24px 8px;
13
+  }
14
+  .list-template__nzTable,
15
+  .list-template__bottom{
16
+    padding: 0!important;
17
+    border: none!important;
18
+    background: #fff!important;
19
+  }
20
+  .list-template{
21
+    width: 100%!important;
22
+    height: 100%!important;
23
+  }
24
+
25
+  .hospitalConfig{
26
+    height: 60px;
27
+    display: flex;
28
+    justify-content: center;
29
+    align-items: center;
30
+    gap: 72px;
31
+  }
32
+  .content{
33
+    flex: 1;
34
+    min-height: 0;
35
+    display: flex;
36
+    flex-direction: column;
37
+    justify-content: space-between;
38
+    border: 1px solid #EEF3F9;
39
+    &.priority{
40
+      margin: 24px 118px 0;
41
+      background-color: #fff;
42
+      .contentInner{
43
+        padding: 48px 206px;
44
+        border: 1px solid #E8EBEF;
45
+      }
46
+    }
47
+    .contentItem{
48
+      padding: 4px 16px;
49
+      cursor: pointer;
50
+      overflow: hidden;
51
+      text-overflow: ellipsis;
52
+      white-space: nowrap;
53
+      &.active{
54
+        color: @primary-color;
55
+        background-color: #F0F6ED;
56
+        border-radius: 4px;
57
+      }
58
+    }
59
+    .contentInner{
60
+      flex: 1;
61
+      display: flex;
62
+      justify-content: space-between;
63
+      align-items: center;
64
+      padding: 0 16px;
65
+      gap: 16px;
66
+      .contentHead{
67
+        height: 45px;
68
+        display: flex;
69
+        justify-content: space-between;
70
+        align-items: center;
71
+        gap: 16px;
72
+        padding: 0 16px;
73
+        font-size: 16px;
74
+        font-weight: bold;
75
+        border-bottom: 1px solid #D9D9D9;
76
+        .title{
77
+          overflow: hidden;
78
+          text-overflow: ellipsis;
79
+          white-space: nowrap;
80
+        }
81
+        .btns{
82
+          flex-shrink: 0;
83
+        }
84
+      }
85
+      .contentBody{
86
+        padding: 0 8px;
87
+        margin: 4px 0;
88
+        flex: 1;
89
+      }
90
+      .address{
91
+        flex: 1;
92
+        height: 100%;
93
+        background: #FFFFFF;
94
+        border: 1px solid #E8EBEF;
95
+        display: flex;
96
+        flex-direction: column;
97
+        width: 0;
98
+      }
99
+      .addressAssign{
100
+        flex: 3;
101
+        height: 100%;
102
+        background: #FFFFFF;
103
+        border: 1px solid #E8EBEF;
104
+        display: flex;
105
+        flex-direction: column;
106
+        width: 0;
107
+      }
108
+      .list-template__searchItem {
109
+        margin-bottom: 16px;
110
+        .label {
111
+          color: #333;
112
+          display: inline-block;
113
+          width: 70px;
114
+          text-align-last: justify;
115
+          text-align: justify;
116
+          &.label--big {
117
+            width: 100px;
118
+          }
119
+        }
120
+        .formItem {
121
+          width: 135px;
122
+        }
123
+      }
124
+    }
125
+    .contentBtns{
126
+      margin-bottom: 16px;
127
+      display: flex;
128
+      justify-content: center;
129
+      align-items: center;
130
+    }
131
+  }
132
+
133
+  .save {
134
+    position: fixed;
135
+    left: 0;
136
+    top: 0;
137
+    width: 100%;
138
+    height: 100%;
139
+    background: rgba(0, 0, 0, 0.4);
140
+    z-index: 99;
141
+
142
+    .tips{
143
+      margin-bottom: 16px!important;
144
+    }
145
+
146
+    .modalBody {
147
+      width: 350px;
148
+      background: #fff;
149
+      border-radius: 5px;
150
+      padding: 10px 20px;
151
+      color: #333;
152
+
153
+      .title {
154
+        width: 100%;
155
+        text-align: center;
156
+        font-size: 18px;
157
+        position: relative;
158
+
159
+        i {
160
+          position: absolute;
161
+          right: 0;
162
+          top: 0;
163
+          font-size: 20px;
164
+          color: #666;
165
+          cursor: pointer;
166
+          padding: 0 5px;
167
+        }
168
+      }
169
+
170
+      .content {
171
+        width: 310px;
172
+        background: #f9fafb;
173
+        border: 1px solid #e5e9ed;
174
+        border-radius: 5px;
175
+        overflow: hidden;
176
+        margin-top: 12px;
177
+        padding: 16px 0;
178
+
179
+        .busyList{
180
+          display: flex;
181
+          margin-bottom: 8px;
182
+          .busyContent{
183
+            margin-right: 8px;
184
+            flex: 1;
185
+          }
186
+        }
187
+
188
+        & > div {
189
+          text-align: center;
190
+          margin: 0;
191
+
192
+          &.icon {
193
+            // margin-top: 17px;
194
+
195
+            i {
196
+              color: #34b349;
197
+              font-size: 30px !important;
198
+
199
+              &.transport-wenhao {
200
+                color: #f5a523;
201
+              }
202
+
203
+              &.transport-shibai {
204
+                color: #ff3a52;
205
+              }
206
+            }
207
+          }
208
+
209
+          &.defeat {
210
+            color: #333;
211
+            font-size: 14px;
212
+          }
213
+
214
+          &:nth-child(3) {
215
+            font-size: 14px;
216
+            color: #666;
217
+          }
218
+        }
219
+        .workAssignmentTips {
220
+          font-size: 12px;
221
+        }
222
+      }
223
+
224
+      button {
225
+        margin-top: 10px;
226
+
227
+        &.btn {
228
+          margin-left: 8px;
229
+        }
230
+      }
231
+    }
232
+
233
+    // 新增
234
+    &.add {
235
+      .modalBody {
236
+        width: 480px;
237
+        height: auto;
238
+
239
+        .content {
240
+          width: 100%;
241
+          height: auto;
242
+          padding: 16px;
243
+          max-height: 497px;
244
+          overflow-y: auto;
245
+
246
+          .addForm {
247
+            .ant-form-item {
248
+              margin-bottom: 0;
249
+
250
+              .ant-form-item-label {
251
+                text-align: left;
252
+              }
253
+
254
+              .desc {
255
+                margin-top: 5px;
256
+              }
257
+            }
258
+
259
+            .datesControl {
260
+              margin-top: -16px;
261
+
262
+              .ant-form-item-label {
263
+                line-height: 40px;
264
+              }
265
+            }
266
+
267
+            .timer {
268
+              .ant-form-item-label {
269
+                width: 100%;
270
+                text-align: left;
271
+              }
272
+
273
+              .numInp {
274
+                margin-right: 5px;
275
+              }
276
+
277
+              .line {
278
+                margin-right: 5px;
279
+              }
280
+            }
281
+
282
+            .timer2 {
283
+              .ant-form-item-label {
284
+                line-height: 20px;
285
+              }
286
+            }
287
+          }
288
+
289
+          .editForm {
290
+            .ant-form-item {
291
+              margin-bottom: 15px;
292
+
293
+              .ant-form-item-label {
294
+                line-height: 14px;
295
+                text-align: left;
296
+              }
297
+            }
298
+          }
299
+        }
300
+      }
301
+    }
302
+  }
303
+}

+ 190 - 0
src/app/components/incidentManagement/incident-substitutio-redeploy/incident-substitution-redeploy.component.ts

@@ -0,0 +1,190 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+
8
+@Component({
9
+  selector: 'app-incident-substitution-redeploy',
10
+  templateUrl: './incident-substitution-redeploy.component.html',
11
+  styleUrls: ['./incident-substitution-redeploy.component.less']
12
+})
13
+export class IncidentSubstitutionRedeployComponent implements OnInit {
14
+  constructor(
15
+    private mainService: MainService,
16
+    private fb: FormBuilder,
17
+    private tool: ToolService,
18
+  ) { }
19
+
20
+  changeInpSubject = new Subject(); //防抖
21
+
22
+  ngOnInit() {
23
+    //防抖
24
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
25
+      if(v[0] === 'user'){
26
+        this.getUsers(v[1]);
27
+      } else if(v[0] === 'group'){
28
+        this.getGroups(v[1]);
29
+      }
30
+    });
31
+    this.initForm();
32
+    this.getHospitals(1);
33
+  }
34
+
35
+  // 初始化新增form表单
36
+  validateForm: FormGroup; //新增/编辑表单
37
+  initForm() {
38
+    this.validateForm = this.fb.group({
39
+      hosId: [null, [Validators.required]],//院区
40
+      dutyId: [null, [Validators.required]],//责任部门
41
+      userGroup: [1, [Validators.required]],//分配方式
42
+      userId: [null],//人
43
+      groupId: [null, [Validators.required]],//组
44
+    });
45
+    console.log(this.validateForm.controls)
46
+  }
47
+
48
+  // 修改院区
49
+  changeHospital(id){
50
+    this.validateForm.controls.dutyId.setValue(null);
51
+    this.validateForm.controls.userId.setValue(null);
52
+    this.validateForm.controls.groupId.setValue(null);
53
+
54
+    this.dutyList = [];
55
+    this.userList = [];
56
+    this.groupList = [];
57
+    this.getHospitals(2, id);
58
+  }
59
+
60
+  // 修改责任部门
61
+  changeDuty(id){
62
+    this.validateForm.controls.userId.setValue(null);
63
+    this.validateForm.controls.groupId.setValue(null);
64
+
65
+    this.userList = [];
66
+    this.groupList = [];
67
+    this.getGroups();
68
+  }
69
+
70
+  // 修改组
71
+  changeGroup(id){
72
+    this.validateForm.controls.userId.setValue(null);
73
+    this.getUsers();
74
+  }
75
+
76
+  // 选择人|组
77
+  changeUserGroup(id){
78
+    this.validateForm.controls.userId.setValue(null);
79
+    this.userList = [];
80
+    if(id === 1){
81
+      // 人
82
+      this.requiredConfigChange('userId', true);
83
+    }else if(id === 2){
84
+      // 组
85
+      this.requiredConfigChange('userId', false);
86
+    }
87
+  }
88
+
89
+  requiredConfigChange(name: string, required: boolean): void {
90
+    if (!required) {
91
+      this.validateForm.get(name)!.clearValidators();
92
+      this.validateForm.get(name)!.markAsPristine();
93
+    } else {
94
+      this.validateForm.get(name)!.setValidators(Validators.required);
95
+      this.validateForm.get(name)!.markAsDirty();
96
+    }
97
+    this.validateForm.get(name)!.updateValueAndValidity();
98
+  }
99
+
100
+  // 边输边搜节流阀
101
+  isLoading = false;
102
+  changeInp(model, e) {
103
+    this.isLoading = true;
104
+    this.changeInpSubject.next([model, e]);
105
+  }
106
+
107
+  // 获取院区
108
+  hospitalList: any = [];
109
+  dutyList: any = [];
110
+  getHospitals(type:number, parentId?) {
111
+    if(type === 1){
112
+      this.hospitalList = this.tool.getHospitalList().filter(v => !v.parent);
113
+      return;
114
+    }
115
+    if(type === 2 && !parentId){
116
+      this.dutyList = [];
117
+      return;
118
+    }
119
+    let postData = {
120
+      hospital: {
121
+        parent: { id: parentId },
122
+        type: { key: 'hospital_type', value: '6' },
123
+      },
124
+      idx: 0,
125
+      sum: 9999,
126
+    };
127
+    this.mainService
128
+      .getFetchDataList("data", "hospital", postData)
129
+      .subscribe((data) => {
130
+        this.isLoading = false;
131
+        this.dutyList = data.list || [];
132
+      });
133
+  }
134
+
135
+  // 搜索
136
+  // 获取用户
137
+  userList: any = [];
138
+  getUsers(keyword = '') {
139
+    if((!this.validateForm.value.groupId && this.validateForm.value.userGroup === 1) || this.validateForm.value.userGroup === 0){
140
+      this.userList = [];
141
+      return;
142
+    }
143
+    let postData = {
144
+      user: {
145
+        hospital: { id: this.validateForm.value.dutyId },
146
+        name: keyword,
147
+        simpleQuery: true,
148
+        groupdata: { id: this.validateForm.value.groupId },
149
+      },
150
+      idx: 0,
151
+      sum: 10,
152
+    };
153
+    this.mainService
154
+      .getFetchDataList("data", "user", postData)
155
+      .subscribe((data) => {
156
+        this.isLoading = false;
157
+        let userList = data.list || [];
158
+        this.userList = userList;
159
+      });
160
+  }
161
+
162
+  // 获取组
163
+  groupList: any = []; //所有所属科室(搜索)
164
+  getGroups(keyword = '') {
165
+    if(!this.validateForm.value.dutyId){
166
+      this.groupList = [];
167
+      return;
168
+    }
169
+    let postData = {
170
+      group2: {
171
+        groupName: keyword,
172
+        hospitals: this.validateForm.value.dutyId,
173
+        type: 1,
174
+      },
175
+      idx: 0,
176
+      sum: 10,
177
+    };
178
+    this.mainService
179
+      .getFetchDataList("data", "group2", postData)
180
+      .subscribe((data) => {
181
+        this.isLoading = false;
182
+        let groupList = data.list || [];
183
+        this.groupList = groupList;
184
+      });
185
+  }
186
+}
187
+
188
+
189
+
190
+

+ 1 - 0
src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.html

@@ -0,0 +1 @@
1
+升级

+ 0 - 0
src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.less


+ 24 - 0
src/app/components/incidentManagement/incident-substitutio-upgrade/incident-substitution-upgrade.component.ts

@@ -0,0 +1,24 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
4
+import { ToolService } from 'src/app/services/tool.service';
5
+
6
+@Component({
7
+  selector: 'app-incident-substitution-upgrade',
8
+  templateUrl: './incident-substitution-upgrade.component.html',
9
+  styleUrls: ['./incident-substitution-upgrade.component.less']
10
+})
11
+export class IncidentSubstitutionUpgradeComponent implements OnInit {
12
+  constructor(
13
+    private mainService: MainService,
14
+    private fb: FormBuilder,
15
+    private tool: ToolService,
16
+  ) { }
17
+
18
+
19
+  ngOnInit() {}
20
+}
21
+
22
+
23
+
24
+

+ 31 - 0
src/app/components/incidentManagement/incident-substitution/incident-substitution.component.html

@@ -0,0 +1,31 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody">
3
+    <div class="title">换人处理<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <overlay-scrollbars #osComponentRef1 class="workingArea" *ngIf="tabs.length">
6
+        <div class="tabs">
7
+          <div class="tab" *ngFor="let item of tabs" (click)="clickTbab(item)" [ngClass]="{ active: activeTabValue === item.value }">{{ item.name }}</div>
8
+        </div>
9
+        <ng-container *ngIf="activeTabValue === 'redeploy'">
10
+          <app-incident-substitution-redeploy></app-incident-substitution-redeploy>
11
+        </ng-container>
12
+        <ng-container *ngIf="activeTabValue === 'assign'">
13
+          <app-incident-substitution-assign></app-incident-substitution-assign>
14
+        </ng-container>
15
+        <ng-container *ngIf="activeTabValue === 'upgrade'">
16
+          <app-incident-substitution-upgrade></app-incident-substitution-upgrade>
17
+        </ng-container>
18
+        <ng-container *ngIf="activeTabValue === 'reassign'">
19
+          <app-incident-substitution-reassign></app-incident-substitution-reassign>
20
+        </ng-container>
21
+      </overlay-scrollbars>
22
+    </div>
23
+    <div class="display_flex justify-content_flex-center">
24
+      <button nz-button nzType="primary" (click)="submitForm()"[nzLoading]="isLoading">确认</button>
25
+      <button nz-button nzType="default" class="btn cancel" (click)="hideModal()">取消</button>
26
+    </div>
27
+  </div>
28
+</div>
29
+
30
+<!-- 遮罩 -->
31
+<app-mask *ngIf="maskFlag"></app-mask>

+ 161 - 0
src/app/components/incidentManagement/incident-substitution/incident-substitution.component.less

@@ -0,0 +1,161 @@
1
+@import "../../../../../src/theme.less";
2
+.coop span {
3
+  display: inline-block;
4
+  padding: 0 8px;
5
+  cursor: pointer;
6
+  position: relative;
7
+}
8
+.modal {
9
+  position: fixed;
10
+  left: 0;
11
+  top: 0;
12
+  width: 100%;
13
+  height: 100%;
14
+  background: rgba(0, 0, 0, 0.4);
15
+  z-index: 8;
16
+  .ji {
17
+    position: absolute;
18
+    right: 0px;
19
+    top: -3px;
20
+    width: 30px;
21
+  }
22
+  .hospitalTable {
23
+    width: 100%;
24
+    td {
25
+      text-align: center !important;
26
+      position: relative;
27
+    }
28
+    .thead {
29
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
30
+      th {
31
+        text-align: center !important;
32
+        color: #fff;
33
+        background: transparent;
34
+      }
35
+    }
36
+  }
37
+
38
+  .modalBody {
39
+    width: 442px;
40
+    min-height: 220px;
41
+    background: #fff;
42
+    border-radius: 5px;
43
+    padding: 10px 20px;
44
+    color: #333;
45
+    &.modalBody-search {
46
+      width: 480px;
47
+      min-height: 250px;
48
+    }
49
+
50
+    .title {
51
+      width: 100%;
52
+      text-align: center;
53
+      font-size: 18px;
54
+      position: relative;
55
+
56
+      i {
57
+        position: absolute;
58
+        right: 0;
59
+        top: 0;
60
+        font-size: 20px;
61
+        color: #666;
62
+        cursor: pointer;
63
+        padding: 0 5px;
64
+      }
65
+    }
66
+
67
+    .content {
68
+      min-height: 117px;
69
+      border: 1px solid #e5e9ed;
70
+      border-radius: 5px;
71
+      overflow: hidden;
72
+      margin-top: 12px;
73
+      display: flex;
74
+      .detail{
75
+        width: 366px;
76
+        height: 100%;
77
+        padding: 16px;
78
+        border-right: 1px solid #E9E9E9;
79
+        .detailItem{
80
+          display: flex;
81
+          margin-bottom: 16px;
82
+          .name{
83
+            width: 5em;
84
+            flex-shrink: 0;
85
+          }
86
+          .value{
87
+            flex: 1;
88
+            text-align: justify;
89
+          }
90
+          .thumbs{
91
+            display: flex;
92
+            align-items: center;
93
+            flex-wrap: wrap;
94
+            gap: 8px;
95
+            .thumb{
96
+              width: 64px;
97
+              height: 64px;
98
+              padding: 4px;
99
+              border-radius: 4px;
100
+              border: 1px solid rgba(0,0,0,0.15);
101
+              img{
102
+                max-width: 100%;
103
+                height: 100%;
104
+              }
105
+            }
106
+          }
107
+
108
+          .audio{
109
+            width: 264px;
110
+            height: 1.5em;
111
+          }
112
+        }
113
+      }
114
+      .workingArea{
115
+        flex: 1;
116
+        height: 100%;
117
+        background: #F9FAFB;
118
+        .tabs{
119
+          height: 44px;
120
+          border-bottom: 1px solid #D9D9D9;
121
+          display: flex;
122
+          align-items: center;
123
+          .tab{
124
+            flex: 1;
125
+            display: flex;
126
+            height: 100%;
127
+            justify-content: center;
128
+            align-items: center;
129
+            font-size: #333;
130
+            cursor: pointer;
131
+            &.active{
132
+              color: @primary-color;
133
+              border-bottom: 2px solid @primary-color;
134
+            }
135
+          }
136
+        }
137
+      }
138
+      .knowage{
139
+        width: 354px;
140
+        height: 100%;
141
+        padding: 16px;
142
+        border-left: 1px solid #E9E9E9;
143
+        .knowageItem{
144
+          padding: 16px;
145
+        }
146
+        .knowageBtns{
147
+          text-align: right;
148
+        }
149
+      }
150
+    }
151
+
152
+    button {
153
+      margin-top: 10px;
154
+
155
+      &.btn {
156
+        margin-left: 8px;
157
+      }
158
+    }
159
+  }
160
+
161
+}

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

@@ -0,0 +1,193 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router, ActivatedRoute } from '@angular/router';
4
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+import { IncidentSubstitutionRedeployComponent } from '../incident-substitutio-redeploy/incident-substitution-redeploy.component';
8
+import { IncidentSubstitutionAssignComponent } from '../incident-substitutio-assign/incident-substitution-assign.component';
9
+import { IncidentSubstitutionUpgradeComponent } from '../incident-substitutio-upgrade/incident-substitution-upgrade.component';
10
+import { IncidentSubstitutionReassignComponent } from '../incident-substitutio-reassign/incident-substitution-reassign.component';
11
+
12
+@Component({
13
+  selector: 'app-incident-substitution',
14
+  templateUrl: './incident-substitution.component.html',
15
+  styleUrls: ['./incident-substitution.component.less']
16
+})
17
+export class IncidentSubstitutionComponent implements OnInit {
18
+  @ViewChild("osComponentRef1", {
19
+    read: OverlayScrollbarsComponent,
20
+    static: false,
21
+  })
22
+  osComponentRef1: OverlayScrollbarsComponent;
23
+  @ViewChild(IncidentSubstitutionRedeployComponent, { static: false }) redeploy!: IncidentSubstitutionRedeployComponent;
24
+  @ViewChild(IncidentSubstitutionAssignComponent, { static: false }) assign!: IncidentSubstitutionAssignComponent;
25
+  @ViewChild(IncidentSubstitutionUpgradeComponent, { static: false }) upgrade!: IncidentSubstitutionUpgradeComponent;
26
+  @ViewChild(IncidentSubstitutionReassignComponent, { static: false }) reassign!: IncidentSubstitutionReassignComponent;
27
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
28
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
29
+
30
+  @Input() id: any;
31
+
32
+  constructor(
33
+    private mainService: MainService,
34
+    private router: Router,
35
+    private route: ActivatedRoute,
36
+    private message: NzMessageService,
37
+    private tool: ToolService,
38
+  ) { }
39
+
40
+  isLoading = false;
41
+
42
+  // 初始化增删改按钮
43
+  coopBtns: any = {};
44
+
45
+  tabs:any[] = [
46
+    // {id: 1, name: '转派', value: 'redeploy', num: ''},
47
+    // {id: 2, name: '指派', value: 'assign', num: ''},
48
+    // {id: 3, name: '升级', value: 'upgrade', num: ''},
49
+    // {id: 4, name: '退回', value: 'reassign', num: ''},
50
+  ]
51
+
52
+  ngOnInit() {
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
54
+    console.log(this.coopBtns)
55
+    this.operationAuthority();
56
+  }
57
+
58
+  // 点击tab
59
+  activeTabValue:any;
60
+  clickTbab(item){
61
+    this.activeTabValue = item.value;
62
+  }
63
+
64
+  // 操作权限
65
+  incidentData:any = {};
66
+  maskFlag:any = false;
67
+  operationAuthority(){
68
+    this.maskFlag = this.message.loading("正在加载中..", {
69
+      nzDuration: 0,
70
+    }).messageId;
71
+    this.mainService
72
+      .getFetchData("simple/data", "incident", this.id)
73
+      .subscribe((result) => {
74
+        this.message.remove(this.maskFlag);
75
+        this.maskFlag = false;
76
+        this.incidentData = result.data || {};
77
+
78
+        // 转派
79
+        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: ''});
81
+        }
82
+
83
+        // 指派
84
+        if((this.incidentData.state.value == 'pending' || this.incidentData.state.value == 'handler' || this.incidentData.state.value == 'reassign') && this.coopBtns.assign){
85
+          let index = this.tabs.findIndex(v => v.value === 'reassign');
86
+          if(index < 0){
87
+            this.tabs = [{id: 2, name: '指派', value: 'assign', num: ''}];
88
+          }else{
89
+            this.tabs.splice(index, 0, {id: 2, name: '指派', value: 'assign', num: ''});
90
+          }
91
+        }
92
+
93
+        // 退回
94
+        if(this.incidentData.state.value == 'pending' || this.incidentData.state.value == 'handler'){
95
+          if(this.tabs.length){
96
+            this.tabs.splice(this.tabs.length, 0, {id: 4, name: '退回', value: 'reassign', num: ''});
97
+          }else{
98
+            this.tabs = [{id: 4, name: '退回', value: 'reassign', num: ''}];
99
+          }
100
+        }
101
+
102
+        this.clickTbab(this.tabs[0]);
103
+      });
104
+  }
105
+
106
+  // 关闭弹窗
107
+  hideModal() {
108
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
109
+  }
110
+
111
+  // 表单提交
112
+  submitForm(): void {
113
+    if(this.activeTabValue === 'assign'){
114
+      // 指派
115
+      for (const i in this.assign.validateForm.controls) {
116
+        this.assign.validateForm.controls[i].markAsDirty();
117
+        this.assign.validateForm.controls[i].updateValueAndValidity();
118
+      }
119
+      if (this.assign.validateForm.invalid) {
120
+        return;
121
+      }
122
+
123
+      this.maskFlag = this.message.loading("正在加载中..", {
124
+        nzDuration: 0,
125
+      }).messageId;
126
+
127
+      let postData = {
128
+        incident: this.incidentData,
129
+      }
130
+
131
+      if(this.assign.validateForm.value.userId){
132
+        // 派人
133
+        postData.incident.assignee = this.assign.validateForm.value.userId;
134
+      } else {
135
+        // 派组
136
+        postData.incident.candidateGroups = this.assign.validateForm.value.groupId;
137
+      }
138
+
139
+      postData.incident.duty = { id: this.assign.validateForm.value.dutyId };
140
+
141
+      this.mainService
142
+      .flowPost("incident/task/assign", postData)
143
+      .subscribe((result) => {
144
+        this.message.remove(this.maskFlag);
145
+        this.maskFlag = false;
146
+        this.confirmModelHs.emit();
147
+
148
+        if (result.state == 200) {
149
+          this.message.success('指派成功');
150
+        } else {
151
+          this.message.error('指派失败');
152
+        }
153
+      });
154
+    }else if(this.activeTabValue === 'reassign'){
155
+      // 退回
156
+      for (const i in this.reassign.validateForm.controls) {
157
+        this.reassign.validateForm.controls[i].markAsDirty();
158
+        this.reassign.validateForm.controls[i].updateValueAndValidity();
159
+      }
160
+      if (this.reassign.validateForm.invalid) {
161
+        return;
162
+      }
163
+
164
+      this.maskFlag = this.message.loading("正在加载中..", {
165
+        nzDuration: 0,
166
+      }).messageId;
167
+
168
+      let postData = {
169
+        incident: this.incidentData,
170
+      }
171
+
172
+      postData.incident.reassignRemark = this.reassign.validateForm.value.reassignRemark;
173
+
174
+      this.mainService
175
+      .flowPost("incident/task/reassign", postData)
176
+      .subscribe((result) => {
177
+        this.message.remove(this.maskFlag);
178
+        this.maskFlag = false;
179
+        this.confirmModelHs.emit();
180
+
181
+        if (result.state == 200) {
182
+          this.message.success('退回成功');
183
+        } else {
184
+          this.message.error('退回失败');
185
+        }
186
+      });
187
+    }
188
+  }
189
+}
190
+
191
+
192
+
193
+

+ 28 - 0
src/app/components/incidentManagement/incident-substitution/incident-substitution.module.ts

@@ -0,0 +1,28 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { IncidentSubstitutionComponent } from './incident-substitution.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { IncidentSubstitutionRedeployComponent } from '../incident-substitutio-redeploy/incident-substitution-redeploy.component';
7
+import { IncidentSubstitutionAssignComponent } from '../incident-substitutio-assign/incident-substitution-assign.component';
8
+import { IncidentSubstitutionUpgradeComponent } from '../incident-substitutio-upgrade/incident-substitution-upgrade.component';
9
+import { IncidentSubstitutionReassignComponent } from '../incident-substitutio-reassign/incident-substitution-reassign.component';
10
+
11
+
12
+@NgModule({
13
+  declarations: [
14
+    IncidentSubstitutionComponent,
15
+    IncidentSubstitutionRedeployComponent,
16
+    IncidentSubstitutionAssignComponent,
17
+    IncidentSubstitutionUpgradeComponent,
18
+    IncidentSubstitutionReassignComponent,
19
+  ],
20
+  imports: [
21
+    CommonModule,
22
+    ShareModule,
23
+  ],
24
+  exports: [
25
+    IncidentSubstitutionComponent,
26
+  ]
27
+})
28
+export class IncidentSubstitutionModule { }

+ 73 - 0
src/app/components/knowledge-look/knowledge-look.component.html

@@ -0,0 +1,73 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center">
2
+  <div class="modalBody">
3
+    <div class="title">查看</div>
4
+    <!-- <overlay-scrollbars #osComponentRef1 class="content"> -->
5
+     <div class="view-box">
6
+       <div class="view-item left-box">
7
+         <div class="item-left-list"
8
+         [ngClass]="{'activeClass': index == vIndex}"
9
+         *ngFor="let item of detailData let index=index;" (click)="versionsClick(item, index)">V{{item.versionNumber}}</div>
10
+       </div>
11
+       <div class="view-item center-box" *ngIf="lookData&&lookData.title">
12
+         <div class="title">{{lookData.title}}</div>
13
+         <div class="title-sign">
14
+           <div class="width-180">知识分类:{{lookData.type.name}}</div>
15
+           <div>报修可见:{{lookData.repairVisible=='1'?'是':'否'}}</div>
16
+           <div>版本号:V{{lookData.versionNumber || ''}}</div>
17
+         </div>
18
+         <div class="title-sign">
19
+           <div class="width-180" *ngIf="lookData.type.value=='1'">关联故障:{{lookData.incidentCategory?lookData.incidentCategory.mutiCategory: ''}}</div>
20
+           <div class="width-180" *ngIf="lookData.type.value=='2'">关联巡检:{{lookData.inspectionForm?lookData.inspectionForm.name: ''}}</div>
21
+           <div>关联产品:{{lookData.assetProduct?lookData.assetProduct.name:''}}</div>
22
+         </div>
23
+         <div class="content-class" *ngIf="richText" [innerHTML]="richText"></div>
24
+         <div class="file-box" *ngIf="fileData.length>0">
25
+           <div>附件列表:</div>
26
+           <div>
27
+             <div class="file-class" *ngFor="let item of fileData" (click)="fileClick(item)">
28
+               {{item.name}}
29
+              <span nz-icon nzType="download" nzTheme="outline" class="download-icon"></span>
30
+             </div>
31
+           </div>
32
+         </div>
33
+       </div>
34
+       <div class="view-item right-box" *ngIf="solutionLogs">
35
+         <nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
36
+          <ng-container *ngFor="let item of solutionLogs; let index = index">
37
+              <nz-step
38
+                [nzDescription]="tpl"
39
+              >
40
+              </nz-step>
41
+              <ng-template #tpl>
42
+                <div *ngIf="index==solutionLogs.length-1" class="step-size">
43
+                  <div>
44
+                    <span style="color: #49B856;">{{item.operationStatus.name}}</span>
45
+                    &nbsp;&nbsp;&nbsp;
46
+                    <span style="color:#333;">{{item.operationUser.name}}</span>
47
+                  </div>
48
+                  <div style="color:#333;">{{ item.time }}</div>
49
+                  <div class="back-class" nz-tooltip [nzTooltipTitle]="item.rejectedReason" *ngIf="item.operationStatus.value=='3'">(驳回原因)</div>
50
+                </div>
51
+                <div *ngIf="index!=solutionLogs.length-1" class="step-size">
52
+                  <div>
53
+                    <span>{{item.operationStatus.name}}</span>
54
+                    &nbsp;&nbsp;&nbsp;
55
+                    <span>{{item.operationUser.name}}</span>
56
+                  </div>
57
+                  <div>{{ item.time }}</div>
58
+                  <div class="back-class" nz-tooltip [nzTooltipTitle]="item.rejectedReason" *ngIf="item.operationStatus.value=='3'">(驳回原因)</div>
59
+                </div>
60
+              </ng-template>
61
+            </ng-container>
62
+         </nz-steps>
63
+       </div>
64
+     </div>
65
+    <!-- </overlay-scrollbars> -->
66
+    <div class="display_flex justify-content_flex-center">
67
+      <button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
68
+    </div>
69
+    <div class="mask-style" *ngIf="isSpinning">
70
+      <nz-spin nzSimple class="spin-style"></nz-spin>
71
+    </div>
72
+  </div>
73
+</div>

+ 343 - 0
src/app/components/knowledge-look/knowledge-look.component.less

@@ -0,0 +1,343 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  .add-button {
4
+    margin: 0 auto 16px !important;
5
+  }
6
+  .targetDept {
7
+    overflow: hidden;
8
+    // width: 90px;
9
+    text-overflow: ellipsis;
10
+    white-space: nowrap;
11
+  }
12
+  .dynamic {
13
+    margin-bottom: 16px;
14
+    display: flex;
15
+    align-items: center;
16
+    input {
17
+      width: 90%;
18
+    }
19
+    i {
20
+      margin-left: 8px;
21
+      cursor: pointer;
22
+      font-size: 18px;
23
+    }
24
+  }
25
+}
26
+
27
+.save {
28
+  position: fixed;
29
+  left: 0;
30
+  top: 0;
31
+  width: 100%;
32
+  height: 100%;
33
+  background: rgba(0, 0, 0, 0.4);
34
+  z-index: 99;
35
+
36
+  .modalBody {
37
+    width: 70%;
38
+    background: #fff;
39
+    border-radius: 5px;
40
+    padding: 10px 20px;
41
+    color: #333;
42
+
43
+    .title {
44
+      width: 100%;
45
+      text-align: center;
46
+      font-size: 18px;
47
+      position: relative;
48
+			margin-bottom: 10px;
49
+      i {
50
+        position: absolute;
51
+        right: 0;
52
+        top: 0;
53
+        font-size: 20px;
54
+        color: #666;
55
+        cursor: pointer;
56
+        padding: 0 5px;
57
+      }
58
+    }
59
+    .content {
60
+      width: 100%;
61
+      height: 117px;
62
+      background: #f9fafb;
63
+      border: 1px solid #e5e9ed;
64
+      border-radius: 5px;
65
+      overflow: hidden;
66
+      margin-top: 12px;
67
+
68
+      div {
69
+        text-align: center;
70
+        margin: 0;
71
+
72
+        &.icon {
73
+          margin-top: 17px;
74
+
75
+          i {
76
+            color: #34b349;
77
+            font-size: 30px !important;
78
+
79
+            &.transport-wenhao {
80
+              color: #f5a523;
81
+            }
82
+
83
+            &.transport-shibai {
84
+              color: #ff3a52;
85
+            }
86
+          }
87
+        }
88
+
89
+        &.defeat {
90
+          color: #333;
91
+          font-size: 18px;
92
+        }
93
+
94
+        &:nth-child(3) {
95
+          font-size: 14px;
96
+          color: #666;
97
+        }
98
+      }
99
+    }
100
+
101
+    button {
102
+      margin-top: 10px;
103
+
104
+      &.btn {
105
+        margin-left: 8px;
106
+      }
107
+    }
108
+  }
109
+
110
+  // 查看/审核
111
+  &.add {
112
+    .modalBody {
113
+      width: 70%;
114
+      height: auto;
115
+				.mask-style{
116
+					width: 100%;
117
+					height: 100%;
118
+					position: fixed;
119
+					top: 0;
120
+					left: 0;
121
+					z-index: 999;
122
+					display: flex;
123
+					background: rgba(0,0,0,0.2);
124
+					align-items: center;
125
+					justify-content: center;
126
+				}
127
+				.spin-style{
128
+					z-index:9999;
129
+				}
130
+			.view-box{
131
+				height: 400px;
132
+				display: flex;
133
+				border: 1px solid #eee;
134
+				.left-box{
135
+					flex: 1;
136
+					font-size: 14px;
137
+					border-right: 1px solid #E9E9E9;
138
+					overflow-y: auto;
139
+					.item-left-list{
140
+						display: flex;
141
+						align-items: center;
142
+						height: 35px;
143
+						padding-left: 10px;
144
+						cursor: pointer;
145
+					}
146
+				}
147
+				.center-box{
148
+					flex: 6;
149
+					padding: 0 20px 20px 20px;
150
+					border-right: 1px solid #E9E9E9;
151
+					height: auto;
152
+					overflow-y: auto;
153
+					.title{
154
+						margin: 10px 0 10px 0;
155
+						font-weight: bold;
156
+						font-size: 20px;
157
+						color: #000000;
158
+						font-style: normal;
159
+						text-transform: none;
160
+					}
161
+					.title-sign{
162
+						display: flex;
163
+						font-weight: 400;
164
+						font-size: 12px;
165
+						color: #555555;
166
+						margin-bottom: 5px;
167
+						.width-180{
168
+							width: 160px;
169
+						}
170
+						div{
171
+							margin-right: 60px;
172
+						}
173
+					}
174
+					.content-class{
175
+						margin-top: 20px;
176
+					}
177
+					.file-box{
178
+						margin-top: 30px;
179
+						font-size: 14px;
180
+						.file-class{
181
+							color: #1890FF;
182
+							text-decoration: underline;
183
+							margin-left: 10px;
184
+							cursor: pointer;
185
+						}
186
+						.download-icon{
187
+							margin-left: 8px;
188
+						}
189
+					}
190
+				}
191
+				.right-box{
192
+					flex: 1.6;
193
+					padding: 10px;
194
+					font-size: 14px;
195
+					overflow-y: auto;
196
+					.back-class{
197
+						color: red;
198
+						cursor: pointer;
199
+					}
200
+				}
201
+			}
202
+      .content {
203
+        width: 100%;
204
+        height: auto;
205
+        padding: 19px 14px 0 14px;
206
+        max-height: 500px;
207
+        overflow-y: auto;
208
+
209
+				.ant-select{
210
+					width: 100%;
211
+				}
212
+				.ant-calendar-picker{
213
+					width: 100% !important;
214
+				}
215
+				.list-template__bottom {
216
+				  background: #f9fafb;
217
+				  border: 1px solid #e5e9ed;
218
+				  border-radius: 8px;
219
+				  padding-bottom: 56px;
220
+				  position: relative;
221
+				  .list-template__nzTable {
222
+				    padding: 16px 16px 0;
223
+
224
+				    .thead {
225
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
226
+
227
+				      th {
228
+				        background: transparent;
229
+				        color: #fff;
230
+				        text-align: center;
231
+				      }
232
+				    }
233
+
234
+				    .ant-table-body {
235
+				      border-bottom: 1px solid #e5e9ed;
236
+				    }
237
+
238
+				    .ant-table-tbody {
239
+				      tr {
240
+				        text-align: center;
241
+				        color: #333;
242
+
243
+				        td {
244
+				          border: none;
245
+
246
+				          &.tab_hover:hover{
247
+				            text-decoration: underline;
248
+				            cursor: pointer;
249
+				          }
250
+
251
+				          .coop {
252
+				            button{
253
+				              color: #333;
254
+				            }
255
+				            span,button {
256
+				              display: inline-block;
257
+				              padding: 0 8px;
258
+				              cursor: pointer;
259
+				              position: relative;
260
+
261
+				              &::after {
262
+				                content: "|";
263
+				                position: absolute;
264
+				                top: 0;
265
+				                right: 0;
266
+				              }
267
+
268
+				              &:hover,
269
+				              &:active {
270
+				                color: @primary-color;
271
+				              }
272
+
273
+				              &:nth-last-child(1) {
274
+				                &::after {
275
+				                  content: "";
276
+				                }
277
+				              }
278
+				            }
279
+				          }
280
+				        }
281
+				      }
282
+				    }
283
+				  }
284
+				  .list-template__pagination {
285
+				    height: 56px;
286
+				    display: flex;
287
+				    align-items: center;
288
+				    position: absolute;
289
+				    right: 8px;
290
+				  }
291
+				}
292
+
293
+        .addForm {
294
+          .ant-form-item {
295
+            margin-bottom: 14px;
296
+
297
+            .ant-form-item-label {
298
+              line-height: 14px;
299
+              text-align: left;
300
+            }
301
+          }
302
+        }
303
+
304
+        .editForm {
305
+          .ant-form-item {
306
+            margin-bottom: 14px;
307
+
308
+            .ant-form-item-label {
309
+              line-height: 0;
310
+              text-align: left;
311
+            }
312
+          }
313
+        }
314
+      }
315
+    }
316
+  }
317
+}
318
+
319
+.activeClass{
320
+	background: #F0F6ED;
321
+}
322
+
323
+.monad{
324
+	margin-top: 20px;
325
+	.monad-list{
326
+		border: 1px solid #e7e7e7;
327
+		border-radius: 5px;
328
+		margin-bottom: 40px;
329
+		padding: 20px;
330
+	}
331
+	.monad-title{
332
+		text-align: center;
333
+		font-weight: 700;
334
+		font-size: 16px;
335
+	}
336
+	.monad-sign{
337
+		display: flex;
338
+		line-height: 30px;
339
+		div{
340
+			margin-right: 15px;
341
+		}
342
+	}
343
+}

+ 118 - 0
src/app/components/knowledge-look/knowledge-look.component.ts

@@ -0,0 +1,118 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { DomSanitizer } from '@angular/platform-browser';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+import { format } from 'date-fns';
7
+
8
+@Component({
9
+  selector: 'app-knowledge-look',
10
+  templateUrl: './knowledge-look.component.html',
11
+  styleUrls: ['./knowledge-look.component.less']
12
+})
13
+export class KnowledgeLookComponent implements OnInit {
14
+  @Output() cancelKnowledgeModal = new EventEmitter();
15
+  @Input() knowledgeData: any = {};
16
+  constructor(
17
+    private mainService: MainService,
18
+    private sanitizer: DomSanitizer,
19
+    private tool: ToolService,
20
+  ) { }
21
+
22
+  ngOnInit() {
23
+    this.hosId = this.tool.getCurrentHospital().id;
24
+    this.getDetail(this.knowledgeData);
25
+  }
26
+
27
+  // 获取知识库详情
28
+  isSpinning: boolean = false; //页面loading状态
29
+  vIndex:number = 0;//版本号下标
30
+  hosId: number;
31
+  rowId=null;
32
+  detailData:any;
33
+  richText:any;
34
+  lookData:any;
35
+  solutionLogs:any;
36
+  stepLength: number = 0; //步骤条
37
+  getDetail(data){
38
+    this.rowId = data.id
39
+		this.vIndex = 0
40
+    let query = {
41
+			idx: 0,
42
+			sum: 9999,
43
+			solution: {
44
+				hosId: this.hosId,
45
+				operationType:'lookOver',
46
+				solutionNumber:data.solutionNumber
47
+			}
48
+		};
49
+		this.isSpinning = true
50
+		this.mainService
51
+			.getFetchDataList("data", "solution", query)
52
+			.subscribe((res) => {
53
+				this.getFile()
54
+				let data = res.list
55
+				this.detailData = data
56
+				let content = data[0].content
57
+				if(content){
58
+					this.richText = this.sanitizer.bypassSecurityTrustHtml(content);
59
+				}else{
60
+					this.richText = ''
61
+				}
62
+				for(let i of data){
63
+					if(i.solutionLogs.length>0){
64
+						for(let t of i.solutionLogs){
65
+							t.time = format(t.operationTime, 'yyyy-MM-dd HH:mm')
66
+						}
67
+					}
68
+				}
69
+				this.lookData = data[0]
70
+				this.solutionLogs = data[0].solutionLogs
71
+				this.stepLength = this.solutionLogs.length
72
+				this.isSpinning = false
73
+			});
74
+  }
75
+
76
+  fileData: any = []; //上传的附件数据
77
+  getFile(){
78
+		this.mainService
79
+			.getPreviewImage('solution', this.rowId)
80
+			.subscribe((res:any)=> {
81
+				this.fileData = res.data.map((v) =>{
82
+					return{
83
+						name: v.name,
84
+						url: location.origin + '/file' + v.relativeFilePath
85
+					}
86
+				});
87
+			});
88
+	}
89
+
90
+  // 版本号点击
91
+	versionsClick(data, index){
92
+		this.vIndex = index
93
+		this.lookData = data
94
+		let content = data.content
95
+		if(content){
96
+			this.richText = this.sanitizer.bypassSecurityTrustHtml(content);
97
+		}else{
98
+			this.richText = ''
99
+		}
100
+	}
101
+
102
+  // 点击附件
103
+	fileClick(data){
104
+		console.log(222,data)
105
+		let a: any = document.createElement('a') // 创建一个元素
106
+		a.style = 'display: none' // 不能在页面中被看到,把他隐藏起来
107
+		a.style.height = '0px' // 给个0高度,避免影响页面布局
108
+		a.download = data.name;
109
+		a.href = data.url // 文件url地址
110
+		document.body.appendChild(a)  //  将其绑定在body上才能发挥作用
111
+		a.click() // 触发a标签的click事件
112
+		document.body.removeChild(a) // 删除该元素
113
+	}
114
+  // 隐藏模态框
115
+  hideModal() {
116
+    this.cancelKnowledgeModal.emit(false)
117
+  }
118
+}

+ 20 - 0
src/app/components/knowledge-look/knowledge-look.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { KnowledgeLookComponent } from './knowledge-look.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+
7
+
8
+@NgModule({
9
+  declarations: [
10
+    KnowledgeLookComponent,
11
+  ],
12
+  imports: [
13
+    CommonModule,
14
+    ShareModule,
15
+  ],
16
+  exports: [
17
+    KnowledgeLookComponent,
18
+  ]
19
+})
20
+export class KnowledgeLookModule { }

+ 15 - 0
src/app/pipes/strip-html.pipe..ts

@@ -0,0 +1,15 @@
1
+import { Pipe, PipeTransform } from "@angular/core";
2
+
3
+@Pipe({
4
+  name: "stripHtml",
5
+})
6
+export class StripHtmlPipe implements PipeTransform {
7
+  transform(value: any, ...args: any[]): any {
8
+    // 过滤html标签和实体
9
+    if(value){
10
+      return value.replace(/<[^>]*>|&[a-z0-9]+;/g, '');
11
+    }else{
12
+      return '';
13
+    }
14
+  }
15
+}

+ 38 - 2
src/app/services/main.service.ts

@@ -648,7 +648,7 @@ export class MainService {
648 648
       }
649 649
     );
650 650
   }
651
-  //获取核酸图片
651
+  //获取附件-通用
652 652
   getPreviewImage(type, id) {
653 653
     return this.http.get(host.host + "/common/common/listAttachment/"+ type +"/" + id, {
654 654
       headers: this.headers,
@@ -851,11 +851,47 @@ export class MainService {
851 851
 	    headers: this.headers,
852 852
 	  });
853 853
 	}
854
-	
854
+
855 855
 	// wechat相关-重置token
856 856
 	refreshToken(type, data): any {
857 857
 	  return this.http.post(host.host + "/wechat/" + type, data, {
858 858
 	    headers: this.headers,
859 859
 	  });
860 860
 	}
861
+
862
+  // 故障工单-获取数量
863
+	getCount(data): any {
864
+	  return this.http.post(host.host + "/flow/incident/list/count", data, {
865
+	    headers: this.headers,
866
+	  });
867
+	}
868
+
869
+  // 故障工单-导出
870
+	downDataModel(data): any {
871
+	  return this.http.post(host.host + "/incident/data/downDataModel/incident/3", data, {
872
+	    headers: this.exportHeader,
873
+      responseType: "arraybuffer",
874
+	  });
875
+	}
876
+
877
+  // 故障工单-流程操作
878
+	flowPost(type, data): any {
879
+	  return this.http.post(host.host + "/flow/" + type, data, {
880
+	    headers: this.headers,
881
+	  });
882
+	}
883
+
884
+  // 查询汇总单
885
+	querySummaryDocNew(data): any {
886
+	  return this.http.post(host.host + "/incident/data/querySummaryDoc", data, {
887
+	    headers: this.headers,
888
+	  });
889
+	}
890
+
891
+  // 新增汇总单
892
+	addSummaryDoc(data): any {
893
+	  return this.http.post(host.host + "/incident/data/addSummaryDoc", data, {
894
+	    headers: this.headers,
895
+	  });
896
+	}
861 897
 }

+ 40 - 2
src/app/services/tool.service.ts

@@ -9,6 +9,10 @@ export class ToolService {
9 9
   logoTitle = '';
10 10
   faviconUrl = '';
11 11
 
12
+  // 附件类型
13
+  // word,excel,pdf,txt,ppt
14
+  attachmentsTypes:string = 'text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.presentationml.presentation';
15
+
12 16
   constructor(private mainService: MainService) {}
13 17
 
14 18
   // 获取logoUrl和logoTitle
@@ -51,6 +55,34 @@ export class ToolService {
51 55
   getCurrentUserDept() {
52 56
     return JSON.parse(localStorage.getItem("user")).user.dept;
53 57
   }
58
+  //获取当前用户id
59
+  getCurrentUserId() {
60
+    return JSON.parse(localStorage.getItem("user")).user.id;
61
+  }
62
+  //返回院区或责任部门
63
+  getHospitalOrDuty() {
64
+    let hospital = this.getCurrentHospital();
65
+    let type = 'hospital';//默认是院区
66
+    if(hospital.type && hospital.type.value == 6){
67
+      // 当前是责任部门
68
+      type = 'duty';
69
+    }
70
+
71
+    if(hospital.type && hospital.type.value != 6){
72
+      // 当前是普通部门
73
+      type = 'department';
74
+    }
75
+
76
+    return {
77
+      hospital,
78
+      type,
79
+    }
80
+  }
81
+
82
+  // 返回当前用户的组
83
+  getCurrentGroupList(){
84
+    return JSON.parse(localStorage.getItem("user")).user.group || [];
85
+  }
54 86
   //获取当前菜单的权限
55 87
   initCoopBtns(route) {
56 88
     let link;
@@ -194,8 +226,8 @@ export class ToolService {
194 226
         case "handle":
195 227
           coopBtns.handle = true; //处理
196 228
           break;
197
-        case "substitution":
198
-          coopBtns.substitution = true; //换人处理
229
+        case "assign":
230
+          coopBtns.assign = true; //指派
199 231
           break;
200 232
         case "postpone":
201 233
           coopBtns.postpone = true; //延期处理
@@ -215,6 +247,12 @@ export class ToolService {
215 247
         case "badEvaluate":
216 248
           coopBtns.badEvaluate = true; //异常评价
217 249
           break;
250
+        case "receive":
251
+          coopBtns.receive = true; //接单
252
+          break;
253
+        case "transfer":
254
+          coopBtns.transfer = true; //转派
255
+          break;
218 256
       }
219 257
     });
220 258
     console.log(coopBtns);

+ 3 - 2
src/app/share/assets-product-management-prompt-modal/assets-product-management-prompt-modal.component.ts

@@ -36,14 +36,15 @@ export class AssetsProductManagementPromptModalComponent implements OnInit {
36 36
   // 获取故障现象
37 37
   incidentCategoryList:any[] = [];
38 38
   getIncidentCategoryList(){
39
-    if(!this.currentHospital.type || (this.currentHospital.type && this.currentHospital.type.value !== '6')){
39
+    let { hospital, type } = this.tool.getHospitalOrDuty();
40
+    if(type === 'hospital' || type === 'department'){
40 41
       this.incidentCategoryList = [];
41 42
       return;
42 43
     };
43 44
     let postData = {
44 45
       hasThird: 'true',//只差有三级的故障现象列表
45 46
       category: {
46
-        dutyIds: this.currentHospital.type.value === '6' ? this.currentHospital.id.toString()  : undefined,
47
+        dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
47 48
       },
48 49
     };
49 50
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {

+ 2 - 4
src/app/share/image-viewer/image-viewer.component.html

@@ -1,11 +1,9 @@
1 1
 <div class="imgViewHelp">
2
-  <ul id="ljImgViewerId" #ljImgViewerId class="list">
2
+  <div id="ljImgViewerId" #ljImgViewerId class="list">
3 3
     <img
4 4
       class="image"
5 5
       [src]="item"
6 6
       *ngFor="let item of imageUrl"
7
-      [width]="width"
8
-      [height]="height"
9 7
     />
10
-  </ul>
8
+  </div>
11 9
 </div>

+ 2 - 6
src/app/share/image-viewer/image-viewer.component.less

@@ -1,9 +1,5 @@
1 1
 .imgViewHelp {
2
-  ul {
3
-    margin: 0;
4
-    padding: 0;
5
-    img {
6
-      margin-right: 8px;
7
-    }
2
+  img {
3
+    margin-right: 8px;
8 4
   }
9 5
 }

+ 11 - 3
src/app/share/image-viewer/image-viewer.component.ts

@@ -9,10 +9,8 @@ export class ImageViewerComponent implements OnInit, AfterViewInit,OnDestroy {
9 9
   @ViewChild("ljImgViewerId", { static: false }) ljImgViewer: ElementRef;
10 10
   // 图片地址
11 11
   @Input() imageUrl: any = [];
12
-  // 默认预览图大小 (单位px)
13
-  @Input() width: any = 100;
14
-  @Input() height: any = 100;
15 12
   @Input() isPreviewNow: boolean = false;
13
+  @Input() initialViewIndex: number = 0;
16 14
   viewer = null;
17 15
 
18 16
   constructor() {}
@@ -22,7 +20,17 @@ export class ImageViewerComponent implements OnInit, AfterViewInit,OnDestroy {
22 20
   }
23 21
 
24 22
   ngAfterViewInit(): void {
23
+    let _this = this;
25 24
     this.viewer = new Viewer(this.ljImgViewer["nativeElement"],{
25
+      inlineStyle: {
26
+        width: '100px', // 设置图片宽度
27
+        height: 'auto', // 设置图片高度,‌这里设置为自动以保持原始比例
28
+      },
29
+      viewed() {
30
+        setTimeout(() => {
31
+          this.viewer.view(_this.initialViewIndex);
32
+        }, 0)
33
+      },
26 34
       hide(){
27 35
         console.log('隐藏')
28 36
         this.viewer && this.viewer.destroy();

+ 3 - 0
src/app/share/share.module.ts

@@ -54,6 +54,7 @@ import { MedicalWasteLogPromptModalComponent } from './medical-waste-log-prompt-
54 54
 import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing-record-detail.component';
55 55
 import { InspectionExecuteDetailComponent } from './inspection-execute-detail/inspection-execute-detail.component';
56 56
 import { wangEditorComponent } from './wang-editor/wang-editor.component';
57
+import { StripHtmlPipe } from '../pipes/strip-html.pipe.';
57 58
 @NgModule({
58 59
   declarations: [
59 60
     DetailSampleComponent,
@@ -94,6 +95,7 @@ import { wangEditorComponent } from './wang-editor/wang-editor.component';
94 95
     CollapseComponent,
95 96
     CollapsePanelComponent,
96 97
     HtmlTransformPipe,
98
+    StripHtmlPipe,
97 99
     FilterSelfPipe,
98 100
     ExcelExportComponent,
99 101
     ExcelImportComponent,
@@ -162,6 +164,7 @@ import { wangEditorComponent } from './wang-editor/wang-editor.component';
162 164
     CollapseComponent,
163 165
     CollapsePanelComponent,
164 166
     HtmlTransformPipe,
167
+    StripHtmlPipe,
165 168
     FilterSelfPipe,
166 169
     ExcelExportComponent,
167 170
     ExcelImportComponent,

+ 3 - 2
src/app/views/assets-consumable/assets-consumable.component.ts

@@ -110,9 +110,10 @@ export class AssetsConsumableComponent implements OnInit {
110 110
     this.modal = true;
111 111
     this.productDto = {};
112 112
     this.initForm();
113
-    if(this.currentHospital.type && this.currentHospital.type.value === '6'){
113
+    let { hospital, type } = this.tool.getHospitalOrDuty();
114
+    if(type === 'duty'){
114 115
       this.disableDutyId = true;
115
-      this.validateForm.controls.dutyId.setValue(this.currentHospital.id);
116
+      this.validateForm.controls.dutyId.setValue(hospital.id);
116 117
     }else{
117 118
       this.disableDutyId = false;
118 119
     }

+ 3 - 2
src/app/views/assets-info/assets-info.component.ts

@@ -120,9 +120,10 @@ export class AssetsInfoComponent implements OnInit {
120 120
     this.add = true; //新增
121 121
     this.modal = true;
122 122
     this.initForm();
123
-    if(this.currentHospital.type && this.currentHospital.type.value === '6'){
123
+    let { hospital, type } = this.tool.getHospitalOrDuty();
124
+    if(type === 'duty'){
124 125
       this.disableDutyId = true;
125
-      this.validateForm.controls.dutyId.setValue(this.currentHospital.id);
126
+      this.validateForm.controls.dutyId.setValue(hospital.id);
126 127
     }else{
127 128
       this.disableDutyId = false;
128 129
     }

+ 75 - 35
src/app/views/incident-management/incident-management.component.html

@@ -7,11 +7,11 @@
7 7
       <div nz-col nzXl='18' class="list-template__searchBox">
8 8
         <div class="list-template__searchItem">
9 9
           <span class="label">登记时间</span>:
10
-          <nz-range-picker style="width: 373px;" nzShowTime [(ngModel)]="searchDTO.dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)" (ngModelChange)="changeDate($event)"></nz-range-picker>
10
+          <nz-range-picker style="width: 373px;" nzShowTime [(ngModel)]="searchDTO.dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
11 11
         </div>
12 12
         <div class="list-template__searchItem">
13 13
           <span class="label">事件单号</span>:
14
-          <input nz-input class="formItem" placeholder="请输入事件单号" [(ngModel)]="searchDTO.gdcode" />
14
+          <input nz-input class="formItem" placeholder="请输入事件单号" [(ngModel)]="searchDTO.incidentsign" />
15 15
         </div>
16 16
         <div class="list-template__searchItem">
17 17
           <span class="label">报修科室</span>:
@@ -28,15 +28,15 @@
28 28
         <div class="list-template__searchItem">
29 29
           <span class="label">状态</span>:
30 30
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
31
-            nzPlaceHolder="请选择状态" [(ngModel)]="gdState">
32
-            <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of gdStates"></nz-option>
31
+            nzPlaceHolder="请选择状态" [(ngModel)]="searchDTO.statusId">
32
+            <nz-option [nzLabel]="data.name" [nzValue]="data.id" *ngFor="let data of gdStates"></nz-option>
33 33
           </nz-select>
34 34
         </div>
35 35
         <div class="list-template__searchItem">
36 36
           <span class="label">处理人</span>:
37 37
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
38
-            (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择处理人" [(ngModel)]="worker">
39
-            <ng-container *ngFor="let option of allWorker">
38
+            (nzOnSearch)="changeUser($event, 'handle')" nzAllowClear nzPlaceHolder="请选择处理人" [(ngModel)]="searchDTO.todoingUser">
39
+            <ng-container *ngFor="let option of handleUserList">
40 40
               <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
41 41
             </ng-container>
42 42
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -49,7 +49,7 @@
49 49
         <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
50 50
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
51 51
         <button nz-button *ngIf="coopBtns.export" class="btn default ml8" (click)='export()' [nzLoading]="loading2">导出</button>
52
-        <button nz-button class="btn default ml8" (click)='reset()'>详细搜索</button>
52
+        <button nz-button class="btn default ml8" (click)='showSearchModal()'>详细搜索</button>
53 53
       </div>
54 54
     </div>
55 55
     <div class="list-template__bottom">
@@ -70,17 +70,40 @@
70 70
         <tbody>
71 71
           <tr *ngFor="let data of listOfData;let index=index;">
72 72
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
73
-            <td class="text_align_left"><span class="red">极高</span> SJ2408030022 2024-08-03 08:45电类-电器插座空开-安装电线线路插座,需要3个插座,联系电话137774177017,周一要开诊</td>
74
-            <td class="text_align_left">南院区<br>神经内科Ⅰ<br>行政办公楼5楼办公室A</td>
75
-            <td class="text_align_left">廖小明<br>联电:18711111111<br>来电:18711111111</td>
76
-            <td>王满<br>水电组<br><span class="red">08-03 08:45</span>前接单</td>
77
-            <td>次日维修<br>06月28日<br>01时00分前完成</td>
78
-            <td>已关闭</td>
73
+            <td class="text_align_left">
74
+              <span [ngClass]="priorityColor(data.priorityId)">{{ data.priorityDTO?.name }}</span>
75
+              {{ data.incidentsign }} {{ data.description }}
76
+              <i class="icon_transport transport-a-11111 ml8" *ngIf="data.reqAttachment"></i>
77
+              <i class="icon_transport transport-luyin ml8" *ngIf="data.reqRecord"></i>
78
+            </td>
79
+            <td class="text_align_left">
80
+              {{ data.hosName || '无' }}<br>
81
+              {{ data.department?.dept || '无' }}<br>
82
+              {{ data.place ? data.place.building.buildingName : '' }}{{ data.place ? data.place.floorName : '' }}{{ data.houseNumber }}
83
+            </td>
84
+            <td class="text_align_left">
85
+              {{ data.requester?.name || '无' }}<br>
86
+              联电:{{ data.contactsInformation || '无' }}<br>
87
+              来电:{{ data.incomingPhone || '无' }}
88
+              <i class="icon_transport transport-luyin ml8" *ngIf="data.callID"></i>
89
+            </td>
90
+            <td>
91
+              {{ data.acceptUser?.name || '无' }}<br>
92
+              {{ transferSynergetic(data) }}<br>
93
+              <span [ngStyle]="{ color: data.handleColourInfo.value }">{{ data.overdueTime | date: 'MM-dd HH:mm' }}</span>前接单
94
+            </td>
95
+            <td [innerHTML]="transferHandlerLog(data.currentLog)"></td>
96
+            <td>{{ data.state?.name }}</td>
79 97
             <td>
80 98
               <div class="coop">
81 99
                 <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
82
-                <span *ngIf="coopBtns.del&&data.gdState.value!=6&&data.gdState.value!=7"
83
-                  (click)="showDelModal($event,data.id)">删除</span>
100
+                <!-- <span *ngIf="coopBtns.edit" (click)="detail($event,data.id)">编辑</span> -->
101
+                <span *ngIf="computedReceive(data)" (click)="showDelModal($event, data,'您确认要接单吗?','接单','receive')">接单</span>
102
+                <span *ngIf="computedHandle(data)" (click)="handle($event,data)">处理</span>
103
+                <span *ngIf="computedSubstitution(data)" (click)="substitution($event,data)">换人处理</span>
104
+                <span *ngIf="coopBtns.postpone" (click)="detail($event,data.id)">延期处理</span>
105
+                <span *ngIf="coopBtns.settings" (click)="detail($event,data.id)">设置责任科室</span>
106
+                <span *ngIf="coopBtns.del" (click)="showDelModal($event, data,'您确认要删除吗?','删除','del')">删除</span>
84 107
               </div>
85 108
             </td>
86 109
           </tr>
@@ -93,11 +116,9 @@
93 116
       </div>
94 117
     </div>
95 118
   </div>
96
-  <!-- 删除模态框 -->
97
-  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="loading3"
98
-    (confirmDelEvent)="confirmDel()" content="您确认要删除工单吗?"></app-dialog-delete>
99
-
100 119
 </div>
120
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
121
+    (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
101 122
 <!-- 操作成功/失败提示框 -->
102 123
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
103 124
   [info]="promptInfo"></app-prompt-modal>
@@ -109,35 +130,54 @@
109 130
     <div class="content">
110 131
       <form nz-form [formGroup]="validateSearchForm" class="addForm">
111 132
         <nz-form-item>
112
-          <nz-form-label [nzSpan]="5" nzRequired nzFor="name">故障现象</nz-form-label>
133
+          <nz-form-label [nzSpan]="5" nzFor="levelCategory">故障现象</nz-form-label>
113 134
           <nz-form-control [nzSpan]="19" nzErrorTip="请输入故障现象!">
114
-            <nz-input-group>
115
-                <input formControlName="name" nz-input placeholder="请输入故障现象">
116
-            </nz-input-group>
135
+            <nz-tree-select [nzNodes]="incidentCategoryList" nzPlaceHolder="请选择故障现象" formControlName="levelCategory"></nz-tree-select>
117 136
           </nz-form-control>
118 137
         </nz-form-item>
119 138
         <nz-form-item>
120
-          <nz-form-label [nzSpan]="5" nzFor="user">受理人</nz-form-label>
139
+          <nz-form-label [nzSpan]="5" nzFor="acceptUser">受理人</nz-form-label>
121 140
           <nz-form-control [nzSpan]="19" nzErrorTip="请选择受理人!">
122 141
             <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
123
-            (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择受理人" formControlName="user">
124
-            <ng-container *ngFor="let option of allWorker">
125
-              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
126
-            </ng-container>
127
-            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
128
-              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
129
-            </nz-option>
130
-          </nz-select>
142
+            (nzOnSearch)="changeUser($event, 'acceptUser')" nzAllowClear nzPlaceHolder="请选择受理人" formControlName="acceptUser">
143
+              <ng-container *ngFor="let option of acceptUserList">
144
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
145
+              </ng-container>
146
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
147
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
148
+              </nz-option>
149
+            </nz-select>
150
+          </nz-form-control>
151
+        </nz-form-item>
152
+        <nz-form-item>
153
+          <nz-form-label [nzSpan]="5" nzFor="selectType">逾期查询</nz-form-label>
154
+          <nz-form-control [nzSpan]="19" nzErrorTip="请选择逾期查询!">
155
+            <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
156
+            nzPlaceHolder="请选择逾期查询" formControlName="selectType">
157
+              <nz-option [nzLabel]="data.name" [nzValue]="data.id" *ngFor="let data of overdueStates"></nz-option>
158
+            </nz-select>
159
+          </nz-form-control>
160
+        </nz-form-item>
161
+        <nz-form-item>
162
+          <nz-form-label [nzSpan]="5" nzFor="deleteFlag">是否已删除</nz-form-label>
163
+          <nz-form-control [nzSpan]="19" nzErrorTip="请选择是否已删除!">
164
+            <nz-radio-group formControlName="deleteFlag">
165
+              <label nz-radio [nzValue]="1">是</label>
166
+              <label nz-radio [nzValue]="0">否</label>
167
+            </nz-radio-group>
131 168
           </nz-form-control>
132 169
         </nz-form-item>
133 170
       </form>
134 171
     </div>
135 172
     <div class="display_flex justify-content_flex-center">
136
-      <button nzType="primary" nz-button (click)="submitSearchForm()" [nzLoading]="btnLoading">确认搜索</button>
173
+      <button nzType="primary" nz-button (click)="submitSearchModal()" [nzLoading]="btnLoading">确认搜索</button>
137 174
       <button class="btn cancel" nz-button nzType="default" (click)="hideSearchModal()">取消</button>
138 175
     </div>
139 176
   </div>
140 177
 </div>
141 178
 
142
-<!-- 查看详情 -->
143
-<router-outlet></router-outlet>
179
+<!-- 处理 -->
180
+<app-incident-handle [id]="coopData.id" *ngIf="handleModalShow" (closeModelHs)="closeHandleModelOrder($event)" (confirmModelHs)="confirmHandleModelOrder($event)"></app-incident-handle>
181
+
182
+<!-- 换人处理 -->
183
+<app-incident-substitution [id]="coopData.id" *ngIf="substitutionModalShow" (closeModelHs)="closeSubstitutionModelOrder($event)" (confirmModelHs)="confirmSubstitutionModelOrder($event)"></app-incident-substitution>

+ 43 - 97
src/app/views/incident-management/incident-management.component.less

@@ -1,5 +1,9 @@
1 1
 @import "../../../../src/theme.less";
2 2
 
3
+.icon_transport{
4
+  color: @primary-color;;
5
+}
6
+
3 7
 .save {
4 8
   position: fixed;
5 9
   left: 0;
@@ -10,7 +14,7 @@
10 14
   z-index: 99;
11 15
 
12 16
   .modalBody {
13
-    width: 1000px;
17
+    width: 424px;
14 18
     background: #fff;
15 19
     border-radius: 5px;
16 20
     padding: 10px 20px;
@@ -89,92 +93,6 @@
89 93
   .txtR {
90 94
     text-align: right !important;
91 95
   }
92
-}
93
-//删除
94
-.saveDel {
95
-  position: fixed;
96
-  left: 0;
97
-  top: 0;
98
-  width: 100%;
99
-  height: 100%;
100
-  background: rgba(0, 0, 0, 0.4);
101
-  z-index: 99;
102
-
103
-  .modalBody {
104
-    width: 350px;
105
-    height: 220px;
106
-    background: #fff;
107
-    border-radius: 5px;
108
-    padding: 10px 20px;
109
-    color: #333;
110
-
111
-    .title {
112
-      width: 100%;
113
-      text-align: center;
114
-      font-size: 18px;
115
-      position: relative;
116
-
117
-      i {
118
-        position: absolute;
119
-        right: 0;
120
-        top: 0;
121
-        font-size: 20px;
122
-        color: #666;
123
-        cursor: pointer;
124
-        padding: 0 5px;
125
-      }
126
-    }
127
-
128
-    .content {
129
-      width: 310px;
130
-      height: 117px;
131
-      background: #f9fafb;
132
-      border: 1px solid #e5e9ed;
133
-      border-radius: 5px;
134
-      overflow: hidden;
135
-      margin-top: 12px;
136
-
137
-      div {
138
-        text-align: center;
139
-        margin: 0;
140
-
141
-        &.icon {
142
-          margin-top: 17px;
143
-
144
-          i {
145
-            color: #34b349;
146
-            font-size: 30px !important;
147
-
148
-            &.transport-wenhao {
149
-              color: #f5a523;
150
-            }
151
-
152
-            &.transport-shibai {
153
-              color: #ff3a52;
154
-            }
155
-          }
156
-        }
157
-
158
-        &.defeat {
159
-          color: #333;
160
-          font-size: 18px;
161
-        }
162
-
163
-        &:nth-child(3) {
164
-          font-size: 14px;
165
-          color: #666;
166
-        }
167
-      }
168
-    }
169
-
170
-    button {
171
-      margin-top: 10px;
172
-
173
-      &.btn {
174
-        margin-left: 8px;
175
-      }
176
-    }
177
-  }
178 96
 
179 97
   // 新增
180 98
   &.add {
@@ -185,16 +103,50 @@
185 103
       .content {
186 104
         width: 100%;
187 105
         height: auto;
188
-        padding: 18px 14px 0 14px;
106
+        padding: 16px;
107
+        max-height: 497px;
108
+        overflow-y: auto;
189 109
 
190 110
         .addForm {
191 111
           .ant-form-item {
192
-            margin-bottom: 15px;
112
+            margin-bottom: 0;
193 113
 
194 114
             .ant-form-item-label {
195
-              line-height: 0;
196 115
               text-align: left;
197 116
             }
117
+
118
+            .desc {
119
+              margin-top: 5px;
120
+            }
121
+          }
122
+
123
+          .datesControl {
124
+            margin-top: -16px;
125
+
126
+            .ant-form-item-label {
127
+              line-height: 40px;
128
+            }
129
+          }
130
+
131
+          .timer {
132
+            .ant-form-item-label {
133
+              width: 100%;
134
+              text-align: left;
135
+            }
136
+
137
+            .numInp {
138
+              margin-right: 5px;
139
+            }
140
+
141
+            .line {
142
+              margin-right: 5px;
143
+            }
144
+          }
145
+
146
+          .timer2 {
147
+            .ant-form-item-label {
148
+              line-height: 20px;
149
+            }
198 150
           }
199 151
         }
200 152
 
@@ -203,18 +155,12 @@
203 155
             margin-bottom: 15px;
204 156
 
205 157
             .ant-form-item-label {
206
-              line-height: 0;
158
+              line-height: 14px;
207 159
               text-align: left;
208 160
             }
209 161
           }
210 162
         }
211 163
       }
212
-
213
-      button {
214
-        &:nth-child(1) {
215
-          margin-right: 20px;
216
-        }
217
-      }
218 164
     }
219 165
   }
220 166
 }

+ 378 - 193
src/app/views/incident-management/incident-management.component.ts

@@ -6,8 +6,9 @@ import { ToolService } from "../../services/tool.service";
6 6
 import { Subject } from "rxjs";
7 7
 import { debounceTime } from "rxjs/operators";
8 8
 import { NzMessageService } from 'ng-zorro-antd/message';
9
-import { format } from 'date-fns';
9
+import { format, addDays, addHours } from 'date-fns';
10 10
 import { FormGroup, Validators, FormBuilder } from '@angular/forms';
11
+import cloneDeep from 'lodash-es/cloneDeep'
11 12
 @Component({
12 13
   selector: "app-incident-management",
13 14
   templateUrl: "./incident-management.component.html",
@@ -30,9 +31,11 @@ export class IncidentManagementComponent implements OnInit {
30 31
   hospital: string; //选中院区
31 32
   alldepart: any = []; //当前院区所属科室
32 33
   worker: number; //选择执行配送人员
33
-  allWorker: any = []; //当前院区执行配送人员列表
34
+  handleUserList: any = []; //处理人列表
35
+  acceptUserList: any = []; //受理人列表
34 36
   gdState: number; //选择工单状态
35 37
   gdStates: any; //工单状态列表
38
+  overdueStates: any; //逾期查询列表
36 39
   pageIndex: number = 1; //页码
37 40
   listLength: number = 10; //总条数
38 41
   pageSize: number = 10; //每页条数
@@ -59,6 +62,7 @@ export class IncidentManagementComponent implements OnInit {
59 62
   searchDTO: any = {};
60 63
 
61 64
   searchTimerSubject = new Subject();
65
+  debounceSubject = new Subject(); //防抖
62 66
 
63 67
   // 初始化增删改按钮
64 68
   coopBtns: any = {};
@@ -67,17 +71,29 @@ export class IncidentManagementComponent implements OnInit {
67 71
   queryTask:string = 'todo';//默认待我接单
68 72
   changeTab(key){
69 73
     this.queryTask = key;
74
+    this.loading1 = true;
75
+    this.debounceSubject.next(true);
70 76
   }
71 77
 
72 78
   ngOnInit() {
79
+    this.initSearchForm();
73 80
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
74 81
       let fun = v[0];
75
-      fun.call(this, v[1]);
82
+      fun.call(this, v[1], v[2]);
83
+    });
84
+    this.debounceSubject.pipe(debounceTime(500)).subscribe((v:boolean) => {
85
+      this.getList(v);
76 86
     });
77 87
     this.coopBtns = this.tool.initCoopBtns(this.route);
78 88
     this.initTabs();
79
-    this.getAllHos();
89
+    this.getDeparts();
90
+    this.getUsers('', null, 'handle');
91
+    this.getUsers('', null, 'acceptUser');
80 92
     this.getGdStates();
93
+    this.getOverdueStates();
94
+    this.getIncidentCategoryList();
95
+    this.loading1 = true;
96
+    this.debounceSubject.next(true);
81 97
   }
82 98
 
83 99
   // 初始化tab
@@ -93,52 +109,54 @@ export class IncidentManagementComponent implements OnInit {
93 109
         let index = this.tabs.findIndex(v => v.key == 'doing');
94 110
         this.tabs.splice(index + 1, 0 , {key: 'reassign', value: '重新指派', num: 0});
95 111
     }
96
-    if (this.coopBtns.badEvaluate) {
97
-        this.tabs.push({key: 'badEvaluate', value: '异常评价', num: 0});
98
-    }
112
+    // if (this.coopBtns.badEvaluate) {
113
+    //     this.tabs.push({key: 'badEvaluate', value: '异常评价', num: 0});
114
+    // }
99 115
   }
100 116
 
101 117
   // 搜索
102 118
   search() {
103
-    this.pageIndex = 1;
104
-    this.getList();
119
+    this.loading1 = true;
120
+    this.debounceSubject.next(true);
105 121
   }
106 122
   // 重置
107 123
   reset() {
108
-    this.pageIndex = 1;
109
-    if (!(this.coopBtns.currentDept && !this.coopBtns.allOrders)) {
110
-      this.searchDTO.department = null;
111
-    }
112
-    if (!(this.coopBtns.currentUser && !this.coopBtns.allOrders)) {
113
-      this.worker = null;
114
-    }
115
-    this.gdState = null;
116 124
     this.searchDTO = {};
117
-    this.changeDate();
118
-    this.getList();
125
+    this.initSearchForm();
126
+    this.loading1 = true;
127
+    this.debounceSubject.next(true);
119 128
   }
120 129
 
121
-  // 获取院区
122
-  getAllHos() {
123
-    this.hospital = this.tool.getCurrentHospital().id + "";
124
-    this.changeHos();
125
-  }
126
-  // 修改院区获取对应科室,工单类型,执行配送人员
127
-  changeHos() {
128
-    this.searchDTO.department = null;
129
-    this.worker = null;
130
-    this.getDeparts();
131
-    this.getAllWorker();
130
+  // 获取故障现象
131
+  incidentCategoryList:any[] = [];
132
+  getIncidentCategoryList(){
133
+    let { hospital, type } = this.tool.getHospitalOrDuty();
134
+    if(type === 'hospital' || type === 'department'){
135
+      this.incidentCategoryList = [];
136
+      return;
137
+    };
138
+    let postData = {
139
+      hasThird: 'true',//只差有三级的故障现象列表
140
+      category: {
141
+        dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
142
+      },
143
+    };
144
+    this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
145
+      let incidentCategoryList = res.data || [];
146
+      incidentCategoryList = incidentCategoryList.map(v => ({...v, parentId: v.parent ? v.parent.id : undefined, title: v.category, key: v.id}));
147
+      this.incidentCategoryList = this.tool.tranListToTreeDataLeaf(incidentCategoryList, undefined, "parentId");
148
+      console.log(this.incidentCategoryList);
149
+    })
132 150
   }
133 151
 
134
-  // 获取配送人员
135
-  getAllWorker(e?, those?) {
152
+  // 获取处理人
153
+  getUsers(e?, those?, type?) {
136 154
     let that = those || this;
137 155
     let postData = {
138 156
       user: {
139 157
         name: e || "",
140 158
         hospital: { id: that.hospital },
141
-        usertype: { id: 106 }, //配送人员
159
+        simpleQuery: true,
142 160
       },
143 161
       idx: 0,
144 162
       sum: 20,
@@ -147,8 +165,12 @@ export class IncidentManagementComponent implements OnInit {
147 165
     that.mainService
148 166
       .getFetchDataList("data", "user", postData)
149 167
       .subscribe((data) => {
150
-        that.allWorker = data.list;
151 168
         that.isLoading = false;
169
+        if(type === 'handle'){
170
+          that.handleUserList = data.list;
171
+        }else if(type === 'acceptUser'){
172
+          that.acceptUserList = data.list;
173
+        }
152 174
       });
153 175
   }
154 176
 
@@ -162,61 +184,182 @@ export class IncidentManagementComponent implements OnInit {
162 184
       this.searchDTO.dateRange = [dateStart,dateEnd];
163 185
     }
164 186
   }
187
+
188
+  // 优先级颜色
189
+  priorityColor(priorityId) {
190
+    // 极低|低
191
+    if(priorityId == 1 || priorityId == 2){
192
+      return '';
193
+    } else if(priorityId == 3){
194
+      return 'yellow';
195
+    } else if(priorityId == 4 || priorityId == 5){
196
+      return 'red';
197
+    }
198
+  }
199
+  // 处理人+协同人
200
+  transferSynergetic(incidentData){
201
+    let str = incidentData.groupORHandlerUser || "";
202
+    if(incidentData.synergetic && incidentData.synergetic.length){
203
+        str += ',' + incidentData.synergetic.map(v => v.name).join(',');
204
+    }
205
+    return str;
206
+  }
207
+
208
+  // 延期记录
209
+  transferHandlerLog = function (currentLog) {
210
+    if(!currentLog){
211
+        return '无';
212
+    }
213
+    currentLog = cloneDeep(currentLog);
214
+    if(currentLog.extra1DTO && currentLog.extra2 && currentLog.startTime){
215
+        if(currentLog.extra2==0.5){
216
+          currentLog.extra2 = 4;
217
+          return currentLog.extra1DTO.name+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
218
+        }else{
219
+          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日前完成");
220
+        }
221
+    }else{
222
+        return '无';
223
+    }
224
+  }
225
+
226
+  // 判断当前人是否在工单组里
227
+  isInGroup(data){
228
+    return this.tool.getCurrentGroupList().some(v => data.currentLog && v.id == data.currentLog.groupId);
229
+  }
230
+
231
+  // 是否显示接单按钮
232
+  computedReceive(data){
233
+    let inUser = data.currentLog && data.currentLog.workerId == this.tool.getCurrentUserId();
234
+    let inGroup = false;
235
+    let groupList = this.tool.getCurrentGroupList();
236
+    groupList.forEach(item => {
237
+        if(data.currentLog){
238
+            if (item.id == data.currentLog.groupId) {
239
+                inGroup = true;
240
+            }
241
+        }
242
+    })
243
+    return data.state.value === 'pending' && (inUser || inGroup) && this.coopBtns.receive && data.deleteFlag !== 1;
244
+  }
245
+
246
+  // 是否显示处理按钮
247
+  computedHandle(data){
248
+    return data.state.value === 'handler' && data.handlingPersonnelUser && data.handlingPersonnelUser.id == this.tool.getCurrentUserId() && data.deleteFlag !== 1;
249
+  }
250
+
251
+  // 是否显示换人处理按钮
252
+  computedSubstitution(data){
253
+    return data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign) && data.deleteFlag !== 1;
254
+  }
255
+
165 256
   // 表格数据
166 257
   loading1 = false;
167
-  getList() {
168
-    var that = this;
169
-    let data: any = {
170
-      idx: that.pageIndex - 1,
171
-      sum: that.pageSize,
172
-      workOrder: {
173
-        worker: { id: that.worker },
174
-        gdState: { id: that.gdState },
175
-        gdcode: this.searchDTO.gdcode,
176
-        createDept: that.searchDTO.department,
177
-        hosId: that.hospital,
258
+  getList(isInit = false) {
259
+    let postData: any = {
260
+      idx: isInit ? 0 : (this.pageIndex - 1),
261
+      sum: this.pageSize,
262
+      incident: {
263
+        assignee: this.tool.getCurrentUserId(),
264
+        acceptDate: this.searchDTO.dateRange ? format(this.searchDTO.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
265
+        acceptDateEnd: this.searchDTO.dateRange ? format(this.searchDTO.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
266
+        incidentsign: this.searchDTO.incidentsign,
267
+        department: this.searchDTO.department ? { id: this.searchDTO.department } : undefined,
268
+        statusId: this.searchDTO.statusId || undefined,
269
+        todoingUser: this.searchDTO.todoingUser ? { id: this.searchDTO.todoingUser } : undefined,
270
+        levelCategory: this.validateSearchForm.value.levelCategory ? { id: this.validateSearchForm.value.levelCategory } : undefined,
271
+        acceptUser: this.validateSearchForm.value.acceptUser ? { id: this.validateSearchForm.value.acceptUser } : undefined,
272
+        selectType: this.validateSearchForm.value.selectType || undefined,
273
+        deleteFlag: this.validateSearchForm.value.deleteFlag,
178 274
       },
179 275
     };
180 276
 
181
-    if (!data.workOrder.worker.id) {
182
-      delete data.workOrder.worker;
183
-    }
184
-    if (!data.workOrder.gdState.id) {
185
-      delete data.workOrder.gdState;
186
-    }
187
-    if (
188
-      data.workOrder.specialCloseFlag === undefined ||
189
-      data.workOrder.specialCloseFlag === null
190
-    ) {
191
-      delete data.workOrder.specialCloseFlag;
192
-    }
193
-    if (!data.workOrder.createDept) {
194
-      delete data.workOrder.createDept;
277
+    if(this.queryTask === 'all' || this.queryTask === 'callback' || this.queryTask === 'badEvaluate'){
278
+      let { hospital, type } = this.tool.getHospitalOrDuty();
279
+      if(type === 'duty'){
280
+        // 当前的所属责任部门
281
+        postData.incident.duty = hospital;
282
+      }else{
283
+        // 当前的所属院区
284
+        postData.incident.hosId = hospital.id;
285
+      }
286
+    }else{
287
+        delete postData.incident.duty;
288
+        delete postData.incident.branch;
195 289
     }
196
-    delete data.workOrder.overdueTime24;
197
-    delete data.workOrder.startTime1;
198
-    delete data.workOrder.endTime1;
199
-    if (false) {
200
-      data.workOrder.overdueTime24 = true;
201
-    } else if (that.startDate && that.endDate) {
202
-      data.workOrder.startTime1 = that.startDate;
203
-      data.workOrder.endTime1 = that.endDate;
290
+
291
+    postData.incident.queryTask = this.queryTask;
292
+
293
+    if(this.queryTask === 'todo' || this.queryTask === 'owns'){
294
+      postData.incident.candidateGroups = this.tool.getCurrentGroupList().map(v => v.id).toString();
295
+    }else{
296
+      delete postData.incident.candidateGroups;
204 297
     }
205
-    that.loading1 = true;
206
-    that.mainService
207
-      .getFetchDataList("data", "workOrder", data)
298
+
299
+    this.loading1 = true;
300
+    this.mainService
301
+      .getFetchDataList("simple/data", "incident", postData)
208 302
       .subscribe((result) => {
209
-        that.loading1 = false;
210
-        that.listOfData = result.list.map(v => ({...v, endDeptsName: v.endDepts ? v.endDepts.map(v => v.dept).toString() : ''}));
211
-        that.listLength = result.totalNum;
303
+        this.loading1 = false;
304
+        this.listOfData = result.list.map(v => ({...v, endDeptsName: v.endDepts ? v.endDepts.map(v => v.dept).toString() : ''}));
305
+        this.listLength = result.totalNum;
212 306
       });
307
+
308
+    // 获取数量
309
+    this.getCount(postData.incident);
213 310
   }
214 311
 
312
+  // 调用接口-查数量
313
+  getCount = function (incident = {}){
314
+    let postData = {
315
+        incidentList: [],
316
+    }
317
+    this.tabs.forEach(v => {
318
+        postData.incidentList.push({...incident, ...{queryTask: v.key}});
319
+    })
320
+    postData.incidentList.forEach(incident => {
321
+        // 请求参数调整
322
+        if(!incident){
323
+            incident = {};
324
+        }
325
+        if(this.queryTask === 'all' || this.queryTask === 'callback' || this.queryTask === 'badEvaluate'){
326
+          let { hospital, type } = this.tool.getHospitalOrDuty();
327
+          if(type === 'duty'){
328
+            // 当前的所属责任部门
329
+            incident.duty = hospital;
330
+          }else{
331
+            // 当前的所属院区
332
+            incident.hosId = hospital.id;
333
+          }
334
+        }else{
335
+            delete incident.duty;
336
+            delete incident.branch;
337
+        }
338
+
339
+        incident.assignee = this.tool.getCurrentUserId();
340
+
341
+        if(this.queryTask === 'todo' || this.queryTask === 'owns'){
342
+          incident.candidateGroups = this.tool.getCurrentGroupList().map(v => v.id).toString();
343
+        }else{
344
+          delete incident.candidateGroups;
345
+        }
346
+    })
347
+    this.mainService
348
+      .getCount(postData)
349
+      .subscribe((result) => {
350
+        let myData = result.data || {};
351
+        this.tabs.forEach(v => {
352
+            v.num = myData[v.key];
353
+        })
354
+      });
355
+}
356
+
215 357
   // 获取所有科室
216 358
   getDeparts(dept?) {
217 359
     let data = {
218 360
       department: {
219
-        cascadeHosId: this.hospital,
361
+        searchType: 1,// 简单查询
362
+        cascadeHosId: this.tool.getCurrentHospital().id,
220 363
         dept: dept,
221 364
       },
222 365
       idx: 0,
@@ -228,38 +371,21 @@ export class IncidentManagementComponent implements OnInit {
228 371
       .subscribe((data) => {
229 372
         this.alldepart = data.list;
230 373
         this.isLoading = false;
231
-        if (dept === undefined && this.coopBtns.currentDept && !this.coopBtns.allOrders) {
232
-          // 初次渲染,权限有当前科室工单,没有全部工单,则回显申请科室
233
-          this.alldepart = [this.loginUser.dept];
234
-          this.searchDTO.department = this.loginUser.dept.id;
235
-        }
236
-        if (dept === undefined && this.coopBtns.currentUser && !this.coopBtns.allOrders) {
237
-          // 初次渲染,权限有当前人员工单,没有全部工单,则回显执行配送人员
238
-          this.allWorker = [this.loginUser];
239
-          this.worker = this.loginUser.id;
240
-        }
241
-        this.getList();
242 374
       });
243 375
   }
244 376
 
245 377
   // 获取工单状态
246 378
   getGdStates() {
247
-    var that = this;
248
-    that.mainService.getDictionary("list", "gdstate").subscribe((data) => {
249
-      that.gdStates = data;
379
+    this.mainService.getDictionary("list", "incident_status").subscribe((data) => {
380
+      this.gdStates = data || [];
250 381
     });
251 382
   }
252 383
 
253
-  // 日期选择
254
-  startDate: string; //发起时间开始
255
-  endDate: string; //发起时间结束
256
-  changeDate(result?): void {
257
-    if (!result) {
258
-      this.startDate = this.endDate = "";
259
-      return;
260
-    }
261
-    this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
262
-    this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
384
+  // 获取逾期查询
385
+  getOverdueStates() {
386
+    this.mainService.getDictionary("list", "overdue_state").subscribe((data) => {
387
+      this.overdueStates = data || [];
388
+    });
263 389
   }
264 390
 
265 391
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
@@ -271,99 +397,114 @@ export class IncidentManagementComponent implements OnInit {
271 397
     setTimeout(() => {
272 398
       this.promptModalShow = true;
273 399
     }, 100);
274
-    this.getList();
400
+    this.loading1 = true;
401
+    this.debounceSubject.next(false);
275 402
   }
276 403
 
277 404
   // 查看
278 405
   detail(e, id) {
279 406
     e.stopPropagation();
280
-    this.router.navigateByUrl("/main/orderManagement/orderDetail/" + id);
281 407
   }
282 408
 
283
-  //删除
284
-  loading3 = false;
285 409
   delModal: boolean = false; //删除模态框
286
-  showDelModal(e, id) {
410
+  tipsMsg1: string; //提示框信息
411
+  tipsMsg2: string; //操作后信息
412
+  confirmDelType: string; //确认的类型(启用/停用,删除)
413
+  showDelModal(
414
+    e,
415
+    data,
416
+    tipsMsg1: string,
417
+    tipsMsg2: string,
418
+    type: string,
419
+  ) {
287 420
     e.stopPropagation();
421
+    this.confirmDelType = type;
288 422
     this.delModal = true;
289
-    this.coopId = id + "";
423
+    this.coopData = data;
424
+    this.tipsMsg1 = tipsMsg1;
425
+    this.tipsMsg2 = tipsMsg2;
290 426
   }
427
+  // 隐藏删除框
291 428
   hideDelModal() {
292 429
     this.delModal = false;
293 430
   }
431
+  // 确认删除
294 432
   confirmDel() {
295
-    this.loading3 = true;
296
-    this.mainService[this.coopId.includes(",") ? "delOrders" : "delOrder"](
297
-      this.coopId
298
-    ).subscribe((data) => {
299
-      this.loading3 = false;
300
-      this.delModal = false;
301
-      if (data.status == 200) {
302
-        if (
303
-          this.listOfData.length == 1 &&
304
-          this.pageIndex == Math.ceil(this.listLength / this.pageSize)
305
-        ) {
306
-          this.listLength--;
307
-          this.pageIndex = Math.ceil(this.listLength / this.pageSize);
308
-        }
309
-        this.showPromptModal("删除", true, "");
310
-      } else {
311
-        this.showPromptModal("删除", false, data.msg);
312
-      }
313
-    });
433
+    this.btnLoading = true;
434
+    if (this.confirmDelType === "del") {
435
+      //删除
436
+      this.mainService
437
+        .simplePost("rmvData", "incident", [this.coopData.id])
438
+        .subscribe((data) => {
439
+          this.btnLoading = false;
440
+          this.delModal = false;
441
+          if (data.status == 200) {
442
+            this.showPromptModal(this.tipsMsg2, true, "");
443
+          } else {
444
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
445
+          }
446
+        });
447
+    }else if (this.confirmDelType === "receive") {
448
+      //接单
449
+      this.mainService
450
+        .flowPost("incident/task/receive", { incident: this.coopData })
451
+        .subscribe((data) => {
452
+          this.btnLoading = false;
453
+          this.delModal = false;
454
+          if (data.state == 200) {
455
+            this.showPromptModal(this.tipsMsg2, true, "");
456
+          } else {
457
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
458
+          }
459
+        });
460
+    }
314 461
   }
315 462
 
316 463
   // 导出
317 464
   loading2 = false;
318 465
   export() {
319
-    // 有备注,无发起时间则提示
320
-    if(!this.searchDTO.dateRange.length){
321
-      this.message.info('请选择发起时间!');
322
-      return;
323
-    }
324
-    // 三个权限都没有,则不展示
325
-    if(!this.coopBtns.currentDept && !this.coopBtns.currentUser && !this.coopBtns.allOrders){
326
-      return;
327
-    }
328
-    let that = this;
329 466
     let postData: any = {
330
-      idx: that.pageIndex - 1,
331
-      sum: that.pageSize,
332
-      workOrder: {
333
-        worker: { id: that.worker },
334
-        gdState: { id: that.gdState },
335
-        gdcode: this.searchDTO.gdcode,
336
-        createDept: that.searchDTO.department,
337
-        hosId: that.hospital,
467
+      idx: 0,
468
+      sum: 9999,
469
+      incident: {
470
+        assignee: this.tool.getCurrentUserId(),
471
+        duty: this.tool.getCurrentHospital(),
472
+        acceptDate: this.searchDTO.dateRange ? format(this.searchDTO.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
473
+        acceptDateEnd: this.searchDTO.dateRange ? format(this.searchDTO.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
474
+        incidentsign: this.searchDTO.incidentsign,
475
+        department: this.searchDTO.department ? { id: this.searchDTO.department } : undefined,
476
+        statusId: this.searchDTO.statusId || undefined,
477
+        todoingUser: this.searchDTO.todoingUser ? { id: this.searchDTO.todoingUser } : undefined,
478
+        levelCategory: this.validateSearchForm.value.levelCategory ? { id: this.validateSearchForm.value.levelCategory } : undefined,
479
+        acceptUser: this.validateSearchForm.value.acceptUser ? { id: this.validateSearchForm.value.acceptUser } : undefined,
480
+        selectType: this.validateSearchForm.value.selectType || undefined,
481
+        deleteFlag: this.validateSearchForm.value.deleteFlag,
338 482
       },
339 483
     };
340 484
 
341
-    if (!postData.workOrder.worker.id) {
342
-      delete postData.workOrder.worker;
343
-    }
344
-    if (!postData.workOrder.gdState.id) {
345
-      delete postData.workOrder.gdState;
346
-    }
347
-    if (
348
-      postData.workOrder.specialCloseFlag === undefined ||
349
-      postData.workOrder.specialCloseFlag === null
350
-    ) {
351
-      delete postData.workOrder.specialCloseFlag;
352
-    }
353
-    if (!postData.workOrder.createDept) {
354
-      delete postData.workOrder.createDept;
485
+    if(this.queryTask === 'all' || this.queryTask === 'callback' || this.queryTask === 'badEvaluate'){
486
+      let { hospital, type } = this.tool.getHospitalOrDuty();
487
+      if(type === 'duty'){
488
+        // 当前的所属责任部门
489
+        postData.incident.duty = hospital;
490
+      }else{
491
+        // 当前的所属院区
492
+        postData.incident.hosId = hospital.id;
493
+      }
494
+    }else{
495
+        delete postData.incident.duty;
496
+        delete postData.incident.branch;
355 497
     }
356
-    delete postData.workOrder.overdueTime24;
357
-    delete postData.workOrder.startTime1;
358
-    delete postData.workOrder.endTime1;
359
-    if (false) {
360
-      postData.workOrder.overdueTime24 = true;
361
-    } else if (that.startDate && that.endDate) {
362
-      postData.workOrder.startTime1 = that.startDate;
363
-      postData.workOrder.endTime1 = that.endDate;
498
+
499
+    postData.incident.queryTask = this.queryTask;
500
+
501
+    if(this.queryTask === 'todo' || this.queryTask === 'owns'){
502
+      postData.incident.candidateGroups = this.tool.getCurrentGroupList().map(v => v.id).toString();
503
+    }else{
504
+      delete postData.incident.candidateGroups;
364 505
     }
365 506
     this.loading2 = true;
366
-    that.mainService.dataExport("workOrder", postData).subscribe(
507
+    this.mainService.downDataModel(postData).subscribe(
367 508
       (data) => {
368 509
         this.loading2 = false;
369 510
         this.showPromptModal("导出", true, "");
@@ -375,7 +516,7 @@ export class IncidentManagementComponent implements OnInit {
375 516
         var a = document.createElement("a");
376 517
         a.href = fileURL;
377 518
         a.target = "_blank";
378
-        a.download = "工单列表.xls";
519
+        a.download = "故障工单.xls";
379 520
         document.body.appendChild(a);
380 521
         a.click();
381 522
       },
@@ -386,58 +527,102 @@ export class IncidentManagementComponent implements OnInit {
386 527
     );
387 528
   }
388 529
 
389
-  // 申请科室边输边搜节流阀
530
+  // 科室边输边搜节流阀
390 531
   isLoading = false;
391 532
   changeInp(e) {
392 533
     this.searchTimer(this.getDeparts, e);
393 534
   }
394 535
 
395
-  // 用户输入搜索配送人员
396
-  changeUser(e) {
397
-    this.searchTimer(this.getAllWorker, e);
536
+  // 人员边输边搜节流阀
537
+  changeUser(e, type) {
538
+    this.searchTimer(this.getUsers, e, type);
398 539
   }
399 540
 
400 541
   // 边输入边搜索节流阀
401
-  searchTimer(fun, e) {
542
+  searchTimer(fun, e, type?) {
402 543
     this.isLoading = true;
403
-    this.searchTimerSubject.next([fun, e]);
404
-  }
405
-
406
-  // 截取意见内容(ie内核截取)
407
-  spliceContent(con) {
408
-    if (con.length >= 41 && navigator.userAgent.indexOf("Trident") > -1) {
409
-      return con.slice(0, 20) + "...";
410
-    } else {
411
-      return con;
412
-    }
544
+    this.searchTimerSubject.next([fun, e, type]);
413 545
   }
414 546
 
415 547
   // 详细搜索
416 548
   searchModal: boolean = false; //新增/编辑模态框
417 549
   modelName = ""; //模态框名称
418
-  add: boolean; //true:新增;false:编辑
419 550
   validateSearchForm: FormGroup; //新增/编辑表单
420
-  coopData: any; //当前操作列
421
-  // 新增弹框
422
-  addModal() {
423
-    this.modelName = "新增";
424
-    this.add = true; //新增
551
+  coopData: any = {}; //当前操作列
552
+  // 显示弹框
553
+  showSearchModal() {
554
+    this.modelName = "详细搜索";
425 555
     this.searchModal = true;
426
-    this.initSearchForm();
427 556
   }
428 557
   //关闭新增/编辑弹框
429
-  hideAddModal() {
558
+  hideSearchModal() {
430 559
     this.searchModal = false;
431
-    this.initSearchForm();
560
+  }
561
+
562
+  // 详细搜索-提交
563
+  submitSearchModal(){
564
+    this.searchModal = false;
565
+    this.getList(true);
432 566
   }
433 567
 
434 568
   // 初始化新增form表单
435 569
   initSearchForm() {
436 570
     this.validateSearchForm = this.fb.group({
437
-      subType: [null],
438
-      description: [''],
439
-      supplierIds: [[]],
440
-      manufacturerIds: [[]],
571
+      levelCategory: [null],
572
+      acceptUser: [null],
573
+      selectType: [null],
574
+      deleteFlag: [0],
441 575
     });
442 576
   }
577
+
578
+  // 详细搜索提交
579
+  submitForm(): void {
580
+    for (const i in this.validateSearchForm.controls) {
581
+      this.validateSearchForm.controls[i].markAsDirty();
582
+      this.validateSearchForm.controls[i].updateValueAndValidity();
583
+    }
584
+    if (this.validateSearchForm.invalid) {
585
+      return;
586
+    }
587
+
588
+    console.log(this.validateSearchForm.value)
589
+    this.loading1 = true;
590
+    this.debounceSubject.next(true);
591
+  }
592
+
593
+  // 处理-弹窗
594
+  handleModalShow = false; //弹窗开关
595
+  handle(e, data) {
596
+    e.stopPropagation();
597
+    this.coopData = data;
598
+    this.handleModalShow = true;
599
+  }
600
+  // 关闭弹窗
601
+  closeHandleModelOrder(e) {
602
+    this.handleModalShow = JSON.parse(e).show;
603
+  }
604
+  // 弹窗确定
605
+  confirmHandleModelOrder(e){
606
+    console.log(e);
607
+    this.handleModalShow = false;
608
+    this.getList(true);
609
+  }
610
+
611
+  // 处理-弹窗
612
+  substitutionModalShow = false; //弹窗开关
613
+  substitution(e, data) {
614
+    e.stopPropagation();
615
+    this.coopData = data;
616
+    this.substitutionModalShow = true;
617
+  }
618
+  // 关闭弹窗
619
+  closeSubstitutionModelOrder(e) {
620
+    this.substitutionModalShow = JSON.parse(e).show;
621
+  }
622
+  // 弹窗确定
623
+  confirmSubstitutionModelOrder(e){
624
+    console.log(e);
625
+    this.substitutionModalShow = false;
626
+    this.getList(true);
627
+  }
443 628
 }

+ 6 - 2
src/app/views/incident-management/incident-management.module.ts

@@ -4,16 +4,20 @@ import { CommonModule } from '@angular/common';
4 4
 import { IncidentManagementRoutingModule } from './incident-management-routing.module';
5 5
 import { IncidentManagementComponent } from './incident-management.component';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7
+import { IncidentHandleModule } from 'src/app/components/incidentManagement/incident-handle/incident-handle.module';
8
+import { IncidentSubstitutionModule } from 'src/app/components/incidentManagement/incident-substitution/incident-substitution.module';
7 9
 
8 10
 
9 11
 @NgModule({
10 12
   declarations: [
11
-    IncidentManagementComponent
13
+    IncidentManagementComponent,
12 14
   ],
13 15
   imports: [
14 16
     CommonModule,
15 17
     IncidentManagementRoutingModule,
16
-    ShareModule
18
+    ShareModule,
19
+    IncidentHandleModule,
20
+    IncidentSubstitutionModule,
17 21
   ]
18 22
 })
19 23
 export class IncidentManagementModule { }

+ 31 - 30
src/app/views/repository-manage-add/repository-manage-add.component.ts

@@ -74,7 +74,7 @@ export class RepositoryManageAddComponent implements OnInit {
74 74
   coopId: number; //表格中执行操作的id
75 75
   department: number; //所属科室
76 76
 	drug: number; //药品名称
77
-	hosId: number; 
77
+	hosId: number;
78 78
 	rowId:number; //清单id
79 79
 	dateRange;//时间
80 80
   batchNumber; //批次号
@@ -130,7 +130,7 @@ export class RepositoryManageAddComponent implements OnInit {
130 130
 				operationType:'lookOver',
131 131
 			}
132 132
 		};
133
-	
133
+
134 134
 		that.mainService
135 135
 			.getFetchDataList("data", "solution", query)
136 136
 			.subscribe((res) => {
@@ -176,11 +176,11 @@ export class RepositoryManageAddComponent implements OnInit {
176 176
 				}
177 177
 			});
178 178
 	}
179
-	
179
+
180 180
 	hideDelModal() {
181 181
 	  this.delModal = false;
182 182
 	}
183
-	
183
+
184 184
 	// 获取产品
185 185
 	getProduct(name){
186 186
 		let postData = {
@@ -200,31 +200,32 @@ export class RepositoryManageAddComponent implements OnInit {
200 200
 				},500)
201 201
 		  });
202 202
 	}
203
-	
203
+
204 204
   // 获取所有院区
205 205
   getAllHospital() {
206 206
 		this.getPolling()
207 207
 		this.getProduct('')
208 208
 		this.getMalfunction()
209 209
   }
210
-	
210
+
211 211
 	// 获取故障现象数据
212 212
 	getMalfunction(){
213
-		if(!this.currentHospital.type || (this.currentHospital.type && this.currentHospital.type.value !== '6')){
213
+    let { hospital, type } = this.tool.getHospitalOrDuty();
214
+		if(type === 'hospital' || type === 'department'){
214 215
 		  this.malfunctionData = [];
215 216
 		  return;
216 217
 		};
217 218
 		let postData = {
218 219
 			hasThird: 'true',
219 220
 		  category: {
220
-		    dutyIds: this.currentHospital.type.value === '6' ? this.currentHospital.id.toString()  : undefined,
221
+		    dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
221 222
 		  },
222 223
 		};
223 224
 		this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
224 225
 		  let incidentCategoryList = res.data || [];
225 226
 		  incidentCategoryList = incidentCategoryList.map(v => ({...v, parentId: v.parent ? v.parent.id : undefined, label: v.category, value: v.id}));
226 227
 		  let arr = this.tool.tranListToTreeDataLeaf(incidentCategoryList, undefined, "parentId");
227
-			
228
+
228 229
 			for(let i of arr){
229 230
 				for(let t of i.children){
230 231
 					for(let x of t.children){
@@ -235,14 +236,14 @@ export class RepositoryManageAddComponent implements OnInit {
235 236
 					}
236 237
 				}
237 238
 			}
238
-			
239
+
239 240
 			if(this.detailData && this.detailData.categoryId){
240 241
 				// let malfunctionId = this.tool.tranListToTreeDataFindIdsLeaf(this.malfunctionData,this.detailData.categoryId);
241 242
 				this.validateForm.controls.malfunction.setValue(this.detailData.categoryId);
242 243
 			}
243 244
 		})
244 245
 	}
245
-	
246
+
246 247
 	// 获取巡检列表
247 248
 	pollingData = [];
248 249
 	getPolling(){
@@ -261,7 +262,7 @@ export class RepositoryManageAddComponent implements OnInit {
261 262
 		    }
262 263
 		  });
263 264
 	}
264
-	
265
+
265 266
 	// 获取知识分类字典
266 267
 	dicData = [];
267 268
 	getDicData(){
@@ -280,7 +281,7 @@ export class RepositoryManageAddComponent implements OnInit {
280 281
 			this.typeDic = res
281 282
 		});
282 283
 	}
283
-	
284
+
284 285
 	// 选择知识库分类
285 286
 	radioChnage(e){
286 287
 		let item = this.dicData.find(i=>i.id == this.validateForm.value.knowledgeClass)
@@ -288,18 +289,18 @@ export class RepositoryManageAddComponent implements OnInit {
288 289
 			this.classItem = item.value
289 290
 		}
290 291
 	}
291
-	
292
+
292 293
 	hideGrantModal(){
293 294
 		this.delGrantModal = false;
294 295
 	}
295
-	
296
-	
296
+
297
+
297 298
 	// 富文本内容
298 299
 	editOrData=null;
299 300
 	changeContent(data){
300 301
 		this.editOrData = data
301 302
 	}
302
-	
303
+
303 304
 	// 表单提交
304 305
 	submitForm(type): void {
305 306
 	  var that = this;
@@ -365,7 +366,7 @@ export class RepositoryManageAddComponent implements OnInit {
365 366
 		}else{
366 367
 			that.btnLoading2 = true;
367 368
 		}
368
-		
369
+
369 370
 	  that.mainService
370 371
 	    .simplePost(this.add?"addData":"updData", "solution", data)
371 372
 	    .subscribe((res) => {
@@ -394,7 +395,7 @@ export class RepositoryManageAddComponent implements OnInit {
394 395
 				}
395 396
 	    });
396 397
 	}
397
-	
398
+
398 399
 	// 上传图片
399 400
 	uploadFile(id){
400 401
 		let url = `/service/common/common/uploadAttachment/solution/${id}/${id}`
@@ -404,18 +405,18 @@ export class RepositoryManageAddComponent implements OnInit {
404 405
 			if(!item){
405 406
 				formData.append('file', i as any);
406 407
 				formData.append('filename', i.name);
407
-				
408
+
408 409
 				const req = new HttpRequest('POST', url, formData, {
409 410
 					reportProgress: false,
410 411
 					withCredentials: false
411 412
 				});
412 413
 				this.http.request(req).subscribe((res) => {
413
-				    
414
+
414 415
 				});
415 416
 			}
416 417
 		}
417 418
 	}
418
-	
419
+
419 420
   // 新增弹框
420 421
   showModal() {
421 422
     this.add = true;
@@ -426,7 +427,7 @@ export class RepositoryManageAddComponent implements OnInit {
426 427
 	back(){
427 428
 		this.router.navigateByUrl(`/main/repositoryManage`);
428 429
 	}
429
-	
430
+
430 431
   hideModal() {
431 432
     this.modal = false;
432 433
   }
@@ -444,12 +445,12 @@ export class RepositoryManageAddComponent implements OnInit {
444 445
 			malfunction:[null,],
445 446
 		});
446 447
   }
447
-	
448
+
448 449
 	beforeUpload = (file: UploadFile) => {
449 450
 		let index = file.name.lastIndexOf('.')
450 451
 		let type = file.name.slice(index + 1)
451 452
 		const isSize = file.size / 1024 / 1024 < 10;
452
-		const isPic = (type === 'xlsx' || type === 'pdf' || 
453
+		const isPic = (type === 'xlsx' || type === 'pdf' ||
453 454
 		type === 'xls' || type === 'ppt' || type === 'pptx' ||
454 455
 		type === 'txt' || type === 'doc' || type === 'docx');
455 456
 		if (!isPic) {
@@ -463,7 +464,7 @@ export class RepositoryManageAddComponent implements OnInit {
463 464
 		this.fileData = this.fileData.concat(file);
464 465
 		return false;
465 466
 	};
466
-	
467
+
467 468
 	// 删除附件
468 469
 	removeFile = (file:any) =>  {
469 470
 		let item = this.fileAllData.find(i=>i.id == file.uid)
@@ -474,21 +475,21 @@ export class RepositoryManageAddComponent implements OnInit {
474 475
 				.subscribe((res:any=[]) => {
475 476
 					if (res.status == 200) {
476 477
 						this.getFile()
477
-					} 
478
+					}
478 479
 				});
479 480
 		}else{//附件不在数据库
480 481
 			if(index!=-1){
481 482
 				this.fileData.splice(index, 1)
482 483
 			}
483 484
 		}
484
-		
485
+
485 486
 	}
486
-	
487
+
487 488
 	closeModel(){
488 489
 		this.initForm();
489 490
 		this.back()
490 491
 	}
491
-	
492
+
492 493
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
493 494
   showPromptModal(con, success, promptInfo?) {
494 495
     this.promptModalShow = false;

+ 164 - 3
src/assets/iconfont/demo_index.html

@@ -55,6 +55,48 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon icon_transport">&#xe62a;</span>
59
+                <div class="name">图片</div>
60
+                <div class="code-name">&amp;#xe62a;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon icon_transport">&#xe887;</span>
65
+                <div class="name">示闲</div>
66
+                <div class="code-name">&amp;#xe887;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon icon_transport">&#xe7bd;</span>
71
+                <div class="name">示忙</div>
72
+                <div class="code-name">&amp;#xe7bd;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
76
+              <span class="icon icon_transport">&#xe636;</span>
77
+                <div class="name">语音播放</div>
78
+                <div class="code-name">&amp;#xe636;</div>
79
+              </li>
80
+          
81
+            <li class="dib">
82
+              <span class="icon icon_transport">&#xe89d;</span>
83
+                <div class="name">来电</div>
84
+                <div class="code-name">&amp;#xe89d;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
88
+              <span class="icon icon_transport">&#xe679;</span>
89
+                <div class="name">通话中</div>
90
+                <div class="code-name">&amp;#xe679;</div>
91
+              </li>
92
+          
93
+            <li class="dib">
94
+              <span class="icon icon_transport">&#xe623;</span>
95
+                <div class="name">配送成功</div>
96
+                <div class="code-name">&amp;#xe623;</div>
97
+              </li>
98
+          
99
+            <li class="dib">
58 100
               <span class="icon icon_transport">&#xe606;</span>
59 101
                 <div class="name">星号</div>
60 102
                 <div class="code-name">&amp;#xe606;</div>
@@ -822,9 +864,9 @@
822 864
 <pre><code class="language-css"
823 865
 >@font-face {
824 866
   font-family: 'icon_transport';
825
-  src: url('iconfont.woff2?t=1722851970750') format('woff2'),
826
-       url('iconfont.woff?t=1722851970750') format('woff'),
827
-       url('iconfont.ttf?t=1722851970750') format('truetype');
867
+  src: url('iconfont.woff2?t=1723428088159') format('woff2'),
868
+       url('iconfont.woff?t=1723428088159') format('woff'),
869
+       url('iconfont.ttf?t=1723428088159') format('truetype');
828 870
 }
829 871
 </code></pre>
830 872
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -851,6 +893,69 @@
851 893
         <ul class="icon_lists dib-box">
852 894
           
853 895
           <li class="dib">
896
+            <span class="icon icon_transport transport-a-11111"></span>
897
+            <div class="name">
898
+              图片
899
+            </div>
900
+            <div class="code-name">.transport-a-11111
901
+            </div>
902
+          </li>
903
+          
904
+          <li class="dib">
905
+            <span class="icon icon_transport transport-shixian"></span>
906
+            <div class="name">
907
+              示闲
908
+            </div>
909
+            <div class="code-name">.transport-shixian
910
+            </div>
911
+          </li>
912
+          
913
+          <li class="dib">
914
+            <span class="icon icon_transport transport-shimang1"></span>
915
+            <div class="name">
916
+              示忙
917
+            </div>
918
+            <div class="code-name">.transport-shimang1
919
+            </div>
920
+          </li>
921
+          
922
+          <li class="dib">
923
+            <span class="icon icon_transport transport-yuyinbofang"></span>
924
+            <div class="name">
925
+              语音播放
926
+            </div>
927
+            <div class="code-name">.transport-yuyinbofang
928
+            </div>
929
+          </li>
930
+          
931
+          <li class="dib">
932
+            <span class="icon icon_transport transport-laidian"></span>
933
+            <div class="name">
934
+              来电
935
+            </div>
936
+            <div class="code-name">.transport-laidian
937
+            </div>
938
+          </li>
939
+          
940
+          <li class="dib">
941
+            <span class="icon icon_transport transport-tonghuazhong"></span>
942
+            <div class="name">
943
+              通话中
944
+            </div>
945
+            <div class="code-name">.transport-tonghuazhong
946
+            </div>
947
+          </li>
948
+          
949
+          <li class="dib">
950
+            <span class="icon icon_transport transport-peisongchenggong"></span>
951
+            <div class="name">
952
+              配送成功
953
+            </div>
954
+            <div class="code-name">.transport-peisongchenggong
955
+            </div>
956
+          </li>
957
+          
958
+          <li class="dib">
854 959
             <span class="icon icon_transport transport-required"></span>
855 960
             <div class="name">
856 961
               星号
@@ -2004,6 +2109,62 @@
2004 2109
           
2005 2110
             <li class="dib">
2006 2111
                 <svg class="icon svg-icon" aria-hidden="true">
2112
+                  <use xlink:href="#transport-a-11111"></use>
2113
+                </svg>
2114
+                <div class="name">图片</div>
2115
+                <div class="code-name">#transport-a-11111</div>
2116
+            </li>
2117
+          
2118
+            <li class="dib">
2119
+                <svg class="icon svg-icon" aria-hidden="true">
2120
+                  <use xlink:href="#transport-shixian"></use>
2121
+                </svg>
2122
+                <div class="name">示闲</div>
2123
+                <div class="code-name">#transport-shixian</div>
2124
+            </li>
2125
+          
2126
+            <li class="dib">
2127
+                <svg class="icon svg-icon" aria-hidden="true">
2128
+                  <use xlink:href="#transport-shimang1"></use>
2129
+                </svg>
2130
+                <div class="name">示忙</div>
2131
+                <div class="code-name">#transport-shimang1</div>
2132
+            </li>
2133
+          
2134
+            <li class="dib">
2135
+                <svg class="icon svg-icon" aria-hidden="true">
2136
+                  <use xlink:href="#transport-yuyinbofang"></use>
2137
+                </svg>
2138
+                <div class="name">语音播放</div>
2139
+                <div class="code-name">#transport-yuyinbofang</div>
2140
+            </li>
2141
+          
2142
+            <li class="dib">
2143
+                <svg class="icon svg-icon" aria-hidden="true">
2144
+                  <use xlink:href="#transport-laidian"></use>
2145
+                </svg>
2146
+                <div class="name">来电</div>
2147
+                <div class="code-name">#transport-laidian</div>
2148
+            </li>
2149
+          
2150
+            <li class="dib">
2151
+                <svg class="icon svg-icon" aria-hidden="true">
2152
+                  <use xlink:href="#transport-tonghuazhong"></use>
2153
+                </svg>
2154
+                <div class="name">通话中</div>
2155
+                <div class="code-name">#transport-tonghuazhong</div>
2156
+            </li>
2157
+          
2158
+            <li class="dib">
2159
+                <svg class="icon svg-icon" aria-hidden="true">
2160
+                  <use xlink:href="#transport-peisongchenggong"></use>
2161
+                </svg>
2162
+                <div class="name">配送成功</div>
2163
+                <div class="code-name">#transport-peisongchenggong</div>
2164
+            </li>
2165
+          
2166
+            <li class="dib">
2167
+                <svg class="icon svg-icon" aria-hidden="true">
2007 2168
                   <use xlink:href="#transport-required"></use>
2008 2169
                 </svg>
2009 2170
                 <div class="name">星号</div>

+ 31 - 3
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "icon_transport"; /* Project id 4543613 */
3
-  src: url('iconfont.woff2?t=1722851970750') format('woff2'),
4
-       url('iconfont.woff?t=1722851970750') format('woff'),
5
-       url('iconfont.ttf?t=1722851970750') format('truetype');
3
+  src: url('iconfont.woff2?t=1723428088159') format('woff2'),
4
+       url('iconfont.woff?t=1723428088159') format('woff'),
5
+       url('iconfont.ttf?t=1723428088159') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,6 +13,34 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.transport-a-11111:before {
17
+  content: "\e62a";
18
+}
19
+
20
+.transport-shixian:before {
21
+  content: "\e887";
22
+}
23
+
24
+.transport-shimang1:before {
25
+  content: "\e7bd";
26
+}
27
+
28
+.transport-yuyinbofang:before {
29
+  content: "\e636";
30
+}
31
+
32
+.transport-laidian:before {
33
+  content: "\e89d";
34
+}
35
+
36
+.transport-tonghuazhong:before {
37
+  content: "\e679";
38
+}
39
+
40
+.transport-peisongchenggong:before {
41
+  content: "\e623";
42
+}
43
+
16 44
 .transport-required:before {
17 45
   content: "\e606";
18 46
 }

File diff suppressed because it is too large
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 49 - 0
src/assets/iconfont/iconfont.json

@@ -6,6 +6,55 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "39056749",
10
+      "name": "图片",
11
+      "font_class": "a-11111",
12
+      "unicode": "e62a",
13
+      "unicode_decimal": 58922
14
+    },
15
+    {
16
+      "icon_id": "37032584",
17
+      "name": "示闲",
18
+      "font_class": "shixian",
19
+      "unicode": "e887",
20
+      "unicode_decimal": 59527
21
+    },
22
+    {
23
+      "icon_id": "3483956",
24
+      "name": "示忙",
25
+      "font_class": "shimang1",
26
+      "unicode": "e7bd",
27
+      "unicode_decimal": 59325
28
+    },
29
+    {
30
+      "icon_id": "12025079",
31
+      "name": "语音播放",
32
+      "font_class": "yuyinbofang",
33
+      "unicode": "e636",
34
+      "unicode_decimal": 58934
35
+    },
36
+    {
37
+      "icon_id": "22978012",
38
+      "name": "来电",
39
+      "font_class": "laidian",
40
+      "unicode": "e89d",
41
+      "unicode_decimal": 59549
42
+    },
43
+    {
44
+      "icon_id": "27189368",
45
+      "name": "通话中",
46
+      "font_class": "tonghuazhong",
47
+      "unicode": "e679",
48
+      "unicode_decimal": 59001
49
+    },
50
+    {
51
+      "icon_id": "17956225",
52
+      "name": "配送成功",
53
+      "font_class": "peisongchenggong",
54
+      "unicode": "e623",
55
+      "unicode_decimal": 58915
56
+    },
57
+    {
9 58
       "icon_id": "20719696",
10 59
       "name": "星号",
11 60
       "font_class": "required",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2


+ 5 - 2
src/common.less

@@ -46,6 +46,9 @@
46 46
 .green {
47 47
   color: #49b856 !important;
48 48
 }
49
+.yellow {
50
+  color: #FADB14 !important;
51
+}
49 52
 .text_align_left{
50 53
   text-align: left !important;
51 54
 }
@@ -301,7 +304,7 @@
301 304
       display: flex;
302 305
       justify-content: space-between;
303 306
       align-items: center;
304
-      padding: 16px 0 0;
307
+      padding: 16px 0;
305 308
       position: relative;
306 309
       overflow: hidden;
307 310
       z-index: 2;
@@ -309,8 +312,8 @@
309 312
         display: flex;
310 313
         align-items: center;
311 314
         flex-wrap: wrap;
315
+        row-gap: 16px;
312 316
         .list-template__searchItem {
313
-          margin-bottom: 16px;
314 317
           .label {
315 318
             margin-left: 16px;
316 319
             color: #333;