seimin 7 mesi fa
parent
commit
8e2f0625e1

+ 191 - 120
src/app/views/fuwutai/fuwutai.component.html

@@ -127,11 +127,11 @@
127 127
   </div>
128 128
   <!-- 状态工单 -->
129 129
   <div class="lists_box" [ngClass]="{ top185: hurseInfoHiding != '1' }">
130
-    <!-- 未分派 -->
130
+    <!-- 未分派/未受理 -->
131 131
     <div class="lists">
132 132
       <div class="head">
133
-        <span class="auto_tit">未分派({{ unassignedList.length }}条)</span>
134
-        <div class="ml8 auto_building">
133
+        <span class="auto_tit"><span *ngIf="flagList.hsmsFlag1">未分派</span><span *ngIf="flagList.itsmFlag1 && flagList.hsmsFlag1">/</span><span *ngIf="flagList.itsmFlag1">未受理</span>({{ unassignedList.length }}条)</span>
134
+        <div class="ml8 auto_building" *ngIf="!flagList.itsmFlag1 && flagList.hsmsFlag1">
135 135
           <nz-select class="auto_building_select" [(ngModel)]="unassignedBuilding" nzMode="multiple" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeUnassignedBuilding($event)" (ngModelChange)="changeUnassignedBuilding($event)">
136 136
             <ng-container *ngFor="let option of unassignedBuildings">
137 137
               <nz-option *ngIf="!bLoading && !b2Loading" [nzLabel]="option[0] + '(' + option[2] + ')'" [nzValue]="option[3]"></nz-option>
@@ -141,9 +141,9 @@
141 141
             </nz-option>
142 142
           </nz-select>
143 143
         </div>
144
-        <span class="toLastTime"><span class="itsmOrHsms" [ngClass]="{bold: itsmData.mdv2Switch}" *ngIf="itsmData.mdv2Switch">运维</span><span class="itsmOrHsms" *ngIf="itsmData.mdv2Switch && hsmsData.hsmsSwitch">|</span><span class="itsmOrHsms" [ngClass]="{bold: hsmsData.hsmsSwitch}" *ngIf="hsmsData.hsmsSwitch">配送</span><span class="time">{{ orderRefreshTime }}s</span></span>
144
+        <span class="toLastTime"><span class="itsmOrHsms" [ngClass]="{bold: flagList.itsmFlag1}" *ngIf="itsmData.mdv2Switch" (click)="filterOrderList('itsm', 1)">运维</span><span class="itsmOrHsms" *ngIf="itsmData.mdv2Switch && hsmsData.hsmsSwitch">|</span><span class="itsmOrHsms" [ngClass]="{bold: flagList.hsmsFlag1}" *ngIf="hsmsData.hsmsSwitch" (click)="filterOrderList('hsms', 1)">配送</span><span class="time">{{ orderRefreshTime }}s</span></span>
145 145
       </div>
146
-      <div class="searchBox">
146
+      <div class="searchBox" *ngIf="!flagList.itsmFlag1 && flagList.hsmsFlag1">
147 147
         <label nz-checkbox [(ngModel)]="allUnassignedList" (ngModelChange)="changeAllUnassignedList($event)">全选</label>
148 148
         <div class="search wp60">
149 149
           <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon" />
@@ -156,132 +156,189 @@
156 156
           批量派单
157 157
         </button>
158 158
       </div>
159
-      <div class="cots_body weifenpai" *ngIf="txtLabelCol == 1" [ngClass]="{ top185: hurseInfoHiding != '1' }">
159
+      <div class="cots_body weifenpai" *ngIf="(txtLabelCol == 1 && hsmsData.hsmsSwitch && !itsmData.mdv2Switch) || itsmData.mdv2Switch" [ngClass]="{ top185: hurseInfoHiding != '1', top185_1: flagList.itsmFlag1 }">
160 160
         <overlay-scrollbars #osComponentRef2 [ngStyle]="{ height: '100%' }">
161 161
           <ng-container *ngIf="unassignedList.length && !loading1">
162 162
             <div class="list listsTypeColor" *ngFor="let data of unassignedList">
163
-              <div class="left_cots">
164
-                <!-- 工单 -->
165
-                <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.id)">
166
-                  <span class="left mr8"><label nz-checkbox [ngModel]="data.checked" (ngModelChange)="batchDispatchSelect($event, data.id)"></label></span>
167
-                  <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.taskType.taskName + (data.goodsRemark?'-'+data.goodsRemark:'')+'(' + data.gdcode + ')'">
168
-                    {{ data.isHalfInspect === 1 ? "半程陪检" : data.taskType.taskName }}<ng-container *ngIf="data.goodsRemark">-{{data.goodsRemark}}</ng-container>({{ data.gdcode }})
169
-                  </span>
170
-                  <div class="right_all">
171
-                    <span nz-tooltip [nzTooltipTitle]="data.worker ? data.worker.phone : ''" class="right_all_name">{{ data.worker ? data.worker.name : "" }}</span>
172
-                    <span class="right">
173
-                      <span [ngClass]="{ colorRed: data.timeOut == true }">{{ data.gdState.name }}</span>
163
+              <!-- 配送 -->
164
+              <ng-container *ngIf="data.type === 'hsms'">
165
+                <div class="left_cots">
166
+                  <!-- 工单 -->
167
+                  <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.data.id)">
168
+                    <span class="left mr8" *ngIf="!flagList.itsmFlag1 && flagList.hsmsFlag1"><label nz-checkbox [ngModel]="data.checked" (ngModelChange)="batchDispatchSelect($event, data.data.id)"></label></span>
169
+                    <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.data.taskType.taskName + (data.data.goodsRemark?'-'+data.data.goodsRemark:'')+'(' + data.data.gdcode + ')'">
170
+                      {{ data.data.isHalfInspect === 1 ? "半程陪检" : data.data.taskType.taskName }}<ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
174 171
                     </span>
172
+                    <div class="right_all">
173
+                      <span nz-tooltip [nzTooltipTitle]="data.data.worker ? data.data.worker.phone : ''" class="right_all_name">{{ data.data.worker ? data.data.worker.name : "" }}</span>
174
+                      <span class="right">
175
+                        <span [ngClass]="{ colorRed: data.data.timeOut == true }">{{ data.data.gdState.name }}</span>
176
+                      </span>
177
+                    </div>
175 178
                   </div>
176
-                </div>
177
-                <!-- 地点 -->
178
-                <div class="didian" (click)="openDetails(data)">
179
-                  <span class="left" *ngIf="data.taskType.associationType.value == 'inspect'">
180
-                    {{ data.startDept ? data.startDept.dept : "" }}
181
-                    <span *ngFor="let item of data.middleDept">
182
-                      ->{{ item.dept }}
179
+                  <!-- 地点 -->
180
+                  <div class="didian" (click)="openDetails(data.data)">
181
+                    <span class="left" *ngIf="data.data.taskType.associationType.value == 'inspect'">
182
+                      {{ data.data.startDept ? data.data.startDept.dept : "" }}
183
+                      <span *ngFor="let item of data.data.middleDept">
184
+                        ->{{ item.dept }}
185
+                      </span>
183 186
                     </span>
