Kaynağa Gözat

暂提代码

seimin 2 yıl önce
ebeveyn
işleme
d6e20ae383

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://weixintest15.ngser.dashitech.com",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 19 - 1
src/app/services/main.service.ts

@@ -492,12 +492,24 @@ export class MainService {
492 492
       headers: this.headers,
493 493
     });
494 494
   }
495
-  //查区域地点接口
495
+  //查报修流程时间
496
+  getProcessTime(data,processInstanceId) {
497
+    return this.http.post(host.host + "/itsm/bpm/flowTracing/"+processInstanceId, data, {
498
+      headers: this.headers,
499
+    });
500
+  }
501
+  //查列表
496 502
   fetchListBx(type, data) {
497 503
     return this.http.post(host.host + "/itsm/fetchDataList/" + type, data, {
498 504
       headers: this.headers,
499 505
     });
500 506
   }
507
+  //查单个
508
+  fetchDataBx(target, id) {
509
+    return this.http.post(host.host + "/itsm/fetchData/" + target + "/" + id,{}, {
510
+      headers: this.headers,
511
+    });
512
+  }
501 513
   //提交报修
502 514
   addWxIncident(data) {
503 515
     return this.http.post(host.host + "/itsm/addWxIncident", data, {
@@ -510,6 +522,12 @@ export class MainService {
510 522
       headers: this.headers,
511 523
     });
512 524
   }
525
+  //获取ITSM字典
526
+  getDictionaryByITSM(data) {
527
+    return this.http.post(host.host + "/itsm/common/getDictionary", data, {
528
+      headers: this.headers,
529
+    });
530
+  }
513 531
   //复制院区
514 532
   copyHosTaskType(data) {
515 533
     return this.http.post(host.host + "/api/copyHosTaskType", data, {

+ 345 - 0
src/app/share/detail-bx/detail-bx.component.html

@@ -0,0 +1,345 @@
1
+<!-- 报修信息 -->
2
+<div class="detail" *ngIf="!maskFlag">
3
+    <div class="title">报修信息<i class="icon_transport transport-guanbi" (click)="close()"></i></div>
4
+    <overlay-scrollbars #osComponentRef1 style="height: 90%; flex: 1">
5
+      <div class="content">
6
+        <div class="top" *ngIf="amplificationShow">
7
+          <div class="num">
8
+            <span class="left">报修编号:{{orderInfo.bxcode}}</span>
9
+            <span class="right">{{orderInfo.incidentState?orderInfo.incidentState.name:''}}</span>
10
+          </div>
11
+          <div class="info" nz-row>
12
+            <div nz-col nzSpan="8">报修类别:{{orderInfo.category?orderInfo.category.category:''}}</div>
13
+            <div nz-col nzSpan="8">报修地址:<ng-container *ngIf="orderInfo.place">{{ orderInfo.place.area.area }} {{ orderInfo.place.place }} {{ orderInfo.address }}</ng-container></div>
14
+            <div nz-col nzSpan="24">报修内容:{{orderInfo.description}}</div>
15
+            <div nz-col nzSpan="24">报修图片:{{orderInfo.description}}</div>
16
+            <div nz-col nzSpan="8">维修人:<ng-container *ngIf="orderInfo.incident&&orderInfo.incident.handlingPersonnelUser">{{ orderInfo.incident.handlingPersonnelUser.name }}</ng-container></div>
17
+            <div nz-col nzSpan="8">维修人电话:<ng-container *ngIf="orderInfo.incident&&orderInfo.incident.handlingPersonnelUser">{{ orderInfo.incident.handlingPersonnelUser.phone }}</ng-container></div>
18
+            <div nz-col nzSpan="24" *ngIf="processData == '已撤回'">撤回原因:{{ orderInfo.retractReason }}</div>
19
+            <div nz-col nzSpan="24" *ngIf="processData == '不受理'">不受理原因:{{ orderInfo.rejectRemark }}</div>
20
+          </div>
21
+        </div>
22
+        <div class="center" *ngIf="amplificationShow">
23
+          <div class="box">
24
+            <!-- <div class="steps" *ngFor="let step of logList;let i = index;">
25
+              <div class="step">
26
+                <div class="info">
27
+                  <i
28
+                    [ngClass]="{'icon_transport':true, 'transport-icon_liucheng':true,'green':(step.record&&step.record[0]&&step.record[0].operationTime)}"></i>
29
+                  <p>{{step.operationName}}</p>
30
+                  <p>{{step.record.length>=1?(step.record[0].operationTime|date:'MM-dd HH:mm'):''}}</p>
31
+                  <p *ngIf="step.record[0]&&step.record[0].dept">
32
+                    <span *ngFor="let dept of step.record">{{!showCoop&&deptDisplay==2?dept.deptalias:dept.dept}},</span>
33
+                  </p>
34
+                  <p *ngIf="i!=0&&step.record&&step.record.length">耗时{{filterTime(step.record)}}</p>
35
+                </div>
36
+                <div class="line"></div>
37
+              </div>
38
+            </div> -->
39
+            <!-- 流程图 start -->
40
+            <div class="processBox">
41
+              <div
42
+                class="process"
43
+                *ngIf="
44
+                  processData == '不受理' ||
45
+                    processData == '结束' ||
46
+                    processData == '已撤回' ||
47
+                    processData == '重复事件'
48
+                "
49
+              >
50
+                <div class="status">
51
+                  {{ processMessage[4] ? processMessage[4].name : "" }}
52
+                </div>
53
+                <div class="ico">
54
+                  <i class="icon_transport transport-icon_liucheng last"></i>
55
+                </div>
56
+                <div class="time">
57
+                  <ng-container *ngIf="processTime[4]">
58
+                    {{processTime[4].startTime | date:"MM-dd HH:mm:ss"}}
59
+                  </ng-container>
60
+                </div>
61
+              </div>
62
+              <div
63
+                class="processCont"
64
+                *ngIf="
65
+                  processData == '不受理' ||
66
+                    processData == '结束' ||
67
+                    processData == '已撤回' ||
68
+                    processData == '重复事件'
69
+                "
70
+              >
71
+                <div class="status"></div>
72
+                <div
73
+                  class="conents"
74
+                  v-html="processMessage[4] ? processMessage[4].desc : ''"
75
+                ></div>
76
+              </div>
77
+              <div
78
+                class="process"
79
+                *ngIf="
80
+                  processData == '评价' ||
81
+                    (processData == '结束' && processData != '重复事件')
82
+                "
83
+              >
84
+                <div class="status">
85
+                  {{ processMessage[3] ? processMessage[3].name : "" }}
86
+                </div>
87
+                <div class="ico">
88
+                  <i
89
+                    class="icon_transport transport-icon_liucheng green now"
90
+                    *ngIf="processData == '评价'"
91
+                  ></i>
92
+                  <i
93
+                    class="icon_transport transport-icon_liucheng last"
94
+                    *ngIf="processData != '评价'"
95
+                  ></i>
96
+                </div>
97
+                <div class="time">
98
+                  <ng-container *ngIf="processTime[3]">
99
+                    {{processTime[3].startTime | date:"MM-dd HH:mm:ss"}}
100
+                  </ng-container>
101
+                </div>
102
+              </div>
103
+              <div
104
+                class="processCont"
105
+                *ngIf="
106
+                  processData == '评价' ||
107
+                    (processData == '结束' && processData != '重复事件')
108
+                "
109
+              >
110
+                <div class="status"></div>
111
+                <div
112
+                  class="conents"
113
+                  v-html="processMessage[3] ? processMessage[3].desc : ''"
114
+                ></div>
115
+              </div>
116
+              <!-- 处理日志 start -->
117
+              <ng-container *ngIf="orderInfo.incident">
118
+                <div *ngFor="let item of orderInfo.incident.handlerLogs;let i = index;">
119
+                  <div
120
+                    class="process"
121
+                    *ngIf="
122
+                      processData == '处理' ||
123
+                        processData == '评价' ||
124
+                        (processData == '结束' && processData != '重复事件')
125
+                    "
126
+                  >
127
+                    <div class="status">
128
+                      {{ processMessage[2] ? processMessage[2].name : "" }}
129
+                    </div>
130
+                    <div class="ico">
131
+                      <i
132
+                        class="icon_transport transport-icon_liucheng green now"
133
+                        *ngIf="processData == '处理' && i === 0"
134
+                      ></i>
135
+                      <i
136
+                        class="icon_transport transport-icon_liucheng last"
137
+                        v-else
138
+                      ></i>
139
+                    </div>
140
+                    <div class="time">
141
+                      {{ item.opTime | date:"MM-dd HH:mm:ss"}},{{ item.userName }}
142
+                    </div>
143
+                  </div>
144
+                  <div
145
+                    class="processCont"
146
+                    *ngIf="
147
+                      processData == '处理' ||
148
+                        processData == '评价' ||
149
+                        (processData == '结束' && processData != '重复事件')
150
+                    "
151
+                  >
152
+                    <div class="status"></div>
153
+                    <div class="conents">{{ item.opValue }}</div>
154
+                  </div>
155
+                </div>
156
+              </ng-container>
157
+              <!-- 处理日志 end -->
158
+              <div
159
+                class="process"
160
+                *ngIf="
161
+                  processData == '处理' ||
162
+                    processData == '评价' ||
163
+                    (processData == '结束' && processData != '重复事件')
164
+                "
165
+              >
166
+                <div class="status">
167
+                  {{ processMessage[2] ? processMessage[2].name : "" }}
168
+                </div>
169
+                <div class="ico">
170
+                  <i
171
+                    class="icon_transport transport-icon_liucheng green now"
172
+                    *ngIf="processData == '处理' && orderInfo.incident && !orderInfo.incident.handlerLogs"
173
+                  ></i>
174
+                  <i
175
+                    class="icon_transport transport-icon_liucheng last"
176
+                    v-else
177
+                  ></i>
178
+                </div>
179
+                <div class="time">
180
+                  <ng-container *ngIf="processTime[2]">
181
+                    {{processTime[2].startTime | date:"MM-dd HH:mm:ss"}}
182
+                  </ng-container>
183
+                </div>
184
+              </div>
185
+              <div
186
+                class="processCont"
187
+                *ngIf="
188
+                  processData == '处理' ||
189
+                    processData == '评价' ||
190
+                    (processData == '结束' && processData != '重复事件')
191
+                "
192
+              >
193
+                <div class="status"></div>
194
+                <div
195
+                  class="conents"
196
+                  v-html="processMessage[2] ? processMessage[2].desc : ''"
197
+                ></div>
198
+              </div>
199
+              <div
200
+                class="process"
201
+                *ngIf="
202
+                  processData == '受理' ||
203
+                    processData == '处理' ||
204
+                    processData == '评价' ||
205
+                    (processData == '结束' && processData != '重复事件')
206
+                "
207
+              >
208
+                <div class="status">
209
+                  {{ processMessage[1] ? processMessage[1].name : "" }}
210
+                </div>
211
+                <div class="ico">
212
+                  <i
213
+                    class="icon_transport transport-icon_liucheng green now"
214
+                    *ngIf="processData == '受理'"
215
+                  ></i>
216
+                  <i
217
+                    class="icon_transport transport-icon_liucheng last"
218
+                    *ngIf="processData != '受理'"
219
+                  ></i>
220
+                </div>
221
+                <div class="time">
222
+                  <ng-container *ngIf="processTime[1]">
223
+                    {{processTime[1].startTime | date:'MM-dd HH:mm:ss'}}
224
+                  </ng-container>
225
+                </div>
226
+              </div>
227
+              <div
228
+                class="processCont"
229
+                *ngIf="
230
+                  processData == '受理' ||
231
+                    processData == '处理' ||
232
+                    processData == '评价' ||
233
+                    (processData == '结束' && processData != '重复事件')
234
+                "
235
+              >
236
+                <div class="status"></div>
237
+                <div
238
+                  class="conents"
239
+                  v-html="processMessage[1] ? processMessage[1].desc : ''"
240
+                ></div>
241
+              </div>
242
+              <div class="process">
243
+                <div class="status">
244
+                  {{ processMessage[0] ? processMessage[0].name : "" }}
245
+                </div>
246
+                <div class="ico">
247
+                  <i
248
+                    class="icon_transport transport-icon_liucheng green now"
249
+                    *ngIf="processData == '申请'"
250
+                  ></i>
251
+                  <i
252
+                    class="icon_transport transport-icon_liucheng last"
253
+                    *ngIf="processData != '申请'"
254
+                  ></i>
255
+                </div>
256
+                <div class="time">
257
+                  <ng-container *ngIf="processTime[0]">
258
+                    {{processTime[0].startTime | date:"MM-dd HH:mm:ss"}}
259
+                  </ng-container>
260
+                </div>
261
+              </div>
262
+              <div class="processCont">
263
+                <div class="status"></div>
264
+                <div
265
+                  class="conents lastConents"
266
+                  v-html="processMessage[0] ? processMessage[0].desc : ''"
267
+                ></div>
268
+              </div>
269
+            </div>
270
+            <!-- 流程图 end -->
271
+          </div>
272
+        </div>
273
+        <div class="bottom" *ngIf="orderInfo.urgentDetails&&showCoop">
274
+          <div class="urgent">
275
+            <div>
276
+              <ng-container *ngIf="amplificationShow&&orderInfo.urgentDetails&&showCoop">
277
+                  加急原因:{{orderInfo.urgentDetails.urgentReason}}
278
+                <button *ngIf="orderInfo.urgentDetails.checkStatus.id==329" class=" btn default" nz-button nzType="primary"
279
+                  [nzLoading]="urgentLoading" nzGhost (click)="urgent()">确认加急</button>
280
+              </ng-container>
281
+            </div>
282
+            <div class="amplification">
283
+              <button
284
+                nz-button
285
+                nzType="primary"
286
+                class="btn default"
287
+                (click)="amplification()"
288
+              >
289
+                {{ amplificationShow ? "放大" : "还原" }}
290
+              </button>
291
+            </div>
292
+          </div>
293
+        </div>
294
+      </div>
295
+    </overlay-scrollbars>
296
+    <div class="btns display_flex justify-content_flex-center">
297
+      <!-- <button *ngIf="showCoop&&orderInfo.gdState.id==69" nz-button nzType="primary" [nzLoading]="isOkLoading"
298
+        (click)='allotWorker()'>派单</button>
299
+      <button *ngIf="showCoop&&(orderInfo.gdState.id==70||orderInfo.gdState.id==71)" nz-button nzType="primary" nzGhost
300
+        (click)="openRecallModal()">撤回</button>
301
+      <button *ngIf="showCoop&&(orderInfo.gdState.id==69||orderInfo.gdState.id==70||orderInfo.gdState.id==71)" nz-button
302
+        nzType="danger" (click)="openDelModal()">删除</button> -->
303
+      <button class=" btn cancel" nz-button nzType="default" (click)="close()">取消</button>
304
+    </div>
305
+  </div>
306
+  
307
+  <!-- 撤回工单 -->
308
+  <div class="recallOrder" *ngIf="recallOrderShow">
309
+    <div class="modalBody">
310
+      <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeRecallOrderModal()"></i></div>
311
+      <div class="content">
312
+        <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
313
+        <div class="defeat">您确认要撤回此工单吗?</div>
314
+      </div>
315
+      <div class="btns display_flex justify-content_flex-center">
316
+        <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmRec()">确认</button>
317
+        <button nz-button nzType="primary" [nzLoading]='recLoading' nzGhost (click)="recAndDel()">撤回并删除</button>
318
+        <button class=" btn cancel" nz-button nzType="default" (click)="closeRecallOrderModal()">取消</button>
319
+      </div>
320
+    </div>
321
+  </div>
322
+  
323
+  <!-- 删除工单 -->
324
+  <div class="recallOrder delModel" *ngIf="delOrderShow">
325
+    <div class="modalBody">
326
+      <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeDelOrderModal()"></i></div>
327
+      <div class="content">
328
+        <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
329
+        <div class="defeat">您确认要删除此工单吗?</div>
330
+      </div>
331
+      <div class="btns display_flex justify-content_flex-center">
332
+        <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmDel()">确认</button>
333
+        <button class="btn cancel" nz-button nzType="default" (click)="closeDelOrderModal()">关闭</button>
334
+      </div>
335
+    </div>
336
+  </div>
337
+  
338
+  <!-- 操作成功/失败提示框 -->
339
+  <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
340
+    [info]="promptInfo" (closeModel)="close()">
341
+    <!-- 2.父组件调用子组件时绑定到这个事件属性,并在事件发生时作出回应。(closeModel)="close()" -->
342
+  </app-prompt-modal>
343
+  <!-- 遮罩 -->
344
+  <app-mask *ngIf="maskFlag"></app-mask>
345
+  

+ 358 - 0
src/app/share/detail-bx/detail-bx.component.less

@@ -0,0 +1,358 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  width: 100%;
4
+  height: 100%;
5
+  position: fixed;
6
+  left: 0;
7
+  top: 0;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 9;
10
+
11
+  display: flex;
12
+  justify-content: center;
13
+  align-items: center;
14
+}
15
+
16
+.detail {
17
+  width: 1000px;
18
+  height: calc(100vh - 100px);
19
+  min-height: 530px;
20
+  border-radius: 5px;
21
+  background: #fff;
22
+  color: #333;
23
+  font-size: 14px;
24
+  padding: 12px 20px;
25
+  position: relative;
26
+  padding-bottom: 70px;
27
+
28
+  // 流程 start
29
+  .processBox {
30
+    margin-top: 0.24rem;
31
+  }
32
+  .process {
33
+    padding: 0 0.24rem;
34
+    display: flex;
35
+  }
36
+  .process .status {
37
+    width: 12%;
38
+    font-size: 0.28rem;
39
+    text-align: center;
40
+  }
41
+  .process .ico {
42
+    width: 6%;
43
+    text-align: center;
44
+  }
45
+  .process .ico i {
46
+    font-size: 0.28rem;
47
+  }
48
+  .process .last {
49
+    color: #005359;
50
+  }
51
+  .process .now {
52
+    color: #48a843;
53
+  }
54
+  .process .time {
55
+    width: 80%;
56
+    font-size: 0.25rem;
57
+    color: #999999;
58
+    padding-left: 2%;
59
+  }
60
+  .processCont {
61
+    padding: 0 0.24rem;
62
+    display: flex;
63
+    margin: 0.07rem 0;
64
+  }
65
+  .processCont .status {
66
+    width: 12%;
67
+  }
68
+  .processCont .conents {
69
+    width: 80%;
70
+    margin-left: 3%;
71
+    font-size: 0.25rem;
72
+    color: #666666;
73
+    padding: 0.07rem 0;
74
+    padding-left: 5%;
75
+    border-left: 0.01rem #999999 solid;
76
+    line-height: 0.3rem;
77
+    word-break: break-all;
78
+  }
79
+  .processCont .lastConents {
80
+    border-left: 0ch;
81
+  }
82
+  // 流程 end
83
+
84
+  .title {
85
+    font-size: 18px;
86
+    text-align: center;
87
+    line-height: 24px;
88
+    margin: 0;
89
+    margin-bottom: 12px;
90
+    position: relative;
91
+
92
+    i {
93
+      position: absolute;
94
+      right: 0;
95
+      top: 0;
96
+      font-size: 20px;
97
+      color: #666;
98
+      cursor: pointer;
99
+      padding: 0 5px;
100
+    }
101
+  }
102
+
103
+  .content {
104
+    width: 960px;
105
+    min-height: 400px;
106
+    border: 1px solid #e5e9ed;
107
+    border-radius: 5px;
108
+    overflow: hidden;
109
+
110
+    & > .top {
111
+      padding: 10px 32px;
112
+      border-bottom: 1px solid #e5e9ed;
113
+
114
+      .num {
115
+        font-size: 16px;
116
+        overflow: hidden;
117
+        margin-bottom: 6px;
118
+
119
+        .left {
120
+          float: left;
121
+          font-weight: 600;
122
+        }
123
+
124
+        .right {
125
+          float: right;
126
+        }
127
+      }
128
+
129
+      .info {
130
+        color: #666;
131
+
132
+        & > div {
133
+          margin: 4px 0;
134
+        }
135
+      }
136
+    }
137
+
138
+    & > .center {
139
+      padding: 27px 0 17px 0;
140
+      border-bottom: 1px solid #e5e9ed;
141
+      font-size: 12px;
142
+
143
+      .box {
144
+        display: flex;
145
+        justify-content: center;
146
+
147
+        .steps {
148
+          &:nth-last-child(1) {
149
+            .line {
150
+              display: none !important;
151
+            }
152
+          }
153
+
154
+          .step {
155
+            .info {
156
+              width: 90px;
157
+              text-align: center;
158
+              display: inline-block;
159
+              vertical-align: top;
160
+
161
+              i {
162
+                color: #e5e9ed;
163
+
164
+                &.green {
165
+                  color: @primary-color;
166
+                }
167
+              }
168
+            }
169
+
170
+            p {
171
+              margin: 0;
172
+            }
173
+
174
+            .line {
175
+              display: inline-block;
176
+              width: 60px;
177
+              height: 2px;
178
+              background: #e5e9ed;
179
+            }
180
+          }
181
+        }
182
+      }
183
+    }
184
+
185
+    & > .bottom {
186
+      padding: 28px 32px;
187
+      background: #f9fafb;
188
+
189
+      .urgent {
190
+        display: flex;
191
+        justify-content: space-between;
192
+        margin-bottom: 8px;
193
+        input {
194
+          width: 600px;
195
+        }
196
+
197
+        .candelBtn {
198
+          margin-left: 20px;
199
+        }
200
+      }
201
+
202
+      .table {
203
+        width: 100%;
204
+        height: 160px;
205
+        // padding: 6px;
206
+        background: #fff;
207
+        // border: 1px solid #e5e9ed;
208
+        border-radius: 5px;
209
+        margin-top: 16px;
210
+
211
+        .thead {
212
+          background: linear-gradient(to right, @bg-start, @bg-end) !important;
213
+
214
+          th {
215
+            color: #fff !important;
216
+            text-align: center;
217
+            font-size: 12px;
218
+            border: none;
219
+          }
220
+        }
221
+
222
+        .ant-table-tbody {
223
+          tr {
224
+            text-align: center;
225
+            font-size: 12px;
226
+            border: none;
227
+
228
+            td {
229
+              border: none;
230
+              position: relative;
231
+            }
232
+          }
233
+
234
+          tr:nth-child(2n) {
235
+            background: #f9fafb;
236
+          }
237
+        }
238
+      }
239
+    }
240
+  }
241
+
242
+  .btns {
243
+    width: 100%;
244
+    position: absolute;
245
+    left: 0;
246
+    bottom: 20px;
247
+
248
+    button {
249
+      margin: 9px;
250
+      margin-bottom: 0;
251
+    }
252
+  }
253
+
254
+  .ant-table {
255
+    border: none !important;
256
+  }
257
+}
258
+
259
+// 撤回工单
260
+.recallOrder {
261
+  position: fixed;
262
+  left: 0;
263
+  top: 0;
264
+  width: 100%;
265
+  height: 100%;
266
+
267
+  display: flex;
268
+  justify-content: center;
269
+  align-items: center;
270
+  background: rgba(0, 0, 0, 0.4);
271
+  z-index: 99;
272
+
273
+  .modalBody {
274
+    width: 350px;
275
+    height: 220px;
276
+    background: #fff;
277
+    border-radius: 5px;
278
+    padding: 10px 20px;
279
+    color: #333;
280
+
281
+    .title {
282
+      width: 100%;
283
+      text-align: center;
284
+      font-size: 18px;
285
+      position: relative;
286
+
287
+      i {
288
+        position: absolute;
289
+        right: 0;
290
+        top: 0;
291
+        font-size: 20px;
292
+        color: #666;
293
+        cursor: pointer;
294
+        padding: 0 5px;
295
+      }
296
+    }
297
+
298
+    .content {
299
+      width: 310px;
300
+      height: 117px;
301
+      background: #f9fafb;
302
+      border: 1px solid #e5e9ed;
303
+      border-radius: 5px;
304
+      overflow: hidden;
305
+      margin-top: 12px;
306
+
307
+      div {
308
+        text-align: center;
309
+        margin: 0;
310
+
311
+        &.icon {
312
+          margin-top: 17px;
313
+
314
+          i {
315
+            color: #ff3b53;
316
+            font-size: 30px !important;
317
+
318
+            &.transport-wenhao {
319
+              color: #f5a523;
320
+            }
321
+          }
322
+        }
323
+
324
+        &.defeat {
325
+          color: #333;
326
+          font-size: 18px;
327
+        }
328
+
329
+        &:nth-child(3) {
330
+          font-size: 14px;
331
+          color: #666;
332
+        }
333
+      }
334
+
335
+      .conditions {
336
+        padding: 16px 20px;
337
+
338
+        div {
339
+          text-align: left;
340
+        }
341
+      }
342
+    }
343
+
344
+    .btns {
345
+      button {
346
+        margin-top: 10px;
347
+
348
+        &.btn {
349
+          margin-left: 8px;
350
+        }
351
+      }
352
+    }
353
+  }
354
+}
355
+
356
+.txtC {
357
+  text-align: center;
358
+}

+ 286 - 0
src/app/share/detail-bx/detail-bx.component.ts

@@ -0,0 +1,286 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { MainService } from "../../services/main.service";
4
+import { forkJoin } from "rxjs";
5
+import { NzMessageService } from "ng-zorro-antd";
6
+import { ToolService } from "src/app/services/tool.service";
7
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
8
+
9
+@Component({
10
+  selector: "app-detail-bx",
11
+  templateUrl: "./detail-bx.component.html",
12
+  styleUrls: ["./detail-bx.component.less"],
13
+})
14
+export class DetailBxComponent implements OnInit {
15
+  @ViewChild("osComponentRef1", {
16
+    read: OverlayScrollbarsComponent,
17
+    static: false,
18
+  })
19
+  osComponentRef1: OverlayScrollbarsComponent;
20
+  constructor(
21
+    private message: NzMessageService,
22
+    private route: ActivatedRoute,
23
+    private router: Router,
24
+    private tool: ToolService,
25
+    private mainService: MainService
26
+  ) {}
27
+  processTime = [];
28
+  processData = "";
29
+  processMessage = [];
30
+
31
+  id: number; //工单id
32
+  orderInfo: any; //工单详情信息
33
+  showCoop: boolean = true; //是否展示详情页操作按钮
34
+
35
+  promptContent: string; //操作提示框提示信息
36
+  ifSuccess: boolean; //操作成功/失败
37
+  promptInfo: string; //操作结果提示信息
38
+  promptModalShow: boolean; //是否展示提示框
39
+
40
+  urgentLoading: boolean = false; //确认加急按钮loading状态
41
+  recLoading: boolean = false; //撤回并删除按钮loading状态
42
+  btnLoading: boolean = false; //确认按钮loading状态
43
+  maskFlag: any = false;
44
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
45
+  amplificationShow = true;
46
+
47
+  ngOnInit() {
48
+    this.tool.getDeptDisplay().subscribe((result) => {
49
+      if (result.status == 200) {
50
+        this.deptDisplay = result.list[0].valueconfig;
51
+      }
52
+    });
53
+    if (this.route.snapshot.parent.parent.routeConfig.path == "nurse") {
54
+      this.showCoop = false;
55
+    }
56
+    this.id = +this.route.snapshot.paramMap.get("id");
57
+    let log$ = this.getLog();
58
+    let detail$ = this.getDetail();
59
+    this.maskFlag = this.message.loading("正在加载中..", {
60
+      nzDuration: 0,
61
+    }).messageId;
62
+    forkJoin(log$, detail$).subscribe((res) => {
63
+      this.message.remove(this.maskFlag);
64
+      this.maskFlag = false;
65
+      // getLog
66
+      this.logList = res[0]["data"];
67
+      // getDetail
68
+      this.orderInfo = res[1]["data"];
69
+      this.getProcessTime();
70
+      this.getProcessMessageData();
71
+      if (this.orderInfo.incident && !this.orderInfo.incident.handlerLogs) {
72
+        this.orderInfo.incident.handlerLogs = [];
73
+      } else {
74
+        this.orderInfo.incident.handlerLogs.reverse();
75
+      }
76
+      if (this.orderInfo.incident && this.orderInfo.incident.repeat) {
77
+        this.processData = "重复事件";
78
+      } else if (this.orderInfo.state.name == "不受理") {
79
+        this.processData = "不受理";
80
+      } else if (this.orderInfo.state.name == "未受理") {
81
+        this.processData = "申请";
82
+      } else if (this.orderInfo.state.name == "处理中") {
83
+        this.processData = "处理";
84
+      } else if (this.orderInfo.state.name == "待评价") {
85
+        this.processData = "评价";
86
+      } else if (this.orderInfo.state.name == "已解决") {
87
+        this.processData = "结束";
88
+      } else if (this.orderInfo.state.name == "已撤回") {
89
+        this.processData = "已撤回";
90
+      }
91
+    });
92
+  }
93
+  //获取流程节点时间
94
+  getProcessTime() {
95
+    if (this.orderInfo.incident && this.orderInfo.incident.processInstanceId) {
96
+      this.mainService
97
+        .getProcessTime({}, this.orderInfo.incident.processInstanceId)
98
+        .subscribe((res: any) => {
99
+          this.processTime = res.data;
100
+        });
101
+    }
102
+  }
103
+
104
+  getProcessMessageData() {
105
+    this.mainService
106
+      .fetchListBx("dictionary", {
107
+        idx: 0,
108
+        sum: 10,
109
+        dictionary: {
110
+          key: "wxincident_task_default",
111
+        },
112
+      })
113
+      .subscribe((res: any) => {
114
+        this.processMessage = res.list;
115
+      });
116
+  }
117
+
118
+  // 放大
119
+  amplification() {
120
+    this.amplificationShow = !this.amplificationShow;
121
+  }
122
+
123
+  // 获取工单详情
124
+  getDetail() {
125
+    return this.mainService.fetchDataBx("wXIncident", this.id);
126
+  }
127
+
128
+  // 确认加急
129
+  urgent() {
130
+    let that = this;
131
+    that.urgentLoading = true;
132
+    let postData = {
133
+      urgentDetails: {
134
+        workerOrder: this.orderInfo["id"],
135
+        checkStatus: {
136
+          id: 330,
137
+        },
138
+        urgentReason: this.orderInfo["urgentDetails"].urgentReason,
139
+        id: this.orderInfo["urgentDetails"].id,
140
+      },
141
+    };
142
+    that.mainService.coopWorkerOrder("urge", postData).subscribe((data) => {
143
+      that.urgentLoading = false;
144
+      if (data.status == 200) {
145
+        that.showPromptModal("加急", true, "");
146
+      } else {
147
+        that.showPromptModal("加急", false, data.msg);
148
+      }
149
+    });
150
+  }
151
+
152
+  // 关闭弹框
153
+  close() {
154
+    // this.router.navigateByUrl('dispatchingDesk');
155
+    history.go(-1);
156
+  }
157
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
158
+  showPromptModal(con, success, promptInfo?) {
159
+    this.promptModalShow = false;
160
+    this.promptContent = con;
161
+    this.ifSuccess = success;
162
+    this.promptInfo = promptInfo;
163
+    setTimeout(() => {
164
+      this.promptModalShow = true;
165
+    }, 100);
166
+  }
167
+  // 获取工单历史记录
168
+  logList = []; //工单历史记录
169
+  getLog() {
170
+    // return this.mainService.getWorkOrderLog(this.id);
171
+    return Promise.resolve(111);
172
+  }
173
+
174
+  // 派单
175
+  allotWorker() {
176
+    this.router.navigateByUrl(
177
+      "dispatchingDesk/allotWorker/" +
178
+        this.id +
179
+        "/" +
180
+        this.orderInfo["gdState"]["id"]
181
+    );
182
+  }
183
+
184
+  // 撤回
185
+  recallOrderShow: boolean = false;
186
+  openRecallModal(): void {
187
+    this.recallOrderShow = true;
188
+  }
189
+  // 撤回并删除
190
+  recAndDel() {
191
+    let that = this;
192
+    that.recLoading = true;
193
+    that.mainService.delOrder(that.id).subscribe((data) => {
194
+      console.log(data);
195
+      that.recLoading = false;
196
+      that.closeDelOrderModal();
197
+      if (data.status == 200) {
198
+        that.showPromptModal("删除", true, "");
199
+      } else {
200
+        that.showPromptModal("删除", false, data.msg);
201
+      }
202
+    });
203
+  }
204
+  // 确认撤回
205
+  confirmRec() {
206
+    let that = this;
207
+    that.btnLoading = true;
208
+    let postData = {
209
+      workOrder: {
210
+        id: that.id,
211
+      },
212
+    };
213
+    that.mainService
214
+      .coopWorkerOrder("excuteWorkOrder/recall", postData)
215
+      .subscribe((data) => {
216
+        that.btnLoading = false;
217
+        that.closeRecallOrderModal();
218
+        if (data.status == 200) {
219
+          that.showPromptModal("撤回", true, "");
220
+        } else {
221
+          that.showPromptModal("撤回", false, data.msg);
222
+        }
223
+      });
224
+  }
225
+  // 关闭撤回弹框
226
+  closeRecallOrderModal() {
227
+    this.recallOrderShow = false;
228
+  }
229
+
230
+  // 删除
231
+  // 打开模态框
232
+  delOrderShow: boolean = false;
233
+  openDelModal() {
234
+    this.delOrderShow = true;
235
+  }
236
+  // 确认删除
237
+  confirmDel() {
238
+    let that = this;
239
+    that.btnLoading = true;
240
+    that.mainService.delOrder(that.id).subscribe((data) => {
241
+      that.btnLoading = false;
242
+      that.closeDelOrderModal();
243
+      if (data.status == 200) {
244
+        that.showPromptModal("删除", true, "");
245
+      } else {
246
+        that.showPromptModal("删除", false, data.msg);
247
+      }
248
+    });
249
+  }
250
+
251
+  // 关闭模态框
252
+  closeDelOrderModal() {
253
+    this.delOrderShow = false;
254
+  }
255
+
256
+  // 格式化时分秒
257
+  // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
258
+  formatTime(time) {
259
+    let timeStr = "";
260
+    if (time >= 0 && time < 60) {
261
+      // 秒
262
+      timeStr = time + "秒";
263
+    } else if (time >= 60 && time < 3600) {
264
+      // 分钟
265
+      timeStr = Math.floor(time / 60) + "分钟";
266
+    } else if (time >= 3600) {
267
+      // 时 + 分
268
+      let h = "";
269
+      let m = "";
270
+      h = Math.floor(time / 3600) + "小时";
271
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
272
+      timeStr = h + m;
273
+    }
274
+    return timeStr;
275
+  }
276
+
277
+  // 计算历史记录耗时
278
+  filterTime(step) {
279
+    // step = [{ difTime: 2 }, { difTime: 6 }]
280
+    let num = 0;
281
+    step.forEach((e) => {
282
+      num += e.difTime;
283
+    });
284
+    return this.formatTime(num / 1000);
285
+  }
286
+}

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

@@ -31,6 +31,7 @@ import { BxPromptModalComponent } from './bx-prompt-modal/bx-prompt-modal.compon
31 31
 import { ExcelExportComponent } from './excel-export/excel-export.component';
32 32
 import { FilterSelfPipe } from '../pipes/filter-self.pipe';
33 33
 import { LogPromptModalComponent } from './log-prompt-modal/log-prompt-modal.component';
34
+import { DetailBxComponent } from './detail-bx/detail-bx.component';
34 35
 
35 36
 @NgModule({
36 37
   declarations: [
@@ -60,6 +61,7 @@ import { LogPromptModalComponent } from './log-prompt-modal/log-prompt-modal.com
60 61
     FilterSelfPipe,
61 62
     ExcelExportComponent,
62 63
     LogPromptModalComponent,
64
+    DetailBxComponent,
63 65
   ],
64 66
   imports: [
65 67
     CommonModule,
@@ -104,6 +106,7 @@ import { LogPromptModalComponent } from './log-prompt-modal/log-prompt-modal.com
104 106
     FilterSelfPipe,
105 107
     ExcelExportComponent,
106 108
     LogPromptModalComponent,
109
+    DetailBxComponent,
107 110
   ]
108 111
 })
109 112
 export class ShareModule { }

+ 6 - 0
src/app/views/hushijiandan/hushijiandan-routing.module.ts

@@ -6,6 +6,7 @@ import { DetailPatientsComponent } from '../../share/detail-patients/detail-pati
6 6
 import { DetailDrugComponent } from '../../share/detail-drug/detail-drug.component';
7 7
 import { DetailOthersComponent } from '../../share/detail-others/detail-others.component';
8 8
 import { AllocationWorkerComponent } from '../../share/allocation-worker/allocation-worker.component';
9
+import { DetailBxComponent } from 'src/app/share/detail-bx/detail-bx.component';
9 10
 
10 11
 
11 12
 const routes: Routes = [
@@ -34,6 +35,11 @@ const routes: Routes = [
34 35
         component: DetailOthersComponent
35 36
       },
36 37
       {
38
+        // 报修详情
39
+        path: 'detailBx/:id',
40
+        component: DetailBxComponent
41
+      },
42
+      {
37 43
         path: 'allotWorker/:id/:stateId',
38 44
         component: AllocationWorkerComponent
39 45
       }

+ 367 - 112
src/app/views/hushijiandan/hushijiandan.component.html

@@ -195,7 +195,11 @@
195 195
           <div
196 196
             class="nurseTitle display_flex justify-content_space-between align-items_center"
197 197
           >
198
-            <span>护士端<span class="todayNum">当日建单数:{{todayNum}}</span></span>
198
+            <span
199
+              >护士端<span class="todayNum"
200
+                >当日建单数:{{ todayNum }}</span
201
+              ></span
202
+            >
199 203
             <p class="updateTipsForNurses red">{{ updateTipsForNurses }}</p>
200 204
             <div class="nurseCode" (click)="showNurseCode()">
201 205
               <i class="nurseCodeIcon icon_transport transport-erweima"></i
@@ -548,29 +552,51 @@
548 552
                   >
549 553
                     <div class="text">历史药单查询</div>
550 554
                   </div>
551
-                  <div *ngIf="isShowBx" nz-col nzSpan="3" [ngClass]="{
555
+                  <div
556
+                    *ngIf="isShowBx"
557
+                    nz-col
558
+                    nzSpan="3"
559
+                    [ngClass]="{
552 560
                       txtC: true,
553 561
                       cur: true,
554 562
                       checked: checkedTableType == 'kjbx'
555
-                    }" (click)="checkTable('kjbx')">
563
+                    }"
564
+                    (click)="checkTable('kjbx')"
565
+                  >
556 566
                     <div class="text">快捷报修</div>
557 567
                   </div>
558
-                  <div *ngIf="isShowBx" nz-col nzSpan="3" [ngClass]="{
568
+                  <div
569
+                    *ngIf="isShowBx"
570
+                    nz-col
571
+                    nzSpan="3"
572
+                    [ngClass]="{
559 573
                       txtC: true,
560 574
                       cur: true,
561 575
                       checked: checkedTableType == 'bxlb'
562
-                    }" (click)="checkTable('bxlb')">
563
-                    <div class="text">报修列表</div>
576
+                    }"
577
+                    (click)="checkTable('bxlb')"
578
+                  >
579
+                    <div class="text">
580
+                      报修列表<strong class="red">&nbsp;({{processing}})</strong>
581
+                    </div>
564 582
                   </div>
