Explorar o código

在系统管理中增加护士端科室显示选择

seimin %!s(int64=3) %!d(string=hai) anos
pai
achega
893ccd2456

+ 7 - 7
package-lock.json

@@ -2608,9 +2608,9 @@
2608 2608
       }
2609 2609
     },
2610 2610
     "core-js": {
2611
-      "version": "3.16.4",
2612
-      "resolved": "https://registry.nlark.com/core-js/download/core-js-3.16.4.tgz",
2613
-      "integrity": "sha1-D7ECmlVPwmiMCWPXyQDhiBiKeOA="
2611
+      "version": "3.17.2",
2612
+      "resolved": "https://registry.nlark.com/core-js/download/core-js-3.17.2.tgz",
2613
+      "integrity": "sha1-+WDq5xDcYsKcypPVMy42YOKJ2xA="
2614 2614
     },
2615 2615
     "core-util-is": {
2616 2616
       "version": "1.0.2",
@@ -2779,9 +2779,9 @@
2779 2779
       }
2780 2780
     },
2781 2781
     "datatables.net": {
2782
-      "version": "1.10.25",
2783
-      "resolved": "https://registry.nlark.com/datatables.net/download/datatables.net-1.10.25.tgz",
2784
-      "integrity": "sha1-/AOiOeCPkdHWS6EBqlTa9AhtFiw=",
2782
+      "version": "1.11.2",
2783
+      "resolved": "https://registry.nlark.com/datatables.net/download/datatables.net-1.11.2.tgz",
2784
+      "integrity": "sha1-AZs3zaNdIgh6ZfmDr6ToduuSAuM=",
2785 2785
       "requires": {
2786 2786
         "jquery": ">=1.7"
2787 2787
       }
@@ -5244,7 +5244,7 @@
5244 5244
     },
5245 5245
     "jquery": {
5246 5246
       "version": "3.6.0",
5247
-      "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.6.0.tgz?cache=0&sync_timestamp=1614705838607&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjquery%2Fdownload%2Fjquery-3.6.0.tgz",
5247
+      "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.6.0.tgz",
5248 5248
       "integrity": "sha1-xyoJ8Vwb3OFC9J2/EXC9+K2sJHA="
5249 5249
     },
5250 5250
     "js-tokens": {

+ 2 - 2
package.json

@@ -24,9 +24,9 @@
24 24
     "@angular/router": "~8.1.1",
25 25
     "@types/crypto-js": "^3.1.47",
26 26
     "@types/overlayscrollbars": "^1.12.1",
27
-    "core-js": "^3.16.4",
27
+    "core-js": "^3.17.2",
28 28
     "crypto-js": "^3.3.0",
29
-    "datatables.net": "^1.10.25",
29
+    "datatables.net": "^1.11.2",
30 30
     "date-fns": "^2.23.0",
31 31
     "echarts": "^4.6.0",
32 32
     "ng-zorro-antd": "^8.5.2",

+ 15 - 1
src/app/services/tool.service.ts

@@ -1,10 +1,11 @@
1 1
 import { Injectable } from "@angular/core";
2
+import { MainService } from "./main.service";
2 3
 
3 4
 @Injectable({
4 5
   providedIn: "root",
5 6
 })
6 7
 export class ToolService {
7
-  constructor() {}
8
+  constructor(private mainService: MainService) {}
8 9
   // 获取权限中的院区
9 10
   getHospitalList() {
10 11
     return (
@@ -95,4 +96,17 @@ export class ToolService {
95 96
     console.log(coopBtns);
96 97
     return coopBtns;
97 98
   }
99
+  // 获取护士端是否使用科室别名的系统配置
100
+  getDeptDisplay() {
101
+    let postData = {
102
+      idx: 0,
103
+      sum: 1,
104
+      systemConfiguration: { keyconfig: "deptDisplay" },
105
+    };
106
+    return this.mainService.getFetchDataList(
107
+      "simple/data",
108
+      "systemConfiguration",
109
+      postData
110
+    );
111
+  }
98 112
 }

+ 6 - 2
src/app/share/detail-drug/detail-drug.component.html

@@ -11,8 +11,12 @@
11 11
         <div nz-col nzSpan="8">工单日期:{{orderInfo.startTime}}</div>
12 12
         <div nz-col nzSpan="8">总耗时:{{orderInfo.showTimeNum}}</div>
13 13
         <div nz-col nzSpan="8">申请类型:{{orderInfo.taskType?orderInfo.taskType.taskName:''}}</div>
14
-        <div nz-col nzSpan="8">申请科室:{{orderInfo.createDeptDTO?orderInfo.createDeptDTO.dept:''}}</div>
15
-        <div nz-col nzSpan="8">目标科室:{{(orderInfo.endDepts&&orderInfo.endDepts[0])?orderInfo.endDepts[0].dept:''}}</div>
14
+        <div nz-col nzSpan="8">
15
+          申请科室:{{orderInfo.createDeptDTO?(!showCoop&&deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept):'-'}}
16
+        </div>
17
+        <div nz-col nzSpan="8">
18
+          目标科室:{{(orderInfo.endDepts&&orderInfo.endDepts[0])?(!showCoop&&deptDisplay==2?orderInfo.endDepts[0].deptalias:orderInfo.endDepts[0].dept):''}}
19
+        </div>
16 20
         <div nz-col nzSpan="8" *ngIf="orderInfo.worker">支助人员信息:{{orderInfo.worker.name}}</div>
17 21
         <div nz-col nzSpan="8" *ngIf="orderInfo.drugs">药包编码:{{orderInfo.drugs.packid}}</div>
18 22
         <div nz-col nzSpan="8" *ngIf="orderInfo.staticDistri">药包编码:{{orderInfo.staticDistri.packid}}</div>

+ 92 - 84
src/app/share/detail-drug/detail-drug.component.ts

@@ -1,67 +1,74 @@
1
-import { Component, OnInit } 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';
1
+import { Component, OnInit } 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";
6 7
 
7 8
 @Component({
8
-  selector: 'app-detail-drug',
9
-  templateUrl: './detail-drug.component.html',
10
-  styleUrls: ['./detail-drug.component.less']
9
+  selector: "app-detail-drug",
10
+  templateUrl: "./detail-drug.component.html",
11
+  styleUrls: ["./detail-drug.component.less"],
11 12
 })
12 13
 export class DetailDrugComponent implements OnInit {
13
-
14 14
   constructor(
15 15
     private message: NzMessageService,
16 16
     private route: ActivatedRoute,
17 17
     private router: Router,
18
+    private tool: ToolService,
18 19
     private mainService: MainService
19
-  ) { }
20
+  ) {}
20 21
 
21
-  id: number;//工单id
22
-  orderInfo: any;//工单详情信息
23
-  showCoop: boolean = true;//是否展示详情页操作按钮
22
+  id: number; //工单id
23
+  orderInfo: any; //工单详情信息
24
+  showCoop: boolean = true; //是否展示详情页操作按钮
24 25
 
25
-  promptContent: string;//操作提示框提示信息
26
-  ifSuccess: boolean;//操作成功/失败
27
-  promptInfo: string;//操作结果提示信息
28
-  promptModalShow: boolean;//是否展示提示框
26
+  promptContent: string; //操作提示框提示信息
27
+  ifSuccess: boolean; //操作成功/失败
28
+  promptInfo: string; //操作结果提示信息
29
+  promptModalShow: boolean; //是否展示提示框
29 30
 
30
-  urgentLoading: boolean = false;//确认加急按钮loading状态
31
-  recLoading: boolean = false;//撤回并删除按钮loading状态
32
-  btnLoading: boolean = false;//确认按钮loading状态
31
+  urgentLoading: boolean = false; //确认加急按钮loading状态
32
+  recLoading: boolean = false; //撤回并删除按钮loading状态
33
+  btnLoading: boolean = false; //确认按钮loading状态
33 34
   maskFlag: any = false;
34
-
35
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
35 36
   ngOnInit() {
36
-    if (this.route.snapshot.parent.parent.routeConfig.path == 'nurse') {
37
+    this.tool.getDeptDisplay().subscribe((result) => {
38
+      if (result.status == 200) {
39
+        this.deptDisplay = result.list[0].valueconfig;
40
+      }
41
+    });
42
+    if (this.route.snapshot.parent.parent.routeConfig.path == "nurse") {
37 43
       this.showCoop = false;
38 44
     }
39
-    this.id = +this.route.snapshot.paramMap.get('id');
45
+    this.id = +this.route.snapshot.paramMap.get("id");
40 46
     let log$ = this.getLog();
41 47
     let detail$ = this.getDetail();
42
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
43
-    forkJoin(log$, detail$).subscribe(res => {
48
+    this.maskFlag = this.message.loading("正在加载中..", {
49
+      nzDuration: 0,
50
+    }).messageId;
51
+    forkJoin(log$, detail$).subscribe((res) => {
44 52
       this.message.remove(this.maskFlag);
45 53
       this.maskFlag = false;
46 54
       // getLog
47
-      this.logList = res[0]['data'];
55
+      this.logList = res[0]["data"];
48 56
       // getDetail
49
-      this.orderInfo = res[1]['data'];
50
-    })
57
+      this.orderInfo = res[1]["data"];
58
+    });
51 59
   }
52 60
 
53 61
   // 获取工单详情
54 62
   getDetail() {
55
-    return this.mainService.getApiFetchData('workOrder', this.id);
63
+    return this.mainService.getApiFetchData("workOrder", this.id);
56 64
   }
57 65
 
58 66
   // 关闭弹框
59 67
   close() {
60 68
     // this.router.navigateByUrl('dispatchingDesk');
61
-    history.go(-1)
69
+    history.go(-1);
62 70
   }
63 71
 
64
-
65 72
   // 加急
66 73
   urgent() {
67 74
     let that = this;
@@ -70,28 +77,35 @@ export class DetailDrugComponent implements OnInit {
70 77
       urgentDetails: {
71 78
         workerOrder: that.id,
72 79
         checkStatus: { id: 330 },
73
-        urgentReason: that.orderInfo['urgentDetails']['urgentReason'],
74
-        id: that.orderInfo['urgentDetails']['id']
75
-      }
76
-    }
77
-    that.mainService.postCustom('workerOrder', 'urge', postData).subscribe(data => {
78
-      console.log(data);
79
-      that.urgentLoading = false;
80
-      if (data.status == 200) {
81
-        that.showPromptModal('加急', true, '');
82
-      } else {
83
-        that.showPromptModal('加急', false, data.msg);
84
-      }
85
-    })
80
+        urgentReason: that.orderInfo["urgentDetails"]["urgentReason"],
81
+        id: that.orderInfo["urgentDetails"]["id"],
82
+      },
83
+    };
84
+    that.mainService
85
+      .postCustom("workerOrder", "urge", postData)
86
+      .subscribe((data) => {
87
+        console.log(data);
88
+        that.urgentLoading = false;
89
+        if (data.status == 200) {
90
+          that.showPromptModal("加急", true, "");
91
+        } else {
92
+          that.showPromptModal("加急", false, data.msg);
93
+        }
94
+      });
86 95
   }
87 96
 
88 97
   // 派单
89 98
   allotWorker() {
90
-    this.router.navigateByUrl('dispatchingDesk/allotWorker/' + this.id + '/' + this.orderInfo['gdState']['id']);
99
+    this.router.navigateByUrl(
100
+      "dispatchingDesk/allotWorker/" +
101
+        this.id +
102
+        "/" +
103
+        this.orderInfo["gdState"]["id"]
104
+    );
91 105
   }
92 106
 
93 107
   // 获取工单历史记录
94
-  logList = [];//工单历史记录
108
+  logList = []; //工单历史记录
95 109
   getLog() {
96 110
     return this.mainService.getWorkOrderLog(this.id);
97 111
   }
@@ -107,33 +121,35 @@ export class DetailDrugComponent implements OnInit {
107 121
     that.btnLoading = true;
108 122
     let postData = {
109 123
       workOrder: {
110
-        id: that.id
111
-      }
112
-    }
113
-    that.mainService.coopWorkerOrder('excuteWorkOrder/recall', postData).subscribe(data => {
114
-      that.btnLoading = false;
115
-      that.closeRecallOrderModal()
116
-      if (data.status == 200) {
117
-        that.showPromptModal('撤回', true, '');
118
-      } else {
119
-        that.showPromptModal('撤回', false, data.msg);
120
-      }
121
-    })
124
+        id: that.id,
125
+      },
126
+    };
127
+    that.mainService
128
+      .coopWorkerOrder("excuteWorkOrder/recall", postData)
129
+      .subscribe((data) => {
130
+        that.btnLoading = false;
131
+        that.closeRecallOrderModal();
132
+        if (data.status == 200) {
133
+          that.showPromptModal("撤回", true, "");
134
+        } else {
135
+          that.showPromptModal("撤回", false, data.msg);
136
+        }
137
+      });
122 138
   }