184
-                  </span>
185
-                  <span class="left" *ngIf="data.taskType.associationType.id != 260">
186
-                    {{ data.startDept ? data.startDept.dept : ""}}{{ data.endDepts ? "->" + data.endDepts[0].dept : "" }}
187
-                  </span>
188
-                  <span class="right" *ngIf="data.goods">
189
-                    <i class="icon_transport transport-icon3"></i>
190
-                    <span>{{ data.goods }}</span>
191
-                  </span>
192
-                  <span class="right" *ngIf="data.workOrderRemark" [title]="data.workOrderRemark">
193
-                    <i class="icon_transport transport-icon3"></i>
194
-                    <span>{{ data.workOrderRemark }}</span>
195
-                  </span>
187
+                    <span class="left" *ngIf="data.data.taskType.associationType.id != 260">
188
+                      {{ data.data.startDept ? data.data.startDept.dept : ""}}{{ data.data.endDepts ? "->" + data.data.endDepts[0].dept : "" }}
189
+                    </span>
190
+                    <span class="right" *ngIf="data.data.goods">
191
+                      <i class="icon_transport transport-icon3"></i>
192
+                      <span>{{ data.data.goods }}</span>
193
+                    </span>
194
+                    <span class="right" *ngIf="data.data.workOrderRemark" [title]="data.data.workOrderRemark">
195
+                      <i class="icon_transport transport-icon3"></i>
196
+                      <span>{{ data.data.workOrderRemark }}</span>
197
+                    </span>
198
+                  </div>
199
+                  <!-- 时间 -->
200
+                  <div class="shijian" (click)="openDetails(data.data)">
201
+                    <span class="left" *ngIf="data.data.expectTimeNum && data.data.timeOut != true">
202
+                      <i class="icon_transport transport-shouye10" nz-tooltip nzTooltipTitle="进行中"></i>
203
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.illnessState">
204
+                        <i *ngIf="data.data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
205
+                        <i *ngIf="data.data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
206
+                      </ng-container>
207
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.careLevel">
208
+                        <i *ngIf="data.data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
209
+                        <i *ngIf="data.data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
210
+                        <i *ngIf="data.data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
211
+                        <i *ngIf="data.data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
212
+                      </ng-container>
213
+                      <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect'">
214
+                        {{ data.data.patient.patientName }}<span *ngIf="data.data.patient.residenceNo">({{ data.data.patient.residenceNo }})</span>
215
+                      </span>
216
+                    </span>
217
+                    <span class="left" *ngIf="data.data.timeOutLength && data.data.timeOut == true">
218
+                      <i class="colorRed icon_transport transport-daojishi" nz-tooltip nzTooltipTitle="超时"></i>
219
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.illnessState">
220
+                        <i *ngIf="data.data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
221
+                        <i *ngIf="data.data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
222
+                      </ng-container>
223
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.careLevel">
224
+                        <i *ngIf="data.data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
225
+                        <i *ngIf="data.data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
226
+                        <i *ngIf="data.data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
227
+                        <i *ngIf="data.data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
228
+                      </ng-container>
229
+                      <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect'">
230
+                        {{ data.data.patient.patientName }}<span *ngIf="data.data.patient.residenceNo">({{ data.data.patient.residenceNo }})</span>
231
+                      </span>
232
+                    </span>
233
+                    <span class="right" nz-tooltip [nzTooltipTitle]="'总时长' + formatTime(data.data.expectTimeNum / 1000)">
234
+                      {{ data.data.showCreateTime }}
235
+                    </span>
236
+                  </div>
237
+                  <!-- 急单 -->
238
+                  <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
239
+                  <!-- 加急单 -->
240
+                  <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
196 241
                 </div>
197
-                <!-- 时间 -->
198
-                <div class="shijian" (click)="openDetails(data)">
199
-                  <span class="left" *ngIf="data.expectTimeNum && data.timeOut != true">
200
-                    <i class="icon_transport transport-shouye10" nz-tooltip nzTooltipTitle="进行中"></i>
201
-                    <ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.illnessState">
202
-                      <i *ngIf="data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
203
-                      <i *ngIf="data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
204
-                    </ng-container>
205
-                    <ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.careLevel">
206
-                      <i *ngIf="data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
207
-                      <i *ngIf="data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
208
-                      <i *ngIf="data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
209
-                      <i *ngIf="data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
210
-                    </ng-container>
211
-                    <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">
212
-                      {{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">({{ data.patient.residenceNo }})</span>
242
+                <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
243
+                  <input type="button" *ngIf="data.data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id)" />
244
+                  <input type="button" *ngIf="!data.data.worker && data.data.gdState.value != 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id, 1)" />
245
+                  <input type="button" *ngIf="data.data.gdState.value == 2 || ((data.data.gdState.value == 3 || data.data.gdState.value == 4) && data.data.worker)" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'hsms')" />
246
+                </div>
247
+                <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
248
+                <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
249
+              </ng-container>
250
+              <!-- 运维 -->
251
+              <ng-container *ngIf="data.type === 'mdv2'">
252
+                <div class="left_cots">
253
+                  <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.data.id)">
254
+                    <span class="left gongdan_name">
255
+                      <span [ngClass]="priorityColor(data.priorityId)">{{ data.data.priorityDTO?.name }}</span>{{ data.data.incidentsign }} <span nz-tooltip [nzTooltipTitle]="data.data.hosName + data.data.department?.dept">{{ data.data.hosName }}{{ data.data.department?.dept }}</span>
213 256
                     </span>