565 583
                   <div
566 584
                     nz-col
567
-                    nzSpan="{{isShowBx?6:12}}"
585
+                    nzSpan="{{ isShowBx ? 6 : 12 }}"
568 586
                     class="txtC h100p alignR display_flex justify-content_flex-end align-items_center"
569 587
                   >
570
-                    <div class="btn txtC" *ngIf="mainRole&&loginUser.usertype.value != 1" (click)="toMain()">
588
+                    <div
589
+                      class="btn txtC"
590
+                      *ngIf="mainRole && loginUser.usertype.value != 1"
591
+                      (click)="toMain()"
592
+                    >
571 593
                       回到系统管理
572 594
                     </div>
573
-                    <div class="btn txtC" *ngIf="mainRole&&loginUser.usertype.value == 1" (click)="toOrder()">
595
+                    <div
596
+                      class="btn txtC"
597
+                      *ngIf="mainRole && loginUser.usertype.value == 1"
598
+                      (click)="toOrder()"
599
+                    >
574 600
                       查看工单
575 601
                     </div>
576 602
                   </div>
@@ -1085,25 +1111,79 @@
1085 1111
                             </div>
1086 1112
                             <div class="modalBody_right">
1087 1113
                               <div class="modalBody_right_head">
1088
-                                综合日志<span>{{ logTime }}秒后自动刷新</span>
1114
+                                <div class="smallTab">
1115
+                                  <div
1116
+                                    class="s_tab"
1117
+                                    *ngFor="let stab of smallTabs"
1118
+                                    (click)="changeSmallTab(stab.id)"
1119
+                                    [ngClass]="{
1120
+                                      active: smallTabId == stab.id
1121
+                                    }"
1122
+                                  >
1123
+                                    {{ stab.name }}
1124
+                                  </div>
1125
+                                </div>
1126
+                                <span>{{ logTime }}秒后自动刷新</span>
1089 1127
                               </div>