123 139
   // 撤回并删除
124 140
   recAndDel() {
125 141
     let that = this;
126 142
     that.recLoading = true;
127
-    that.mainService.delOrder(that.id).subscribe(data => {
143
+    that.mainService.delOrder(that.id).subscribe((data) => {
128 144
       console.log(data);
129 145
       that.recLoading = false;
130
-      that.closeDelOrderModal()
146
+      that.closeDelOrderModal();
131 147
       if (data.status == 200) {
132
-        that.showPromptModal('删除', true, '');
148
+        that.showPromptModal("删除", true, "");
133 149
       } else {
134
-        that.showPromptModal('删除', false, data.msg);
150
+        that.showPromptModal("删除", false, data.msg);
135 151
       }
136
-    })
152
+    });
137 153
   }
138 154
   // 关闭撤回弹框
139 155
   closeRecallOrderModal() {
@@ -150,15 +166,15 @@ export class DetailDrugComponent implements OnInit {
150 166
   confirmDel() {
151 167
     let that = this;
152 168
     that.btnLoading = true;
153
-    that.mainService.delOrder(that.id).subscribe(data => {
169
+    that.mainService.delOrder(that.id).subscribe((data) => {
154 170
       that.btnLoading = false;
155
-      that.closeDelOrderModal()
171
+      that.closeDelOrderModal();
156 172
       if (data.status == 200) {
157
-        that.showPromptModal('删除', true, '');
173
+        that.showPromptModal("删除", true, "");
158 174
       } else {
159
-        that.showPromptModal('删除', false, data.msg);
175
+        that.showPromptModal("删除", false, data.msg);
160 176
       }
161
-    })
177
+    });
162 178
   }
163 179
 
164 180
   // 关闭模态框
@@ -166,9 +182,6 @@ export class DetailDrugComponent implements OnInit {
166 182
     this.delOrderShow = false;
167 183
   }
168 184
 
169
-
170
-
171
-
172 185
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
173 186
   showPromptModal(con, success, promptInfo?) {
174 187
     this.promptModalShow = false;
@@ -180,27 +193,22 @@ export class DetailDrugComponent implements OnInit {
180 193
     }, 100);
181 194
   }
182 195
 
183
-
184
-
185
-
186
-
187
-
188 196
   // 格式化时分秒
189 197
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
190 198
   formatTime(time) {
191
-    let timeStr = '';
199
+    let timeStr = "";
192 200
     if (time >= 0 && time < 60) {
193 201
       // 秒
194
-      timeStr = time + '秒';
202
+      timeStr = time + "秒";
195 203
     } else if (time >= 60 && time < 3600) {
196 204
       // 分钟
197
-      timeStr = Math.floor(time / 60) + '分钟'
205
+      timeStr = Math.floor(time / 60) + "分钟";
198 206
     } else if (time >= 3600) {
199 207
       // 时 + 分
200
-      let h = '';
201
-      let m = '';
202
-      h = Math.floor(time / 3600) + '小时';
203
-      m = (time % 3600) >= 60 ? Math.floor((time % 3600) / 60) + '分钟' : '';
208
+      let h = "";
209
+      let m = "";
210
+      h = Math.floor(time / 3600) + "小时";
211
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
204 212
       timeStr = h + m;
205 213
     }
206 214
     return timeStr;
@@ -210,7 +218,7 @@ export class DetailDrugComponent implements OnInit {
210 218
   filterTime(step) {
211 219
     // step = [{ difTime: 2 }, { difTime: 6 }]
212 220
     let num = 0;
213
-    step.forEach(e => {
221
+    step.forEach((e) => {
214 222
       num += e.difTime;
215 223
     });
216 224
     return this.formatTime(num / 1000);

+ 3 - 1
src/app/share/detail-others/detail-others.component.html

@@ -11,7 +11,9 @@
11 11
         <div nz-col nzSpan="8">工单日期:{{orderInfo.startTime}}</div>
12 12
         <div nz-col nzSpan="8">总耗时:{{orderInfo.showTimeNum}}</div>
13 13
         <div nz-col nzSpan="8">申请类型:{{orderInfo.taskType.taskName}}</div>
14
-        <div nz-col nzSpan="8">申请科室:{{orderInfo.createDeptDTO?orderInfo.createDeptDTO.dept:'-'}}</div>
14
+        <div nz-col nzSpan="8">
15
+          申请科室:{{orderInfo.createDeptDTO?(!showCoop&&deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept):'-'}}
16
+        </div>
15 17
         <div nz-col nzSpan="8">目标科室:{{endDepts}}</div>
16 18
         <div nz-col nzSpan="8" *ngIf="orderInfo.worker">支助人员信息:{{orderInfo.worker.name}}</div>
17 19
         <div nz-col nzSpan="24" *ngIf="orderInfo.workOrderRemark">备注信息:{{orderInfo.workOrderRemark}}

+ 99 - 82
src/app/share/detail-others/detail-others.component.ts

@@ -1,59 +1,73 @@
1
-import { Component, OnInit } 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';
1
+import { Component, OnInit } 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";
6 7
 
7 8
 @Component({
8
-  selector: 'app-detail-others',
9
-  templateUrl: './detail-others.component.html',
10
-  styleUrls: ['./detail-others.component.less']
9
+  selector: "app-detail-others",
10
+  templateUrl: "./detail-others.component.html",
11
+  styleUrls: ["./detail-others.component.less"],
11 12
 })
12 13
 export class DetailOthersComponent implements OnInit {
13
-
14 14
   constructor(
15 15
     private message: NzMessageService,
16 16
     private route: ActivatedRoute,
17 17
     private router: Router,
18
-    private mainService: MainService) { }
19
-
20
-  id: number;//工单id
21
-  orderInfo: any;//工单详情信息
22
-  endDepts = '';//工单详情目标科室
23
-  showCoop: boolean = true;//是否展示详情页操作按钮
24
-
25
-  promptContent: string;//操作提示框提示信息
26
-  ifSuccess: boolean;//操作成功/失败
27
-  promptInfo: string;//操作结果提示信息
28
-  promptModalShow: boolean;//是否展示提示框
29
-
30
-  urgentLoading: boolean = false;//确认加急按钮loading状态
31
-  recLoading: boolean = false;//撤回并删除按钮loading状态
32
-  btnLoading: boolean = false;//确认按钮loading状态
18
+    private tool: ToolService,
19
+    private mainService: MainService
20
+  ) {}
21
+
22
+  id: number; //工单id
23
+  orderInfo: any; //工单详情信息
24
+  endDepts = ""; //工单详情目标科室
25
+  showCoop: boolean = true; //是否展示详情页操作按钮
26
+
27
+  promptContent: string; //操作提示框提示信息
28
+  ifSuccess: boolean; //操作成功/失败
29
+  promptInfo: string; //操作结果提示信息
30
+  promptModalShow: boolean; //是否展示提示框
31
+
32
+  urgentLoading: boolean = false; //确认加急按钮loading状态
33
+  recLoading: boolean = false; //撤回并删除按钮loading状态
34
+  btnLoading: boolean = false; //确认按钮loading状态
33 35
   maskFlag: any = false;
36
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
34 37
 
35 38
   ngOnInit() {
36
-    if (this.route.snapshot.parent.parent.routeConfig.path == 'nurse') {
39
+    this.tool.getDeptDisplay().subscribe((result) => {
40
+      if (result.status == 200) {
41
+        this.deptDisplay = result.list[0].valueconfig;
42
+      }
43
+    });
44
+    if (this.route.snapshot.parent.parent.routeConfig.path == "nurse") {
37 45
       this.showCoop = false;
38 46
     }
39
-    this.id = +this.route.snapshot.paramMap.get('id');
47
+    this.id = +this.route.snapshot.paramMap.get("id");
40 48
     let log$ = this.getLog();
41 49
     let detail$ = this.getDetail();
42
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
43
-    forkJoin(log$, detail$).subscribe(res => {
50
+    this.maskFlag = this.message.loading("正在加载中..", {
51
+      nzDuration: 0,
52
+    }).messageId;
53
+    forkJoin(log$, detail$).subscribe((res) => {
44 54
       this.message.remove(this.maskFlag);
45 55
       this.maskFlag = false;
46 56
       // getLog
47
-      this.logList = res[0]['data'];
57
+      this.logList = res[0]["data"];
48 58
       // getDetail
49
-      this.orderInfo = res[1]['data'];
50
-      this.endDepts = res[1]['data'].endDepts.map(item => item.dept).join();
51
-    })
59
+      this.orderInfo = res[1]["data"];
60
+      this.endDepts = res[1]["data"].endDepts
61
+        .map((item) =>
62
+          (!this.showCoop && this.deptDisplay == 2) ? item.deptalias : item.dept
63
+        )
64
+        .join();
65
+    });
52 66
   }
53 67
 
54 68
   // 获取工单详情
55 69
   getDetail() {
56
-    return this.mainService.getApiFetchData('workOrder', this.id);
70
+    return this.mainService.getApiFetchData("workOrder", this.id);
57 71
   }
58 72
 
59 73
   // 确认加急
@@ -61,29 +75,29 @@ export class DetailOthersComponent implements OnInit {
61 75
     let that = this;
62 76
     that.urgentLoading = true;
63 77
     let postData = {
64
-      "urgentDetails": {
65
-        "workerOrder": this.orderInfo['id'],
66
-        "checkStatus": {
67
-          "id": 330
78
+      urgentDetails: {
79
+        workerOrder: this.orderInfo["id"],
80
+        checkStatus: {
81
+          id: 330,
68 82
         },
69
-        "urgentReason": this.orderInfo['urgentDetails'].urgentReason,
70
-        "id": this.orderInfo['urgentDetails'].id
71
-      }
72
-    }
73
-    that.mainService.coopWorkerOrder('urge', postData).subscribe(data => {
83
+        urgentReason: this.orderInfo["urgentDetails"].urgentReason,
84
+        id: this.orderInfo["urgentDetails"].id,
85
+      },
86
+    };
87
+    that.mainService.coopWorkerOrder("urge", postData).subscribe((data) => {
74 88
       that.urgentLoading = false;
75 89
       if (data.status == 200) {
76
-        that.showPromptModal('加急', true, '');
90
+        that.showPromptModal("加急", true, "");
77 91
       } else {
78
-        that.showPromptModal('加急', false, data.msg);
92
+        that.showPromptModal("加急", false, data.msg);
79 93
       }
80
-    })
94
+    });
81 95
   }
82 96
 
83 97
   // 关闭弹框
84 98
   close() {
85 99
     // this.router.navigateByUrl('dispatchingDesk');
86
-    history.go(-1)
100
+    history.go(-1);
87 101
   }
88 102
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
89 103
   showPromptModal(con, success, promptInfo?) {
@@ -96,14 +110,19 @@ export class DetailOthersComponent implements OnInit {
96 110
     }, 100);
97 111
   }
98 112
   // 获取工单历史记录
99
-  logList = [];//工单历史记录
113
+  logList = []; //工单历史记录
100 114
   getLog() {
101 115
     return this.mainService.getWorkOrderLog(this.id);
102 116
   }
103 117
 
104 118
   // 派单
105 119
   allotWorker() {
106
-    this.router.navigateByUrl('dispatchingDesk/allotWorker/' + this.id + '/' + this.orderInfo['gdState']['id']);
120
+    this.router.navigateByUrl(
121
+      "dispatchingDesk/allotWorker/" +
122
+        this.id +
123
+        "/" +
124
+        this.orderInfo["gdState"]["id"]
125
+    );
107 126
   }
108 127
 
109 128
   // 撤回
@@ -115,16 +134,16 @@ export class DetailOthersComponent implements OnInit {
115 134
   recAndDel() {
116 135
     let that = this;
117 136
     that.recLoading = true;
118
-    that.mainService.delOrder(that.id).subscribe(data => {
137
+    that.mainService.delOrder(that.id).subscribe((data) => {
119 138
       console.log(data);
120 139
       that.recLoading = false;
121
-      that.closeDelOrderModal()
140
+      that.closeDelOrderModal();
122 141
       if (data.status == 200) {
123
-        that.showPromptModal('删除', true, '');
142
+        that.showPromptModal("删除", true, "");
124 143
       } else {
125
-        that.showPromptModal('删除', false, data.msg);
144
+        that.showPromptModal("删除", false, data.msg);
126 145
       }
127
-    })
146
+    });
128 147
   }
129 148
   // 确认撤回
130 149
   confirmRec() {
@@ -132,25 +151,26 @@ export class DetailOthersComponent implements OnInit {
132 151
     that.btnLoading = true;
133 152
     let postData = {
134 153
       workOrder: {
135
-        id: that.id
136
-      }
137
-    }
138
-    that.mainService.coopWorkerOrder('excuteWorkOrder/recall', postData).subscribe(data => {
139
-      that.btnLoading = false;
140
-      that.closeRecallOrderModal()
141
-      if (data.status == 200) {
142
-        that.showPromptModal('撤回', true, '');
143
-      } else {
144
-        that.showPromptModal('撤回', false, data.msg);
145
-      }
146
-    })
154
+        id: that.id,
155
+      },
156
+    };
157
+    that.mainService
158
+      .coopWorkerOrder("excuteWorkOrder/recall", postData)
159
+      .subscribe((data) => {
160
+        that.btnLoading = false;
161
+        that.closeRecallOrderModal();
162
+        if (data.status == 200) {
163
+          that.showPromptModal("撤回", true, "");
164
+        } else {
165
+          that.showPromptModal("撤回", false, data.msg);
166
+        }
167
+      });
147 168
   }
148 169
   // 关闭撤回弹框
149 170
   closeRecallOrderModal() {
150 171
     this.recallOrderShow = false;
151 172
   }
152 173
 
153
-
154 174
   // 删除
155 175
   // 打开模态框
156 176
   delOrderShow: boolean = false;
@@ -161,15 +181,15 @@ export class DetailOthersComponent implements OnInit {
161 181
   confirmDel() {
162 182
     let that = this;
163 183
     that.btnLoading = true;
164
-    that.mainService.delOrder(that.id).subscribe(data => {
184
+    that.mainService.delOrder(that.id).subscribe((data) => {
165 185
       that.btnLoading = false;
166
-      that.closeDelOrderModal()
186
+      that.closeDelOrderModal();
167 187
       if (data.status == 200) {
168
-        that.showPromptModal('删除', true, '');
188
+        that.showPromptModal("删除", true, "");
169 189
       } else {
170
-        that.showPromptModal('删除', false, data.msg);
190
+        that.showPromptModal("删除", false, data.msg);
171 191
       }
172
-    })
192
+    });
173 193
   }
174 194
 
175 195
   // 关闭模态框
@@ -180,19 +200,19 @@ export class DetailOthersComponent implements OnInit {
180 200
   // 格式化时分秒
181 201
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
182 202
   formatTime(time) {
183
-    let timeStr = '';
203
+    let timeStr = "";
184 204
     if (time >= 0 && time < 60) {
185 205
       // 秒
186
-      timeStr = time + '秒';
206
+      timeStr = time + "秒";
187 207
     } else if (time >= 60 && time < 3600) {
188 208
       // 分钟
189
-      timeStr = Math.floor(time / 60) + '分钟'
209
+      timeStr = Math.floor(time / 60) + "分钟";
190 210
     } else if (time >= 3600) {
191 211
       // 时 + 分
192
-      let h = '';
193
-      let m = '';
194
-      h = Math.floor(time / 3600) + '小时';
195
-      m = (time % 3600) >= 60 ? Math.floor((time % 3600) / 60) + '分钟' : '';
212
+      let h = "";
213
+      let m = "";
214
+      h = Math.floor(time / 3600) + "小时";
215
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
196 216
       timeStr = h + m;
197 217
     }
198 218
     return timeStr;
@@ -202,12 +222,9 @@ export class DetailOthersComponent implements OnInit {
202 222
   filterTime(step) {
203 223
     // step = [{ difTime: 2 }, { difTime: 6 }]
204 224
     let num = 0;
205
-    step.forEach(e => {
225
+    step.forEach((e) => {
206 226
       num += e.difTime;
207 227
     });
208 228
     return this.formatTime(num / 1000);
209
-
210 229
   }
211
-
212
-
213 230
 }

+ 6 - 4
src/app/share/detail-patients/detail-patients.component.html

@@ -12,12 +12,14 @@
12 12
           <div nz-col nzSpan="8">工单日期:{{orderInfo.startTime}}</div>
13 13
           <div nz-col nzSpan="8">总耗时:{{orderInfo.showTimeNum}}</div>
14 14
           <div nz-col nzSpan="8">申请类型:{{orderInfo.taskType.taskName}}</div>
15
-          <div nz-col nzSpan="8">申请科室:{{orderInfo.createDeptDTO.dept}}</div>
15
+          <div nz-col nzSpan="8">
16
+            申请科室:{{orderInfo.createDeptDTO?(!showCoop&&deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept):'-'}}
17
+          </div>
16 18
           <div nz-col nzSpan="8" *ngIf="middleDept.length>0">中间科室:{{middleDept.join(',')}}</div>
17 19
           <div nz-col nzSpan="8">目标科室:
18 20
             <span *ngFor="let dep of orderInfo.endDepts;let i=index;">
19
-              <span *ngIf="i!=orderInfo.endDepts.length-1">{{dep.dept}},</span>
20
-              <span *ngIf="i==orderInfo.endDepts.length-1">{{dep.dept}}</span>
21
+              <span *ngIf="i!=orderInfo.endDepts.length-1">{{!showCoop&&deptDisplay==2?dep.deptalias:dep.dept}},</span>
22
+              <span *ngIf="i==orderInfo.endDepts.length-1">{{!showCoop&&deptDisplay==2?dep.deptalias:dep.dept}}</span>
21 23
             </span>
22 24
           </div>
23 25
           <div nz-col nzSpan="8">陪同情况:{{orderInfo.isAccompany==1?'需要医护陪同':'无需医护陪同'}}</div>
@@ -121,7 +123,7 @@
121 123
               <div nz-col nzSpan="8">
122 124
                 <p>
123 125
                   <span class="label">检查科室:</span>
124
-                  <span>{{item.execDept?item.execDept.dept:'-'}}</span>
126
+                  <span>{{item.execDept?(!showCoop&&deptDisplay==2?item.execDept.deptalias:item.execDept.dept):'-'}}</span>
125 127
                 </p>
126 128
               </div>
127 129
               <div nz-col nzSpan="8">

+ 116 - 89
src/app/share/detail-patients/detail-patients.component.ts

@@ -1,79 +1,101 @@
1
-import { Component, OnInit, ViewChild } from '@angular/core';
2
-import { ActivatedRoute, Router } from '@angular/router';
3
-import { MainService } from '../../services/main.service';
4
-import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
5
-import { NzMessageService } from 'ng-zorro-antd';
6
-import { forkJoin } from 'rxjs';
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { MainService } from "../../services/main.service";
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { NzMessageService } from "ng-zorro-antd";
6
+import { forkJoin } from "rxjs";
7
+import { ToolService } from "src/app/services/tool.service";
7 8
 
8 9
 @Component({
9
-  selector: 'app-detail-patients',
10
-  templateUrl: './detail-patients.component.html',
11
-  styleUrls: ['./detail-patients.component.less']
10
+  selector: "app-detail-patients",
11
+  templateUrl: "./detail-patients.component.html",
12
+  styleUrls: ["./detail-patients.component.less"],
12 13
 })
13 14
 export class DetailPatientsComponent implements OnInit {
14
-  @ViewChild('osComponentRef1', { read: OverlayScrollbarsComponent, static: false })
15
+  @ViewChild("osComponentRef1", {
16
+    read: OverlayScrollbarsComponent,
17
+    static: false,
18
+  })
15 19
   osComponentRef1: OverlayScrollbarsComponent;
16 20
   constructor(
17 21
     private message: NzMessageService,
18 22
     private route: ActivatedRoute,
19 23
     private router: Router,
20
-    private mainService: MainService) { }
24
+    private tool: ToolService,
25
+    private mainService: MainService
26
+  ) {}
21 27
 
22
-  id: number;//工单id
23
-  orderInfo: any;//工单详情信息
24
-  showCoop: boolean = true;//是否展示详情页操作按钮
28
+  id: number; //工单id
29
+  orderInfo: any; //工单详情信息
30
+  showCoop: boolean = true; //是否展示详情页操作按钮
25 31
 
26
-  promptContent: string;//操作提示框提示信息
27
-  ifSuccess: boolean;//操作成功/失败
28
-  promptInfo: string;//操作结果提示信息
29
-  promptModalShow: boolean;//是否展示提示框
32
+  promptContent: string; //操作提示框提示信息
33
+  ifSuccess: boolean; //操作成功/失败
34
+  promptInfo: string; //操作结果提示信息
35
+  promptModalShow: boolean; //是否展示提示框
30 36
 
31
-  urgentLoading: boolean = false;//确认加急按钮loading状态
32
-  recLoading: boolean = false;//撤回并删除按钮loading状态
33
-  btnLoading: boolean = false;//确认按钮loading状态
37
+  urgentLoading: boolean = false; //确认加急按钮loading状态
38
+  recLoading: boolean = false; //撤回并删除按钮loading状态
39
+  btnLoading: boolean = false; //确认按钮loading状态
34 40
   maskFlag: any = false;
41
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
35 42
   ngOnInit() {
36
-    if (this.route.snapshot.parent.parent.routeConfig.path == 'nurse') {
43
+    this.tool.getDeptDisplay().subscribe((result) => {
44
+      if (result.status == 200) {
45
+        this.deptDisplay = result.list[0].valueconfig;
46
+      }
47
+    });
48
+    if (this.route.snapshot.parent.parent.routeConfig.path == "nurse") {
37 49
       this.showCoop = false;
38 50
     }
39
-    this.id = +this.route.snapshot.paramMap.get('id');
51
+    this.id = +this.route.snapshot.paramMap.get("id");
40 52
     let log$ = this.getLog();
41 53
     let detail$ = this.getDetail();
42
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
43
-    forkJoin(log$, detail$).subscribe(res => {
54
+    this.maskFlag = this.message.loading("正在加载中..", {
55
+      nzDuration: 0,
56
+    }).messageId;
57
+    forkJoin(log$, detail$).subscribe((res) => {
44 58
       this.message.remove(this.maskFlag);
45 59
       this.maskFlag = false;
46 60
       // getLog
47
-      this.logList = res[0]['data'];
61
+      this.logList = res[0]["data"];
48 62
       // getDetail
49
-      this.orderInfo = res[1]['data'];
50
-      if (this.orderInfo['checkList'] && this.orderInfo['checkList'].length) {
63
+      this.orderInfo = res[1]["data"];
64
+      if (this.orderInfo["checkList"] && this.orderInfo["checkList"].length) {
51 65
         let arr = [];
52
-        let orderInfo = this.orderInfo['checkList'].filter(item => item.yyTime);
66
+        let orderInfo = this.orderInfo["checkList"].filter(
67
+          (item) => item.yyTime
68
+        );
53 69
         if (orderInfo.length) {
54
-          arr = orderInfo.map(item => [(new Date(item.yyTime)).getTime() - (new Date()).getTime(), item.yyTime]);
55
-          arr.sort((a, b) => (a - b));
56
-          this.orderInfo['yyTime'] = arr[0][1];
70
+          arr = orderInfo.map((item) => [
71
+            new Date(item.yyTime).getTime() - new Date().getTime(),
72
+            item.yyTime,
73
+          ]);
74
+          arr.sort((a, b) => a - b);
75
+          this.orderInfo["yyTime"] = arr[0][1];
57 76
         } else {
58
-          this.orderInfo['yyTime'] = '';
77
+          this.orderInfo["yyTime"] = "";
59 78
         }
60 79
       } else {
61
-        this.orderInfo['yyTime'] = '';
80
+        this.orderInfo["yyTime"] = "";
62 81
       }
63
-      if (res[1]['data'].middleDept) {
64
-        this.middleDept = res[1]['data'].middleDept.map(item => item.dept);
82
+      if (res[1]["data"].middleDept) {
83
+        this.middleDept = res[1]["data"].middleDept
84
+          .map((item) =>
85
+            !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
86
+          );
65 87
       } else {
66 88
         this.middleDept = [];
67 89
       }
68
-    })
90
+    });
69 91
   }
70 92
   // 获取工单详情
71
-  middleDept = [];//中间科室数组
93
+  middleDept = []; //中间科室数组
72 94
   getDetail() {
73
-    return this.mainService.getApiFetchData('workOrder', this.id);
95
+    return this.mainService.getApiFetchData("workOrder", this.id);
74 96
   }
75 97
   // 获取工单历史记录
76
-  logList = [];//工单历史记录
98
+  logList = []; //工单历史记录
77 99
   getLog() {
78 100
     return this.mainService.getWorkOrderLog(this.id);
79 101
   }
@@ -86,24 +108,31 @@ export class DetailPatientsComponent implements OnInit {
86 108
       urgentDetails: {
87 109
         workerOrder: that.id,
88 110
         checkStatus: { id: 330 },
89
-        urgentReason: that.orderInfo['urgentDetails']['urgentReason'],
90
-        id: that.orderInfo['urgentDetails']['id']
91
-      }
92
-    }
93
-    that.mainService.postCustom('workerOrder', 'urge', postData).subscribe(data => {
94
-      console.log(data);
95
-      that.urgentLoading = false;
96
-      if (data.status == 200) {
97
-        that.showPromptModal('加急', true, '');
98
-      } else {
99
-        that.showPromptModal('加急', false, data.msg);
100
-      }
101
-    })
111
+        urgentReason: that.orderInfo["urgentDetails"]["urgentReason"],
112
+        id: that.orderInfo["urgentDetails"]["id"],
113
+      },
114
+    };
115
+    that.mainService
116
+      .postCustom("workerOrder", "urge", postData)
117
+      .subscribe((data) => {
118
+        console.log(data);
119
+        that.urgentLoading = false;
120
+        if (data.status == 200) {
121
+          that.showPromptModal("加急", true, "");
122
+        } else {
123
+          that.showPromptModal("加急", false, data.msg);
124
+        }
125
+      });
102 126
   }
103 127
 
104 128
   // 派单
105 129
   allotWorker() {
106
-    this.router.navigateByUrl('dispatchingDesk/allotWorker/' + this.id + '/' + this.orderInfo['gdState']['id']);
130
+    this.router.navigateByUrl(
131
+      "dispatchingDesk/allotWorker/" +
132
+        this.id +
133
+        "/" +
134
+        this.orderInfo["gdState"]["id"]
135
+    );
107 136
   }
108 137
 
109 138
   // 撤回
@@ -117,33 +146,35 @@ export class DetailPatientsComponent implements OnInit {
117 146
     that.btnLoading = true;
118 147
     let postData = {
119 148
       workOrder: {
120
-        id: that.id
121
-      }
122
-    }
123
-    that.mainService.coopWorkerOrder('excuteWorkOrder/recall', postData).subscribe(data => {
124
-      that.btnLoading = false;
125
-      that.closeRecallOrderModal()
126
-      if (data.status == 200) {
127
-        that.showPromptModal('撤回', true, '');
128
-      } else {
129
-        that.showPromptModal('撤回', false, data.msg);
130
-      }
131
-    })
149
+        id: that.id,
150
+      },
151
+    };
152
+    that.mainService
153
+      .coopWorkerOrder("excuteWorkOrder/recall", postData)
154
+      .subscribe((data) => {
155
+        that.btnLoading = false;
156
+        that.closeRecallOrderModal();
157
+        if (data.status == 200) {
158
+          that.showPromptModal("撤回", true, "");
159
+        } else {
160
+          that.showPromptModal("撤回", false, data.msg);
161
+        }
162
+      });
132 163
   }
133 164
   // 撤回并删除
134 165
   recAndDel() {
135 166
     let that = this;
136 167
     that.recLoading = true;
137
-    that.mainService.delOrder(that.id).subscribe(data => {
168
+    that.mainService.delOrder(that.id).subscribe((data) => {
138 169
       console.log(data);
139 170
       that.recLoading = false;
140
-      that.closeDelOrderModal()
171
+      that.closeDelOrderModal();
141 172
       if (data.status == 200) {
142
-        that.showPromptModal('删除', true, '');
173
+        that.showPromptModal("删除", true, "");
143 174
       } else {
144
-        that.showPromptModal('删除', false, data.msg);
175
+        that.showPromptModal("删除", false, data.msg);
145 176
       }
146
-    })
177
+    });
147 178
   }
148 179
   // 关闭撤回弹框
149 180
   closeRecallOrderModal() {
@@ -153,7 +184,7 @@ export class DetailPatientsComponent implements OnInit {
153 184
   // 关闭弹框
154 185
   close() {
155 186
     // this.router.navigateByUrl('dispatchingDesk');
156
-    history.go(-1)
187
+    history.go(-1);
157 188
   }
158 189
 
159 190
   // 删除
@@ -166,15 +197,15 @@ export class DetailPatientsComponent implements OnInit {
166 197
   confirmDel() {
167 198
     let that = this;
168 199
     that.btnLoading = true;
169
-    that.mainService.delOrder(that.id).subscribe(data => {
170
-      that.closeDelOrderModal()
200
+    that.mainService.delOrder(that.id).subscribe((data) => {
201
+      that.closeDelOrderModal();
171 202
       that.btnLoading = false;
172 203
       if (data.status == 200) {
173
-        that.showPromptModal('删除', true, '');
204
+        that.showPromptModal("删除", true, "");
174 205
       } else {
175
-        that.showPromptModal('删除', false, data.msg);
206
+        that.showPromptModal("删除", false, data.msg);
176 207
       }
177
-    })
208
+    });
178 209
   }
179 210
 
180 211
   // 关闭模态框
@@ -182,9 +213,6 @@ export class DetailPatientsComponent implements OnInit {
182 213
     this.delOrderShow = false;
183 214
   }
184 215
 
185
-
186
-
187
-
188 216
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
189 217
   showPromptModal(con, success, promptInfo?) {
190 218
     this.promptModalShow = false;
@@ -199,19 +227,19 @@ export class DetailPatientsComponent implements OnInit {
199 227
   // 格式化时分秒
200 228
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
201 229
   formatTime(time) {
202
-    let timeStr = '';
230
+    let timeStr = "";
203 231
     if (time >= 0 && time < 60) {
204 232
       // 秒
205
-      timeStr = time + '秒';
233
+      timeStr = time + "秒";
206 234
     } else if (time >= 60 && time < 3600) {
207 235
       // 分钟
208
-      timeStr = Math.floor(time / 60) + '分钟'
236
+      timeStr = Math.floor(time / 60) + "分钟";
209 237
     } else if (time >= 3600) {
210 238
       // 时 + 分
211
-      let h = '';
212
-      let m = '';
213
-      h = Math.floor(time / 3600) + '小时';
214
-      m = (time % 3600) >= 60 ? Math.floor((time % 3600) / 60) + '分钟' : '';
239
+      let h = "";
240
+      let m = "";
241
+      h = Math.floor(time / 3600) + "小时";
242
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
215 243
       timeStr = h + m;
216 244
     }
217 245
     return timeStr;
@@ -221,10 +249,9 @@ export class DetailPatientsComponent implements OnInit {
221 249
   filterTime(step) {
222 250
     // step = [{ difTime: 2 }, { difTime: 6 }]
223 251
     let num = 0;
224
-    step.forEach(e => {
252
+    step.forEach((e) => {
225 253
       num += e.difTime;
226 254
     });
227 255
     return this.formatTime(num / 1000);
228 256
   }
229 257
 }
230
-

+ 4 - 2
src/app/share/detail-sample/detail-sample.component.html

@@ -13,7 +13,9 @@
13 13
         <div nz-col nzSpan="8">申请类型:{{orderInfo.taskType.taskName}}</div>
14 14
         <div nz-col nzSpan="8">预计接收:{{orderInfo.expectReceiveNum?orderInfo.expectReceiveNum:''}}</div>
15 15
 
16
-        <div nz-col nzSpan="8">申请科室:{{orderInfo.createDeptDTO.dept}}</div>
16
+        <div nz-col nzSpan="8">
17
+          申请科室:{{orderInfo.createDeptDTO?(!showCoop&&deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept):'-'}}
18
+        </div>
17 19
         <div nz-col nzSpan="8">目标科室:{{endDepts}}</div>
18 20
         <div nz-col nzSpan="8" *ngIf="orderInfo.worker">支助人员信息:{{orderInfo.worker.name}}</div>
19 21
         <div nz-col nzSpan="8">实际接收:{{orderInfo.actualReceiveNum?orderInfo.actualReceiveNum:''}}</div>
@@ -73,7 +75,7 @@
73 75
               <td>{{data.scode}}</td>
74 76
               <td>{{data.patientName}}</td>
75 77
               <td>{{data.bedNum}}</td>
76
-              <td>{{data.checkDept.dept}}</td>
78
+              <td>{{!showCoop&&deptDisplay==2?data.checkDept.deptalias:data.checkDept.dept}}</td>
77 79
               <td>{{data.received?"是":"否"}}</td>
78 80
               <td>{{data.arrived?"是":"否"}}</td>
79 81
               <td>{{data.arriveTime?data.arriveTime:'-'}}</td>

+ 99 - 81
src/app/share/detail-sample/detail-sample.component.ts

@@ -1,59 +1,72 @@
1
-import { Component, OnInit } 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
-
1
+import { Component, OnInit } 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 7
 
8 8
 @Component({
9
-  selector: 'app-detail-sample',
10
-  templateUrl: './detail-sample.component.html',
11
-  styleUrls: ['./detail-sample.component.less']
9
+  selector: "app-detail-sample",
10
+  templateUrl: "./detail-sample.component.html",
11
+  styleUrls: ["./detail-sample.component.less"],
12 12
 })
13 13
 export class DetailSampleComponent implements OnInit {
14
-
15 14
   constructor(
16 15
     private message: NzMessageService,
17 16
     private route: ActivatedRoute,
18 17
     private router: Router,
19
-    private mainService: MainService) { }
20
-
21
-  id: number;//工单id
22
-  orderInfo: any;//工单详情信息
23
-  endDepts = '';//工单详情目标科室
24
-  showCoop: boolean = true;//是否展示详情页操作按钮
25
-
26
-  promptContent: string;//操作提示框提示信息
27
-  ifSuccess: boolean;//操作成功/失败
28
-  promptInfo: string;//操作结果提示信息
29
-  promptModalShow: boolean;//是否展示提示框
30
-
31
-  urgentLoading: boolean = false;//确认加急按钮loading状态
32
-  recLoading: boolean = false;//撤回并删除按钮loading状态
33
-  btnLoading: boolean = false;//确认按钮loading状态
18
+    private tool: ToolService,
19
+    private mainService: MainService
20
+  ) {}
21
+
22
+  id: number; //工单id
23
+  orderInfo: any; //工单详情信息
24
+  endDepts = ""; //工单详情目标科室
25
+  showCoop: boolean = true; //是否展示详情页操作按钮
26
+
27
+  promptContent: string; //操作提示框提示信息
28
+  ifSuccess: boolean; //操作成功/失败
29
+  promptInfo: string; //操作结果提示信息
30
+  promptModalShow: boolean; //是否展示提示框
31
+
32
+  urgentLoading: boolean = false; //确认加急按钮loading状态
33
+  recLoading: boolean = false; //撤回并删除按钮loading状态
34
+  btnLoading: boolean = false; //确认按钮loading状态
34 35
   maskFlag: any = false;
36
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
35 37
   ngOnInit() {
36
-    if (this.route.snapshot.parent.parent.routeConfig.path == 'nurse') {
38
+    this.tool.getDeptDisplay().subscribe((result) => {
39
+      if (result.status == 200) {
40
+        this.deptDisplay = result.list[0].valueconfig;
41
+      }
42
+    });
43
+    if (this.route.snapshot.parent.parent.routeConfig.path == "nurse") {
37 44
       this.showCoop = false;
38 45
     }
39
-    this.id = +this.route.snapshot.paramMap.get('id');
46
+    this.id = +this.route.snapshot.paramMap.get("id");
40 47
     let log$ = this.getLog();
41 48
     let detail$ = this.getDetail();
42
-    this.maskFlag = this.message.loading('正在加载中..', { nzDuration: 0 }).messageId;
43
-    forkJoin(log$, detail$).subscribe(res => {
49
+    this.maskFlag = this.message.loading("正在加载中..", {
50
+      nzDuration: 0,
51
+    }).messageId;
52
+    forkJoin(log$, detail$).subscribe((res) => {
44 53
       this.message.remove(this.maskFlag);
45 54
       this.maskFlag = false;
46 55
       // getLog
47
-      this.logList = res[0]['data'];
56
+      this.logList = res[0]["data"];
48 57
       // getDetail
49
-      this.orderInfo = res[1]['data'];
50
-      this.endDepts = res[1]['data'].endDepts.map(item => item.dept).join();
51
-    })
58
+      this.orderInfo = res[1]["data"];
59
+      this.endDepts = res[1]["data"].endDepts
60
+        .map((item) =>
61
+          !this.showCoop && this.deptDisplay == 2 ? item.deptalias : item.dept
62
+        )
63
+        .join();
64
+    });
52 65
   }
53 66
 
54 67
   // 获取工单详情
55 68
   getDetail() {
56
-    return this.mainService.getApiFetchData('workOrder', this.id);
69
+    return this.mainService.getApiFetchData("workOrder", this.id);
57 70
   }
58 71
 
59 72
   // 确认加急
@@ -61,33 +74,38 @@ export class DetailSampleComponent implements OnInit {
61 74
     let that = this;
62 75
     that.urgentLoading = true;
63 76
     let postData = {
64
-      "urgentDetails": {
65
-        "workerOrder": this.orderInfo['id'],
66
-        "checkStatus": {
67
-          "id": 330
77
+      urgentDetails: {
78
+        workerOrder: this.orderInfo["id"],
79
+        checkStatus: {
80
+          id: 330,
68 81
         },
69
-        "urgentReason": this.orderInfo['urgentDetails'].urgentReason,
70
-        "id": this.orderInfo['urgentDetails'].id
71
-      }
72
-    }
73
-    that.mainService.coopWorkerOrder('urge', postData).subscribe(data => {
82
+        urgentReason: this.orderInfo["urgentDetails"].urgentReason,
83
+        id: this.orderInfo["urgentDetails"].id,
84
+      },
85
+    };
86
+    that.mainService.coopWorkerOrder("urge", postData).subscribe((data) => {
74 87
       that.urgentLoading = false;
75 88
       if (data.status == 200) {
76
-        that.showPromptModal('加急', true, '');
89
+        that.showPromptModal("加急", true, "");
77 90
       } else {
78
-        that.showPromptModal('加急', false, data.msg);
91
+        that.showPromptModal("加急", false, data.msg);
79 92
       }
80
-    })
93
+    });
81 94
   }
82 95
   // 获取工单历史记录
83
-  logList = [];//工单历史记录
96
+  logList = []; //工单历史记录
84 97
   getLog() {
85 98
     return this.mainService.getWorkOrderLog(this.id);
86 99
   }
87 100
 
88 101
   // 派单
89 102
   allotWorker() {
90
-    this.router.navigateByUrl('dispatchingDesk/allotWorker/' + this.id + '/' + this.orderInfo['gdState']['id']);
103
+    this.router.navigateByUrl(
104
+      "dispatchingDesk/allotWorker/" +
105
+        this.id +
106
+        "/" +
107
+        this.orderInfo["gdState"]["id"]
108
+    );
91 109
   }
92 110
 
93 111
   // 撤回
@@ -101,33 +119,35 @@ export class DetailSampleComponent implements OnInit {
101 119
     that.btnLoading = true;
102 120
     let postData = {
103 121
       workOrder: {
104
-        id: that.id
105
-      }
106
-    }
107
-    that.mainService.coopWorkerOrder('excuteWorkOrder/recall', postData).subscribe(data => {
108
-      that.btnLoading = false;
109
-      that.closeRecallOrderModal()
110
-      if (data.status == 200) {
111
-        that.showPromptModal('撤回', true, '');
112
-      } else {
113
-        that.showPromptModal('撤回', false, data.msg);
114
-      }
115
-    })
122
+        id: that.id,
123
+      },
124
+    };
125
+    that.mainService
126
+      .coopWorkerOrder("excuteWorkOrder/recall", postData)
127
+      .subscribe((data) => {
128
+        that.btnLoading = false;
129
+        that.closeRecallOrderModal();
130
+        if (data.status == 200) {
131
+          that.showPromptModal("撤回", true, "");
132
+        } else {
133
+          that.showPromptModal("撤回", false, data.msg);
134
+        }
135
+      });
116 136
   }
117 137
   // 撤回并删除
118 138
   recAndDel() {
119 139
     let that = this;
120 140
     that.recLoading = true;
121
-    that.mainService.delOrder(that.id).subscribe(data => {
141
+    that.mainService.delOrder(that.id).subscribe((data) => {
122 142
       console.log(data);
123 143
       that.recLoading = false;
124
-      that.closeDelOrderModal()
144
+      that.closeDelOrderModal();
125 145
       if (data.status == 200) {
126
-        that.showPromptModal('删除', true, '');
146
+        that.showPromptModal("删除", true, "");
127 147
       } else {
128
-        that.showPromptModal('删除', false, data.msg);
148
+        that.showPromptModal("删除", false, data.msg);
129 149
       }
130
-    })
150
+    });
131 151
   }
132 152
   // 关闭撤回弹框
133 153
   closeRecallOrderModal() {
@@ -137,7 +157,7 @@ export class DetailSampleComponent implements OnInit {
137 157
   // 关闭弹框
138 158
   close() {
139 159
     // this.router.navigateByUrl('dispatchingDesk');
140
-    history.go(-1)
160
+    history.go(-1);
141 161
   }
142 162
 
143 163
   // 删除
@@ -150,15 +170,15 @@ export class DetailSampleComponent implements OnInit {
150 170
   confirmDel() {
151 171
     let that = this;
152 172
     that.btnLoading = true;
153
-    that.mainService.delOrder(that.id).subscribe(data => {
173
+    that.mainService.delOrder(that.id).subscribe((data) => {
154 174
       that.btnLoading = false;
155
-      that.closeDelOrderModal()
175
+      that.closeDelOrderModal();
156 176
       if (data.status == 200) {
157
-        that.showPromptModal('删除', true, '');
177
+        that.showPromptModal("删除", true, "");
158 178
       } else {
159
-        that.showPromptModal('删除', false, data.msg);
179
+        that.showPromptModal("删除", false, data.msg);
160 180
       }
161
-    })
181
+    });
162 182
   }
163 183
 
164 184
   // 关闭模态框
@@ -177,34 +197,32 @@ export class DetailSampleComponent implements OnInit {
177 197
     }, 100);
178 198
   }
179 199
 
180
-
181 200
   // 格式化时分秒
182 201
   // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
183 202
   formatTime(time) {
184
-    let timeStr = '';
203
+    let timeStr = "";
185 204
     if (time >= 0 && time < 60) {
186 205
       // 秒
187
-      timeStr = time + '秒';
206
+      timeStr = time + "秒";
188 207
     } else if (time >= 60 && time < 3600) {
189 208
       // 分钟
190
-      timeStr = Math.floor(time / 60) + '分钟'
209
+      timeStr = Math.floor(time / 60) + "分钟";
191 210
     } else if (time >= 3600) {
192 211
       // 时 + 分
193
-      let h = '';
194
-      let m = '';
195
-      h = Math.floor(time / 3600) + '小时';
196
-      m = (time % 3600) >= 60 ? Math.floor((time % 3600) / 60) + '分钟' : '';
212
+      let h = "";
213
+      let m = "";
214
+      h = Math.floor(time / 3600) + "小时";
215
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
197 216
       timeStr = h + m;
198 217
     }
199 218
     return timeStr;
200 219
   }
201 220
 
202
-
203 221
   // 计算历史记录耗时
204 222
   filterTime(step) {
205 223
     // step = [{ difTime: 2 }, { difTime: 6 }]
206 224
     let num = 0;
207
-    step.forEach(e => {
225
+    step.forEach((e) => {
208 226
       num += e.difTime;
209 227
     });
210 228
     return this.formatTime(num / 1000);

+ 5 - 3
src/app/share/hs-prompt-modal/hs-prompt-modal.component.html

@@ -3,7 +3,8 @@
3 3
     <div class="title">当前科室<i *ngIf="closeTimeFlag<=0||closeTimeFlag>0&&closeTime===0"
4 4
         class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
5 5
     <div class="content">
6
-      <div class="defeat">{{currentDept.dept}}</div>
6
+      <div class="defeat"><span *ngIf="deptDisplay">{{deptDisplay==2?currentDept.deptalias:currentDept.dept}}</span>
7
+      </div>
7 8
       <div class="countDown" *ngIf="closeTimeFlag<0||closeTimeFlag>0&&closeTime>0"><span
8 9
           *ngIf="closeTimeFlag<0">关闭</span>倒计时<em>{{closeTime}}s</em></div>
9 10
     </div>
@@ -19,7 +20,7 @@
19 20
     <div class="content content-search">
20 21
       <div class="defeat-search display_flex justify-content_flex-center flex-direction_column">
21 22
         <span>当前院区:<em>{{currentHospital.hosName}}</em></span>
22
-        <span>当前科室:<em>{{currentDept.dept}}</em></span>
23
+        <span>当前科室:<em *ngIf="deptDisplay">{{deptDisplay==2?currentDept.deptalias:currentDept.dept}}</em></span>
23 24
       </div>
24 25
       <div class="form">
25 26
         <form nz-form [formGroup]="validateForm">
@@ -46,7 +47,8 @@
46 47
               <nz-select formControlName="dutyDeptFc" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
47 48
                 (nzOnSearch)="searchDept(validateForm.controls.hospital.value,$event)" nzPlaceHolder="请选择当值科室">
48 49
                 <ng-container *ngFor="let option of dutyDepts">
49
-                  <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
50
+                  <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
51
+                    [nzValue]="option.id"></nz-option>
50 52
                 </ng-container>
51 53
                 <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
52 54
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...

+ 7 - 0
src/app/share/hs-prompt-modal/hs-prompt-modal.component.ts

@@ -35,7 +35,13 @@ export class HsPromptModalComponent implements OnInit {
35 35
     private tool: ToolService
36 36
   ) {}
37 37
   searchDeptSubject = new Subject();
38
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
38 39
   ngOnInit() {
40
+    this.tool.getDeptDisplay().subscribe((result) => {
41
+      if (result.status == 200) {
42
+        this.deptDisplay = result.list[0].valueconfig;
43
+      }
44
+    });
39 45
     this.searchDeptSubject.pipe(debounceTime(500)).subscribe((v: any) => {
40 46
       this.search(v.hosId, v.e);
41 47
     });
@@ -159,6 +165,7 @@ export class HsPromptModalComponent implements OnInit {
159 165
       department: {
160 166
         hospital: { id: hosId },
161 167
         keyWord: keywords,
168
+        nurseSign: 1,
162 169
       },
163 170
     };
164 171
     this.mainService

+ 27 - 13
src/app/views/hushijiandan/hushijiandan.component.html

@@ -105,7 +105,7 @@
105 105
             <div class="wel">欢迎您:</div>
106 106
             <div class="user">
107 107
               <img src="../../assets/images/icon_keshi.png" alt="">
108
-              <span>{{loginUser.dept.dept}}</span>
108
+              <span *ngIf="deptDisplay">{{deptDisplay==2?loginUser.dept.deptalias:loginUser.dept.dept}}</span>
109 109
             </div>
110 110
             <div class="userInfo-wrap">
111 111
               <div class="logOut" (click)="changeKsNow()">切换科室</div>
@@ -355,7 +355,9 @@
355 355
                                                 (nzOnSearch)="searchDept('start',buildMsg,$event)"
356 356
                                                 nzPlaceHolder="请选择起点科室">
357 357
                                                 <ng-container *ngFor="let option of buildMsg.start.start.list">
358
-                                                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id">
358
+                                                  <nz-option *ngIf="true"
359
+                                                    [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
360
+                                                    [nzValue]="option.id">
359 361
                                                   </nz-option>
360 362
                                                 </ng-container>
361 363
                                                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
@@ -380,7 +382,9 @@
380 382
                                                 (nzOnSearch)="searchDept('target',buildMsg,$event)" nzAllowClear
381 383
                                                 nzPlaceHolder="请选择目标科室">
382 384
                                                 <ng-container *ngFor="let option of buildMsg.end.end.list">
383
-                                                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id">
385
+                                                  <nz-option *ngIf="true"
386
+                                                    [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
387
+                                                    [nzValue]="option.id">
384 388
                                                   </nz-option>
385 389
                                                 </ng-container>
386 390
                                                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
@@ -405,7 +409,9 @@
405 409
                                                 (nzOnSearch)="searchDept('start',buildMsg,$event)"
406 410
                                                 nzPlaceHolder="请选择起点科室">
407 411
                                                 <ng-container *ngFor="let option of buildMsg.start.start.list">
408
-                                                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id">
412
+                                                  <nz-option *ngIf="true"
413
+                                                    [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
414
+                                                    [nzValue]="option.id">
409 415
                                                   </nz-option>
410 416
                                                 </ng-container>
411 417
                                                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
@@ -423,7 +429,9 @@
423 429
                                                 (nzOnSearch)="searchDept('target',buildMsg,$event)"
424 430
                                                 nzPlaceHolder="请选择目标科室">
425 431
                                                 <ng-container *ngFor="let option of buildMsg.end.end.list">
426
-                                                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id">
432
+                                                  <nz-option *ngIf="true"
433
+                                                    [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
434
+                                                    [nzValue]="option.id">
427 435
                                                   </nz-option>
428 436
                                                 </ng-container>
429 437
                                                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
@@ -589,7 +597,7 @@
589 597
                           <td>{{ data.bedNum||'-' }}</td>
590 598
                           <td>{{data.arriveTime||'-'}}</td>
591 599
                           <td>{{ data.worker||'-' }}</td>
592
-                          <td>{{data.checkDept?data.checkDept.dept:'-'}}</td>
600
+                          <td>{{data.checkDept?(deptDisplay==2?data.checkDept.deptalias:data.checkDept.dept):'-'}}</td>
593 601
                           <td>{{data.sendTime||'-'}}</td>
594 602
                           <td><button (click)="viewSpecimenHistory(data)">查看</button></td>
595 603
                         </tr>
@@ -871,7 +879,8 @@
871 879
                   nzServerSearch nzShowSearch (nzOnSearch)="searchDept('start',checkedShowMsg,$event)"
872 880
                   nzPlaceHolder="请选择起点科室">
873 881
                   <ng-container *ngFor="let option of checkedShowMsg.start.start.list">
874
-                    <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
882
+                    <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
883
+                      [nzValue]="option.id"></nz-option>
875 884
                   </ng-container>
876 885
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
877 886
                     <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -888,7 +897,8 @@
888 897
                   nzServerSearch nzShowSearch (nzOnSearch)="searchDept('target',checkedShowMsg,$event)"
889 898
                   nzPlaceHolder="请选择目标科室">
890 899
                   <ng-container *ngFor="let option of checkedShowMsg.end.end.list">
891
-                    <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
900
+                    <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept"
901
+                      [nzValue]="option.id"></nz-option>
892 902
                   </ng-container>
893 903
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
894 904
                     <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -980,7 +990,8 @@
980 990
               <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" nzServerSearch
981 991
                 nzShowSearch (nzOnSearch)="searchDept('start',buildMsg1,$event)" nzPlaceHolder="请选择起点科室">
982 992
                 <ng-container *ngFor="let option of buildMsg1.start.start.list">
983
-                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
993
+                  <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept" [nzValue]="option.id">
994
+                  </nz-option>
984 995
                 </ng-container>
985 996
                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
986 997
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1004,7 +1015,8 @@
1004 1015
               <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" nzServerSearch
1005 1016
                 nzShowSearch (nzOnSearch)="searchDept('target',buildMsg1,$event)" nzAllowClear nzPlaceHolder="请选择目标科室">
1006 1017
                 <ng-container *ngFor="let option of buildMsg1.end.end.list">
1007
-                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1018
+                  <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept" [nzValue]="option.id">
1019
+                  </nz-option>
1008 1020
                 </ng-container>
1009 1021
                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
1010 1022
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1028,7 +1040,8 @@
1028 1040
               <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" nzServerSearch
1029 1041
                 nzShowSearch (nzOnSearch)="searchDept('start',buildMsg1,$event)" nzPlaceHolder="请选择起点科室">
1030 1042
                 <ng-container *ngFor="let option of buildMsg1.start.start.list">
1031
-                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1043
+                  <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept" [nzValue]="option.id">
1044
+                  </nz-option>
1032 1045
                 </ng-container>
1033 1046
                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
1034 1047
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1042,7 +1055,8 @@
1042 1055
               <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" nzServerSearch
1043 1056
                 nzShowSearch (nzOnSearch)="searchDept('target',buildMsg1,$event)" nzPlaceHolder="请选择目标科室">
1044 1057
                 <ng-container *ngFor="let option of buildMsg1.end.end.list">
1045
-                  <nz-option *ngIf="true" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1058
+                  <nz-option *ngIf="true" [nzLabel]="deptDisplay==2?option.deptalias:option.dept" [nzValue]="option.id">
1059
+                  </nz-option>
1046 1060
                 </ng-container>
1047 1061
                 <nz-option *ngIf="false" nzDisabled nzCustomContent>
1048 1062
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1226,7 +1240,7 @@
1226 1240
                   {{ detail.printDate || "-" }}
1227 1241
                 </td>
1228 1242
                 <td>
1229
-                  {{ detail.checkDept ? detail.checkDept.dept : "-" }}
1243
+                  {{ detail.checkDept ? (deptDisplay==2?detail.checkDept.deptalias:detail.checkDept.dept) : "-" }}
1230 1244
                   <div *ngIf="detail.urgent != 0" [class.ji]="detail.urgent == 1"></div>
1231 1245
                 </td>
1232 1246
               </tr>

+ 11 - 2
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -132,7 +132,13 @@ export class HushijiandanComponent implements OnInit {
132 132
   logTimer = null; //综合日志定时器
133 133
   logTime = 0; //综合日志自动刷新秒数
134 134
   logTimeConst = 30; //综合日志自动刷新秒数
135
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
135 136
   ngOnInit() {
137
+    this.tool.getDeptDisplay().subscribe((result) => {
138
+      if (result.status == 200) {
139
+        this.deptDisplay = result.list[0].valueconfig;
140
+      }
141
+    });
136 142
     this.getUpdateTipsForNurses();
137 143
     this.getSpecimenButton();
138 144
     this.getCloseTimeFlag();
@@ -746,7 +752,7 @@ export class HushijiandanComponent implements OnInit {
746 752
     ) {
747 753
       return; //固定科室范围禁用搜索
748 754
     }
749
-    let postData = {
755
+    let postData: any = {
750 756
       idx: 0,
751 757
       sum: 20,
752 758
       department: {
@@ -767,6 +773,7 @@ export class HushijiandanComponent implements OnInit {
767 773
     } else if (type == "target") {
768 774
       postData.department["ids"] = msg.end.deptIds || "";
769 775
     }
776
+    postData.department.nurseSign = 1;
770 777
     this.mainService
771 778
       .getFetchDataList("data", "department", postData)
772 779
       .subscribe((data) => {
@@ -1533,7 +1540,9 @@ export class HushijiandanComponent implements OnInit {
1533 1540
               label:
1534 1541
                 (e.yyTime || "") +
1535 1542
                 " " +
1536
-                e.execDept.dept +
1543
+                (this.deptDisplay == 2
1544
+                  ? e.execDept.deptalias
1545
+                  : e.execDept.dept) +
1537 1546
                 " 进行 " +
1538 1547
                 (e.inspectName || "检查"),
1539 1548
               value: e["id"],

+ 9 - 0
src/app/views/sys-config/sys-config.component.html

@@ -23,6 +23,15 @@
23 23
           </nz-form-control>
24 24
         </nz-form-item>
25 25
         <nz-form-item class="formItem">
26
+          <nz-form-label [nzSpan]="24" nzFor="deptDisplay" nzRequired class="label">护士端科室显示选择</nz-form-label>
27
+          <nz-form-control [nzSpan]="24" nzErrorTip="请输入护士端科室显示选择!">
28
+            <nz-radio-group formControlName="deptDisplay">
29
+              <label nz-radio nzValue="1">科室名称</label>
30
+              <label nz-radio nzValue="2">科室别名</label>
31
+            </nz-radio-group>
32
+          </nz-form-control>
33
+        </nz-form-item>
34
+        <nz-form-item class="formItem">
26 35
           <nz-form-label [nzSpan]="12" nzFor="orderClearUserSwitch" nzRequired class="label">下班后是否自动调度重新分派
27 36
           </nz-form-label>
28 37
           <nz-form-control [nzSpan]="12" nzErrorTip="下班后是否自动调度重新分派是必填项!">

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

@@ -35,6 +35,7 @@ export class SysConfigComponent implements OnInit {
35 35
       defaultPwd: [null, [Validators.required]],
36 36
       effectiveDuration: [null, [Validators.required]],
37 37
       specimenButton: [null, [Validators.required]],
38
+      deptDisplay: [null, [Validators.required]],
38 39
       orderClearUserSwitch: [null, [Validators.required]],
39 40
       deptQRCode: [null, [Validators.required]],
40 41
       workOrderSettings: [5, [Validators.required]],
@@ -95,6 +96,7 @@ export class SysConfigComponent implements OnInit {
95 96
         item.keyconfig === "pwd" ||
96 97
         item.keyconfig === "conversationSeconds" ||
97 98
         item.keyconfig === "specimenButton" ||
99
+        item.keyconfig === "deptDisplay" ||
98 100
         item.keyconfig === "orderClearUserSwitch" ||
99 101
         item.keyconfig === "deptQRCode" ||
100 102
         item.keyconfig === "workOrderSettings" ||
@@ -110,6 +112,8 @@ export class SysConfigComponent implements OnInit {
110 112
         item.valueconfig = this.validateForm.controls.effectiveDuration.value;
111 113
       } else if (item.keyconfig === "specimenButton") {
112 114
         item.valueconfig = this.validateForm.controls.specimenButton.value;
115
+      } else if (item.keyconfig === "deptDisplay") {
116
+        item.valueconfig = this.validateForm.controls.deptDisplay.value;
113 117
       } else if (item.keyconfig === "orderClearUserSwitch") {
114 118
         item.valueconfig =
115 119
           this.validateForm.controls.orderClearUserSwitch.value;
@@ -180,6 +184,9 @@ export class SysConfigComponent implements OnInit {
180 184
                 case "specimenButton":
181 185
                   this.validateForm.controls.specimenButton.setValue(c[1]);
182 186
                   break;
187
+                case "deptDisplay":
188
+                  this.validateForm.controls.deptDisplay.setValue(c[1]);
189
+                  break;
183 190
                 case "orderClearUserSwitch":
184 191
                   this.validateForm.controls.orderClearUserSwitch.setValue(
185 192
                     c[1]