214
-                  </span>
215
-                  <span class="left" *ngIf="data.timeOutLength && data.timeOut == true">
216
-                    <i class="colorRed icon_transport transport-daojishi" nz-tooltip nzTooltipTitle="超时"></i>
217
-                    <ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.illnessState">
218
-                      <i *ngIf="data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
219
-                      <i *ngIf="data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
220
-                    </ng-container>
221
-                    <ng-container *ngIf="(data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect') && data.patient?.careLevel">
222
-                      <i *ngIf="data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
223
-                      <i *ngIf="data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
224
-                      <i *ngIf="data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
225
-                      <i *ngIf="data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
226
-                    </ng-container>
227
-                    <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">
228
-                      {{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">({{ data.patient.residenceNo }})</span>
257
+                    <div class="right_all">
258
+                      <span class="right">
259
+                        <span>{{ data.data.state.name }}</span>
260
+                      </span>
261
+                    </div>
262
+                  </div>
263
+
264
+                  <div class="didian" (click)="openItsmDetails(data.data)">
265
+                    <span class="left">
266
+                      <span nz-tooltip [nzTooltipTitle]="data.data.description">{{ data.data.description }}</span>
229 267
                     </span>
230
-                  </span>
231
-                  <span class="right" nz-tooltip [nzTooltipTitle]="'总时长' + formatTime(data.expectTimeNum / 1000)">
232
-                    {{ data.showCreateTime }}
233
-                  </span>
268
+                  </div>
269
+
270
+                  <div class="didian" (click)="openItsmDetails(data.data)">
271
+                    <span class="left">
272
+                      <span nz-tooltip [nzTooltipTitle]="(data.data.place ? data.data.place.building.buildingName : '') + (data.data.place ? data.data.place.floorName : '') + data.data.houseNumber">{{ data.data.place ? data.data.place.building.buildingName : '' }}{{ data.data.place ? data.data.place.floorName : '' }}{{ data.data.houseNumber }}</span>
273
+                      <i class="icon_transport transport-a-11111 ml8" *ngIf="data.data.reqAttachment"></i>
274
+                    </span>
275
+                  </div>
276
+
277
+                  <div class="didian" (click)="openItsmDetails(data.data)" *ngIf="transferHandlerLog(data.data.currentLog)">
278
+                    <span class="left">
279
+                      <span [innerHTML]="transferHandlerLog(data.data.currentLog)" nz-tooltip [nzTooltipTitle]="transferHandlerLog(data.data.currentLog)"></span>
280
+                    </span>
281
+                  </div>
282
+                  <!-- 时间 -->
283
+                  <div class="shijian" (click)="openItsmDetails(data.data)">
284
+                    <span class="left">
285
+                      <span>
286
+                        申请人:{{ data.data.requester?.name }}
287
+                      </span>
288
+                    </span>
289
+                    <span class="right">
290
+                      {{ data.data.startDate | date: 'yyyy-MM-dd HH:mm'}}
291
+                    </span>
292
+                  </div>
234 293
                 </div>
235
-                <!-- 急单 -->
236
-                <img *ngIf="data.emergencyType && data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
237
-                <!-- 加急单 -->
238
-                <img *ngIf="data.emergencyType && data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
239
-              </div>
240
-              <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
241
-                <input type="button" *ngIf="data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.id, data.gdState.id)" />
242
-                <input type="button" *ngIf="!data.worker && data.gdState.value != 2" class="top_bot" value="派单" (click)="allotWorker(data.id, data.gdState.id, 1)" />
243
-                <input type="button" *ngIf="data.gdState.value == 2 || ((data.gdState.value == 3 || data.gdState.value == 4) && data.worker)" class="btm_bot" value="删除" (click)="openDelModal(data.id)" />
244
-              </div>
245
-              <div *ngIf="data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.percent + '%' }"></div>
246
-              <div *ngIf="data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
294
+                <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
295
+                  <input type="button" *ngIf="data.data.state.value == 'accept'" class="top_bot" value="生成" (click)="generateOrder(data.data)" />
296
+                  <input type="button" *ngIf="data.data.state.value == 'accept'" class="top_bot" value="不受理" (click)="generateOrder(data.data)" />
297
+                  <input type="button" *ngIf="data.data.state.value == 'storage'" class="top_bot" value="继续建单" (click)="generateOrder(data.data)" />
298
+                  <input type="button" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
299
+                </div>
300
+                <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
301
+                <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
302
+              </ng-container>
247 303
             </div>
248 304
           </ng-container>
249 305
           <div class="loading display_flex col-flex justify-content_flex-center align-items_center" *ngIf="loading1">
250 306
             <img src="../../assets/images/loading.gif" alt="" />
251 307
           </div>
308
+
252 309
           <div class="no_data" *ngIf="unassignedList.length == 0 && !loading1">
253 310
             暂无数据
254 311
           </div>
255 312
         </overlay-scrollbars>
256 313
       </div>
257
-      <div class="cots_body weifenpai twoCol" *ngIf="txtLabelCol == 2" [ngClass]="{ top185: hurseInfoHiding != '1' }">
314
+      <div class="cots_body weifenpai twoCol" *ngIf="txtLabelCol == 2 && flagList.hsmsFlag1 && !flagList.itsmFlag1" [ngClass]="{ top185: hurseInfoHiding != '1' }">
258 315
         <overlay-scrollbars #osComponentRef1 [ngStyle]="{ height: '100%' }">
259 316
           <ng-container *ngIf="unassignedList.length && !loading1">
260 317
             <div class="list listsTypeColor" *ngFor="let data of unassignedList">
261
-              <div class="left_cots" (click)="openDetails(data)">
318
+              <div class="left_cots" (click)="openDetails(data.data)">
262 319
                 <!-- 工单 -->
263 320
                 <div class="gongdan">
264
-                  <span class="left">{{ data.taskType.associationType.name }}{{ data.createDeptDTO ? "(" + data.createDeptDTO.dept + ")" : "" }}</span>
265
-                  <span [ngClass]="{ right: true, colorRed: data.timeOut == true }">
266
-                    {{ data.gdState.name }}
321
+                  <span class="left">{{ data.data.taskType.associationType.name }}{{ data.data.createDeptDTO ? "(" + data.data.createDeptDTO.dept + ")" : "" }}</span>
322
+                  <span [ngClass]="{ right: true, colorRed: data.data.timeOut == true }">
323
+                    {{ data.data.gdState.name }}
267 324
                   </span>
268 325
                 </div>
269 326
                 <!-- 时间 -->
270 327
                 <div class="shijian">
271 328
                   <div class="left">
272
-                    {{ data.createUser ? data.createUser.name : "" }}
329
+                    {{ data.data.createUser ? data.data.createUser.name : "" }}
273 330
                   </div>
274 331
                   <span class="right">
275
-                    <span>{{ data.showCreateTime }}</span>
332
+                    <span>{{ data.data.showCreateTime }}</span>
276 333
                   </span>
277 334
                 </div>
278 335
                 <!-- 急单 -->
279
-                <img *ngIf="data.emergencyType && data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
336
+                <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
280 337
                 <!-- 加急单 -->
281
-                <img *ngIf="data.emergencyType && data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
338
+                <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
282 339
               </div>
283
-              <div *ngIf="data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.percent + '%' }"></div>
284
-              <div *ngIf="data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
340
+              <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
341
+              <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
285 342
             </div>
286 343
           </ng-container>
287 344
           <div class="loading display_flex col-flex justify-content_flex-center align-items_center" *ngIf="loading1">
@@ -594,7 +651,7 @@
594 651
                   "
595 652
                   class="btm_bot"
596 653
                   value="删除"
597
-                  (click)="openDelModal(data.id)"
654
+                  (click)="openDelModal(data.id, 'hsms')"
598 655
                 />
599 656
               </div>
600 657
               <div
@@ -1614,7 +1671,7 @@
1614 1671
           <div class="name">来电咨询</div>
1615 1672
           <div class="newTopItem">
1616 1673
             <span class="grayFont required">院区:</span>
1617
-            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.branch" (ngModelChange)="changeApplyHospital($event)" nzAllowClear>
1674
+            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.hosId" (ngModelChange)="changeApplyHospital($event)" nzAllowClear>
1618 1675
               <ng-container *ngFor="let option of applicationHospitalList">
1619 1676
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
1620 1677
               </ng-container>
@@ -1636,15 +1693,18 @@
1636 1693
           </div>
1637 1694
           <div class="newTopItem">
1638 1695
             <span class="grayFont">申请人:</span>
1639
-            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear>
1640
-              <ng-container *ngFor="let option of applicationRequesterList">
1641
-                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
1642
-              </ng-container>
1643
-              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1644
-                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
1645
-              </nz-option>
1646
-            </nz-select>
1647
-            <label nz-checkbox [(ngModel)]="isRelatedDepartment" (ngModelChange)="changeApplyRelatedDepartment($event)" class="ml8">关联查</label>
1696
+            <ng-container *ngIf="buildType === '微信转事件'">{{incidentMsg.requesterName}}</ng-container>
1697
+            <ng-container *ngIf="!buildType">
1698
+              <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear>
1699
+                <ng-container *ngFor="let option of applicationRequesterList">
1700
+                  <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
1701
+                </ng-container>
1702
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1703
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
1704
+                </nz-option>
1705
+              </nz-select>
1706
+              <label nz-checkbox [(ngModel)]="isRelatedDepartment" (ngModelChange)="changeApplyRelatedDepartment($event)" class="ml8">关联查</label>
1707
+            </ng-container>
1648 1708
           </div>
1649 1709
           <div class="newTopItem">
1650 1710
             <span class="grayFont">来电电话:{{incidentModel.incomingPhone}}</span>
@@ -2322,18 +2382,18 @@
2322 2382
                       </nz-select>
2323 2383
                     </div>
2324 2384
                     <div class="col flex7">
2325
-                      <input nz-input placeholder="请填写详细地址" [(ngModel)]="incidentModel.address" />
2385
+                      <input nz-input placeholder="请填写详细地址" [(ngModel)]="incidentModel.houseNumber" />
2326 2386
                     </div>
2327 2387
                   </div>
2328 2388
 
2329 2389
                   <div class="row gap8">
2330 2390
                     <div class="col">
2331 2391
                       <span class="name">科室电话:</span>
2332
-                      <ng-container *ngIf="incidentMsg.manyPhone">{{incidentMsg.manyPhone|stringToFirstValue}}<em (click)="importPhone(incidentMsg.manyPhone, true)">引入</em></ng-container>
2392
+                      <ng-container *ngIf="incidentMsg.deptManyPhone">{{incidentMsg.deptManyPhone|stringToFirstValue}}<em (click)="importPhone(incidentMsg.deptManyPhone, true)">引入</em></ng-container>
2333 2393
                     </div>
2334 2394
                     <div class="col">
2335 2395
                       <span class="name">报修人电话:</span>
2336
-                      <ng-container *ngIf="incidentMsg.phone">{{incidentMsg.phone}}<em (click)="importPhone(incidentMsg.phone)">引入</em></ng-container>
2396
+                      <ng-container *ngIf="incidentMsg.requesterPhone">{{incidentMsg.requesterPhone}}<em (click)="importPhone(incidentMsg.requesterPhone)">引入</em></ng-container>
2337 2397
                     </div>
2338 2398
                     <div class="col">
2339 2399
                       <span class="name">来电电话:</span>
@@ -2403,16 +2463,21 @@
2403 2463
                     <div class="col">
2404 2464
                       <span class="name">报修图片:</span>
2405 2465
                       <div class="value w100 upload">
2406
-                        <nz-upload nzListType="picture-card" [(nzFileList)]="fileList" [nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png" [nzShowButton]="fileList.length < 3" [nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl" [nzSize]="10240">
2407
-                          <i nz-icon nzType="plus"></i>
2408
-                          <div class="ant-upload-text">上传照片</div>
2409
-                        </nz-upload>
2410
-                        <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
2411
-                          <ng-template #modalContent>
2412
-                            <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
2413
-                          </ng-template>
2414
-                        </nz-modal>
2415
-                        <div class="tips">(支持JPG/PNG格式图片,单张大小10M以内)</div>
2466
+                        <ng-container *ngIf="repairImgs.length === 0">
2467
+                          <nz-upload nzListType="picture-card" [(nzFileList)]="fileList" [nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png" [nzShowButton]="fileList.length < 3" [nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl" [nzSize]="10240">
2468
+                            <i nz-icon nzType="plus"></i>
2469
+                            <div class="ant-upload-text">上传照片</div>
2470
+                          </nz-upload>
2471
+                          <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
2472
+                            <ng-template #modalContent>
2473
+                              <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
2474
+                            </ng-template>
2475
+                          </nz-modal>
2476
+                          <div class="tips">(支持JPG/PNG格式图片,单张大小10M以内)</div>
2477
+                        </ng-container>
2478
+                        <div class="thumbList" *ngIf="repairImgs.length > 0">
2479
+                          <div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
2480
+                        </div>
2416 2481
                       </div>
2417 2482
                     </div>
2418 2483
                   </div>
@@ -2538,7 +2603,7 @@
2538 2603
                   <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
2539 2604
                     <input type="button" *ngIf="data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.id, data.gdState.id)" />
2540 2605
                     <input type="button" *ngIf="data.gdState.value == 3 || data.gdState.value == 4" class="mid_bot" value="撤回" (click)="openRecallModal(data.id)" />
2541
-                    <input type="button" *ngIf="data.gdState.value == 2 || data.gdState.value == 3 || data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.id)" />
2606
+                    <input type="button" *ngIf="data.gdState.value == 2 || data.gdState.value == 3 || data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.id, 'hsms')" />
2542 2607
                   </div>
2543 2608
                   <div *ngIf="data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.percent + '%' }"></div>
2544 2609
                   <div *ngIf="data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
@@ -2698,7 +2763,7 @@
2698 2763
           </button>
2699 2764
         </ng-container>
2700 2765
         <ng-container *ngIf="currentTabIndex === '99999'">
2701
-          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin">是否连续建单</label>
2766
+          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '微信转事件'">是否连续建单</label>
2702 2767
           <button nz-button class="btn" nzType="primary" (click)="directOrder()">
2703 2768
             直接解决
2704 2769
           </button>
@@ -2831,3 +2896,9 @@
2831 2896
 
2832 2897
 <!-- 知识库查看 -->
2833 2898
 <app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>
2899
+
2900
+<!-- 详情 -->
2901
+<app-incident-detail [id]="coopData.id" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>
2902
+
2903
+<!-- 图片预览 -->
2904
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>

+ 58 - 30
src/app/views/fuwutai/fuwutai.component.less

@@ -11,6 +11,31 @@
11 11
   }
12 12
 }
13 13
 
14
+.thumbList{
15
+  display: flex;
16
+  align-items: center;
17
+  flex-wrap: wrap;
18
+  gap: 8px;
19
+  .thumb{
20
+    width: 64px;
21
+    height: 64px;
22
+    padding: 4px;
23
+    border-radius: 4px;
24
+    border: 1px solid rgba(0,0,0,0.15);
25
+    img{
26
+      width: 100%;
27
+      height: 100%;
28
+      object-fit: cover;
29
+      object-position: center;
30
+      cursor: pointer;
31
+    }
32
+  }
33
+}
34
+
35
+.transport-a-11111{
36
+  color: @primary-color;
37
+}
38
+
14 39
 .itsmOrHsms{
15 40
   color: rgba(0,0,0,0.45);
16 41
   cursor: pointer;
@@ -423,7 +448,7 @@
423 448
 
424 449
   .lists .head .auto_tit {
425 450
     font-weight: bold;
426
-    font-size: 16px;
451
+    font-size: 14px;
427 452
   }
428 453
   .lists .head .auto_building {
429 454
     display: inline-block;
@@ -519,7 +544,10 @@
519 544
     background-color: white;
520 545
     border-top: 1px rgb(225, 229, 232) solid;
521 546
     &.top185 {
522
-      height: calc(100vh - 355px);
547
+      height: calc(100% - 94px);
548
+    }
549
+    &.top185_1 {
550
+      height: calc(100% - 40px);
523 551
     }
524 552
   }
525 553
 
@@ -555,9 +583,11 @@
555 583
 
556 584
   /* 未分派 */
557 585
   .weifenpai .list {
558
-    height: 100px;
586
+    // height: 100px;
559 587
     border-bottom: 1px rgb(225, 229, 232) solid;
560 588
     position: relative;
589
+    overflow: hidden;
590
+    display: flex;
561 591
   }
562 592
   // 转出院记录
563 593
   .patientLog .list {
@@ -570,7 +600,7 @@
570 600
 
571 601
   /* 左边 */
572 602
   .left_cots {
573
-    height: 100px;
603
+    // height: 100px;
574 604
     width: 78%;
575 605
     float: left;
576 606
     margin-left: 2%;
@@ -590,14 +620,8 @@
590 620
   /* 右边 */
591 621
   .right_bots {
592 622
     width: 20%;
593
-    height: 100px;
594
-    float: left;
595 623
     border-left: 1px #e1e5e8 solid;
596
-    // display: flex;
597
-    // flex-wrap: wrap;
598
-    // align-items: center;
599
-    // justify-content: center;
600
-    padding: 12px 0;
624
+    padding: 8px 0;
601 625
   }
602 626
 
603 627
   /* 上按钮 */
@@ -613,7 +637,8 @@
613 637
 
614 638
   .slider {
615 639
     position: absolute;
616
-    top: 98px;
640
+    // top: 98px;
641
+    bottom: 0;
617 642
     right: 0;
618 643
     width: 100%;
619 644
     height: 2px;
@@ -646,7 +671,7 @@
646 671
     width: 70%;
647 672
     border-radius: 4px;
648 673
     color: #78797a;
649
-    background-color: #f9fafb;
674
+    background-color: #F0F6ED;
650 675
     border: 1px #e5e9ed solid;
651 676
     cursor: pointer;
652 677
     height: 27px;
@@ -655,7 +680,7 @@
655 680
   /* 工单 */
656 681
   .weifenpai .left_cots .gongdan {
657 682
     height: 24px;
658
-    margin-top: 5px;
683
+    margin: 4px 0;
659 684
     line-height: 24px;
660 685
     text-align: center;
661 686
   }
@@ -666,7 +691,7 @@
666 691
     font-size: 14px;
667 692
   }
668 693
   .gongdan_name {
669
-    max-width: 60% !important;
694
+    max-width: 80% !important;
670 695
     overflow: hidden !important;
671 696
     text-overflow: ellipsis !important;
672 697
     white-space: nowrap !important;
@@ -704,7 +729,7 @@
704 729
   .weifenpai .didian {
705 730
     height: 24px;
706 731
     line-height: 24px;
707
-    margin-top: 8px;
732
+    margin: 4px 0;
708 733
     display: flex;
709 734
   }
710 735
 
@@ -746,7 +771,7 @@
746 771
   .weifenpai .shijian {
747 772
     height: 24px;
748 773
     line-height: 24px;
749
-    margin-top: 8px;
774
+    margin: 4px 0;
750 775
   }
751 776
 
752 777
   .weifenpai .shijian .left {
@@ -775,14 +800,16 @@
775 800
 
776 801
   /* 待到达 */
777 802
   .daidaoda .list {
778
-    height: 100px;
803
+    // height: 100px;
804
+    overflow: hidden;
779 805
     border-bottom: 1px rgb(225, 229, 232) solid;
780 806
     position: relative;
807
+    display: flex;
781 808
   }
782 809
 
783 810
   /* 左边 */
784 811
   .daidaoda .left_cots {
785
-    height: 100px;
812
+    // height: 100px;
786 813
     width: 78%;
787 814
     float: left;
788 815
     margin-left: 2%;
@@ -810,7 +837,7 @@
810 837
   /* 工单 */
811 838
   .daidaoda .gongdan {
812 839
     height: 24px;
813
-    margin-top: 5px;
840
+    margin: 4px 0;
814 841
     line-height: 24px;
815 842
     text-align: center;
816 843
   }
@@ -853,7 +880,7 @@
853 880
   .daidaoda .didian {
854 881
     height: 24px;
855 882
     line-height: 24px;
856
-    margin-top: 8px;
883
+    margin: 4px 0;
857 884
     display: flex;
858 885
   }
859 886
 
@@ -889,7 +916,7 @@
889 916
   .daidaoda .shijian {
890 917
     height: 24px;
891 918
     line-height: 24px;
892
-    margin-top: 8px;
919
+    margin: 4px 0;
893 920
   }
894 921
 
895 922
   .daidaoda .shijian .left {
@@ -918,11 +945,12 @@
918 945
 
919 946
   /* 执行中 */
920 947
   .zhixingzhong .list {
921
-    height: 100px;
948
+    // height: 100px;
922 949
     border-bottom: 1px rgb(225, 229, 232) solid;
923 950
     cursor: pointer;
924 951
     position: relative;
925 952
     overflow: hidden;
953
+    display: flex;
926 954
 
927 955
     .left_cots {
928 956
       width: 98%;
@@ -940,7 +968,7 @@
940 968
   /* 工单 */
941 969
   .zhixingzhong .gongdan {
942 970
     height: 24px;
943
-    margin-top: 5px;
971
+    margin: 4px 0;
944 972
     line-height: 24px;
945 973
     text-align: center;
946 974
   }
@@ -983,7 +1011,7 @@
983 1011
   .zhixingzhong .didian {
984 1012
     height: 24px;
985 1013
     line-height: 24px;
986
-    margin-top: 8px;
1014
+    margin: 4px 0;
987 1015
     display: flex;
988 1016
   }
989 1017
 
@@ -1023,7 +1051,7 @@
1023 1051
   .zhixingzhong .shijian {
1024 1052
     height: 24px;
1025 1053
     line-height: 24px;
1026
-    margin-top: 8px;
1054
+    margin: 4px 0;
1027 1055
   }
1028 1056
 
1029 1057
   .zhixingzhong .shijian .left {
@@ -1177,7 +1205,7 @@
1177 1205
 
1178 1206
   /* 左边 */
1179 1207
   .create-order-model .right_lists .left_cots {
1180
-    height: 100px;
1208
+    // height: 100px;
1181 1209
     width: 78%;
1182 1210
     float: left;
1183 1211
     margin-left: 2%;
@@ -1229,7 +1257,7 @@
1229 1257
     margin-top: 4px;
1230 1258
     border-radius: 4px;
1231 1259
     color: #78797a;
1232
-    background-color: #f9fafb;
1260
+    background-color: #F0F6ED;
1233 1261
     border: 1px #e5e9ed solid;
1234 1262
     cursor: pointer;
1235 1263
     height: 27px;
@@ -1238,7 +1266,7 @@
1238 1266
   /* 工单 */
1239 1267
   .create-order-model .right_lists .left_cots .gongdan {
1240 1268
     height: 24px;
1241
-    margin-top: 5px;
1269
+    margin: 4px 0;
1242 1270
     line-height: 24px;
1243 1271
   }
1244 1272
 
@@ -1318,7 +1346,7 @@
1318 1346
   .create-order-model .right_lists .shijian {
1319 1347
     height: 24px;
1320 1348
     line-height: 24px;
1321
-    margin-top: 8px;
1349
+    margin: 4px 0;
1322 1350
   }
1323 1351
 
1324 1352
   .create-order-model .right_lists .shijian .left {

+ 281 - 116
src/app/views/fuwutai/fuwutai.component.ts

@@ -20,9 +20,10 @@ import { Subject, forkJoin } from "rxjs";
20 20
 import { debounceTime, filter } from "rxjs/operators";
21 21
 import { SourceId } from "src/app/type/types";
22 22
 import { ToolService } from 'src/app/services/tool.service';
23
-import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format } from 'date-fns';
23
+import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours } from 'date-fns';
24 24
 import { UploadFile } from 'ng-zorro-antd';
25 25
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
26
+import cloneDeep from 'lodash-es/cloneDeep'
26 27
 
27 28
 // 日期禁用
28 29
 function range(start: number, end: number): number[] {
@@ -771,6 +772,15 @@ export class FuwutaiComponent implements OnInit {
771 772
   recDelLoading: boolean = false; //撤回并删除loading状态
772 773
   saveLoading: boolean = false; //保存按钮loading状态
773 774
 
775
+  flagList:any = {
776
+    itsmFlag1: false,
777
+    hsmsFlag1: false,
778
+    itsmFlag2: false,
779
+    hsmsFlag2: false,
780
+    itsmFlag3: false,
781
+    hsmsFlag3: false,
782
+  }
783
+
774 784
   mainRole: boolean = false; //回到系统管理权限
775 785
   initRole() {
776 786
     // let roles = JSON.parse(localStorage.getItem('user')).user.role;
@@ -831,6 +841,9 @@ export class FuwutaiComponent implements OnInit {
831 841
       orderScopeRadio: this.orderScopeRadio || '0',
832 842
       hsmsSwitch: scopeInfo.hsmsSwitch === 1,
833 843
     }
844
+    this.flagList.hsmsFlag1 = this.hsmsData.hsmsSwitch;
845
+    this.flagList.hsmsFlag2 = this.hsmsData.hsmsSwitch;
846
+    this.flagList.hsmsFlag3 = this.hsmsData.hsmsSwitch;
834 847
     this.itsmCheckedHos = scopeInfo.dutyList || [];
835 848
     this.itsmOrderScopeRadio = scopeInfo.dutyRange + "";
836 849
     this.itsmScopeGroups = scopeInfo.dutyGroupList || [];
@@ -841,6 +854,9 @@ export class FuwutaiComponent implements OnInit {
841 854
       mdv2Switch: scopeInfo.mdv2Switch === 1,
842 855
       allDuty: scopeInfo.allDuty === undefined ? 1 : scopeInfo.allDuty,
843 856
     }
857
+    this.flagList.itsmFlag1 = this.itsmData.mdv2Switch;
858
+    this.flagList.itsmFlag2 = this.itsmData.mdv2Switch;
859
+    this.flagList.itsmFlag3 = this.itsmData.mdv2Switch;
844 860
     this.getHospitalConfigList('allowNucleicAcidPrinting');
845 861
   }
846 862
 
@@ -1262,45 +1278,51 @@ export class FuwutaiComponent implements OnInit {
1262 1278
   loading2 = true;
1263 1279
   loading3 = true;
1264 1280
   getOrderList(stateId, isAudio?) {
1265
-    let that = this;
1281
+    this[`loading${stateId}`] = true;
1266 1282
     let keyWords = "";
1267
-    if (stateId == 1) {
1268
-      keyWords = this.unassignedSearchCon || "";
1269
-    } else if (stateId == 2) {
1270
-      keyWords = this.arriveSearchCon || "";
1271
-    } else if (stateId == 3) {
1272
-      keyWords = this.executionSearchCon || "";
1273
-    }
1274
-    if (that.user.user.scope) {
1275
-      that.user.user.scope.typeIds = that.user.user.scope.typeIds || [];
1276
-    }
1277
-    if (!that.user.user.scope || !that.user.user.scope.typeIds) {
1278
-      that.loading1 = that.loading2 = that.loading3 = false;
1279
-      return;
1280
-    }
1281 1283
     let types = "";
1282
-    that.user.user.scope.typeIds.forEach((e) => {
1283
-      types += e.id + ",";
1284
-    });
1285
-    types = types.slice(0, types.length - 1);
1284
+
1286 1285
     let postData:any = {};
1287 1286
     // 配送
1288
-    if(this.hsmsData.hsmsSwitch){
1289
-      postData.workOrderQuery = {
1290
-        workOrder: {
1291
-          serTaskTypes: types || "null",
1292
-          serGdState: stateId,
1293
-          range: that.orderScopeRadio,
1294
-          platform: 3,
1295
-          searchDays: 1,
1296
-          keyWord: keyWords,
1297
-        },
1298
-        idx: 0,
1299
-        sum: 1,
1287
+    if(this.flagList['hsmsFlag' + stateId]){
1288
+      if (stateId == 1) {
1289
+        keyWords = this.unassignedSearchCon || "";
1290
+      } else if (stateId == 2) {
1291
+        keyWords = this.arriveSearchCon || "";
1292
+      } else if (stateId == 3) {
1293
+        keyWords = this.executionSearchCon || "";
1294
+      }
1295
+      if (this.user.user.scope) {
1296
+        this.user.user.scope.typeIds = this.user.user.scope.typeIds || [];
1297
+      }
1298
+      if (!this.user.user.scope || !this.user.user.scope.typeIds) {
1299
+        this.loading1 = this.loading2 = this.loading3 = false;
1300
+      }else{
1301
+        this.user.user.scope.typeIds.forEach((e) => {
1302
+          types += e.id + ",";
1303
+        });
1304
+        types = types.slice(0, types.length - 1);
1305
+
1306
+        postData.workOrderQuery = {
1307
+          workOrder: {
1308
+            serTaskTypes: types || "null",
1309
+            serGdState: stateId,
1310
+            range: this.orderScopeRadio,
1311
+            platform: 3,
1312
+            searchDays: 1,
1313
+            keyWord: keyWords,
1314
+          },
1315
+          idx: 0,
1316
+          sum: 1,
1317
+        }
1318
+
1319
+        if (this.unassignedBuilding.length && stateId == 1) {
1320
+          postData.workOrderQuery.workOrder["deptIds"] = this.unassignedBuilding.toString();
1321
+        }
1300 1322
       }
1301 1323
     }
1302 1324
     // 运维
1303
-    if(this.itsmData.mdv2Switch){
1325
+    if(this.flagList['itsmFlag' + stateId]){
1304 1326
       postData.incidentQuery = {
1305 1327
         incident: {
1306 1328
           "queryTask": "storageAccept",
@@ -1310,37 +1332,22 @@ export class FuwutaiComponent implements OnInit {
1310 1332
         sum: 1,
1311 1333
       }
1312 1334
     }
1313
-    if (stateId == 1) {
1314
-      if (this.unassignedBuilding.length) {
1315
-        postData.workOrderQuery.workOrder["deptIds"] = this.unassignedBuilding.toString();
1316
-      }
1317
-      that.loading1 = true;
1318
-    } else if (stateId == 2) {
1319
-      that.loading2 = true;
1320
-    } else if (stateId == 3) {
1321
-      that.loading3 = true;
1322
-    }
1335
+
1323 1336
     console.log(postData);
1324
-    that.mainService
1325
-      .orderList(postData)
1326
-      .subscribe((data:any) => {
1337
+    this.mainService.orderList(postData).subscribe((data:any) => {
1327 1338
         if (stateId == 1) {
1328 1339
           // 未分派
1329
-          that.unassignedList = data.list || [];
1330
-          that.unassignedList.forEach((item) => {
1340
+          this.unassignedList = data.data || [];
1341
+          this.unassignedList.forEach((item) => {
1331 1342
             item.checked = false;
1332 1343
           });
1333
-          that.batchType = false;
1334
-          that.allUnassignedList = false;
1335
-          that.unassignedListClone = JSON.parse(
1336
-            JSON.stringify(that.unassignedList)
1344
+          this.batchType = false;
1345
+          this.allUnassignedList = false;
1346
+          this.unassignedListClone = JSON.parse(
1347
+            JSON.stringify(this.unassignedList)
1337 1348
           );
1338 1349
 
1339
-          if (
1340
-            this.audioNotDispatched &&
1341
-            that.unassignedList.length > 0 &&
1342
-            isAudio
1343
-          ) {
1350
+          if (this.audioNotDispatched && this.unassignedList.length > 0 && isAudio) {
1344 1351
             //语音播报开启
1345 1352
             let audio = document.createElement("audio");
1346 1353
             audio.src = "./../../assets/audio/audioNotDispatched.mp3";
@@ -1349,25 +1356,25 @@ export class FuwutaiComponent implements OnInit {
1349 1356
               audio.play();
1350 1357
             });
1351 1358
           }
1352
-          that.loading1 = false;
1359
+          this.loading1 = false;
1353 1360
         } else if (stateId == 2) {
1354 1361
           // 待到达
1355
-          that.arriveList = data.list || [];
1356
-          that.arriveList.forEach((item) => {
1362
+          this.arriveList = data.list || [];
1363
+          this.arriveList.forEach((item) => {
1357 1364
             item.checked = false;
1358 1365
           });
1359
-          that.batchType1 = false;
1360
-          that.allArriveList = false;
1361
-          that.arriveListClone = JSON.parse(JSON.stringify(that.arriveList));
1362
-          that.loading2 = false;
1366
+          this.batchType1 = false;
1367
+          this.allArriveList = false;
1368
+          this.arriveListClone = JSON.parse(JSON.stringify(this.arriveList));
1369
+          this.loading2 = false;
1363 1370
         } else if (stateId == 3) {
1364 1371
           // 执行中
1365
-          that.executionList = data.list || [];
1366
-          that.loading3 = false;
1372
+          this.executionList = data.list || [];
1373
+          this.loading3 = false;
1367 1374
         }
1368 1375
 
1369 1376
         if (keyWords) {
1370
-          that.loading1 = that.loading2 = that.loading3 = false;
1377
+          this.loading1 = this.loading2 = this.loading3 = false;
1371 1378
         }
1372 1379
       });
1373 1380
   }
@@ -1437,6 +1444,22 @@ export class FuwutaiComponent implements OnInit {
1437 1444
       this.router.navigateByUrl("dispatchingDesk/detailOthers/" + data.id);
1438 1445
     }
1439 1446
   }
1447
+
1448
+  // 查看ITSM工单详情
1449
+  detailModalShow = false; //弹窗开关
1450
+  openItsmDetails(data) {
1451
+    this.coopData = data;
1452
+    this.detailModalShow = true;
1453
+  }
1454
+  // 关闭弹窗
1455
+  closeDetailModelOrder(e) {
1456
+    this.detailModalShow = JSON.parse(e).show;
1457
+  }
1458
+  // 弹窗确定
1459
+  confirmDetailModelOrder(e){
1460
+    console.log(e);
1461
+    this.detailModalShow = false;
1462
+  }
1440 1463
   // 选择楼栋
1441 1464
   changeUnassignedBuilding(e) {
1442 1465
     this.getOrderList(1);
@@ -1610,13 +1633,16 @@ export class FuwutaiComponent implements OnInit {
1610 1633
   // 打开新建工单
1611 1634
   deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房
1612 1635
   deathTasktypeIdPatient; //获取这个写死的任务类型的id,转出院记录
1613
-  async showNewOrder(des?, phone?) {
1636
+  async showNewOrder(des = '', phone = '', isInit = false, buildType = '') {
1637
+    this.buildType = buildType;
1614 1638
     if(this.itsmData.mdv2Switch){
1615 1639
       this.searchApplicationHospital();
1616 1640
       this.searchApplicationCategory();
1617 1641
       this.searchApplicationPriority();
1618 1642
       this.searchApplicationSource();
1619
-      this.searchApplicationDepartment('itsm');
1643
+      isInit ? this.searchApplicationDepartment('itsm', undefined, undefined, undefined, true) : this.searchApplicationDepartment('itsm');
1644
+      isInit && ((this.isRelatedDepartment && this.incidentModel.department) || (!this.isRelatedDepartment && this.incidentModel.hosId) ) && this.incidentModel.hosId && this.searchApplicationBuilding();
1645
+      isInit && this.incidentModel.area && this.searchApplicationFloor();
1620 1646
       if(!this.hsmsData.hsmsSwitch){
1621 1647
         this.taskBuild = null;
1622 1648
         this.newOrderShow = true;
@@ -1624,10 +1650,11 @@ export class FuwutaiComponent implements OnInit {
1624 1650
         this.fixedTab = "newOrder";
1625 1651
         this.currentRTab = 0;
1626 1652
         this.rightTitle_tab = [];
1627
-        this.incidentModel = {};
1628
-        this.incidentMsg = {};
1653
+        this.incidentModel = isInit ? this.incidentModel : {};
1654
+        this.incidentMsg = isInit ? this.incidentMsg : {};
1655
+        this.isBuildOrderAgagin = false;
1629 1656
         this.applyDept = null;
1630
-        this.incidentModel.department = null;
1657
+        this.incidentModel.department = isInit ? this.incidentModel.department : null;
1631 1658
 
1632 1659
         //正常初始化
1633 1660
         this.getAutoWorkTypes();
@@ -1656,8 +1683,7 @@ export class FuwutaiComponent implements OnInit {
1656 1683
     let deathTasktypePatientResult: any = await this.patientLogTasktype();
1657 1684
     this.patientLogTasktypeLoading = false;
1658 1685
     if (deathTasktypePatientResult.status == 200) {
1659
-      this.deathTasktypeIdPatient =
1660
-        deathTasktypePatientResult.list[0].valueconfig;
1686
+      this.deathTasktypeIdPatient = deathTasktypePatientResult.list[0].valueconfig;
1661 1687
     } else {
1662 1688
       return;
1663 1689
     }
@@ -1668,10 +1694,11 @@ export class FuwutaiComponent implements OnInit {
1668 1694
     this.fixedTab = "newOrder";
1669 1695
     this.currentRTab = 0;
1670 1696
     this.rightTitle_tab = [];
1671
-    this.incidentModel = {};
1672
-    this.incidentMsg = {};
1697
+    this.incidentModel = isInit ? this.incidentModel : {};
1698
+    this.incidentMsg = isInit ? this.incidentMsg : {};
1699
+    this.isBuildOrderAgagin = false;
1673 1700
     this.applyDept = null;
1674
-    this.incidentModel.department = null;
1701
+    this.incidentModel.department = isInit ? this.incidentModel.department : null;
1675 1702
     console.log(des);
1676 1703
     if (des === "no") {
1677 1704
       //没绑定科室
@@ -1816,8 +1843,13 @@ export class FuwutaiComponent implements OnInit {
1816 1843
           { id: 3, name: '知识库' },
1817 1844
         ]
1818 1845
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1819
-      }else{
1820
-        this.rightTitle_tab = [];
1846
+      }
1847
+
1848
+      let deptObj = this.applicationDeptList.find(v => v.id == this.incidentModel.department);
1849
+
1850
+      if(this.applyDept != this.incidentModel.department){
1851
+        this.applyDept = this.incidentModel.department;
1852
+        this.searchApplicationDepartment('hsms', deptObj ? deptObj.dept : '', undefined, this.incidentModel.department);
1821 1853
       }
1822 1854
 
1823 1855
       // 回显事件来源
@@ -1832,8 +1864,13 @@ export class FuwutaiComponent implements OnInit {
1832 1864
           { id: 1, name: '转出院记录' },
1833 1865
         ]
1834 1866
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1835
-      }else{
1836
-        this.rightTitle_tab = [];
1867
+      }
1868
+
1869
+      let deptObj = this.applicationDepartmentList.find(v => v.id == this.applyDept);
1870
+
1871
+      if(this.incidentModel.department != this.applyDept){
1872
+        this.incidentModel.department = this.applyDept;
1873
+        this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
1837 1874
       }
1838 1875
     }
1839 1876
   }
@@ -1904,7 +1941,9 @@ export class FuwutaiComponent implements OnInit {
1904 1941
     this.incidentModel.department = undefined;
1905 1942
     this.searchApplicationDepartment('itsm');
1906 1943
 
1907
-    this.incidentModel.requester = undefined;
1944
+    if(this.buildType !== '微信转事件'){
1945
+      this.incidentModel.requester = undefined;
1946
+    }
1908 1947
     this.applicationRequesterList = [];
1909 1948
 
1910 1949
     this.incidentModel.area = undefined;
@@ -1913,7 +1952,7 @@ export class FuwutaiComponent implements OnInit {
1913 1952
     this.incidentModel.place = undefined;
1914 1953
     this.applicationFloorList = [];
1915 1954
 
1916
-    this.incidentModel.address = undefined;
1955
+    this.incidentModel.houseNumber = undefined;
1917 1956
     this.incidentModel.duty = undefined;
1918 1957
 
1919 1958
     // 根据院区和故障现象带出责任部门,优先级,维修人/组
@@ -1961,7 +2000,7 @@ export class FuwutaiComponent implements OnInit {
1961 2000
       idx: 0,
1962 2001
       sum: 20,
1963 2002
       user: {
1964
-        hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.branch },
2003
+        hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
1965 2004
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
1966 2005
         name: keyWord,
1967 2006
         // simpleQuery: true,
@@ -1983,7 +2022,7 @@ export class FuwutaiComponent implements OnInit {
1983 2022
     let userObj = this.applicationRequesterList.find(v => v.id == e);
1984 2023
     // 选择申请人回显申请人电话
1985 2024
     if(userObj){
1986
-      this.incidentMsg.phone = userObj.phone;
2025
+      this.incidentMsg.requesterPhone = userObj.phone;
1987 2026
     }
1988 2027
   }
1989 2028
   // 故障现象列表
@@ -2016,7 +2055,7 @@ export class FuwutaiComponent implements OnInit {
2016 2055
     // 知识库
2017 2056
     this.getKnowageList();
2018 2057
     // 根据院区和故障现象带出责任部门,优先级,维修人/组,故障描述
2019
-    if(this.incidentModel.branch && e){
2058
+    if(this.incidentModel.hosId && e){
2020 2059
       // 带出故障描述
2021 2060
       if(this.incidentModel.description){
2022 2061
         this.incidentModel.description = this.incidentModel.description + ' ' + this.applicationCategoryList.find(v => v.id == e).mutiCategory;
@@ -2029,7 +2068,7 @@ export class FuwutaiComponent implements OnInit {
2029 2068
         sum: 9999,
2030 2069
         incidentCategoryConfig: {
2031 2070
           categoryId: e,
2032
-          hosId: this.incidentModel.branch,
2071
+          hosId: this.incidentModel.hosId,
2033 2072
         },
2034 2073
       };
2035 2074
       console.log(postData);
@@ -2088,10 +2127,10 @@ export class FuwutaiComponent implements OnInit {
2088 2127
         "department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
2089 2128
         "contactsInformation": this.incidentModel.contactsInformation,
2090 2129
         "contacts": this.incidentModel.contacts,
2091
-        "hosId": this.incidentModel.branch || undefined,
2130
+        "hosId": this.incidentModel.hosId || undefined,
2092 2131
         "area": this.incidentModel.area ? { id: this.incidentModel.area } : undefined,
2093 2132
         "place": this.incidentModel.place ? { id: this.incidentModel.place } : undefined,
2094
-        "houseNumber": this.incidentModel.address,
2133
+        "houseNumber": this.incidentModel.houseNumber,
2095 2134
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
2096 2135
         "priorityId": this.incidentModel.priorityId || undefined,
2097 2136
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
@@ -2108,6 +2147,10 @@ export class FuwutaiComponent implements OnInit {
2108 2147
       },
2109 2148
     };
2110 2149
 
2150
+    if(this.buildType){
2151
+      Object.assign(postData.incident, this.editOrder);
2152
+    }
2153
+
2111 2154
     this.mainService
2112 2155
       .flowPost("incident/task/accept", postData)
2113 2156
       .subscribe((result) => {
@@ -2342,7 +2385,7 @@ export class FuwutaiComponent implements OnInit {
2342 2385
       idx: 0,
2343 2386
       sum: 9999,
2344 2387
       building: {
2345
-        hosId: this.incidentModel.branch,
2388
+        cascadeHosId: this.incidentModel.hosId,
2346 2389
       },
2347 2390
     };
2348 2391
     this.isLoading = true;
@@ -2369,7 +2412,7 @@ export class FuwutaiComponent implements OnInit {
2369 2412
       sum: 9999,
2370 2413
       floor: {
2371 2414
         buildId: this.incidentModel.area || undefined,
2372
-        hosId: this.incidentModel.branch,
2415
+        hosId: this.incidentModel.hosId,
2373 2416
       },
2374 2417
     };
2375 2418
     this.isLoading = true;
@@ -2384,13 +2427,15 @@ export class FuwutaiComponent implements OnInit {
2384 2427
   }
2385 2428
   // 修改关联查
2386 2429
   changeApplyRelatedDepartment(e){
2387
-    this.incidentModel.requester = undefined;
2430
+    if(this.buildType !== '微信转事件'){
2431
+      this.incidentModel.requester = undefined;
2432
+    }
2388 2433
     this.searchApplicationRequester();
2389 2434
   }
2390 2435
   // 申请科室列表(搜索)
2391 2436
   isLoadingApply: boolean = false;
2392 2437
   applicationDeptList:any[] = [];
2393
-  searchApplicationDepartment(type, e?, phone?, deptId?) {
2438
+  searchApplicationDepartment(type, e?, phone?, deptId?, isInit?) {
2394 2439
     if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
2395 2440
       return;
2396 2441
     }
@@ -2400,7 +2445,7 @@ export class FuwutaiComponent implements OnInit {
2400 2445
     }
2401 2446
     let cascadeHosId;
2402 2447
     if(type == 'itsm'){
2403
-      cascadeHosId = this.incidentModel.branch || undefined;
2448
+      cascadeHosId = this.incidentModel.hosId || undefined;
2404 2449
     }else{
2405 2450
       cascadeHosId = this.checkedHos;
2406 2451
     }
@@ -2456,6 +2501,8 @@ export class FuwutaiComponent implements OnInit {
2456 2501
             }
2457 2502
           }else if(type == 'itsm'){
2458 2503
             this.applicationDeptList = data.list;
2504
+            let ids = this.applicationDeptList.map(v => v.id);
2505
+            isInit && !ids.includes(this.incidentModel.department) && (this.applicationDeptList.unshift({id: this.incidentModel.department, dept: this.incidentMsg.deptName}))
2459 2506
             deptId && this.changeApplyDept(deptId);
2460 2507
           }
2461 2508
         }
@@ -2513,9 +2560,9 @@ export class FuwutaiComponent implements OnInit {
2513 2560
     }
2514 2561
 
2515 2562
     // 选择科室回显一级院区
2516
-    if(!this.incidentModel.branch){
2563
+    if(!this.incidentModel.hosId){
2517 2564
       if(deptObj){
2518
-        this.incidentModel.branch = deptObj.hospital.parent ? deptObj.hospital.parent.id : deptObj.hospital.id;
2565
+        this.incidentModel.hosId = deptObj.hospital.parent ? deptObj.hospital.parent.id : deptObj.hospital.id;
2519 2566
       }
2520 2567
 
2521 2568
       this.incidentModel.area = undefined;
@@ -2528,16 +2575,18 @@ export class FuwutaiComponent implements OnInit {
2528 2575
     // 选择科室回显科室电话,楼栋,楼层,地址
2529 2576
     if(deptObj){
2530 2577
       console.log('deptObj:', deptObj)
2531
-      this.incidentMsg.manyPhone = deptObj.manyPhone;
2578
+      this.incidentMsg.deptManyPhone = deptObj.manyPhone;
2532 2579
       this.incidentModel.area = deptObj.building ? deptObj.building.id : undefined;
2533 2580
       this.incidentModel.area && this.searchApplicationBuilding();
2534 2581
       this.incidentModel.place = deptObj.floor ? deptObj.floor.id : undefined;
2535 2582
       this.incidentModel.place && this.searchApplicationFloor();
2536
-      this.incidentModel.address = deptObj.address;
2583
+      this.incidentModel.houseNumber = deptObj.address;
2537 2584
     }
2538 2585
 
2539 2586
     // 刷新申请人列表
2540
-    this.incidentModel.requester = undefined;
2587
+    if(this.buildType !== '微信转事件'){
2588
+      this.incidentModel.requester = undefined;
2589
+    }
2541 2590
     this.searchApplicationRequester();
2542 2591
 
2543 2592
     // 回显维修人/组
@@ -2734,10 +2783,10 @@ export class FuwutaiComponent implements OnInit {
2734 2783
         "department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
2735 2784
         "contactsInformation": this.incidentModel.contactsInformation,
2736 2785
         "contacts": this.incidentModel.contacts,
2737
-        "hosId": this.incidentModel.branch || undefined,
2786
+        "hosId": this.incidentModel.hosId || undefined,
2738 2787
         "area": this.incidentModel.area ? { id: this.incidentModel.area } : undefined,
2739 2788
         "place": this.incidentModel.place ? { id: this.incidentModel.place } : undefined,
2740
-        "houseNumber": this.incidentModel.address,
2789
+        "houseNumber": this.incidentModel.houseNumber,
2741 2790
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
2742 2791
         "priorityId": this.incidentModel.priorityId || undefined,
2743 2792
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
@@ -2752,6 +2801,9 @@ export class FuwutaiComponent implements OnInit {
2752 2801
         "assignee": this.incidentModel.user || undefined,
2753 2802
       }
2754 2803
     };
2804
+    if(this.buildType){
2805
+      Object.assign(postData.incident, this.editOrder);
2806
+    }
2755 2807
     console.log(postData);
2756 2808
     // return;
2757 2809
 
@@ -2784,8 +2836,10 @@ export class FuwutaiComponent implements OnInit {
2784 2836
       this.incidentModel.category = undefined;
2785 2837
       this.incidentModel.user = undefined;
2786 2838
       this.incidentModel.group = undefined;
2839
+      this.showPromptModal("建单", true, "", "");
2787 2840
     }else{
2788
-      this.newOrderCancel();
2841
+      this.newOrderShow = false; //关闭弹窗
2842
+      this.showPromptModal("建单", true, "", "");
2789 2843
     }
2790 2844
   }
2791 2845
 
@@ -2823,10 +2877,11 @@ export class FuwutaiComponent implements OnInit {
2823 2877
           });
2824 2878
           console.log('workTypesArrange', this.workTypesArrange);
2825 2879
           // 任务类型是否显示操作项
2826
-          this.workTypesFlag = Object.keys(this.workTypesArrange).length >= 5;
2880
+          let arr = Object.keys(this.workTypesArrange);
2881
+          this.workTypesFlag = arr.length >= 5;
2827 2882
           // 默认选中第一项
2828
-          if (Object.keys(this.workTypesArrange).length > 0) {
2829
-            this.tabClick(Object.keys(this.workTypesArrange)[0]);
2883
+          if (arr.length > 0) {
2884
+            this.tabClick(arr[arr.length - 1]);
2830 2885
           }
2831 2886
         }
2832 2887
       });
@@ -3380,24 +3435,39 @@ export class FuwutaiComponent implements OnInit {
3380 3435
   // 删除
3381 3436
   // 打开模态框
3382 3437
   coopId; //当前操作id
3383
-  openDelModal(id) {
3438
+  coopType;
3439
+  openDelModal(id, type) {
3384 3440
     this.coopId = id;
3441
+    this.coopType = type;
3385 3442
     this.delOrderShow = true;
3386 3443
   }
3387 3444
   // 确认删除
3388 3445
   confirmDel() {
3389 3446
     let that = this;
3390 3447
     that.btnLoading = true;
3391
-    that.mainService.delOrder(that.coopId).subscribe((data) => {
3392
-      that.btnLoading = false;
3393
-      console.log(data);
3394
-      that.closeDelOrderModal();
3395
-      if (data.status == 200) {
3396
-        that.showPromptModal("删除", true, "");
3397
-      } else {
3398
-        that.showPromptModal("删除", false, data.msg);
3399
-      }
3400
-    });
3448
+    if(this.coopType === 'hsms'){
3449
+      that.mainService.delOrder(that.coopId).subscribe((data) => {
3450
+        that.btnLoading = false;
3451
+        console.log(data);
3452
+        that.closeDelOrderModal();
3453
+        if (data.status == 200) {
3454
+          that.showPromptModal("删除", true, "");
3455
+        } else {
3456
+          that.showPromptModal("删除", false, data.msg);
3457
+        }
3458
+      });
3459
+    }else if(this.coopType === 'itsm'){
3460
+      that.mainService.simplePost("rmvData", "incident", [this.coopId]).subscribe((data) => {
3461
+        that.btnLoading = false;
3462
+        console.log(data);
3463
+        that.closeDelOrderModal();
3464
+        if (data.status == 200) {
3465
+          that.showPromptModal("删除", true, "");
3466
+        } else {
3467
+          that.showPromptModal("删除", false, data.msg);
3468
+        }
3469
+      });
3470
+    }
3401 3471
   }
3402 3472
 
3403 3473
   // 关闭模态框
@@ -3669,4 +3739,99 @@ export class FuwutaiComponent implements OnInit {
3669 3739
       this.radioValueQt = +arr[1];
3670 3740
     }
3671 3741
   }
3742
+
3743
+  // 运维、配送工单切换
3744
+  filterOrderList(type, state){
3745
+    this.flagList[`${type}Flag${state}`] = !this.flagList[`${type}Flag${state}`];
3746
+    this.getOrderList(state, state === 1);
3747
+  }
3748
+
3749
+  // 优先级颜色
3750
+  priorityColor(priorityId) {
3751
+    // 极低|低
3752
+    if(priorityId == 1 || priorityId == 2){
3753
+      return '';
3754
+    } else if(priorityId == 3){
3755
+      return 'yellow';
3756
+    } else if(priorityId == 4 || priorityId == 5){
3757
+      return 'red';
3758
+    }
3759
+  }
3760
+
3761
+  // 延期记录
3762
+  transferHandlerLog = function (currentLog) {
3763
+    if(!currentLog){
3764
+        return '';
3765
+    }
3766
+    currentLog = cloneDeep(currentLog);
3767
+    if(currentLog.extra1DTO && currentLog.extra2 && currentLog.startTime){
3768
+        if(currentLog.extra2==0.5){
3769
+          currentLog.extra2 = 4;
3770
+          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
3771
+        }else{
3772
+          return currentLog.extra1DTO.name+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "MM月dd日前完成");
3773
+        }
3774
+    }else{
3775
+        return '';
3776
+    }
3777
+  }
3778
+
3779
+  // 生成工单
3780
+  buildType;
3781
+  editOrder;
3782
+  generateOrder(data){
3783
+    this.editOrder = cloneDeep(data);
3784
+    let incidentModel = cloneDeep(data);
3785
+    let incidentMsg:any = {};
3786
+    console.log('data:', data)
3787
+    // incidentModel.department && (this.applicationDeptList = [cloneDeep(incidentModel.department)]);
3788
+    incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
3789
+    incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
3790
+    incidentModel.department && (incidentModel.department = incidentModel.department.id);
3791
+    incidentModel.requester && (this.applicationRequesterList = [cloneDeep(incidentModel.requester)]);
3792
+    incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
3793
+    incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
3794
+    incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
3795
+    incidentModel.source && (incidentModel.source = incidentModel.source.id);
3796
+    incidentModel.area && (incidentModel.area = incidentModel.area.id);
3797
+    incidentModel.place && (incidentModel.place = incidentModel.place.id);
3798
+    this.incidentModel = incidentModel;
3799
+    this.incidentMsg = incidentMsg;
3800
+    console.log('this.applicationDeptList:', this.applicationDeptList)
3801
+    console.log('incidentModel:', incidentModel)
3802
+    this.showNewOrder('', '', true, '微信转事件');
3803
+
3804
+    // 查询报修图片
3805
+    this.getRepairImgs(data.id);
3806
+  }
3807
+
3808
+  // 获取报修图片
3809
+  repairImgs:any[] = [];//报修图片
3810
+  getRepairImgs(incidentId) {
3811
+    this.mainService
3812
+      .getPreviewImage('wechatRequesterIncident', incidentId)
3813
+      .subscribe((res:any) => {
3814
+        res.data = res.data || [];
3815
+        res.data.forEach(v => {
3816
+          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
3817
+          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
3818
+        })
3819
+        this.repairImgs = res.data;
3820
+      });
3821
+  }
3822
+
3823
+  // 预览图片
3824
+  imgs = [];
3825
+  isPreview = false;
3826
+  initialViewIndex:number = 0;
3827
+  previewImageHandler(data = [], index = 0) {
3828
+    this.initialViewIndex = index;
3829
+    console.log(index)
3830
+    this.isPreview = false;
3831
+    data = data || [];
3832
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
3833
+    setTimeout(() => {
3834
+      this.isPreview = true;
3835
+    }, 0)
3836
+  }
3672 3837
 }

+ 2 - 0
src/app/views/fuwutai/fuwutai.module.ts

@@ -9,6 +9,7 @@ import { NgxPrintModule } from 'ngx-print';
9 9
 import { OrderScopeModule } from 'src/app/components/order-scope/order-scope.module';
10 10
 import { IncidentDicrectOrderModule } from 'src/app/components/incidentManagement/incident-direct-order/incident-direct-order.module';
11 11
 import { KnowledgeLookModule } from 'src/app/components/knowledge-look/knowledge-look.module';
12
+import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
12 13
 
13 14
 
14 15
 @NgModule({
@@ -23,6 +24,7 @@ import { KnowledgeLookModule } from 'src/app/components/knowledge-look/knowledge
23 24
     OrderScopeModule,
24 25
     IncidentDicrectOrderModule,
25 26
     KnowledgeLookModule,
27
+    IncidentDetailModule,
26 28
   ]
27 29
 })
28 30
 export class FuwutaiModule { }