1090 1128
                               <overlay-scrollbars
1091 1129
                                 class="modalBody_right_box"
1092 1130
                                 #osComponentRef9
1093 1131
                                 style="height: 100%"
1094
-                                *ngIf="!rLoading && listDeptOrderRecords.length"
1132
+                                *ngIf="
1133
+                                  (smallTabId == 1 &&
1134
+                                    !rLoading &&
1135
+                                    listDeptOrderRecords.length) ||
1136
+                                  smallTabId == 2
1137
+                                "
1095 1138
                               >
1096 1139
                                 <div class="modalBody_right_box">
1097
-                                  <div
1098
-                                    class="modalBody_right_list"
1099
-                                    *ngFor="let item of listDeptOrderRecords"
1100
-                                    [innerHTML]="item.msg | htmlTransform"
1101
-                                  ></div>
1140
+                                  <ng-container
1141
+                                    *ngIf="smallTabId == 1; else elseSmall"
1142
+                                  >
1143
+                                    <div
1144
+                                      class="modalBody_right_list"
1145
+                                      *ngFor="let item of listDeptOrderRecords"
1146
+                                      [innerHTML]="item.msg | htmlTransform"
1147
+                                    ></div>
1148
+                                  </ng-container>
1149
+                                  <ng-template #elseSmall>
1150
+                                    <nz-table
1151
+                                      class="bxFlex bxTable"
1152
+                                      [nzData]="quickBxlbList"
1153
+                                      nzSize="small"
1154
+                                      [nzShowPagination]="false"
1155
+                                      [nzLoading]="quickBxlbLoading"
1156
+                                    >
1157
+                                      <tbody>
1158
+                                        <tr
1159
+                                          (click)="
1160
+                                            showBxModal(
1161
+                                              data,
1162
+                                              '您的报修为“' +
1163
+                                                data.content +
1164
+                                                '” 是否确认报修?'
1165
+                                            )
1166
+                                          "
1167
+                                          *ngFor="
1168
+                                            let data of quickBxlbList;
1169
+                                            let i = index
1170
+                                          "
1171
+                                        >
1172
+                                          <td>{{ data.content || "无" }}</td>
1173
+                                        </tr>
1174
+                                        <tr (click)="checkTable('kjbx')">
1175
+                                          <td class="moreBx">
1176
+                                            更多报修&gt;&gt;
1177
+                                          </td>
1178
+                                        </tr>
1179
+                                      </tbody>
1180
+                                    </nz-table>
1181
+                                  </ng-template>
1102 1182
                                 </div>
