Procházet zdrojové kódy

标本详情和检查详情

seimin před 2 roky
rodič
revize
50385961f3
3 změnil soubory, kde provedl 671 přidání a 2 odebrání
  1. 7 0
      pages.json
  2. 654 0
      pages/detail/detail.vue
  3. 10 2
      pages/orderDetail/orderDetail.vue

+ 7 - 0
pages.json

@@ -40,6 +40,13 @@
40 40
         "navigationBarBackgroundColor": "#2C2D31"
41 41
       }
42 42
 
43
+    }, {
44
+      "path": "pages/detail/detail",
45
+      "style": {
46
+        "navigationBarTitleText": "详情",
47
+        "navigationBarBackgroundColor": "#2C2D31"
48
+      }
49
+
43 50
     }
44 51
   ],
45 52
   "globalStyle": {

+ 654 - 0
pages/detail/detail.vue

@@ -0,0 +1,654 @@
1
+<template>
2
+  <view class="orderDetail">
3
+    <!-- 头部 -->
4
+    <view class="orderDetail_header">
5
+      <view class="orderDetail_header_item" v-for="tab in tabs" :key="tab.id" :class="{active:tab.id === selectedTab}"
6
+        @click="debouncedChangeTab(tab.id)">
7
+        {{tab.name}}
8
+      </view>
9
+    </view>
10
+    <!-- tab -->
11
+    <!-- 检查信息 -->
12
+    <view class="orderDetail_info" v-show="selectedTab === 1">
13
+      <scroll-view scroll-y class="orderDetail_infoItem" v-if="info.id">
14
+        <view class="orderDetail_infoItem_header">
15
+          <view class="orderDetail_infoItem_header_title">
16
+            <view class="icon"></view>
17
+            <view class="taskNameAndWorkerName">
18
+              <text class="taskName">检查单号</text>
19
+            </view>
20
+          </view>
21
+          <text class="orderDetail_infoItem_header_more">{{info.inspectCode||'暂无'}}</text>
22
+        </view>
23
+        <view class="orderDetail_infoItem_item">
24
+          <view class="orderDetail_infoItem_item_content">
25
+            <text class="orderDetail_infoItem_item_name">患者姓名</text>
26
+            <text class="orderDetail_infoItem_item_value">{{info.patientName||'暂无'}}</text>
27
+          </view>
28
+          <view class="orderDetail_infoItem_item_content">
29
+            <text class="orderDetail_infoItem_item_name">患者床号</text>
30
+            <text class="orderDetail_infoItem_item_value">{{info.bedNum ?info.bedNum + '床': '暂无'}}</text>
31
+          </view>
32
+          <view class="orderDetail_infoItem_item_content">
33
+            <text class="orderDetail_infoItem_item_name">住院号</text>
34
+            <text class="orderDetail_infoItem_item_value">{{info.residenceNo || '暂无'}}</text>
35
+          </view>
36
+          <view class="orderDetail_infoItem_item_content">
37
+            <text class="orderDetail_infoItem_item_name">检查项目</text>
38
+            <text class="orderDetail_infoItem_item_value">{{info.inspectName||'暂无'}}</text>
39
+          </view>
40
+          <view class="orderDetail_infoItem_item_content">
41
+            <text class="orderDetail_infoItem_item_name">预约时间</text>
42
+            <text class="orderDetail_infoItem_item_value">{{info.yyTime||'暂无'}}</text>
43
+          </view>
44
+          <view class="orderDetail_infoItem_item_content">
45
+            <text class="orderDetail_infoItem_item_name">叫号信息</text>
46
+            <text class="orderDetail_infoItem_item_value">{{info.reservationNumber||'暂无'}}</text>
47
+          </view>
48
+          <view class="orderDetail_infoItem_item_content">
49
+            <text class="orderDetail_infoItem_item_name">状态</text>
50
+            <text class="orderDetail_infoItem_item_value">{{info.inspectState?info.inspectState.name:'暂无'}}</text>
51
+          </view>
52
+        </view>
53
+      </scroll-view>
54
+    </view>
55
+    <!-- 标本信息 -->
56
+    <view class="orderDetail_info" v-show="selectedTab === 2">
57
+      <scroll-view scroll-y class="orderDetail_infoItem" v-if="info.id">
58
+        <view class="orderDetail_infoItem_header">
59
+          <view class="orderDetail_infoItem_header_title">
60
+            <view class="icon"></view>
61
+            <view class="taskNameAndWorkerName">
62
+              <text class="taskName">标本编码</text>
63
+            </view>
64
+          </view>
65
+          <text class="orderDetail_infoItem_header_more">{{info.scode||'暂无'}}</text>
66
+        </view>
67
+        <view class="orderDetail_infoItem_item">
68
+          <view class="orderDetail_infoItem_item_content">
69
+            <text class="orderDetail_infoItem_item_name">患者姓名</text>
70
+            <text class="orderDetail_infoItem_item_value">{{info.patientName||'暂无'}}</text>
71
+          </view>
72
+          <view class="orderDetail_infoItem_item_content">
73
+            <text class="orderDetail_infoItem_item_name">患者床号</text>
74
+            <text class="orderDetail_infoItem_item_value">{{info.bedNum ?info.bedNum + '床': '暂无'}}</text>
75
+          </view>
76
+          <view class="orderDetail_infoItem_item_content">
77
+            <text class="orderDetail_infoItem_item_name">住院号</text>
78
+            <text class="orderDetail_infoItem_item_value">{{info.residenceNo || '暂无'}}</text>
79
+          </view>
80
+          <view class="orderDetail_infoItem_item_content">
81
+            <text class="orderDetail_infoItem_item_name">标本类型</text>
82
+            <text class="orderDetail_infoItem_item_value">{{info.stype?info.stype.name:'暂无'}}</text>
83
+          </view>
84
+          <view class="orderDetail_infoItem_item_content">
85
+            <text class="orderDetail_infoItem_item_name">检验科室</text>
86
+            <text
87
+              class="orderDetail_infoItem_item_value">{{info.checkDept?(deptDisplay == 2?info.checkDept.deptalias:info.checkDept.dept):'暂无'}}</text>
88
+          </view>
89
+          <view class="orderDetail_infoItem_item_content">
90
+            <text class="orderDetail_infoItem_item_name">申请科室</text>
91
+            <text
92
+              class="orderDetail_infoItem_item_value">{{info.sickRoom?(deptDisplay == 2?info.sickRoom.deptalias:info.sickRoom.dept):'暂无'}}</text>
93
+          </view>
94
+          <view class="orderDetail_infoItem_item_content">
95
+            <text class="orderDetail_infoItem_item_name">状态</text>
96
+            <text class="orderDetail_infoItem_item_value">{{info.speState?info.speState.name:'暂无'}}</text>
97
+          </view>
98
+        </view>
99
+      </scroll-view>
100
+    </view>
101
+    <!-- 流程信息 -->
102
+    <view class="orderDetail_info" v-show="selectedTab === 3">
103
+      <scroll-view scroll-y class="orderDetail_infoItem">
104
+        <view class="orderDetail_infoItem_header">
105
+          <view class="orderDetail_infoItem_header_title">
106
+            <view class="icon"></view>
107
+            <view class="taskNameAndWorkerName">
108
+              <text class="taskName">过程信息</text>
109
+            </view>
110
+          </view>
111
+        </view>
112
+      </scroll-view>
113
+    </view>
114
+    <!-- 底部 -->
115
+    <seiminFooterBtn :btns="btns"></seiminFooterBtn>
116
+    <seiminModel ref="seiminModel"></seiminModel>
117
+  </view>
118
+</template>
119
+
120
+<script>
121
+  import {
122
+    debounce
123
+  } from 'lodash/function';
124
+  import {
125
+    reqFetchData,
126
+    reqFetchWorkOrderLog,
127
+  } from "../../request/api.js";
128
+  import {
129
+    mapState
130
+  } from "vuex";
131
+  import {
132
+    GDSTATE
133
+  } from "../../utils/enum.gdstate.js";
134
+  import {
135
+    ASSOCIATION_TYPES
136
+  } from "../../utils/enum.association_types.js";
137
+  import {
138
+    showAppraise,
139
+    openRecallModal,
140
+    openExecModal,
141
+    showJiaji,
142
+  } from "../../utils/index.js";
143
+  export default {
144
+    data() {
145
+      return {
146
+        debouncedChangeTab: null,
147
+        // 路由传参
148
+        queryParams: {},
149
+        // 关联类型
150
+        ASSOCIATION_TYPES,
151
+        // 选项卡
152
+        tabs: [],
153
+        // 当前选中的tab
154
+        selectedTab: 1,
155
+        // 标本信息、检查信息
156
+        info: {},
157
+        //底部按钮
158
+        btns: [],
159
+      };
160
+    },
161
+    computed: {
162
+      ...mapState('other', ["deptDisplay"]),
163
+    },
164
+    methods: {
165
+      init(queryParams) {
166
+        this.queryParams = queryParams;
167
+        let type = 0;
168
+        switch (queryParams.associationType) {
169
+          case 'inspect':
170
+            this.tabs = [{
171
+                id: 1,
172
+                name: '检查信息'
173
+              },
174
+              {
175
+                id: 3,
176
+                name: '过程信息'
177
+              },
178
+            ];
179
+            this.changeTab(1);
180
+            break;
181
+          case 'specimen':
182
+            this.tabs = [{
183
+                id: 2,
184
+                name: '标本信息'
185
+              },
186
+              {
187
+                id: 3,
188
+                name: '过程信息'
189
+              },
190
+            ];
191
+            this.changeTab(2);
192
+            break;
193
+        }
194
+
195
+      },
196
+      // 格式化时分秒
197
+      // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
198
+      formatTime(time) {
199
+        let timeStr = "";
200
+        if (time >= 0 && time < 60) {
201
+          // 秒
202
+          timeStr = time + "秒";
203
+        } else if (time >= 60 && time < 3600) {
204
+          // 分钟
205
+          timeStr = Math.floor(time / 60) + "分钟";
206
+        } else if (time >= 3600) {
207
+          // 时 + 分
208
+          let h = "";
209
+          let m = "";
210
+          h = Math.floor(time / 3600) + "小时";
211
+          m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
212
+          timeStr = h + m;
213
+        }
214
+        return timeStr;
215
+      },
216
+      // 计算流程信息耗时
217
+      filterTime(step) {
218
+        let num = 0;
219
+        step.forEach((e) => {
220
+          num += e.difTime;
221
+        });
222
+        return this.formatTime(num / 1000);
223
+      },
224
+      // 切换tab
225
+      changeTab(id) {
226
+        this.selectedTab = id;
227
+        switch (id) {
228
+          case 1:
229
+            this.getInspect(this.queryParams);
230
+            break;
231
+          case 2:
232
+            this.getSpecimen(this.queryParams);
233
+            break;
234
+          case 3:
235
+            break;
236
+        }
237
+      },
238
+      //获取检查信息数据
239
+      getInspect(queryParams) {
240
+        uni.showLoading({
241
+          mask: true,
242
+          title: '加载中',
243
+        })
244
+        reqFetchData('api', 'inspect', queryParams.id).then(res => {
245
+          uni.hideLoading();
246
+          if (res.status == 200) {
247
+            // 工单信息
248
+            this.info = res.data;
249
+            //底部按钮处理
250
+            this.btns = [{
251
+              name: "返回",
252
+              type: "default",
253
+              click: () => {
254
+                uni.navigateBack();
255
+              },
256
+            }];
257
+          } else {
258
+            this.btns = [{
259
+              name: "回到列表",
260
+              type: "default",
261
+              click: () => {
262
+                uni.navigateTo({
263
+                  url: "/pages/orderList/orderList",
264
+                });
265
+              },
266
+            }, ];
267
+            this.$refs.seiminModel.show({
268
+              skin: 'toast',
269
+              icon: 'error',
270
+              content: '请求失败',
271
+            })
272
+          }
273
+        })
274
+      },
275
+      //获取标本信息数据
276
+      getSpecimen(queryParams) {
277
+        uni.showLoading({
278
+          mask: true,
279
+          title: '加载中',
280
+        })
281
+        reqFetchData('api', 'specimen', queryParams.id).then(res => {
282
+          uni.hideLoading();
283
+          if (res.status == 200) {
284
+            // 流程信息
285
+            this.info = res.data;
286
+            //底部按钮处理
287
+            this.btns = [{
288
+              name: "返回",
289
+              type: "default",
290
+              click: () => {
291
+                uni.navigateBack();
292
+              },
293
+            }];
294
+          } else {
295
+            //底部按钮处理
296
+            this.btns = [{
297
+              name: "返回",
298
+              type: "default",
299
+              click: () => {
300
+                uni.navigateBack();
301
+              },
302
+            }];
303
+            this.$refs.seiminModel.show({
304
+              skin: 'toast',
305
+              icon: 'error',
306
+              content: '请求失败',
307
+            })
308
+          }
309
+        })
310
+      },
311
+    },
312
+    onLoad(queryParams) {
313
+      console.log(queryParams);
314
+      this.init(queryParams);
315
+    },
316
+    created() {
317
+      this.debouncedChangeTab = debounce(this.changeTab, 166);
318
+    },
319
+    beforeDestroy() {
320
+      this.debouncedChangeTab.cancel()
321
+    }
322
+  }
323
+</script>
324
+
325
+<style lang="scss" scoped>
326
+  .orderDetail {
327
+    padding-bottom: 108rpx;
328
+
329
+    // 头部
330
+    .orderDetail_header {
331
+      position: fixed;
332
+      z-index: 98;
333
+      width: 100%;
334
+      height: 88rpx;
335
+      background-color: #fff;
336
+      color: #333;
337
+      @include flex;
338
+
339
+      .orderDetail_header_item {
340
+        flex: 1;
341
+        font-size: 32rpx;
342
+        @include border(right);
343
+        @include border(bottom);
344
+        @include flex(center, center);
345
+
346
+        &:last-of-type {
347
+          border-right: none;
348
+        }
349
+
350
+        &.active {
351
+          color: $defaultColor;
352
+          border-bottom: 4rpx solid $defaultColor;
353
+        }
354
+      }
355
+    }
356
+
357
+    // tab
358
+    // 工单详情
359
+    .orderDetail_info {
360
+      padding: 108rpx 24rpx 0;
361
+
362
+      .orderDetail_infoItem {
363
+        width: 702rpx;
364
+        height: calc(100vh - 340rpx);
365
+        background-color: #fff;
366
+        margin-top: 8rpx;
367
+        border-radius: 8rpx;
368
+        position: relative;
369
+        padding: 0 24rpx;
370
+        font-size: 32rpx;
371
+        @include border;
372
+        @include semicircle(#f9fafb, 82rpx);
373
+        @include flex(flex-start, stretch, column);
374
+
375
+        .ji,
376
+        .jiaji {
377
+          width: 60rpx;
378
+          position: absolute;
379
+          right: 0;
380
+          top: 0;
381
+        }
382
+
383
+        .orderDetail_infoItem_header {
384
+          height: 86rpx;
385
+          @include border($directive:bottom, $style:dashed);
386
+          @include flex(space-between, center);
387
+
388
+          .orderDetail_infoItem_header_title {
389
+            color: #333;
390
+            flex: 1;
391
+            @include flex(flex-start, center);
392
+
393
+            .icon {
394
+              width: 10rpx;
395
+              height: 46rpx;
396
+              border-radius: 2rpx;
397
+              background-color: #F0F6ED;
398
+              @include btn_background;
399
+            }
400
+
401
+            .taskNameAndWorkerName {
402
+              flex: 1;
403
+              @include flex;
404
+
405
+              .taskName {
406
+                max-width: 10em;
407
+                margin-left: 8rpx;
408
+                font-size: 38rpx;
409
+                font-weight: bold;
410
+                @include clamp;
411
+              }
412
+            }
413
+          }
414
+
415
+          .orderDetail_infoItem_header_more {
416
+            color: #333;
417
+            font-weight: bold;
418
+            font-size: 38rpx;
419
+            @include clamp;
420
+          }
421
+        }
422
+
423
+        .orderDetail_infoItem_item {
424
+          padding-top: 12rpx;
425
+          padding-bottom: 12rpx;
426
+          color: #333;
427
+          font-size: 30rpx;
428
+          flex: 1;
429
+          @include border(bottom);
430
+          @include flex(flex-start, stretch, column);
431
+
432
+          &.process {
433
+            padding-top: 90rpx;
434
+            padding-bottom: 90rpx;
435
+          }
436
+
437
+          &:last-of-type {
438
+            border-bottom: none;
439
+          }
440
+
441
+          // 工单信息
442
+          .orderDetail_infoItem_item_content {
443
+            margin-top: 20rpx;
444
+            @include flex(space-between, stretch);
445
+
446
+            .orderDetail_infoItem_item_name {
447
+              font-size: 34rpx;
448
+              color: #666;
449
+              max-width: 4em;
450
+            }
451
+
452
+            .orderDetail_infoItem_item_value {
453
+              font-size: 38rpx;
454
+              color: #333;
455
+              font-weight: bold;
456
+              max-width: 420rpx;
457
+              text-align: justify;
458
+              word-break: break-all;
459
+            }
460
+          }
461
+
462
+          // 流程信息
463
+          .orderDetail_process_item {
464
+            min-height: 120rpx;
465
+            line-height: 50rpx;
466
+            color: #333;
467
+            @include flex(center);
468
+
469
+            &:last-of-type {
470
+              .step_icon {
471
+                &::after {
472
+                  display: none;
473
+                }
474
+              }
475
+            }
476
+
477
+            .step_infoStart {
478
+              font-size: 28rpx;
479
+              flex: 1;
480
+              @include flex(flex-end);
481
+
482
+              .step_time {
483
+                margin-left: 16rpx;
484
+              }
485
+            }
486
+
487
+            .step_icon {
488
+              font-size: 38rpx;
489
+              margin-left: 30rpx;
490
+              margin-right: 30rpx;
491
+              position: relative;
492
+              color: #E5E9ED;
493
+
494
+              &.active {
495
+                color: #07863C;
496
+              }
497
+
498
+              &::after {
499
+                content: '';
500
+                position: absolute;
501
+                top: 60rpx;
502
+                left: 18rpx;
503
+                width: 1px;
504
+                height: calc(100% - 70rpx);
505
+                background-color: #DDE1E5;
506
+              }
507
+            }
508
+
509
+            .step_infoEnd {
510
+              font-size: 34rpx;
511
+              flex: 1;
512
+              padding-bottom: 16rpx;
513
+            }
514
+          }
515
+
516
+          // 业务信息-检查
517
+          &.business_inspect {
518
+            .inspect_info {
519
+              font-size: 34rpx;
520
+              color: #333;
521
+              padding-top: 20rpx;
522
+              padding-bottom: 20rpx;
523
+              @include border($directive:bottom, $style:dashed);
524
+
525
+              .inspect_info_block {
526
+                height: 60rpx;
527
+                @include flex(space-between, center);
528
+
529
+                .inspect_info_left {
530
+                  @include flex;
531
+
532
+                  .inspect_info_icon {
533
+                    width: 50rpx;
534
+                    height: 50rpx;
535
+                    line-height: 50rpx;
536
+                    background-color: #FFE8EB;
537
+                    border-radius: 50%;
538
+                    border: 1px solid #FF3B53;
539
+                    color: #FF3B53;
540
+                    font-size: 28rpx;
541
+                    margin-right: 8rpx;
542
+                    @include flex(center, center);
543
+
544
+                    &.green {
545
+                      border: 1px solid $defaultColor;
546
+                      background-color: rgba(73, 184, 86, 0.1);
547
+                    }
548
+                  }
549
+
550
+                  .inspect_info_name {
551
+                    font-weight: bold;
552
+                  }
553
+                }
554
+
555
+                .inspect_info_right {
556
+                  font-weight: bold;
557
+                }
558
+              }
559
+            }
560
+
561
+            .inspect_item {
562
+              color: #333;
563
+              font-size: 34rpx;
564
+              line-height: 48rpx;
565
+              padding-top: 26rpx;
566
+              padding-bottom: 26rpx;
567
+              @include border($directive:bottom, $style:dashed);
568
+
569
+              .inspect_item_name {
570
+                font-weight: bold;
571
+              }
572
+
573
+              .inspect_item_yytime {
574
+                font-weight: bold;
575
+              }
576
+
577
+              .inspect_item_info {
578
+                margin-top: 16rpx;
579
+                margin-bottom: 16rpx;
580
+                @include flex(space-between, center);
581
+
582
+                .inspect_item_dept {
583
+                  flex: 1;
584
+                  word-break: break-all;
585
+                  @include clamp;
586
+                }
587
+
588
+                .inspect_item_number {
589
+                  flex: 1;
590
+                  text-align: right;
591
+                  word-break: break-all;
592
+                  @include clamp;
593
+                }
594
+              }
595
+            }
596
+          }
597
+
598
+          // 业务信息-标本
599
+          &.business_specimen {
600
+            font-size: 34rpx;
601
+
602
+            .th {
603
+              background-color: red;
604
+              @include btn_background;
605
+
606
+              th {
607
+                color: #fff;
608
+              }
609
+            }
610
+
611
+            .td {
612
+              position: relative;
613
+
614
+              .urgent {
615
+                width: 60rpx;
616
+                position: absolute !important;
617
+                right: 0;
618
+                top: 0;
619
+              }
620
+            }
621
+
622
+            .table--border {
623
+              border: none;
624
+            }
625
+
626
+            ::v-deep .uni-table {
627
+              min-width: 0;
628
+            }
629
+
630
+            ::v-deep .uni-table-td {
631
+              word-break: break-all;
632
+            }
633
+          }
634
+
635
+          // 业务信息-药品
636
+          &.business_drugsBag {
637
+            .drugsBag_item {
638
+              color: #333;
639
+              font-size: 34rpx;
640
+              margin-top: 20rpx;
641
+              @include flex(space-between, center);
642
+
643
+              .drugsBag_item_name {}
644
+
645
+              .drugsBag_item_value {
646
+                font-weight: bold;
647
+              }
648
+            }
649
+          }
650
+        }
651
+      }
652
+    }
653
+  }
654
+</style>

+ 10 - 2
pages/orderDetail/orderDetail.vue

@@ -196,7 +196,8 @@
196 196
           </view>
197 197
           <!-- 检查信息 -->
198 198
           <block v-if="orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务']">
199
-            <view class="inspect_item" v-for="item in orderInfo.checkList" :key="item.id">
199
+            <view class="inspect_item" v-for="item in orderInfo.checkList" :key="item.id"
200
+              @click="toDetail(item.id,orderInfo.taskType.associationType.value)">
200 201
               <view class="inspect_item_name">
201 202
                 {{item.inspectName||'暂无'}}
202 203
               </view>
@@ -227,7 +228,8 @@
227 228
                 <uni-th align="center" width="71">科室</uni-th>
228 229
               </uni-tr>
229 230
               <!-- 表格数据行 -->
230
-              <uni-tr v-for="data in orderInfo.specimenSet" :key="data.id">
231
+              <uni-tr v-for="data in orderInfo.specimenSet" :key="data.id"
232
+                @click.native="toDetail(data.id,orderInfo.taskType.associationType.value)">
231 233
                 <uni-td align="center">{{data.stype?data.stype.name:'暂无'}}</uni-td>
232 234
                 <uni-td align="center">{{data.scode || '暂无'}}</uni-td>
233 235
                 <uni-td align="center">{{data.speState?data.speState.name:'暂无'}}</uni-td>
@@ -373,6 +375,12 @@
373 375
         this.queryParams = queryParams;
374 376
         this.changeTab(1);
375 377
       },
378
+      // 跳转详情
379
+      toDetail(id, associationType) {
380
+        uni.navigateTo({
381
+          url: `/pages/detail/detail?id=${id}&associationType=${associationType}`
382
+        })
383
+      },
376 384
       // 格式化时分秒
377 385
       // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
378 386
       formatTime(time) {