1103 1183
                               </overlay-scrollbars>
1104 1184
                               <div
1105 1185
                                 class="modalBody_left nLoading w100"
1106
-                                *ngIf="rLoading"
1186
+                                *ngIf="smallTabId == 1 && rLoading"
1107 1187
                               >
1108 1188
                                 <img
1109 1189
                                   src="../../../assets/images/loading.gif"
@@ -1114,7 +1194,9 @@
1114 1194
                               <div
1115 1195
                                 class="modalBody_left noData w100"
1116 1196
                                 *ngIf="
1117
-                                  !rLoading && !listDeptOrderRecords.length
1197
+                                  smallTabId == 1 &&
1198
+                                  !rLoading &&
1199
+                                  !listDeptOrderRecords.length
1118 1200
                                 "
1119 1201
                               >
1120 1202
                                 暂无数据
@@ -1439,57 +1521,182 @@
1439 1521
                 </div>
1440 1522
               </div>
1441 1523
               <!-- 快捷报修 -->
1442
-              <div *ngIf="checkedTableType == 'kjbx'&&isShowBx" style="flex: 1; height: 100%;display:flex;">
1443
-                <form nz-form [formGroup]="bxForm" (ngSubmit)="submitBxForm()" class="bxForm bxFlex">
1444
-                  <nz-form-item>
1445
-                    <nz-form-label [nzSpan]="8" nzRequired nzFor="name">联系人</nz-form-label>
1446
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请填写联系人">
1447
-                      <input type="text" nz-input formControlName="name" placeholder="请填写联系人" />
1448
-                    </nz-form-control>
1449
-                  </nz-form-item>
1450
-                  <nz-form-item>
1451
-                    <nz-form-label [nzSpan]="8" nzRequired nzFor="phone">联系人电话</nz-form-label>
1452
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请填写联系人电话">
1453
-                      <input type="text" nz-input formControlName="phone" placeholder="请填写联系人电话" />
1454
-                    </nz-form-control>
1455
-                  </nz-form-item>
1456
-                  <nz-form-item>
1457
-                    <nz-form-label [nzSpan]="8" nzFor="hospital" nzRequired>所属院区</nz-form-label>
1458
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请选择所属院区!">
1459
-                      <nz-select formControlName="hospital" nzPlaceHolder="请选择所属院区" (ngModelChange)="getPlace($event)">
1460
-                        <nz-option [nzValue]="area.id" [nzLabel]="area.area" *ngFor="let area of areas"></nz-option>
1461
-                      </nz-select>
1462
-                    </nz-form-control>
1463
-                  </nz-form-item>
1464
-                  <nz-form-item>
1465
-                    <nz-form-label [nzSpan]="8" nzFor="building" nzRequired>楼栋</nz-form-label>
1466
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请选择楼栋!">
1467
-                      <nz-select formControlName="building" nzPlaceHolder="请选择楼栋">
1468
-                        <nz-option [nzValue]="place.id" [nzLabel]="place.place" *ngFor="let place of places">
1469
-                        </nz-option>
1470
-                      </nz-select>
1471
-                    </nz-form-control>
1472
-                  </nz-form-item>
1473
-                  <nz-form-item>
1474
-                    <nz-form-label [nzSpan]="8" nzRequired>详细地址</nz-form-label>
1475
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请填写详细地址">
1476
-                      <textarea formControlName="address" nz-input rows="2" placeholder="请填写详细地址"></textarea>
1477
-                    </nz-form-control>
1478
-                  </nz-form-item>
1479
-                  <nz-form-item>
1480
-                    <nz-form-label [nzSpan]="8" nzRequired>报修内容</nz-form-label>
1481
-                    <nz-form-control [nzSpan]="12" nzErrorTip="请填写报修内容">
1482
-                      <textarea formControlName="content" nz-input rows="2" placeholder="请填写报修内容"></textarea>
1483
-                    </nz-form-control>
1484
-                  </nz-form-item>
1485
-                  <nz-form-item>
1486
-                    <nz-form-label [nzSpan]="8" style="visibility: hidden;"></nz-form-label>
1487
-                    <nz-form-control [nzSpan]="12">
1488
-                      <button nz-button nzType="primary" [nzLoading]="bxLoading">提交</button>
1489
-                    </nz-form-control>
1490
-                  </nz-form-item>
1491
-                </form>
1492
-                <nz-table class="bxFlex bxTable" [nzData]="quickBxlbList" nzSize="small" [nzShowPagination]="false"
1524
+              <div
1525
+                *ngIf="checkedTableType == 'kjbx' && isShowBx"
1526
+                style="flex: 1; height: 100%; display: flex"
1527
+              >
1528
+                <div class="otherBox">
1529
+                  <div class="otherBoxInner">
1530
+                    <!-- 故障现象查询 -->
1531
+                    <div class="otherBox-nav" style="width: 30%">
1532
+                      <div class="otherBox-nav__head">
1533
+                        <input
1534
+                          nz-input
1535
+                          placeholder="请输入关键字"
1536
+                          [(ngModel)]="incidentSearch"
1537
+                          (ngModelChange)="incidentSearchChange()"
1538
+                        />
1539
+                      </div>
1540
+                      <overlay-scrollbars
1541
+                        #osComponentRef10
1542
+                        class="otherBox-nav__main"
1543
+                        [ngStyle]="{ height: '100%' }"
1544
+                      >
1545
+                        <div
1546
+                          class="otherBox-nav__mainInner"
1547
+                          *ngIf="!iLoading && incidentList.length > 0"
1548
+                        >
1549
+                          <div class="w100">
1550
+                            <div
1551
+                              class="otherBox-nav__mainItem"
1552
+                              *ngFor="let item of incidentList"
1553
+                              (click)="incidentClick(item)"
1554
+                              [ngClass]="{
1555
+                                active: selectIncidentId == item.id
1556
+                              }"
1557
+                              [title]="item.mutiCategory"
1558
+                            >
1559
+                              {{ item.mutiCategory }}
1560
+                            </div>
1561
+                          </div>
1562
+                        </div>
1563
+                        <div
1564
+                          class="otherBox-nav__mainInner noData"
1565
+                          *ngIf="!iLoading && incidentList.length == 0"
1566
+                        >
1567
+                          暂无数据
1568
+                        </div>
1569
+                        <div
1570
+                          class="otherBox-nav__mainInner oLoading"
1571
+                          *ngIf="iLoading"
1572
+                        >
1573
+                          <img
1574
+                            src="../../../assets/images/loading.gif"
1575
+                            alt=""
1576
+                          />
1577
+                          <div>加载中...</div>
1578
+                        </div>
1579
+                      </overlay-scrollbars>
1580
+                    </div>
1581
+                    <form
1582
+                      nz-form
1583
+                      [formGroup]="bxForm"
1584
+                      (ngSubmit)="submitBxForm()"
1585
+                      class="bxForm bxFlex"
1586
+                    >
1587
+                      <!-- <nz-form-item>
1588
+                        <nz-form-label [nzSpan]="8" nzRequired nzFor="name"
1589
+                          >联系人</nz-form-label
1590
+                        >
1591
+                        <nz-form-control [nzSpan]="12" nzErrorTip="请填写联系人">
1592
+                          <input
1593
+                            type="text"
1594
+                            nz-input
1595
+                            formControlName="name"
1596
+                            placeholder="请填写联系人"
1597
+                          />
1598
+                        </nz-form-control>
1599
+                      </nz-form-item>
1600
+                      <nz-form-item>
1601
+                        <nz-form-label [nzSpan]="8" nzRequired nzFor="phone"
1602
+                          >联系人电话</nz-form-label
1603
+                        >
1604
+                        <nz-form-control
1605
+                          [nzSpan]="12"
1606
+                          nzErrorTip="请填写联系人电话"
1607
+                        >
1608
+                          <input
1609
+                            type="text"
1610
+                            nz-input
1611
+                            formControlName="phone"
1612
+                            placeholder="请填写联系人电话"
1613
+                          />
1614
+                        </nz-form-control>
1615
+                      </nz-form-item>
1616
+                      <nz-form-item>
1617
+                        <nz-form-label [nzSpan]="8" nzFor="hospital" nzRequired
1618
+                          >所属院区</nz-form-label
1619
+                        >
1620
+                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择所属院区!">
1621
+                          <nz-select
1622
+                            formControlName="hospital"
1623
+                            nzPlaceHolder="请选择所属院区"
1624
+                            (ngModelChange)="getPlace($event)"
1625
+                          >
1626
+                            <nz-option
1627
+                              [nzValue]="area.id"
1628
+                              [nzLabel]="area.area"
1629
+                              *ngFor="let area of areas"
1630
+                            ></nz-option>
1631
+                          </nz-select>
1632
+                        </nz-form-control>
1633
+                      </nz-form-item>
1634
+                      <nz-form-item>
1635
+                        <nz-form-label [nzSpan]="8" nzFor="building" nzRequired
1636
+                          >楼栋</nz-form-label
1637
+                        >
1638
+                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择楼栋!">
1639
+                          <nz-select
1640
+                            formControlName="building"
1641
+                            nzPlaceHolder="请选择楼栋"
1642
+                          >
1643
+                            <nz-option
1644
+                              [nzValue]="place.id"
1645
+                              [nzLabel]="place.place"
1646
+                              *ngFor="let place of places"
1647
+                            >
1648
+                            </nz-option>
1649
+                          </nz-select>
1650
+                        </nz-form-control>
1651
+                      </nz-form-item>
1652
+                      <nz-form-item>
1653
+                        <nz-form-label [nzSpan]="8" nzRequired
1654
+                          >详细地址</nz-form-label
1655
+                        >
1656
+                        <nz-form-control [nzSpan]="12" nzErrorTip="请填写详细地址">
1657
+                          <textarea
1658
+                            formControlName="address"
1659
+                            nz-input
1660
+                            rows="2"
1661
+                            placeholder="请填写详细地址"
1662
+                          ></textarea>
1663
+                        </nz-form-control>
1664
+                      </nz-form-item> -->
1665
+                      <nz-form-item>
1666
+                        <nz-form-label [nzSpan]="8" nzRequired
1667
+                          >报修内容</nz-form-label
1668
+                        >
1669
+                        <nz-form-control
1670
+                          [nzSpan]="12"
1671
+                          nzErrorTip="请填写报修内容"
1672
+                        >
1673
+                          <textarea
1674
+                            formControlName="content"
1675
+                            nz-input
1676
+                            rows="2"
1677
+                            placeholder="请填写报修内容"
1678
+                          ></textarea>
1679
+                        </nz-form-control>
1680
+                      </nz-form-item>
1681
+                      <nz-form-item>
1682
+                        <nz-form-label
1683
+                          [nzSpan]="8"
1684
+                          style="visibility: hidden"
1685
+                        ></nz-form-label>
1686
+                        <nz-form-control [nzSpan]="12">
1687
+                          <button
1688
+                            nz-button
1689
+                            nzType="primary"
1690
+                            [nzLoading]="bxLoading"
1691
+                          >
1692
+                            提交
1693
+                          </button>
1694
+                        </nz-form-control>
1695
+                      </nz-form-item>
1696
+                    </form>
1697
+                  </div>
1698
+                </div>
1699
+                <!-- <nz-table class="bxFlex bxTable" [nzData]="quickBxlbList" nzSize="small" [nzShowPagination]="false"
1493 1700
                   [nzLoading]="quickBxlbLoading">
1494 1701
                   <tbody>
1495 1702
                     <tr (click)="showBxModal(data,'您的报修为“'+data.content+'” 是否确认报修?')" *ngFor="
@@ -1499,35 +1706,59 @@
1499 1706
                       <td>{{ data.content||'无' }}</td>
1500 1707
                     </tr>
1501 1708
                   </tbody>
1502
-                </nz-table>
1709
+                </nz-table> -->
1503 1710
               </div>
1504 1711
               <!-- 报修列表 -->
1505
-              <div *ngIf="checkedTableType == 'bxlb'&&isShowBx" style="flex: 1; height: 100%">
1506
-                <div class="
1507
-                    searchBox
1508
-                    display_flex
1509
-                    align-items_center
1510
-                    justify-content_space-between
1511
-                  ">
1512
-                  <div class="
1513
-                      left
1514
-                      alignC
1515
-                      display_flex
1516
-                      justify-content_flex-center
1517
-                      align-items_center
1518
-                    ">
1712
+              <div
1713
+                *ngIf="checkedTableType == 'bxlb' && isShowBx"
1714
+                style="flex: 1; height: 100%"
1715
+              >
1716
+                <div
1717
+                  class="searchBox display_flex align-items_center justify-content_space-between"
1718
+                >
1719
+                  <div
1720
+                    class="left alignC display_flex justify-content_flex-center align-items_center"
1721
+                  >
1722
+                    <div>状态:</div>
1723
+                    <div>
1724
+                      <nz-select 
1725
+                        style="width: 160px;"
1726
+                        class="formItem"
1727
+                        [nzDropdownMatchSelectWidth]="false"
1728
+                        [nzShowSearch]="false"
1729
+                        nzAllowClear
1730
+                        nzPlaceHolder="请选择状态"
1731
+                        [(ngModel)]="incidentStateId"
1732
+                      >
1733
+                        <nz-option
1734
+                          nzLabel="{{ data.name }}"
1735
+                          nzValue="{{ data.id }}"
1736
+                          *ngFor="let data of incidentStateList"
1737
+                        ></nz-option>
1738
+                      </nz-select>
1739
+                    </div>
1519 1740
                   </div>
1520 1741
 
1521 1742
                   <div class="btns">
1522
-                    <button nz-button nzType="primary" nzGhost (click)="getBxlb(true)">
1743
+                    <button
1744
+                      nz-button
1745
+                      nzType="primary"
1746
+                      nzGhost
1747
+                      (click)="getBxlb(true)"
1748
+                    >
1523 1749
                       搜索
1524 1750
                     </button>
1525 1751
                   </div>
1526 1752
                 </div>
1527 1753
                 <div class="table">
1528 1754
                   <div class="box">
1529
-                    <nz-table class="hospitalTable" [nzData]="bxlbList" nzSize="middle" [nzShowPagination]="false"
1530
-                      [nzLoading]="bxlbLoading">
1755
+                    <nz-table
1756
+                      class="hospitalTable"
1757
+                      [nzData]="bxlbList"
1758
+                      nzSize="middle"
1759
+                      [nzShowPagination]="false"
1760
+                      [nzLoading]="bxlbLoading"
1761
+                    >
1531 1762
                       <thead>
1532 1763
                         <tr class="thead">
1533 1764
                           <th nzWidth="7%">序号</th>
@@ -1540,29 +1771,41 @@
1540 1771
                         </tr>
1541 1772
                       </thead>
1542 1773
                       <tbody>
1543
-                        <tr *ngFor="
1544
-                            let data of bxlbList;
1545
-                            let i = index
1546
-                          ">
1774
+                        <tr *ngFor="let data of bxlbList; let i = index">
1547 1775
                           <td>{{ i + 1 }}</td>
1548
-                          <td>{{ data.description||'无' }}</td>
1776
+                          <td>{{ data.description || "无" }}</td>
1549 1777
                           <td>
1550
-                            {{ data.createTime|date:'MM-dd HH:mm' }}
1778
+                            {{ data.createTime | date: "MM-dd HH:mm" }}
1551 1779
                           </td>
1552
-                          <td>{{ data.requester?data.requester.name:'无' }}</td>
1553
-                          <td>{{ data.state.name }}</td>
1554
-                          <td>{{ data.incident?(data.incident.contacts?data.incident.contacts:'无'):'无' }}</td>
1555 1780
                           <td>
1556
-                            <button (click)="viewBx(data)">
1557
-                              查看
1558
-                            </button>
1781
+                            {{ data.requester ? data.requester.name : "无" }}
1782
+                          </td>
1783
+                          <td>{{ data.serviceState?data.serviceState.name:'无' }}</td>
1784
+                          <td>
1785
+                            {{
1786
+                              data.incident
1787
+                                ? data.incident.contacts
1788
+                                  ? data.incident.contacts
1789
+                                  : "无"
1790
+                                : "无"
1791
+                            }}
1792
+                          </td>
1793
+                          <td>
1794
+                            <!-- <button (click)="viewBx(data)">查看</button> -->
1795
+                            <button (click)="detailBx(data)" class="mr8">查看</button>
1796
+                            <button (click)="detailBx(data)">评价</button>
1559 1797
                           </td>
1560 1798
                         </tr>
1561 1799
                       </tbody>
1562 1800
                     </nz-table>
1563 1801
                     <div class="pagination">
1564
-                      <nz-pagination [(nzPageIndex)]="bxlbPageIndex" [(nzTotal)]="bxlbListLength"
1565
-                        [(nzPageSize)]="bxlbPageSize" (nzPageIndexChange)="getBxlb()" (nzPageSizeChange)="getBxlb()">
1802
+                      <nz-pagination
1803
+                        [(nzPageIndex)]="bxlbPageIndex"
1804
+                        [(nzTotal)]="bxlbListLength"
1805
+                        [(nzPageSize)]="bxlbPageSize"
1806
+                        (nzPageIndexChange)="getBxlb()"
1807
+                        (nzPageSizeChange)="getBxlb()"
1808
+                      >
1566 1809
                       </nz-pagination>
1567 1810
                     </div>
1568 1811
                   </div>
@@ -1648,10 +1891,17 @@
1648 1891
                                   ? "半程陪检"
1649 1892
                                   : item.taskType.taskName
1650 1893
                               }}
1651
-                              <ng-container *ngIf="item.taskType.associationType.value == 'drugsBag' && item.drugs">
1652
-                                ({{item.drugs.packid}})
1894
+                              <ng-container
1895
+                                *ngIf="
1896
+                                  item.taskType.associationType.value ==
1897
+                                    'drugsBag' && item.drugs
1898
+                                "
1899
+                              >
1900
+                                ({{ item.drugs.packid }})
1653 1901
                               </ng-container>
1654
-                              <ng-container *ngIf="item.goodsRemark">-{{item.goodsRemark}}</ng-container>
1902
+                              <ng-container *ngIf="item.goodsRemark"
1903
+                                >-{{ item.goodsRemark }}</ng-container
1904
+                              >
1655 1905
                               <span
1656 1906
                                 *ngIf="
1657 1907
                                   item.patient &&
@@ -1670,13 +1920,18 @@
1670 1920
                           </div>
1671 1921
                           <div class="row" nz-row>
1672 1922
                             <!-- <div nz-col nzSpan="12" class="col txtL"></div> -->
1673
-                            <div
1674
-                              nz-col
1675
-                              nzSpan="12"
1676
-                              class="col txtL"
1677
-                            >
1678
-                              <ng-container *ngIf="item.taskType.associationType.value == 'drugsBag' && item.startDept">
1679
-                                {{deptDisplay == 2 ? item.startDept.deptalias:item.startDept.dept}}
1923
+                            <div nz-col nzSpan="12" class="col txtL">
1924
+                              <ng-container
1925
+                                *ngIf="
1926
+                                  item.taskType.associationType.value ==
1927
+                                    'drugsBag' && item.startDept
1928
+                                "
1929
+                              >
1930
+                                {{
1931
+                                  deptDisplay == 2
1932
+                                    ? item.startDept.deptalias
1933
+                                    : item.startDept.dept
1934
+                                }}
1680 1935
                               </ng-container>
1681 1936
                             </div>
1682 1937
                             <div
@@ -1693,7 +1948,7 @@
1693 1948
                               nzSpan="12"
1694 1949
                               class="col txtR"
1695 1950
                             >
1696
-                              {{item.yyjdTime | date: "MM-dd HH:mm"}}
1951
+                              {{ item.yyjdTime | date: "MM-dd HH:mm" }}
1697 1952
                             </div>
1698 1953
                           </div>
1699 1954
                           <div class="row" nz-row>

+ 130 - 39
src/app/views/hushijiandan/hushijiandan.component.less

@@ -6,7 +6,7 @@
6 6
   display: flex;
7 7
 
8 8
   .bxForm {
9
-    margin-top: 16px;
9
+    margin-top: 32px;
10 10
   }
11 11
 
12 12
   .bxFlex {
@@ -14,6 +14,9 @@
14 14
   }
15 15
 
16 16
   .bxTable {
17
+    .moreBx{
18
+      color: @primary-color;
19
+    }
17 20
     margin-top: 16px;
18 21
     ::ng-deep .ant-table-body {
19 22
       margin: 0 !important;
@@ -29,9 +32,7 @@
29 32
     }
30 33
 
31 34
     .thead {
32
-      background-image: linear-gradient(to right,
33
-          @bg-start,
34
-          @bg-end );
35
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
35 36
       padding: 10px 0;
36 37
 
37 38
       th {
@@ -54,7 +55,6 @@
54 55
   }
55 56
 
56 57
   .yyTimeError {
57
-
58 58
     ::ng-deep .ant-time-picker-input,
59 59
     ::ng-deep .ant-calendar-picker-input {
60 60
       border: 1px solid red !important;
@@ -276,9 +276,11 @@
276 276
             width: 100%;
277 277
             height: 40px;
278 278
             line-height: 40px;
279
-            background-image: linear-gradient(90deg,
280
-                @bg-end 0%,
281
-                @bg-start 100%);
279
+            background-image: linear-gradient(
280
+              90deg,
281
+              @bg-end 0%,
282
+              @bg-start 100%
283
+            );
282 284
 
283 285
             tr {
284 286
               height: 40px;
@@ -308,7 +310,8 @@
308 310
                   top: -3px;
309 311
                   width: 41px;
310 312
                   height: 42px;
311
-                  background: url(./../../../assets/images/icon_ji.png) no-repeat 3px 0;
313
+                  background: url(./../../../assets/images/icon_ji.png)
314
+                    no-repeat 3px 0;
312 315
                 }
313 316
               }
314 317
             }
@@ -340,6 +343,68 @@
340 343
 }
341 344
 
342 345
 // 查看标本详情 end
346
+.otherBox-nav {
347
+  width: 20%;
348
+  border-right: 1px solid #dde1e5;
349
+  display: flex;
350
+  flex-direction: column;
351
+
352
+  .otherBox-nav__head {
353
+    height: 50px;
354
+    display: flex;
355
+    flex-direction: column;
356
+    justify-content: flex-end;
357
+    align-items: center;
358
+    padding-left: 8px;
359
+    padding-right: 8px;
360
+
361
+    input {
362
+      height: 36px;
363
+    }
364
+  }
365
+
366
+  .otherBox-nav__main {
367
+    flex: 1;
368
+    position: relative;
369
+
370
+    ::ng-deep .os-content {
371
+      height: 100% !important;
372
+    }
373
+
374
+    .otherBox-nav__mainInner {
375
+      display: flex;
376
+      flex-direction: column;
377
+      align-items: center;
378
+      margin-top: 16px;
379
+
380
+      &.noData,
381
+      &.oLoading {
382
+        position: absolute;
383
+        width: 100%;
384
+        justify-content: center;
385
+        height: 100%;
386
+        margin-top: 0;
387
+      }
388
+
389
+      .otherBox-nav__mainItem {
390
+        line-height: 26px;
391
+        color: #333;
392
+        padding-left: 8px;
393
+        margin-bottom: 8px;
394
+        border-radius: 4px;
395
+        cursor: pointer;
396
+        overflow: hidden;
397
+        text-overflow: ellipsis;
398
+        white-space: nowrap;
399
+
400
+        &.active {
401
+          color: @primary-color;
402
+          background-color: #f0f6ed;
403
+        }
404
+      }
405
+    }
406
+  }
407
+}
343 408
 
344 409
 .nurse {
345 410
   width: 100%;
@@ -471,9 +536,24 @@
471 536
             font-size: 16px;
472 537
             font-weight: bold;
473 538
             border-bottom: 1px solid #dde1e5;
474
-            padding-bottom: 8px;
475 539
             display: flex;
476 540
             justify-content: space-between;
541
+            align-items: center;
542
+            .smallTab{
543
+              display: flex;
544
+              .s_tab {
545
+                cursor: pointer;
546
+                padding: 8px;
547
+                border-right: 1px solid #e5e9ed;
548
+                &:first-of-type{
549
+                  border-left: 1px solid #e5e9ed;
550
+                }
551
+                &.active{
552
+                  color: #fff;
553
+                  background-color: @primary-color;
554
+                }
555
+              }
556
+            }
477 557
 
478 558
             span {
479 559
               font-weight: normal;
@@ -495,9 +575,9 @@
495 575
             height: 100%;
496 576
             display: flex;
497 577
             flex-direction: column;
498
-            justify-content: center;
578
+            // justify-content: center;
499 579
             border-left: 1px solid #dde1e5;
500
-            padding: 8px;
580
+            padding: 0 8px 8px;
501 581
 
502 582
             .modalBody_right_list {
503 583
               text-align: justify;
@@ -525,7 +605,7 @@
525 605
               justify-content: center;
526 606
               align-items: center;
527 607
 
528
-              &>div {
608
+              & > div {
529 609
                 width: 100%;
530 610
               }
531 611
 
@@ -707,9 +787,11 @@
707 787
             }
708 788
 
709 789
             .btn {
710
-              background-image: linear-gradient(90deg,
711
-                  @bg-start 0%,
712
-                  @bg-end 100%);
790
+              background-image: linear-gradient(
791
+                90deg,
792
+                @bg-start 0%,
793
+                @bg-end 100%
794
+              );
713 795
               line-height: 28px;
714 796
               text-align: center;
715 797
               border-radius: 4px;
@@ -770,7 +852,7 @@
770 852
           font-size: 22px;
771 853
           color: #333;
772 854
           flex: 1;
773
-          .todayNum{
855
+          .todayNum {
774 856
             font-size: 16px;
775 857
             margin-left: 16px;
776 858
           }
@@ -847,7 +929,7 @@
847 929
     .inner-content {
848 930
       background: #fff;
849 931
       height: 100% !important;
850
-      border-bottom: 1px solid #e5e9ed;
932
+      // border-bottom: 1px solid #e5e9ed;
851 933
 
852 934
       .launch {
853 935
         width: 90px;
@@ -886,7 +968,8 @@
886 968
               width: 56px;
887 969
               height: 56px;
888 970
               margin-top: 6px;
889
-              background: url(../../../assets/images/icon_hushebei2.png) center no-repeat;
971
+              background: url(../../../assets/images/icon_hushebei2.png) center
972
+                no-repeat;
890 973
             }
891 974
 
892 975
             &:nth-child(2n) {
@@ -920,7 +1003,7 @@
920 1003
         width: 100%;
921 1004
         height: 100%;
922 1005
 
923
-        &>div {
1006
+        & > div {
924 1007
           height: 100%;
925 1008
 
926 1009
           &:nth-child(1) {
@@ -967,9 +1050,11 @@
967 1050
 
968 1051
                   .btn {
969 1052
                     height: 48%;
970
-                    background-image: linear-gradient(90deg,
971
-                        @bg-start 0%,
972
-                        @bg-end 100%);
1053
+                    background-image: linear-gradient(
1054
+                      90deg,
1055
+                      @bg-start 0%,
1056
+                      @bg-end 100%
1057
+                    );
973 1058
                     border-radius: 4px;
974 1059
                     color: #fff;
975 1060
                     padding: 0;
@@ -1080,7 +1165,7 @@
1080 1165
                 }
1081 1166
               }
1082 1167
 
1083
-              &>div {
1168
+              & > div {
1084 1169
                 padding: 0 8px;
1085 1170
               }
1086 1171
 
@@ -1093,9 +1178,11 @@
1093 1178
                 width: 104px;
1094 1179
                 height: 34px;
1095 1180
                 line-height: 34px;
1096
-                background-image: linear-gradient(90deg,
1097
-                    @bg-start 0%,
1098
-                    @bg-end 100%);
1181
+                background-image: linear-gradient(
1182
+                  90deg,
1183
+                  @bg-start 0%,
1184
+                  @bg-end 100%
1185
+                );
1099 1186
                 border-radius: 4px;
1100 1187
                 color: #fff;
1101 1188
                 border: none;
@@ -1121,9 +1208,11 @@
1121 1208
                 }
1122 1209
 
1123 1210
                 &:nth-child(2) {
1124
-                  background-image: linear-gradient(135deg,
1125
-                      @bg-start 0%,
1126
-                      @bg-end 100%);
1211
+                  background-image: linear-gradient(
1212
+                    135deg,
1213
+                    @bg-start 0%,
1214
+                    @bg-end 100%
1215
+                  );
1127 1216
                   border: solid 1px @primary-color;
1128 1217
                   margin-left: 8px;
1129 1218
                 }
@@ -1162,9 +1251,11 @@
1162 1251
                 }
1163 1252
 
1164 1253
                 .thead {
1165
-                  background-image: linear-gradient(to right,
1166
-                      @bg-start,
1167
-                      @bg-end );
1254
+                  background-image: linear-gradient(
1255
+                    to right,
1256
+                    @bg-start,
1257
+                    @bg-end
1258
+                  );
1168 1259
                   padding: 10px 0;
1169 1260
 
1170 1261
                   th {
@@ -1252,7 +1343,7 @@
1252 1343
             z-index: 9;
1253 1344
             background: #fff;
1254 1345
 
1255
-            &>span {
1346
+            & > span {
1256 1347
               font-size: 16px;
1257 1348
               color: #666;
1258 1349
               font-weight: 500;
@@ -1626,7 +1717,7 @@
1626 1717
         }
1627 1718
       }
1628 1719
 
1629
-      &>div {
1720
+      & > div {
1630 1721
         margin: 0;
1631 1722
 
1632 1723
         &.title {
@@ -1755,7 +1846,7 @@
1755 1846
       overflow: hidden;
1756 1847
       margin-top: 12px;
1757 1848
 
1758
-      &>div {
1849
+      & > div {
1759 1850
         text-align: center;
1760 1851
         margin: 0;
1761 1852
 
@@ -1847,7 +1938,7 @@
1847 1938
     z-index: 88;
1848 1939
   }
1849 1940
 
1850
-  &>.left {
1941
+  & > .left {
1851 1942
     width: 480px;
1852 1943
     float: left;
1853 1944
     background: #fff;
@@ -1876,7 +1967,7 @@
1876 1967
               padding: 15px 6px;
1877 1968
               text-align: center;
1878 1969
 
1879
-              &>.tdiv {
1970
+              & > .tdiv {
1880 1971
                 overflow: hidden;
1881 1972
 
1882 1973
                 .name {
@@ -1913,7 +2004,7 @@
1913 2004
       }
1914 2005
 
1915 2006
       .conditions {
1916
-        &>.ant-row {
2007
+        & > .ant-row {
1917 2008
           margin: 8px 0;
1918 2009
 
1919 2010
           .ant-row {

+ 147 - 49
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -90,10 +90,16 @@ export class HushijiandanComponent implements OnInit {
90 90
     static: false,
91 91
   })
92 92
   osComponentRef9: OverlayScrollbarsComponent;
93
+  @ViewChild("osComponentRef10", {
94
+    read: OverlayScrollbarsComponent,
95
+    static: false,
96
+  })
97
+  osComponentRef10: OverlayScrollbarsComponent;
93 98
   othersListOptions: any;
94 99
   sortableTimer = null;
95 100
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
96 101
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
102
+  incidentSearchChangeSubject = new Subject(); //故障现象搜索防抖
97 103
   isYyInspect = false; //需要预约检查
98 104
   constructor(
99 105
     private message: NzMessageService,
@@ -140,6 +146,7 @@ export class HushijiandanComponent implements OnInit {
140 146
   orderListTime = 0; //工单列表自动刷新秒数
141 147
   orderListTimeConst = 60; //工单列表自动刷新秒数
142 148
   deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
149
+
143 150
   ngOnInit() {
144 151
     this.tool.getDeptDisplay().subscribe((result) => {
145 152
       if (result.status == 200) {
@@ -150,6 +157,7 @@ export class HushijiandanComponent implements OnInit {
150 157
     this.getUpdateTipsForNurses();
151 158
     this.getSpecimenButton();
152 159
     this.getCloseTimeFlag();
160
+    this.getBxlb();
153 161
     this.currentUser = this.tool.getCurrentUserDept();
154 162
     console.log(this.currentUser, this.tabSearchCont);
155 163
     //防抖
@@ -159,6 +167,11 @@ export class HushijiandanComponent implements OnInit {
159 167
     this.otherSearchChangeSubject.pipe(debounceTime(500)).subscribe((v) => {
160 168
       this.getDeptTaskType(v);
161 169
     });
170
+    this.incidentSearchChangeSubject
171
+      .pipe(debounceTime(500))
172
+      .subscribe((v: string) => {
173
+        this.getIncidentcategory(v);
174
+      });
162 175
     this.currentHospital = this.tool.getCurrentHospital();
163 176
 
164 177
     this.getTodayNum();
@@ -171,7 +184,7 @@ export class HushijiandanComponent implements OnInit {
171 184
     this.refreshSpecimenWorkOrderMsg();
172 185
     this.initRole();
173 186
     this.getWebsocket();
174
-    this.listDeptOrderRecord();
187
+
175 188
     // 综合日志倒计时 start
176 189
     this.logTime = this.logTimeConst;
177 190
     clearInterval(this.logTimer);
@@ -179,8 +192,12 @@ export class HushijiandanComponent implements OnInit {
179 192
       this.logTime--;
180 193
       if (this.logTime === 0) {
181 194
         this.logTime = this.logTimeConst;
182
-        this.listDeptOrderRecord();
183
-        this.getTodayNum();//当日工单数量
195
+        if (this.smallTabId == 1) {
196
+          this.listDeptOrderRecord();
197
+        } else if (this.smallTabId == 2) {
198
+          this.getQuickBxlb();
199
+        }
200
+        this.getTodayNum(); //当日工单数量
184 201
       }
185 202
     }, 1000);
186 203
     // 综合日志倒计时 end
@@ -235,17 +252,28 @@ export class HushijiandanComponent implements OnInit {
235 252
   specimenWorkOrderMsg: any = {}; //急标普标数量&信息
236 253
   jpDrugsWKOMsg: any = {}; //药品静配提示信息
237 254
 
255
+  // 切换综合日志和一键报修
256
+  smallTabs = [];
257
+  smallTabId = 2; //默认显示一键报修
258
+  changeSmallTab(id) {
259
+    this.smallTabId = id;
260
+    if (id == 1) {
261
+      this.listDeptOrderRecord();
262
+    } else if (id == 2) {
263
+      this.getQuickBxlb();
264
+    }
265
+  }
238 266
   // 获取当日建单总数
239
-  todayNum = ''; //当日建单总数
267
+  todayNum = ""; //当日建单总数
240 268
   getTodayNum() {
241 269
     this.mainService
242 270
       .getFetchDataList("nurse", "workOrder", {
243 271
         idx: 0,
244 272
         sum: 1,
245
-        workOrder: { 
273
+        workOrder: {
246 274
           createDept: this.loginUser.dept.id,
247
-          startTime1:format(startOfDay(new Date()),'yyyy-MM-dd HH:mm:ss'),
248
-          endTime1:format(endOfDay(new Date()),'yyyy-MM-dd HH:mm:ss'),
275
+          startTime1: format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
276
+          endTime1: format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
249 277
         },
250 278
       })
251 279
       .subscribe((data) => {
@@ -256,22 +284,22 @@ export class HushijiandanComponent implements OnInit {
256 284
   }
257 285
 
258 286
   // 获取报修区域(所属院区)
259
-  areas: any = []; //区域(所属院区)列表
260
-  getArea() {
261
-    this.areas = [];
262
-    this.mainService
263
-      .fetchListBx("area", { idx: 0, sum: 1000 })
264
-      .subscribe((result: any) => {
265
-        if (result.status == 200) {
266
-          this.areas = result.list;
267
-          if (this.areas.length) {
268
-            this.bxForm.controls.hospital.setValue(this.areas[0].id);
269
-          } else {
270
-            this.bxForm.controls.hospital.setValue(null);
271
-          }
272
-        }
273
-      });
274
-  }
287
+  // areas: any = []; //区域(所属院区)列表
288
+  // getArea() {
289
+  //   this.areas = [];
290
+  //   this.mainService
291
+  //     .fetchListBx("area", { idx: 0, sum: 1000 })
292
+  //     .subscribe((result: any) => {
293
+  //       if (result.status == 200) {
294
+  //         this.areas = result.list;
295
+  //         if (this.areas.length) {
296
+  //           this.bxForm.controls.hospital.setValue(this.areas[0].id);
297
+  //         } else {
298
+  //           this.bxForm.controls.hospital.setValue(null);
299
+  //         }
300
+  //       }
301
+  //     });
302
+  // }
275 303
   //根据区域(所属院区)获取地点(楼栋)
276 304
   places: any = []; //地点(楼栋)列表
277 305
   getPlace(buildingId) {
@@ -380,6 +408,18 @@ export class HushijiandanComponent implements OnInit {
380 408
       .subscribe((result) => {
381 409
         if (result.status == 200) {
382 410
           this.isShowBx = result.list[0].valueconfig == 1;
411
+          if (this.isShowBx) {
412
+            this.smallTabs = [
413
+              { id: 1, name: "综合日志" },
414
+              { id: 2, name: "一键报修" },
415
+            ];
416
+            this.smallTabId = 2;
417
+            this.getQuickBxlb();
418
+          } else {
419
+            this.smallTabs = [{ id: 1, name: "综合日志" }];
420
+            this.smallTabId = 1;
421
+            this.listDeptOrderRecord();
422
+          }
383 423
         }
384 424
       });
385 425
   }
@@ -470,6 +510,10 @@ export class HushijiandanComponent implements OnInit {
470 510
   closeModelHistoryDrugsbag(e) {
471 511
     this.historyDPromptModalShow = JSON.parse(e).show;
472 512
   }
513
+  // 查看报修信息
514
+  detailBx(data){
515
+    this.router.navigateByUrl("nurse/detailBx/" + data.id);
516
+  }
473 517
   // 查看报修信息弹窗
474 518
   bxPromptModalShow = false; //弹窗开关
475 519
   bData = ""; //查看详情携带所有数据
@@ -590,11 +634,23 @@ export class HushijiandanComponent implements OnInit {
590 634
     this.selectOtherId = item.id;
591 635
     this.newShortcutOrder(item, "other");
592 636
   }
637
+  selectIncidentId; //选中的id
638
+  incidentClick(item) {
639
+    this.positionY = this.osComponentRef10.osInstance().scroll().position.y; //内容滚动的距离
640
+    this.selectIncidentId = item.id;
641
+    this.bxForm.controls.content.setValue(item.mutiCategory);
642
+  }
593 643
   //搜索
594 644
   otherNum = 0;
595 645
   otherSearchChange() {
596 646
     this.otherSearchChangeSubject.next(this.otherSearch);
597 647
   }
648
+  //搜索
649
+  incidentSearch = ""; //搜索的关键词
650
+  incidentNum = 0;
651
+  incidentSearchChange() {
652
+    this.incidentSearchChangeSubject.next(this.incidentSearch);
653
+  }
598 654
   // 切换科室
599 655
   changeKs() {
600 656
     this.hsPromptModalShow = true;
@@ -859,7 +915,42 @@ export class HushijiandanComponent implements OnInit {
859 915
       }
860 916
     });
861 917
   }
862
-
918
+  // 获取事件状态liaomingming
919
+  incidentStateList = [];
920
+  incidentStateId = undefined;
921
+  getIncidentState() {
922
+    let postData = { type: "list", key: "service_state" };
923
+    this.iLoading = true;
924
+    this.mainService.getDictionaryByITSM(postData).subscribe((data: any) => {
925
+      this.iLoading = false;
926
+      if (data.status == 200) {
927
+        this.incidentStateList = data.data || [];
928
+      }
929
+    });
930
+  }
931
+  // 获取故障现象(三级)liaoming
932
+  incidentList = [];
933
+  iLoading = false;
934
+  getIncidentcategory(key = "") {
935
+    let postData = {
936
+      idx: 0,
937
+      sum: 9999,
938
+      incidentcategory: {
939
+        category: key,
940
+        selectType: "pinyin_qs",
941
+        hierarchyQuery: "three",
942
+      },
943
+    };
944
+    this.iLoading = true;
945
+    this.mainService
946
+      .fetchListBx("incidentcategory", postData)
947
+      .subscribe((data: any) => {
948
+        this.iLoading = false;
949
+        if (data.status == 200) {
950
+          this.incidentList = data.list || [];
951
+        }
952
+      });
953
+  }
863 954
   // 获取当前登录人科室任务类型信息
864 955
   othersList: any = []; // 其他一键建单列表
865 956
   bbMsg: any = {}; //标本一键建单
@@ -1229,11 +1320,11 @@ export class HushijiandanComponent implements OnInit {
1229 1320
     });
1230 1321
     //新增报修
1231 1322
     this.bxForm = this.fb.group({
1232
-      name: [null, [Validators.required]],
1233
-      phone: [null, [Validators.required]],
1234
-      hospital: [null, [Validators.required]],
1235
-      building: [null, [Validators.required]],
1236
-      address: [null, [Validators.required]],
1323
+      // name: [null, [Validators.required]],
1324
+      // phone: [null, [Validators.required]],
1325
+      // hospital: [null, [Validators.required]],
1326
+      // building: [null, [Validators.required]],
1327
+      // address: [null, [Validators.required]],
1237 1328
       content: [null, [Validators.required]],
1238 1329
     });
1239 1330
   }
@@ -1965,13 +2056,13 @@ export class HushijiandanComponent implements OnInit {
1965 2056
     //   }
1966 2057
     // };
1967 2058
     if (e == 0) {
1968
-      this.patientForm.get('urgentReason')!.clearValidators();
1969
-      this.patientForm.get('urgentReason')!.markAsPristine();
2059
+      this.patientForm.get("urgentReason")!.clearValidators();
2060
+      this.patientForm.get("urgentReason")!.markAsPristine();
1970 2061
     } else {
1971
-      this.patientForm.get('urgentReason')!.setValidators(Validators.required);
1972
-      this.patientForm.get('urgentReason')!.markAsDirty();
2062
+      this.patientForm.get("urgentReason")!.setValidators(Validators.required);
2063
+      this.patientForm.get("urgentReason")!.markAsDirty();
1973 2064
     }
1974
-    this.patientForm.get('urgentReason')!.updateValueAndValidity();
2065
+    this.patientForm.get("urgentReason")!.updateValueAndValidity();
1975 2066
     if (this.isYyInspect) {
1976 2067
       this.isYyInspect = e == 0;
1977 2068
       if (!this.isYyInspect) {
@@ -2447,15 +2538,17 @@ export class HushijiandanComponent implements OnInit {
2447 2538
       this.getHistorySpecimen();
2448 2539
     } else if (type === "historyDrugsbag") {
2449 2540
       this.getHistoryDrugsbag();
2450
-    }else if (type === "bxlb" && this.isShowBx) {
2541
+    } else if (type === "bxlb" && this.isShowBx) {
2451 2542
       this.getBxlb();
2543
+      this.getIncidentState();
2452 2544
     } else if (type === "kjbx" && this.isShowBx) {
2453
-      this.getQuickBxlb();
2545
+      // this.getQuickBxlb();
2546
+      this.getIncidentcategory();
2454 2547
       // 获取报修的区域(所属院区)
2455
-      this.getArea();
2456
-      this.bxForm.controls.name.setValue(this.loginUser.name);
2457
-      this.bxForm.controls.phone.setValue(this.loginUser.phone);
2458
-      this.bxForm.controls.address.setValue(null);
2548
+      // this.getArea();
2549
+      // this.bxForm.controls.name.setValue(this.loginUser.name);
2550
+      // this.bxForm.controls.phone.setValue(this.loginUser.phone);
2551
+      // this.bxForm.controls.address.setValue(null);
2459 2552
       this.bxForm.controls.content.setValue(null);
2460 2553
     }
2461 2554
   }
@@ -2474,12 +2567,15 @@ export class HushijiandanComponent implements OnInit {
2474 2567
         let postData = {
2475 2568
           verification: "true",
2476 2569
           incident: {
2477
-            address: this.bxForm.controls.address.value,
2478
-            areaId: this.bxForm.controls.hospital.value,
2479
-            contacts: this.bxForm.controls.name.value,
2480
-            contactsInformation: this.bxForm.controls.phone.value,
2570
+            contacts: this.loginUser.name,
2571
+            contactsInformation: this.loginUser.phone,
2572
+            // address: this.bxForm.controls.address.value,
2573
+            // areaId: this.bxForm.controls.hospital.value,
2574
+            // contacts: this.bxForm.controls.name.value,
2575
+            // contactsInformation: this.bxForm.controls.phone.value,
2481 2576
             description: this.bxForm.controls.content.value,
2482
-            placeId: this.bxForm.controls.building.value,
2577
+            categoryId: this.selectIncidentId,
2578
+            // placeId: this.bxForm.controls.building.value,
2483 2579
             requester: { account: this.loginUser.account },
2484 2580
             sourceType: "wechatUserIncident",
2485 2581
             fileUrl: "url",
@@ -2620,6 +2716,7 @@ export class HushijiandanComponent implements OnInit {
2620 2716
   bxlbListLength: number = 10; //表格总数据量
2621 2717
   bxlbCodeSearchInp: string = ""; //标本编码搜索
2622 2718
   bxlbParentSearchInp: string = ""; //患者信息搜索
2719
+  processing: number = 0; //处理中的数量
2623 2720
   bxlbLoading = false;
2624 2721
   getBxlb(idx?) {
2625 2722
     if (idx) {
@@ -2629,15 +2726,16 @@ export class HushijiandanComponent implements OnInit {
2629 2726
     this.bxlbLoading = true;
2630 2727
     this.mainService
2631 2728
       .listWxIncident({
2632
-        "assignee": current.user.account,
2633
-        "state": 0,
2634
-        "idx": this.bxlbPageIndex - 1,
2635
-        "sum": this.bxlbPageSize
2729
+        assignee: current.user.account,
2730
+        service_state: this.incidentStateId?parseInt(this.incidentStateId):undefined,
2731
+        idx: this.bxlbPageIndex - 1,
2732
+        sum: this.bxlbPageSize,
2636 2733
       })
2637 2734
       .subscribe((data: any) => {
2638 2735
         this.bxlbLoading = false;
2639 2736
         this.bxlbList = data.data || [];
2640 2737
         this.bxlbListLength = data.resultCount || 0;
2738
+        this.processing = data.resultCount || 0;
2641 2739
       });
2642 2740
   }
2643 2741
 

+ 8 - 2
src/app/views/sys-config/sys-config.component.html

@@ -113,15 +113,21 @@
113 113
           </nz-form-control>
114 114
         </nz-form-item>
115 115
         <nz-form-item class="formItem">
116
-          <nz-form-label [nzSpan]="12" nzFor="itsmIncident" nzRequired class="label">护士端是否显示报修
116
+          <nz-form-label [nzSpan]="9" nzFor="itsmIncident" nzRequired class="label">护士端是否显示报修
117 117
           </nz-form-label>
118
-          <nz-form-control [nzSpan]="12" nzErrorTip="护士端是否显示报修是必填项!">
118
+          <nz-form-control [nzSpan]="15" nzErrorTip="护士端是否显示报修是必填项!">
119 119
             <nz-radio-group formControlName="itsmIncident">
120 120
               <label nz-radio nzValue="1">是</label>
121 121
               <label nz-radio nzValue="0">否</label>
122 122
             </nz-radio-group>
123 123
           </nz-form-control>
124 124
         </nz-form-item>
125
+        <nz-form-item class="formItem" *ngIf="validateForm.controls.itsmIncident.value == 1">
126
+          <nz-form-label [nzSpan]="24" nzFor="itsmIP" nzRequired class="label">链接地址</nz-form-label>
127
+          <nz-form-control [nzSpan]="24" nzErrorTip="请输入链接地址!">
128
+            <input nz-input formControlName="itsmIP" id="itsmIP" placeholder="请输入链接地址">
129
+          </nz-form-control>
130
+        </nz-form-item>
125 131
       </div>
126 132
     </form>
127 133
   </overlay-scrollbars>

+ 7 - 0
src/app/views/sys-config/sys-config.component.ts

@@ -38,6 +38,7 @@ export class SysConfigComponent implements OnInit {
38 38
   ngOnInit() {
39 39
     this.validateForm = this.fb.group({
40 40
       defaultPwd: [null, [Validators.required]],
41
+      itsmIP: [null, [Validators.required]],
41 42
       effectiveDuration: [null, [Validators.required]],
42 43
       specimenButton: [null, [Validators.required]],
43 44
       deptDisplay: [null, [Validators.required]],
@@ -100,6 +101,7 @@ export class SysConfigComponent implements OnInit {
100 101
     let filterData = this.initConfig.filter(
101 102
       (item) =>
102 103
         item.keyconfig === "pwd" ||
104
+        item.keyconfig === "itsmIP" ||
103 105
         item.keyconfig === "conversationSeconds" ||
104 106
         item.keyconfig === "specimenButton" ||
105 107
         item.keyconfig === "deptDisplay" ||
@@ -114,6 +116,8 @@ export class SysConfigComponent implements OnInit {
114 116
     filterData.forEach((item) => {
115 117
       if (item.keyconfig === "pwd") {
116 118
         item.valueconfig = this.validateForm.controls.defaultPwd.value;
119
+      }else if (item.keyconfig === "itsmIP") {
120
+        item.valueconfig = this.validateForm.controls.itsmIP.value;
117 121
       } else if (item.keyconfig === "conversationSeconds") {
118 122
         item.valueconfig = this.validateForm.controls.effectiveDuration.value;
119 123
       } else if (item.keyconfig === "specimenButton") {
@@ -185,6 +189,9 @@ export class SysConfigComponent implements OnInit {
185 189
                 case "pwd":
186 190
                   this.validateForm.controls.defaultPwd.setValue(c[1]);
187 191
                   break;
192
+                case "itsmIP":
193
+                  this.validateForm.controls.itsmIP.setValue(c[1]);
194
+                  break;
188 195
                 case "conversationSeconds":
189 196
                   this.validateForm.controls.effectiveDuration.setValue(c[1]);
190 197
                   break;