Browse Source

录音盒

seimin 6 months ago
parent
commit
faba4f7335

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "/service": {
2
   "/service": {
3
-		"target": "http://192.168.4.105",
3
+		"target": "http://192.168.3.108",
4
     "logLevel": "debug",
4
     "logLevel": "debug",
5
     "changeOrigin": true,
5
     "changeOrigin": true,
6
     "pathRewrite": {
6
     "pathRewrite": {

+ 68 - 0
src/app/components/bind-extension-number/bind-extension-number.component.html

@@ -0,0 +1,68 @@
1
+<!-- 绑定分机 -->
2
+<div class="init recallOrder display_flex justify-content_flex-center align-items_center">
3
+  <div class="con modalBody">
4
+    <div class="title">
5
+      绑定分机<i class="icon_transport transport-guanbi" (click)="cancelInit()"></i>
6
+    </div>
7
+    <div class="content">
8
+      <div class="scopeTab">
9
+        <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
10
+          <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="changeFlag($event, item)">{{item.name}}</label>
11
+        </div>
12
+      </div>
13
+      <!-- 分机绑定 -->
14
+      <div class="conditions" *ngIf="activeScopeTab.value == 1">
15
+        <div nz-row class="row">
16
+          <div nz-col nzSpan="3" class="name">院区:</div>
17
+          <div nz-col nzSpan="21">
18
+            <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择院区" [(ngModel)]="formData1.hospital" (ngModelChange)="changeHospital($event)">
19
+              <ng-container *ngFor="let option of hospitalList">
20
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
21
+              </ng-container>
22
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
+              </nz-option>
25
+            </nz-select>
26
+          </div>
27
+        </div>
28
+        <div nz-row class="row">
29
+          <div nz-col nzSpan="3" class="name">分机号:</div>
30
+          <div nz-col nzSpan="21">
31
+            <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择分机号" [(ngModel)]="formData1.number">
32
+              <ng-container *ngFor="let option of phoneNumList">
33
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.value" [nzValue]="option.value"></nz-option>
34
+              </ng-container>
35
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
36
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
37
+              </nz-option>
38
+            </nz-select>
39
+          </div>
40
+        </div>
41
+      </div>
42
+      <!-- 呼叫中心 -->
43
+      <div class="conditions" *ngIf="activeScopeTab.value == 2">
44
+        <div nz-row class="row">
45
+          <div nz-col nzSpan="3" class="name">分机号:</div>
46
+          <div nz-col nzSpan="21">
47
+            <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择分机号" [(ngModel)]="formData2.number">
48
+              <ng-container *ngFor="let option of hjzxCornetList">
49
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.value" [nzValue]="option.value"></nz-option>
50
+              </ng-container>
51
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
52
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
53
+              </nz-option>
54
+            </nz-select>
55
+          </div>
56
+        </div>
57
+      </div>
58
+    </div>
59
+    <div class="btns display_flex justify-content_flex-center">
60
+      <button class="btn" nz-button nzType="primary" [nzLoading]="websocketLoading" (click)="saveOrderScope()">
61
+        绑定
62
+      </button>
63
+      <button class="btn cancel" nz-button nzType="default" (click)="cancelInit()">
64
+        知道了
65
+      </button>
66
+    </div>
67
+  </div>
68
+</div>

+ 192 - 0
src/app/components/bind-extension-number/bind-extension-number.component.less

@@ -0,0 +1,192 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  ::ng-deep .ant-checkbox-wrapper + .ant-checkbox-wrapper{
4
+    margin-left: 0!important;
5
+  }
6
+  .formItem {
7
+    width: 290px;
8
+  }
9
+  .name{
10
+    line-height: 32px;
11
+  }
12
+  .row{
13
+    margin-bottom: 24px!important;
14
+  }
15
+  .required{
16
+    position: relative;
17
+    &::before{
18
+      font-family: icon_transport;
19
+      font-size: 10px;
20
+      content:'\e606';
21
+      color: red;
22
+      position: absolute;
23
+      right: 100%;
24
+      top: 50%;
25
+      transform: translateY(-50%);
26
+      margin-right: 2px;
27
+    }
28
+  }
29
+  // 撤回工单
30
+  .recallOrder {
31
+    position: fixed;
32
+    left: 0;
33
+    top: 0;
34
+    width: 100%;
35
+    height: 100%;
36
+    background: rgba(0, 0, 0, 0.4);
37
+    z-index: 9999999;
38
+
39
+    .modalBody {
40
+      width: 350px;
41
+      height: 220px;
42
+      background: #fff;
43
+      border-radius: 5px;
44
+      padding: 10px 20px;
45
+      color: #333;
46
+
47
+      .title {
48
+        width: 100%;
49
+        text-align: center;
50
+        font-size: 18px;
51
+        position: relative;
52
+
53
+        i {
54
+          position: absolute;
55
+          right: 0;
56
+          top: 0;
57
+          font-size: 20px;
58
+          color: #666;
59
+          cursor: pointer;
60
+          padding: 0 5px;
61
+        }
62
+      }
63
+
64
+      .content {
65
+        width: 310px;
66
+        height: 117px;
67
+        background: #f9fafb;
68
+        border: 1px solid #e5e9ed;
69
+        border-radius: 5px;
70
+        overflow: hidden;
71
+        margin-top: 12px;
72
+
73
+        div {
74
+          text-align: center;
75
+          margin: 0;
76
+
77
+          &.icon {
78
+            margin-top: 17px;
79
+
80
+            i {
81
+              color: #ff3b53;
82
+              font-size: 30px !important;
83
+
84
+              &.transport-wenhao {
85
+                color: #f5a523;
86
+              }
87
+            }
88
+          }
89
+
90
+          &.defeat {
91
+            color: #333;
92
+            font-size: 18px;
93
+          }
94
+
95
+          &:nth-child(3) {
96
+            font-size: 14px;
97
+            color: #666;
98
+          }
99
+        }
100
+
101
+        .conditions {
102
+          height: 235px;
103
+          overflow: auto;
104
+          padding: 48px 80px;
105
+
106
+          div {
107
+            text-align: left;
108
+          }
109
+        }
110
+      }
111
+
112
+      .btns {
113
+        button {
114
+          margin-top: 10px;
115
+          margin-left: 5px;
116
+        }
117
+
118
+        .recDelBtn {
119
+          width: 115px;
120
+        }
121
+      }
122
+    }
123
+  }
124
+
125
+  // 初始化设置
126
+  .init {
127
+    position: fixed;
128
+    left: 0;
129
+    top: 0;
130
+    width: 100%;
131
+    height: 100%;
132
+    background: rgba(0, 0, 0, 0.4);
133
+    z-index: 99;
134
+
135
+    .con {
136
+      width: 832px;
137
+      height: auto;
138
+      background: #fff;
139
+      border-radius: 5px;
140
+      padding: 10px 20px;
141
+      color: #333;
142
+
143
+      .content {
144
+        width: 100%;
145
+        height: auto;
146
+
147
+        .scopeTab{
148
+          display: flex;
149
+          height: 60px;
150
+          border-bottom: 1px solid #D9D9D9;
151
+          .scopeTabItem{
152
+            flex: 1;
153
+            display: flex;
154
+            justify-content: center;
155
+            align-items: center;
156
+            border-right: 1px solid #D9D9D9;
157
+            background-color: #fff;
158
+            cursor: pointer;
159
+            &:last-of-type{
160
+              border-right: none;
161
+            }
162
+            &.active{
163
+              background-color: #F0F6ED;
164
+            }
165
+          }
166
+        }
167
+
168
+        .remin {
169
+          font-size: 14px;
170
+          color: #666;
171
+          line-height: 48px;
172
+          border-bottom: 1px solid #e5e9ed;
173
+        }
174
+
175
+        .boxes {
176
+          color: #333;
177
+          padding: 8px 12px;
178
+
179
+          & > div:nth-child(1) {
180
+            color: #333;
181
+            text-align: left;
182
+          }
183
+
184
+          & > div:nth-child(2) {
185
+            color: #666;
186
+            text-align: left;
187
+          }
188
+        }
189
+      }
190
+    }
191
+  }
192
+}

+ 192 - 0
src/app/components/bind-extension-number/bind-extension-number.component.ts

@@ -0,0 +1,192 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { ToolService } from 'src/app/services/tool.service';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { WebsocketIncomingService } from 'src/app/services/websocket-incoming.service';
7
+import http from "../../../assets/js/http";
8
+
9
+@Component({
10
+  selector: 'app-bind-extension-number',
11
+  templateUrl: './bind-extension-number.component.html',
12
+  styleUrls: ['./bind-extension-number.component.less']
13
+})
14
+export class BindExtensionNumberComponent implements OnInit {
15
+  @Input() websocketLoading:boolean = false;
16
+  @Input() hsmsData:any = {
17
+    checkedHos: undefined,
18
+    scopeGroups: [],
19
+    orderScopeRadio: undefined,
20
+  }
21
+  @Input() itsmData:any = {
22
+    checkedHos: undefined,
23
+    scopeGroups: [],
24
+    orderScopeRadio: undefined,
25
+  }
26
+  @Output() confirmModal = new EventEmitter();
27
+  @Output() cancelModal = new EventEmitter();
28
+  constructor(
29
+    private mainService: MainService,
30
+    private tool: ToolService,
31
+    private message: NzMessageService,
32
+    private icomingService: WebsocketIncomingService,
33
+  ) { }
34
+
35
+  user = JSON.parse(localStorage.getItem("user")); //用户信息
36
+  isLoading:boolean = false;
37
+  formData1:any = {};
38
+  formData2:any = {};
39
+  hospitalList:any[] = [];
40
+
41
+  // 工单范选项卡
42
+  scopeTabs:any[] = [
43
+    { name: '分机绑定', value: 1, checked: false },
44
+    { name: '呼叫中心', value: 2, checked: false },
45
+  ];
46
+  activeScopeTab = this.scopeTabs[0];
47
+
48
+  ngOnInit() {
49
+    console.log('itsmData', this.itsmData);
50
+    console.log('hsmsData', this.hsmsData);
51
+    this.getHospitalList();
52
+    this.getHjzxCornetList();
53
+    this.getCallCenterConfig();
54
+  }
55
+
56
+  // 获取院区列表
57
+  getHospitalList() {
58
+    // 工单范围
59
+    // 运维不限制部门,则取权限下的所有院区和部门
60
+    // 运维限制部门,则取运维选中的部门和配送选中的院区
61
+    if(this.itsmData.mdv2Switch){
62
+      // 开通运维
63
+      if(this.itsmData.allDuty === 1){
64
+        // 不限制部门
65
+        let hospitals = this.user.infoPermission.hospitals || [];
66
+        let dutyList = this.user.infoPermission.dutyList || [];
67
+        this.hospitalList = hospitals.concat(dutyList);
68
+      }else{
69
+        // 限制部门
70
+        if(this.hsmsData.hsmsSwitch){
71
+          // 开通配送
72
+          this.hospitalList = this.itsmData.checkedHos.concat(this.hsmsData.checkedHosDTO);
73
+        }else{
74
+          // 未开通配送
75
+          this.hospitalList = this.itsmData.checkedHos;
76
+        }
77
+      }
78
+    }else{
79
+      // 未开通运维
80
+      if(this.hsmsData.hsmsSwitch){
81
+        // 开通配送
82
+        this.hospitalList = [this.hsmsData.checkedHosDTO];
83
+      }else{
84
+        // 未开通配送
85
+        this.hospitalList = [];
86
+      }
87
+    }
88
+  }
89
+
90
+  //获取呼叫中心分机号码
91
+  hjzxCornetList:any[] = [];
92
+  getHjzxCornetList() {
93
+    this.isLoading = true;
94
+    this.mainService.getDictionary('list', 'hjzx_cornet').subscribe((data) => {
95
+      this.isLoading = false;
96
+      this.hjzxCornetList = data || [];
97
+    });
98
+  }
99
+
100
+  // 获取呼叫中心服务连接地址
101
+  callCenterConfigObj:any = {};
102
+  getCallCenterConfig() {
103
+    let data = {
104
+      idx: 0,
105
+      sum: 9999,
106
+      callCenterConfig: {},
107
+    };
108
+    this.mainService
109
+      .getFetchDataList("simple/data", "callCenterConfig", data)
110
+      .subscribe((data) => {
111
+        if (data.status == 200) {
112
+          let list = data.list || [];
113
+          this.callCenterConfigObj = list.length ? list[0] : {};
114
+        }else{
115
+          this.message.error(data.msg || "请求数据失败");
116
+        }
117
+      });
118
+  }
119
+
120
+  // 修改院区
121
+  changeHospital(hosId){
122
+    this.phoneNumList = [];
123
+    this.getPhoneNumList(hosId);
124
+  }
125
+
126
+
127
+
128
+  // 修改选项卡-是否启动
129
+  changeFlag(flag, item){
130
+    if(flag){
131
+      this.scopeTabs.forEach(v => {
132
+        if(v.value != item.value){
133
+          v.checked = false;
134
+        }
135
+      })
136
+    }
137
+  }
138
+
139
+  //获取所有分机号码列表
140
+  phoneNumList:any[] = [];
141
+  getPhoneNumList(hosId) {
142
+    this.isLoading = true;
143
+    let postData = {
144
+      idx: 0,
145
+      sum: 100,
146
+      hospitalConfig: { hosId },
147
+    };
148
+    this.mainService
149
+      .getFetchDataList("simple/data", "hospitalConfig", postData)
150
+      .subscribe((result) => {
151
+        this.isLoading = false;
152
+        this.phoneNumList = result.list.filter((item) => item.key.includes("phone_num_port") && item.value);
153
+        console.log('this.phoneNumList:', this.phoneNumList)
154
+      });
155
+  }
156
+
157
+  // 保存工单范围设置
158
+  saveOrderScope() {
159
+    let startObj = this.scopeTabs.find((item) => item.checked);
160
+    if(startObj){
161
+      if(startObj.value == 1){
162
+        // 录音盒
163
+        if(!this.formData1.number){
164
+          this.message.warning('请选择【分机绑定】分机号码')
165
+          return;
166
+        }
167
+        this.icomingService.setSign('box');
168
+        this.confirmModal.emit(this.formData1.number);
169
+      }else if(startObj.value == 2){
170
+        // 呼叫中心
171
+        if(!this.formData2.number){
172
+          this.message.warning('请选择【呼叫中心】分机号码')
173
+          return;
174
+        }
175
+        if(!this.callCenterConfigObj.socketUrl.trim()){
176
+          this.message.warning('呼叫中心服务连接地址未配置,请前往配置中心->三方配置中配置')
177
+          return;
178
+        }
179
+        this.icomingService.setSign('callCenter');
180
+        this.icomingService.setSocketUrl(`${http.wsName}://${this.callCenterConfigObj.socketUrl}`);
181
+        this.confirmModal.emit(this.formData2.number);
182
+      }
183
+    }else{
184
+      this.message.warning('请启动分机号码或呼叫中心')
185
+    }
186
+  }
187
+
188
+  // 关闭弹窗
189
+  cancelInit() {
190
+    this.cancelModal.emit();
191
+  }
192
+}

+ 20 - 0
src/app/components/bind-extension-number/bind-extension-number.module.ts

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

+ 0 - 1
src/app/services/httpInterceptor.service.ts

@@ -38,7 +38,6 @@ export class HttpInterceptorService implements HttpInterceptor {
38
               this.message.info('登录失效,请重新登录!').onClose!.subscribe(() => {
38
               this.message.info('登录失效,请重新登录!').onClose!.subscribe(() => {
39
                 localStorage.removeItem("user");
39
                 localStorage.removeItem("user");
40
                 localStorage.removeItem("menu");
40
                 localStorage.removeItem("menu");
41
-                localStorage.removeItem("phones");
42
                 localStorage.removeItem("index");
41
                 localStorage.removeItem("index");
43
                 this.router.navigate(['/login']);
42
                 this.router.navigate(['/login']);
44
               })
43
               })

+ 122 - 0
src/app/services/websocket-hjzx.service.ts

@@ -0,0 +1,122 @@
1
+/*
2
+ * @Author: seimin
3
+ * @Date: 2024-09-24 16:34:47
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-09-24 16:38:01
6
+ * @Description: 呼叫中心websocket服务
7
+ */
8
+import { Injectable } from "@angular/core";
9
+import { Subject, Observable, from } from "rxjs";
10
+import * as Atmosphere from "atmosphere.js";
11
+
12
+@Injectable({
13
+  providedIn: "root",
14
+})
15
+export class WebsocketHjzxService {
16
+  constructor() { }
17
+  private lockReconnect = false; //避免ws重复连接
18
+  ws = null; //定义websocket
19
+  private url = ""; //ws连接地址
20
+  private urlParams; //ws连接传参
21
+  private isHandler = false; //是否手动
22
+  private subject;
23
+  private reconnectTimer = null;//重连的计时器
24
+  // 连接websocket
25
+  connectWs(url, data): Observable<any> {
26
+    this.url = url;
27
+    this.urlParams = data;
28
+    this.subject = new Subject<any>();
29
+    let request: any = {
30
+      webSocketUrl: url,
31
+      trackMessageLength: true, //校验数据完整性
32
+      transport: "websocket",
33
+      handleOnlineOffline: false,
34
+      suspend: false,
35
+      maxReconnectOnClose: 0,
36
+    };
37
+
38
+    request.onOpen = (response) => {
39
+      console.log("ws连接成功" + new Date().toLocaleString());
40
+      this.heartCheck.reset().start(this);
41
+      console.log(response);
42
+      this.ws.push(JSON.stringify(data));
43
+    };
44
+
45
+    request.onMessage = (response) => {
46
+      this.heartCheck.reset().start(this);
47
+      let message = response.responseBody;
48
+      try {
49
+        console.log("收到消息" + message);
50
+        if (message !== "pong") {
51
+          this.subject.next(JSON.parse(message));
52
+        }
53
+      } catch (e) {
54
+        console.log("This doesn't look like a valid JSON: ", message);
55
+        return;
56
+      }
57
+    };
58
+
59
+    request.onClose = (response) => {
60
+      console.log("ws连接关闭" + new Date().toLocaleString(), this.isHandler);
61
+      this.ws = null;
62
+      console.log(response)
63
+      if (!this.isHandler && response.status === 408) {
64
+        this.reconnect(this.url, this.urlParams);
65
+      }
66
+    };
67
+
68
+    request.onError = (response) => {
69
+      console.log("ws连接错误", this.isHandler);
70
+      this.ws = null;
71
+      if (response.status === 0) {
72
+        this.reconnect(this.url, this.urlParams);
73
+      }
74
+    };
75
+    this.ws = Atmosphere.subscribe(request);
76
+    return this.subject.asObservable();
77
+  }
78
+  //断线重连
79
+  private reconnect(url, data) {
80
+    if (this.lockReconnect) return;
81
+    this.lockReconnect = true;
82
+    this.reconnectTimer = setTimeout(() => {
83
+      //没连接上会一直重连,设置延迟避免请求过多
84
+      this.connectWs(url, data);
85
+      this.lockReconnect = false;
86
+    }, 15000);
87
+  }
88
+  private heartCheck = {
89
+    timeout: 30000, //发一次心跳的间隔时间
90
+    timeoutObj: null,
91
+    serverTimeoutObj: null,
92
+    reset: function () {
93
+      clearTimeout(this.timeoutObj);
94
+      clearTimeout(this.serverTimeoutObj);
95
+      return this;
96
+    },
97
+    start: function (_this) {
98
+      this.timeoutObj = setTimeout(() => {
99
+        //这里发送一个心跳,后端收到后,返回一个心跳消息,
100
+        //onmessage拿到返回的心跳就说明连接正常
101
+        if (_this.ws) {
102
+          _this.ws.push("ping");
103
+        }
104
+        this.serverTimeoutObj = setTimeout(() => {
105
+          //如果超过一定时间还没重置,说明后端主动断开了
106
+          _this.closeWs(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
107
+        }, this.timeout);
108
+      }, this.timeout);
109
+    },
110
+  };
111
+
112
+  // 断开websocket
113
+  closeWs(flag: boolean = false) {
114
+    this.isHandler = flag;
115
+    if (flag) {
116
+      clearTimeout(this.reconnectTimer);
117
+    }
118
+    if (this.ws) {
119
+      this.ws.close();
120
+    }
121
+  }
122
+}

+ 99 - 0
src/app/services/websocket-incoming.service.ts

@@ -0,0 +1,99 @@
1
+/*
2
+ * @Author: seimin
3
+ * @Date: 2024-09-24 16:34:47
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-09-26 11:09:46
6
+ * @Description: 来电弹屏websocket服务
7
+ */
8
+import { Injectable } from "@angular/core";
9
+import { Observable } from "rxjs";
10
+import { WebsocketPhoneService } from './websocket-phone.service';
11
+import { WebsocketHjzxService } from './websocket-hjzx.service';
12
+import { MainService } from './main.service';
13
+import http from "../../assets/js/http";
14
+
15
+@Injectable({
16
+  providedIn: "root",
17
+})
18
+export class WebsocketIncomingService {
19
+  constructor(
20
+    private mainService: MainService,
21
+    private phoneService: WebsocketPhoneService,
22
+    private hjzxService: WebsocketHjzxService,
23
+  ) { }
24
+
25
+  // 连接websocket { userCount }
26
+  private user = JSON.parse(localStorage.getItem("user")); //用户信息
27
+  connectWs(): Observable<any> {
28
+    let userCount = this.user.user.account + "|" + this.getPhoneNumber();
29
+    if(this.getSign() === 'box'){
30
+      return this.phoneService.connectWs(http.phoneWs, { userCount });
31
+    }else if(this.getSign() === 'callCenter'){
32
+      return this.hjzxService.connectWs(this.getSocketUrl(), { userCount });
33
+    }
34
+  }
35
+  // 断开websocket
36
+  closeWs(flag: boolean = false) {
37
+    console.log('sign', this.getSign())
38
+    if(this.getSign() === 'box'){
39
+      this.phoneService.closeWs(flag);
40
+    }else if(this.getSign() === 'callCenter'){
41
+      this.hjzxService.closeWs(flag);
42
+    }
43
+  }
44
+
45
+  // 绑定的分机号码
46
+  private phoneNumber:string = '';
47
+  // 获取绑定分机号码
48
+  getPhoneNumber() {
49
+    return this.phoneNumber || localStorage.getItem('phoneNumber');
50
+  }
51
+  // 设置绑定分机号码
52
+  setPhoneNumber(phoneNumber: string) {
53
+    this.phoneNumber = phoneNumber;
54
+    localStorage.setItem('phoneNumber', phoneNumber);
55
+  }
56
+  // 删除绑定分机号码
57
+  removePhoneNumber() {
58
+    this.phoneNumber = '';
59
+    localStorage.removeItem('phoneNumber');
60
+
61
+    this.removeSign();
62
+    this.removeSocketUrl();
63
+  }
64
+
65
+  // 标识(呼叫中心或录音盒)
66
+  // callCenter|box
67
+  private sign:string = '';
68
+  // 获取绑定标识
69
+  getSign() {
70
+    return this.sign || localStorage.getItem('sign');
71
+  }
72
+  // 设置绑定标识
73
+  setSign(sign: string) {
74
+    this.sign = sign;
75
+    localStorage.setItem('sign', sign);
76
+  }
77
+  // 删除绑定标识
78
+  removeSign() {
79
+    this.sign = '';
80
+    localStorage.removeItem('sign');
81
+  }
82
+
83
+  // 呼叫中心服务地址
84
+  private socketUrl:string = '';
85
+  // 获取呼叫中心服务地址
86
+  getSocketUrl() {
87
+    return this.socketUrl || localStorage.getItem('socketUrl');
88
+  }
89
+  // 设置呼叫中心服务地址
90
+  setSocketUrl(socketUrl: string) {
91
+    this.socketUrl = socketUrl;
92
+    localStorage.setItem('socketUrl', socketUrl);
93
+  }
94
+  // 删除呼叫中心服务地址
95
+  removeSocketUrl() {
96
+    this.socketUrl = '';
97
+    localStorage.removeItem('socketUrl');
98
+  }
99
+}

+ 7 - 0
src/app/services/websocket-phone.service.ts

@@ -1,3 +1,10 @@
1
+/*
2
+ * @Author: seimin
3
+ * @Date: 2024-03-11 11:11:09
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-09-24 16:38:23
6
+ * @Description: 录音盒websocket服务
7
+ */
1
 import { Injectable } from "@angular/core";
8
 import { Injectable } from "@angular/core";
2
 import { Subject, Observable, from } from "rxjs";
9
 import { Subject, Observable, from } from "rxjs";
3
 import * as Atmosphere from "atmosphere.js";
10
 import * as Atmosphere from "atmosphere.js";

+ 1 - 0
src/app/type/types.ts

@@ -11,6 +11,7 @@ export enum SourceId {
11
  * 接口地址
11
  * 接口地址
12
  */
12
  */
13
 export interface baseUrlType {
13
 export interface baseUrlType {
14
+  wsName: string;//ws/wss
14
   domain: string; //chrome下载地址
15
   domain: string; //chrome下载地址
15
   host: string; //接口地址
16
   host: string; //接口地址
16
   specimenViewHost: string; //业务视图地址
17
   specimenViewHost: string; //业务视图地址

+ 51 - 109
src/app/views/fuwutai/fuwutai.component.html

@@ -22,7 +22,7 @@
22
     <div class="message_cot">
22
     <div class="message_cot">
23
       <!-- 配送人员信息 -->
23
       <!-- 配送人员信息 -->
24
       <div class="cot_hid" [style.height]="cotHeight + 'px'">
24
       <div class="cot_hid" [style.height]="cotHeight + 'px'">
25
-        <ng-container *ngIf="!wLoading && (typeData.type === 1 || typeData.type === 2)">
25
+        <ng-container *ngIf="!wLoading && typeData && (typeData.type === 1 || typeData.type === 2)">
26
           <div id="cotAll" class="cot_all" *ngIf="patientCareCol != 6">
26
           <div id="cotAll" class="cot_all" *ngIf="patientCareCol != 6">
27
             <div [ngClass]="{cot: true, fourCol: patientCareCol == 4, sevenCol: patientCareCol == 7}" *ngFor="let data of workerMessage">
27
             <div [ngClass]="{cot: true, fourCol: patientCareCol == 4, sevenCol: patientCareCol == 7}" *ngFor="let data of workerMessage">
28
               <div class="first" *ngIf="data">
28
               <div class="first" *ngIf="data">
@@ -47,7 +47,7 @@
47
             </div>
47
             </div>
48
           </div>
48
           </div>
49
         </ng-container>
49
         </ng-container>
50
-        <ng-container *ngIf="!wLoading && typeData.type === 3">
50
+        <ng-container *ngIf="!wLoading && typeData && typeData.type === 3">
51
           <div id="cotAll" class="cot_all">
51
           <div id="cotAll" class="cot_all">
52
             <div [ngClass]="{cot: true, sevenCol: true}" *ngFor="let data of workerMessage">
52
             <div [ngClass]="{cot: true, sevenCol: true}" *ngFor="let data of workerMessage">
53
               <div class="first" *ngIf="data">
53
               <div class="first" *ngIf="data">
@@ -717,59 +717,6 @@
717
   <!-- 右侧悬浮框 -->
717
   <!-- 右侧悬浮框 -->
718
   <div id="fixedMenu" class="fixed">
718
   <div id="fixedMenu" class="fixed">
719
     <div class="left" *ngIf="fixedTab != '' && showLastItems && fixedTab != 'newOrder' && fixedTab != 'toSystem' && fixedTab != 'logout'">
719
     <div class="left" *ngIf="fixedTab != '' && showLastItems && fixedTab != 'newOrder' && fixedTab != 'toSystem' && fixedTab != 'logout'">
720
-      <!-- 绑定分机 -->
721
-      <div class="con bindingExtension" *ngIf="fixedTab == 'bindingExtension' && fixedTab != 'newOrder' && !phoneNumLoading">
722
-        <div class="title">绑定分机</div>
723
-        <overlay-scrollbars #osComponentRef7 [ngStyle]="{ height: '152px' }" class="conditions">
724
-          <div nz-row *ngIf="binding === 1">
725
-            <div nz-col nzSpan="24">
726
-              <div nz-row>
727
-                <nz-checkbox-wrapper class="w100" (nzOnChange)="changePhones($event)">
728
-                  <div nz-row>
729
-                    <div *ngFor="let data of phoneNumList" nz-col nzSpan="8">
730
-                      <label nz-checkbox [nzValue]="data.value" [ngModel]="data.checked">分机{{ data.value }}</label>
731
-                    </div>
732
-                  </div>
733
-                </nz-checkbox-wrapper>
734
-              </div>
735
-            </div>
736
-          </div>
737
-          <div nz-row *ngIf="binding === 2">
738
-            <div nz-col nzSpan="6">已绑定分机号:</div>
739
-            <div class="bindingExtension_content" nz-col nzSpan="24">
740
-              <span *ngFor="let data of phoneNumListBind; let last = last">
741
-                <span style="color: #333" *ngIf="!last">分机{{ data }}、</span>
742
-                <span style="color: #333" *ngIf="last">分机{{ data }}</span>
743
-              </span>
744
-            </div>
745
-          </div>
746
-          <div nz-row *ngIf="binding === 3">
747
-            <div nz-col nzSpan="24" class="noContentFlex">
748
-              <img class="noContent" src="../../assets/images/icon_jianchakong@big.png" alt="" />
749
-              <p>暂未绑定分机号</p>
750
-            </div>
751
-          </div>
752
-        </overlay-scrollbars>
753
-        <div class="btns display_flex justify-content_flex-center">
754
-          <button nz-button nzType="primary" nzValue="small" (click)="bindingHandle()" *ngIf="binding === 3">
755
-            绑定分机
756
-          </button>
757
-          <button nz-button nzType="primary" nzValue="small" (click)="bindingHandle()" *ngIf="binding === 2">
758
-            重新绑定
759
-          </button>
760
-          <button nz-button nzType="primary" nzValue="small" *ngIf="binding === 1" (click)="bindingOk()" [nzLoading]="bindOkLoading">
761
-            确定绑定
762
-          </button>
763
-        </div>
764
-      </div>
765
-      <div class="con bindingExtension display_flex justify-content_flex-center align-items_center" *ngIf="fixedTab == 'bindingExtension' && fixedTab != 'newOrder' && phoneNumLoading">
766
-        <div class="loadingFull display_flex justify-content_flex-center align-items_center">
767
-          <div class="loadingFullInner">
768
-            <img src="../../../assets/images/loading.gif" alt="" />
769
-            <div>加载中...</div>
770
-          </div>
771
-        </div>
772
-      </div>
773
       <!-- 展示形式 -->
720
       <!-- 展示形式 -->
774
       <div class="con" *ngIf="fixedTab == 'colType' && fixedTab != 'newOrder'">
721
       <div class="con" *ngIf="fixedTab == 'colType' && fixedTab != 'newOrder'">
775
         <div class="title">展示形式</div>
722
         <div class="title">展示形式</div>
@@ -970,76 +917,67 @@
970
       </div>
917
       </div>
971
     </div>
918
     </div>
972
     <div class="right">
919
     <div class="right">
973
-      <div class="fixedMenu hujiaozhongxin" *ngIf="hsmsData.hsmsSwitch || itsmData.mdv2Switch">
920
+      <div class="fixedMenuWrap">
921
+        <div class="fixedMenu" *ngIf="incomingService.getPhoneNumber()">
922
+          <div class="menuItems">
923
+            <div class="item itemLink ellipsis-oneline cursorDefault w100" nz-tooltip [nzTooltipTitle]="incomingService.getPhoneNumber()">
924
+              {{incomingService.getPhoneNumber()}}
925
+            </div>
926
+          </div>
927
+        </div>
928
+        <div class="fixedMenu" *ngIf="incomingService.getPhoneNumber() && incomingService.getSign() === 'box'">
929
+          <div class="menuItems">
930
+            <i class="icon_transport transport-shixian call-icon"></i>
931
+          </div>
932
+        </div>
933
+        <div class="fixedMenu" hidden>
934
+          <div class="menuItems">
935
+            <button nz-button nzType="link" class="item itemLink call-status">
936
+              示闲
937
+            </button>
938
+          </div>
939
+        </div>
940
+      </div>
941
+      <div class="fixedMenu" *ngIf="hsmsData.hsmsSwitch || itsmData.mdv2Switch">
974
         <div class="menuItems">
942
         <div class="menuItems">
975
-          <button
976
-            nz-button
977
-            nzType="link"
978
-            class="item itemLink"
979
-            (click)="showNewOrder()"
980
-            [nzLoading]="getConfigTasktypeLoading || patientLogTasktypeLoading"
981
-          >
943
+          <button nz-button nzType="link" class="item itemLink" (click)="showNewOrder()" [nzLoading]="getConfigTasktypeLoading || patientLogTasktypeLoading">
982
             新建工单
944
             新建工单
983
           </button>
945
           </button>
984
         </div>
946
         </div>
985
       </div>
947
       </div>
948
+      <div class="fixedMenu" *ngIf="!incomingService.getPhoneNumber()">
949
+        <div class="menuItems">
950
+          <button nz-button nzType="link" class="item itemLink" (click)="showBindExtensionNumber()">
951
+            绑定分机
952
+          </button>
953
+        </div>
954
+      </div>
955
+      <div class="fixedMenu" *ngIf="incomingService.getPhoneNumber()">
956
+        <div class="menuItems">
957
+          <button nz-button nzType="link" class="item itemLink" (click)="checkOut()">
958
+            签出
959
+          </button>
960
+        </div>
961
+      </div>
986
       <div class="fixedMenu">
962
       <div class="fixedMenu">
987
         <div class="menuItems">
963
         <div class="menuItems">
988
-          <div
989
-            class="others"
990
-            [ngStyle]="{
991
-              height: showLastItems
992
-                ? mainRole
993
-                  ? 35 * 6 + 'px'
994
-                  : 35 * 5 + 'px'
995
-                : 0
996
-            }"
997
-          >
998
-            <div
999
-              [ngClass]="{
1000
-                item: true,
1001
-                checked: fixedTab == 'bindingExtension'
1002
-              }"
1003
-              (click)="showBindingExtension()"
1004
-            >
1005
-              绑定分机
1006
-            </div>
1007
-            <div
1008
-              [ngClass]="{ item: true, checked: fixedTab == 'orderScope' }"
1009
-              (click)="showOrderScope()"
1010
-            >
964
+          <div class="others" [ngStyle]="{ height: showLastItems ? mainRole ? 35 * 6 + 'px' : 35 * 5 + 'px' : 0 }">
965
+            <div [ngClass]="{ item: true, checked: fixedTab == 'orderScope' }" (click)="showOrderScope()">
1011
               工单范围
966
               工单范围
1012
             </div>
967
             </div>
1013
-            <div
1014
-              [ngClass]="{ item: true, checked: fixedTab == 'colType' }"
1015
-              (click)="checkFixedTab('colType')"
1016
-            >
968
+            <div [ngClass]="{ item: true, checked: fixedTab == 'colType' }" (click)="checkFixedTab('colType')">
1017
               展示形式
969
               展示形式
1018
             </div>
970
             </div>
1019
-            <div
1020
-              [ngClass]="{ item: true, checked: fixedTab == 'nucleicAcidPrinting' }"
1021
-              (click)="checkFixedTab('nucleicAcidPrinting')"
1022
-              *ngIf="isShowNucleicAcidPrinting"
1023
-            >
971
+            <div [ngClass]="{ item: true, checked: fixedTab == 'nucleicAcidPrinting' }" (click)="checkFixedTab('nucleicAcidPrinting')" *ngIf="isShowNucleicAcidPrinting">
1024
               核酸打印
972
               核酸打印
1025
             </div>
973
             </div>
1026
-            <div
1027
-              [ngClass]="{ item: true, checked: fixedTab == 'queueNum' }"
1028
-              (click)="checkFixedTab('queueNum')"
1029
-            >
974
+            <div [ngClass]="{ item: true, checked: fixedTab == 'queueNum' }" (click)="checkFixedTab('queueNum')">
1030
               叫号信息
975
               叫号信息
1031
             </div>
976
             </div>
1032
-            <div
1033
-              [ngClass]="{ item: true, checked: fixedTab == 'toSystem' }"
1034
-              *ngIf="mainRole"
1035
-              (click)="checkFixedTab('toSystem')"
1036
-            >
977
+            <div [ngClass]="{ item: true, checked: fixedTab == 'toSystem' }" *ngIf="mainRole" (click)="checkFixedTab('toSystem')">
1037
               返回系统
978
               返回系统
1038
             </div>
979
             </div>
1039
-            <div
1040
-              [ngClass]="{ item: true, checked: fixedTab == 'logout' }"
1041
-              (click)="checkFixedTab('logout')"
1042
-            >
980
+            <div [ngClass]="{ item: true, checked: fixedTab == 'logout' }" (click)="checkFixedTab('logout')">
1043
               退出系统
981
               退出系统
1044
             </div>
982
             </div>
1045
           </div>
983
           </div>
@@ -1171,7 +1109,6 @@
1171
             </nz-select>
1109
             </nz-select>
1172
           </div>
1110
           </div>
1173
           <div class="newTopItem">
1111
           <div class="newTopItem">
1174
-            <span class="tel grayFont" *ngIf="callNumber">来电号码:{{ callNumber }}</span>
1175
             <span class="grayFont">任务类型:</span>
1112
             <span class="grayFont">任务类型:</span>
1176
             <nz-select *ngIf="applyDept" style="width: 146px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="onSearchTaskBuild($event)" nzPlaceHolder="请选择任务类型" [(ngModel)]="taskBuild" (ngModelChange)="changeTaskBuild($event)">
1113
             <nz-select *ngIf="applyDept" style="width: 146px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="onSearchTaskBuild($event)" nzPlaceHolder="请选择任务类型" [(ngModel)]="taskBuild" (ngModelChange)="changeTaskBuild($event)">
1177
               <ng-container *ngFor="let option of searchTaskList">
1114
               <ng-container *ngFor="let option of searchTaskList">
@@ -1183,6 +1120,9 @@
1183
               </nz-option>
1120
               </nz-option>
1184
             </nz-select>
1121
             </nz-select>
1185
           </div>
1122
           </div>
1123
+          <div class="newTopItem">
1124
+            <span class="grayFont">来电电话:{{callNumber}}</span>
1125
+          </div>
1186
         </div>
1126
         </div>
1187
       </div>
1127
       </div>
1188
       <div class="title" *ngIf="currentTabIndex === '99999'">
1128
       <div class="title" *ngIf="currentTabIndex === '99999'">
@@ -2364,6 +2304,8 @@
2364
     content="您确认要退出系统吗?"
2304
     content="您确认要退出系统吗?"
2365
   ></app-dialog-delete>
2305
   ></app-dialog-delete>
2366
 </div>
2306
 </div>
2307
+<!-- 绑定分机 -->
2308
+<app-bind-extension-number [hsmsData]="hsmsData" [itsmData]="itsmData" [websocketLoading]="websocketLoading" *ngIf="showBindExtensionNumberModal" (confirmModal)="checkIn($event)" (cancelModal)="cancelBindExtensionNumber($event)"></app-bind-extension-number>
2367
 <!-- 工单范围 -->
2309
 <!-- 工单范围 -->
2368
 <app-order-scope *ngIf="showInitModal" [hsmsData]="hsmsData" [itsmData]="itsmData" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
2310
 <app-order-scope *ngIf="showInitModal" [hsmsData]="hsmsData" [itsmData]="itsmData" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
2369
 <!-- 消息弹框模板 -->
2311
 <!-- 消息弹框模板 -->

+ 21 - 5
src/app/views/fuwutai/fuwutai.component.less

@@ -1715,19 +1715,35 @@
1715
       position: relative;
1715
       position: relative;
1716
       z-index: 8;
1716
       z-index: 8;
1717
 
1717
 
1718
+      .fixedMenuWrap{
1719
+        border-radius: 5px;
1720
+        margin-bottom: 16px;
1721
+        .fixedMenu{
1722
+          border-radius: 0!important;
1723
+          &:last-of-type{
1724
+            border: none!important;
1725
+          }
1726
+        }
1727
+      }
1728
+
1718
       .fixedMenu {
1729
       .fixedMenu {
1719
         border: 1px solid #e5e9ed;
1730
         border: 1px solid #e5e9ed;
1720
         color: @primary-color;
1731
         color: @primary-color;
1721
         background: rgb(255, 255, 255);
1732
         background: rgb(255, 255, 255);
1722
         text-align: center;
1733
         text-align: center;
1723
         border-radius: 5px 0 0 5px;
1734
         border-radius: 5px 0 0 5px;
1724
-        // box-shadow: -3px 4px 15px rgba(234, 233, 233, .5);
1725
-
1726
-        &.hujiaozhongxin {
1727
-          margin-bottom: 5px;
1728
-        }
1729
 
1735
 
1730
         .menuItems {
1736
         .menuItems {
1737
+          .call-icon{
1738
+            font-size: 26px;
1739
+            color: @primary-color;
1740
+            padding: 16px 0;
1741
+          }
1742
+          .call-status{
1743
+            background-color: @primary-color;
1744
+            color: #fff;
1745
+            width: 100%;
1746
+          }
1731
           .item {
1747
           .item {
1732
             height: 35px;
1748
             height: 35px;
1733
             line-height: 35px;
1749
             line-height: 35px;

+ 226 - 239
src/app/views/fuwutai/fuwutai.component.ts

@@ -24,6 +24,7 @@ import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, pa
24
 import { UploadFile } from 'ng-zorro-antd';
24
 import { UploadFile } from 'ng-zorro-antd';
25
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
25
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
26
 import cloneDeep from 'lodash-es/cloneDeep'
26
 import cloneDeep from 'lodash-es/cloneDeep'
27
+import { WebsocketIncomingService } from 'src/app/services/websocket-incoming.service';
27
 
28
 
28
 // 日期禁用
29
 // 日期禁用
29
 function range(start: number, end: number): number[] {
30
 function range(start: number, end: number): number[] {
@@ -110,6 +111,7 @@ export class FuwutaiComponent implements OnInit {
110
     private tool: ToolService,
111
     private tool: ToolService,
111
     private http: HttpClient,
112
     private http: HttpClient,
112
     public route: ActivatedRoute,
113
     public route: ActivatedRoute,
114
+    public incomingService: WebsocketIncomingService,
113
   ) {}
115
   ) {}
114
   validateFormZy!: FormGroup;
116
   validateFormZy!: FormGroup;
115
   validateFormQt!: FormGroup;
117
   validateFormQt!: FormGroup;
@@ -145,13 +147,6 @@ export class FuwutaiComponent implements OnInit {
145
   targetDept; //目标科室
147
   targetDept; //目标科室
146
   noArrives = []; //未到达列表
148
   noArrives = []; //未到达列表
147
   newLoading = false; //loading
149
   newLoading = false; //loading
148
-  //绑定分机
149
-  bindingExtensionShow = false; //展示/隐藏绑定分机弹框
150
-  binding = -1; //1-确定绑定,2-重新绑定,3-绑定分机
151
-  phoneNumList = []; //所有分机列表
152
-  phoneNumListBind = []; //已绑定分机列表
153
-  phoneNumListSelected = []; //选中的分机列表
154
-  phoneNumLoading = false; //分机弹窗切换页面loading
155
   //防抖
150
   //防抖
156
   changeInpSubject = new Subject();
151
   changeInpSubject = new Subject();
157
   changeCommonInpSubject = new Subject();
152
   changeCommonInpSubject = new Subject();
@@ -229,7 +224,7 @@ export class FuwutaiComponent implements OnInit {
229
     types = types.slice(0, types.length - 1);
224
     types = types.slice(0, types.length - 1);
230
     let postData = {
225
     let postData = {
231
       workOrder: {
226
       workOrder: {
232
-        serTaskTypes: types || "null",
227
+        serTaskTypes: types || undefined,
233
         serGdState: 1,
228
         serGdState: 1,
234
         range: this.orderScopeRadio,
229
         range: this.orderScopeRadio,
235
         platform: 3,
230
         platform: 3,
@@ -436,7 +431,7 @@ export class FuwutaiComponent implements OnInit {
436
           if (go === "&go&") {
431
           if (go === "&go&") {
437
             this.applyDept = data["startDept"].id;
432
             this.applyDept = data["startDept"].id;
438
             this.applyStartDept = data["startDept"];
433
             this.applyStartDept = data["startDept"];
439
-            this.callNumber = data["phone"];
434
+            this.incidentModel.incomingPhone = this.callNumber = data["phone"];
440
             this.showPromptModal("建单", true, "", "closeGo");
435
             this.showPromptModal("建单", true, "", "closeGo");
441
           } else {
436
           } else {
442
             this.showPromptModal("建单", true, "", "close");
437
             this.showPromptModal("建单", true, "", "close");
@@ -471,7 +466,7 @@ export class FuwutaiComponent implements OnInit {
471
         if (go === "&go&") {
466
         if (go === "&go&") {
472
           this.applyDept = data["startDept"].id;
467
           this.applyDept = data["startDept"].id;
473
           this.applyStartDept = data["startDept"];
468
           this.applyStartDept = data["startDept"];
474
-          this.callNumber = data["phone"];
469
+          this.incidentModel.incomingPhone = this.callNumber = data["phone"];
475
           this.showPromptModal("建单", true, "", "closeGo");
470
           this.showPromptModal("建单", true, "", "closeGo");
476
         } else {
471
         } else {
477
           this.showPromptModal("建单", true, "", "close");
472
           this.showPromptModal("建单", true, "", "close");
@@ -530,7 +525,7 @@ export class FuwutaiComponent implements OnInit {
530
         if (go === "&go&") {
525
         if (go === "&go&") {
531
           this.applyDept = data["startDept"].id;
526
           this.applyDept = data["startDept"].id;
532
           this.applyStartDept = data["startDept"];
527
           this.applyStartDept = data["startDept"];
533
-          this.callNumber = data["phone"];
528
+          this.incidentModel.incomingPhone = this.callNumber = data["phone"];
534
           this.showPromptModal("建单", true, "", "closeGo");
529
           this.showPromptModal("建单", true, "", "closeGo");
535
         } else {
530
         } else {
536
           this.showPromptModal("建单", true, "", "close");
531
           this.showPromptModal("建单", true, "", "close");
@@ -696,7 +691,6 @@ export class FuwutaiComponent implements OnInit {
696
     this.initRole();
691
     this.initRole();
697
     this.initLogin();
692
     this.initLogin();
698
     this.retract();
693
     this.retract();
699
-    this.windowResize();
700
     this.refresh();
694
     this.refresh();
701
     this.initOrderScope();
695
     this.initOrderScope();
702
     this.getOrderList(1);
696
     this.getOrderList(1);
@@ -715,7 +709,7 @@ export class FuwutaiComponent implements OnInit {
715
     document.removeEventListener("keydown", this.quickShowNewOrder.bind(this));
709
     document.removeEventListener("keydown", this.quickShowNewOrder.bind(this));
716
     this.quickShowNewOrder = null;
710
     this.quickShowNewOrder = null;
717
     clearTimeout(this.refreshTimerId);
711
     clearTimeout(this.refreshTimerId);
718
-    this.phones.closeWs(true);
712
+    this.incomingService.closeWs(true);
719
     this.sers.closeWs(true);
713
     this.sers.closeWs(true);
720
   }
714
   }
721
   ngAfterViewInit() {
715
   ngAfterViewInit() {
@@ -800,6 +794,7 @@ export class FuwutaiComponent implements OnInit {
800
 
794
 
801
   // 工单范围设置回显
795
   // 工单范围设置回显
802
   checkedHos;// 配送-院区选择
796
   checkedHos;// 配送-院区选择
797
+  checkedHosDTO;// 配送-院区选择
803
   scopeGroups = []; //配送-当前所属人员分组
798
   scopeGroups = []; //配送-当前所属人员分组
804
   orderScopeRadio;// 配送-工单范围
799
   orderScopeRadio;// 配送-工单范围
805
 
800
 
@@ -825,6 +820,7 @@ export class FuwutaiComponent implements OnInit {
825
     }
820
     }
826
     let scopeInfo = this.user.user.scope;
821
     let scopeInfo = this.user.user.scope;
827
     this.checkedHos = scopeInfo.hospitalId ? scopeInfo.hospitalId.id : undefined;
822
     this.checkedHos = scopeInfo.hospitalId ? scopeInfo.hospitalId.id : undefined;
823
+    this.checkedHosDTO = scopeInfo.hospitalId || undefined;
828
     this.orderScopeRadio = scopeInfo.range + "";
824
     this.orderScopeRadio = scopeInfo.range + "";
829
     let groupIds = scopeInfo.groupIds || [];
825
     let groupIds = scopeInfo.groupIds || [];
830
     let dutyGroupList = scopeInfo.dutyGroupList || [];
826
     let dutyGroupList = scopeInfo.dutyGroupList || [];
@@ -834,6 +830,7 @@ export class FuwutaiComponent implements OnInit {
834
     }
830
     }
835
     this.hsmsData = {
831
     this.hsmsData = {
836
       checkedHos: this.checkedHos,
832
       checkedHos: this.checkedHos,
833
+      checkedHosDTO: this.checkedHosDTO,
837
       scopeGroups: this.scopeGroups,
834
       scopeGroups: this.scopeGroups,
838
       orderScopeRadio: this.orderScopeRadio || '0',
835
       orderScopeRadio: this.orderScopeRadio || '0',
839
       hsmsSwitch: scopeInfo.hsmsSwitch === 1,
836
       hsmsSwitch: scopeInfo.hsmsSwitch === 1,
@@ -865,7 +862,7 @@ export class FuwutaiComponent implements OnInit {
865
       this.cancelOrderScope();
862
       this.cancelOrderScope();
866
       this.showPromptModal("保存", true, "");
863
       this.showPromptModal("保存", true, "");
867
       // 关闭phone的websocket
864
       // 关闭phone的websocket
868
-      this.phones.closeWs(true);
865
+      this.incomingService.closeWs(true);
869
       this.getPhoneNum(false);
866
       this.getPhoneNum(false);
870
       this.user.user.scope = data.data;
867
       this.user.user.scope = data.data;
871
       localStorage.setItem("user", JSON.stringify(this.user));
868
       localStorage.setItem("user", JSON.stringify(this.user));
@@ -886,6 +883,28 @@ export class FuwutaiComponent implements OnInit {
886
     this.showInitModal = true;
883
     this.showInitModal = true;
887
   }
884
   }
888
 
885
 
886
+  // 绑定分机
887
+  showBindExtensionNumberModal: boolean = false;
888
+  cancelBindExtensionNumber() {
889
+    this.showBindExtensionNumberModal = false;
890
+  }
891
+
892
+  showBindExtensionNumber() {
893
+    this.showBindExtensionNumberModal = true;
894
+  }
895
+
896
+  // 保存绑定分机-签入
897
+  checkIn(phoneNumber){
898
+    this.incomingService.setPhoneNumber(phoneNumber);
899
+    this.incomingService.closeWs(true);
900
+    this.getWebsocketPhone();
901
+  }
902
+
903
+  // 签出
904
+  checkOut(){
905
+    this.showDelModal(undefined, undefined,'您确认要签出吗?','签出','checkout');
906
+  }
907
+
889
   // 连接websocket
908
   // 连接websocket
890
   getWebsocketSer() {
909
   getWebsocketSer() {
891
     this.sers
910
     this.sers
@@ -895,94 +914,128 @@ export class FuwutaiComponent implements OnInit {
895
         if (result && result.content) {
914
         if (result && result.content) {
896
           this.createBasicNotification(result);
915
           this.createBasicNotification(result);
897
         }
916
         }
898
-        this.windowResize();
899
       });
917
       });
900
   }
918
   }
901
-  // 连接websocket---phone
902
-  bindOkLoading = false;
919
+
920
+  // 连接websocket
921
+  websocketLoading:boolean = false; //websocket连接状态
903
   getWebsocketPhone() {
922
   getWebsocketPhone() {
904
-    this.bindOkLoading = true;
905
-    let userCount =
906
-      this.user.user.account + "|" + this.phoneNumListSelected.join("_");
907
-    this.phones.connectWs(http.phoneWs, { userCount }).subscribe((data) => {
908
-      // data = { status: 201, phone: '013581394341' };//ceshi
909
-      console.log(data);
910
-      this.bindOkLoading = false;
911
-      if (data.status == 200 && data.phone) {
912
-        localStorage.setItem("phones", data.phone);
913
-        this.phoneNumListBind = data.phone.split("_");
914
-        this.phoneNumListBind.forEach((item) => {
915
-          let obj = this.phoneNumList.find((item1) => item1.value === item);
916
-          if (obj) {
917
-            obj.checked = true;
918
-          }
919
-        });
920
-        this.binding = 2;
921
-      } else if (data.status == 201 && data.phone) {
922
-        let dataObj = {
923
-          idx: 0,
924
-          sum: 10,
925
-          department: {
926
-            searchType: 2,
927
-            phone: data.phone,
928
-          },
929
-        };
930
-        this.mainService
931
-          .getFetchDataList("data", "department", dataObj)
932
-          .subscribe((result) => {
933
-            if (result.status == 200) {
934
-              console.log(result);
935
-              if (result.list.length > 0) {
936
-                //绑定了科室
937
-                // this.callNumber = '';
938
-                if (!this.newOrderShow && !this.newOrderShowOpen) {
939
-                  this.applyDeptMiddle = result.list[0];
940
-                  this.showNewOrder("yes");
941
-                }
942
-                // this.changeApplicationDepartment();
943
-              } else {
944
-                //没绑定科室
945
-                // this.callNumber = '';
946
-                console.log(this.newOrderShow);
947
-                if (!this.newOrderShow && !this.newOrderShowOpen) {
948
-                  this.applyDept = null;
949
-                  this.showNewOrder("no", data.phone);
923
+    this.websocketLoading = true;
924
+    this.incomingService.connectWs().subscribe((data) => {
925
+      const sign = this.incomingService.getSign();
926
+      if(sign === 'box'){
927
+        // 录音盒
928
+        // data = { status: 201, phone: '013581394341' };//ceshi
929
+        console.log(data);
930
+        this.websocketLoading = false;
931
+        this.incidentModel.callID = data.callId || undefined;
932
+        if (data.status == 200 && data.phone) {
933
+          this.msg.info('签入成功');
934
+          this.cancelBindExtensionNumber();
935
+        } else if (data.status == 201 && data.phone) {
936
+          this.incidentModel.incomingPhone = this.callNumber = data.phone;
937
+          let dataObj = {
938
+            idx: 0,
939
+            sum: 10,
940
+            department: {
941
+              searchType: 2,
942
+              phone: data.phone,
943
+            },
944
+          };
945
+          this.mainService
946
+            .getFetchDataList("data", "department", dataObj)
947
+            .subscribe((result) => {
948
+              if (result.status == 200) {
949
+                console.log(result);
950
+                if (result.list.length > 0) {
951
+                  //绑定了科室
952
+                  if (!this.newOrderShow && !this.newOrderShowOpen) {
953
+                    this.applyDeptMiddle = result.list[0];
954
+                    this.showNewOrder("yes", data.phone, true);
955
+                  }
956
+                } else {
957
+                  //没绑定科室
958
+                  console.log(this.newOrderShow);
959
+                  if (!this.newOrderShow && !this.newOrderShowOpen) {
960
+                    this.applyDept = null;
961
+                    this.showNewOrder("no", data.phone, true);
962
+                  }
950
                 }
963
                 }
951
-                // this.changeApplicationDepartment(data.phone);
952
               }
964
               }
953
-            }
954
-          });
955
-      } else if (data.status == 201 && data.phone === "") {
956
-        //没绑定科室
957
-        // this.callNumber = '';
958
-        if (!this.newOrderShow && !this.newOrderShowOpen) {
959
-          this.applyDept = null;
960
-          this.showNewOrder("no", data.phone);
965
+            });
966
+        } else if (data.status == 201 && data.phone === "") {
967
+          //没绑定科室
968
+          if (!this.newOrderShow && !this.newOrderShowOpen) {
969
+            this.applyDept = null;
970
+            this.showNewOrder("no", data.phone, true);
971
+          }
961
         }
972
         }
962
-        // this.changeApplicationDepartment(data.phone);
973
+      }else if(sign === 'callCenter'){
974
+        // 呼叫中心
975
+        console.log(data);
976
+        this.websocketLoading = false;
977
+        // this.incidentModel.callID = data.callId || undefined;
978
+        // if (data.status == 200 && data.phone) {
979
+        //   this.cancelBindExtensionNumber();
980
+        // } else if (data.status == 201 && data.phone) {
981
+        //   let dataObj = {
982
+        //     idx: 0,
983
+        //     sum: 10,
984
+        //     department: {
985
+        //       searchType: 2,
986
+        //       phone: data.phone,
987
+        //     },
988
+        //   };
989
+        //   this.mainService
990
+        //     .getFetchDataList("data", "department", dataObj)
991
+        //     .subscribe((result) => {
992
+        //       if (result.status == 200) {
993
+        //         console.log(result);
994
+        //         if (result.list.length > 0) {
995
+        //           //绑定了科室
996
+        //           if (!this.newOrderShow && !this.newOrderShowOpen) {
997
+        //             this.applyDeptMiddle = result.list[0];
998
+        //             this.showNewOrder("yes");
999
+        //           }
1000
+        //         } else {
1001
+        //           //没绑定科室
1002
+        //           console.log(this.newOrderShow);
1003
+        //           if (!this.newOrderShow && !this.newOrderShowOpen) {
1004
+        //             this.applyDept = null;
1005
+        //             this.showNewOrder("no", data.phone);
1006
+        //           }
1007
+        //         }
1008
+        //       }
1009
+        //     });
1010
+        // } else if (data.status == 201 && data.phone === "") {
1011
+        //   //没绑定科室
1012
+        //   if (!this.newOrderShow && !this.newOrderShowOpen) {
1013
+        //     this.applyDept = null;
1014
+        //     this.showNewOrder("no", data.phone);
1015
+        //   }
1016
+        // }
963
       }
1017
       }
964
-      this.windowResize();
965
     });
1018
     });
966
   }
1019
   }
967
   //确定绑定
1020
   //确定绑定
968
-  bindingOk() {
969
-    if (this.phoneNumListSelected.length > 0) {
970
-      this.phones.closeWs(true);
971
-      this.getWebsocketPhone();
972
-    } else {
973
-      localStorage.removeItem("phones");
974
-      this.binding = 3;
975
-      this.phoneNumListBind = [];
976
-      this.phoneNumList.forEach((item) => {
977
-        item.checked = false;
978
-      });
979
-      this.phones.closeWs(true);
980
-    }
981
-  }
1021
+  // bindingOk() {
1022
+  //   if (this.phoneNumListSelected.length > 0) {
1023
+  //     this.incomingService.closeWs(true);
1024
+  //     this.getWebsocketPhone();
1025
+  //   } else {
1026
+  //     this.incomingService.removePhoneNumber();
1027
+  //     this.binding = 3;
1028
+  //     this.phoneNumListBind = [];
1029
+  //     this.phoneNumList.forEach((item) => {
1030
+  //       item.checked = false;
1031
+  //     });
1032
+  //     this.incomingService.closeWs(true);
1033
+  //   }
1034
+  // }
982
   // 选择分机
1035
   // 选择分机
983
-  changePhones(value) {
984
-    this.phoneNumListSelected = value;
985
-  }
1036
+  // changePhones(value) {
1037
+  //   this.phoneNumListSelected = value;
1038
+  // }
986
 
1039
 
987
   onChange(value: number): void {
1040
   onChange(value: number): void {
988
     console.log(`onChange: ${value}`);
1041
     console.log(`onChange: ${value}`);
@@ -1256,53 +1309,54 @@ export class FuwutaiComponent implements OnInit {
1256
     let that = this;
1309
     let that = this;
1257
     that.typeId = typeId;
1310
     that.typeId = typeId;
1258
     this.typeData = this.scopeGroups.find(v => v.id === typeId);
1311
     this.typeData = this.scopeGroups.find(v => v.id === typeId);
1259
-    let type = this.typeData.type;
1260
-    // 配送
1261
-    if(type === 1 || type === 2){
1262
-      let postData = {
1263
-        groups: [typeId],
1264
-        idx: 0,
1265
-        sum: 100,
1266
-        hosId: this.checkedHos,
1267
-      };
1268
-      // if (typeId == -1) {
1269
-      //   let groups = [];
1270
-      //   that.scopeGroups.forEach((e) => {
1271
-      //     groups.push(e.id);
1272
-      //   });
1273
-      //   postData.groups = groups;
1274
-      // }
1275
-      if (this.hurseInfoHiding == '1'){
1276
-        that.workerMessage = [];
1277
-        that.initTopCount();
1278
-        return;
1312
+    if(this.typeData){
1313
+      let type = this.typeData.type;
1314
+      // 配送
1315
+      if(type === 1 || type === 2){
1316
+        let postData = {
1317
+          groups: [typeId],
1318
+          idx: 0,
1319
+          sum: 100,
1320
+          hosId: this.checkedHos,
1321
+        };
1322
+        // if (typeId == -1) {
1323
+        //   let groups = [];
1324
+        //   that.scopeGroups.forEach((e) => {
1325
+        //     groups.push(e.id);
1326
+        //   });
1327
+        //   postData.groups = groups;
1328
+        // }
1329
+        if (this.hurseInfoHiding == '1'){
1330
+          that.workerMessage = [];
1331
+          that.initTopCount();
1332
+          return;
1333
+        }
1334
+        this.wLoading = true;
1335
+        that.mainService.getSerInfo("getWorkInfo", postData).subscribe((data) => {
1336
+          this.wLoading = false;
1337
+          that.workerMessage = data.data ? data.data : [];
1338
+          that.initTopCount();
1339
+        });
1279
       }
1340
       }
1280
-      this.wLoading = true;
1281
-      that.mainService.getSerInfo("getWorkInfo", postData).subscribe((data) => {
1282
-        this.wLoading = false;
1283
-        that.workerMessage = data.data ? data.data : [];
1284
-        that.initTopCount();
1285
-      });
1286
-    }
1287
 
1341
 
1288
-    // 运维
1289
-    if(type === 3){
1290
-      let postData = {
1291
-        groups: [typeId],
1292
-      };
1293
-      if (this.hurseInfoHiding == '1'){
1294
-        that.workerMessage = [];
1295
-        that.initTopCount();
1296
-        return;
1342
+      // 运维
1343
+      if(type === 3){
1344
+        let postData = {
1345
+          groups: [typeId],
1346
+        };
1347
+        if (this.hurseInfoHiding == '1'){
1348
+          that.workerMessage = [];
1349
+          that.initTopCount();
1350
+          return;
1351
+        }
1352
+        this.wLoading = true;
1353
+        that.mainService.incidentUserTaskCount(postData).subscribe((data:any) => {
1354
+          this.wLoading = false;
1355
+          that.workerMessage = data.data ? data.data : [];
1356
+          that.initTopCount();
1357
+        });
1297
       }
1358
       }
1298
-      this.wLoading = true;
1299
-      that.mainService.incidentUserTaskCount(postData).subscribe((data:any) => {
1300
-        this.wLoading = false;
1301
-        that.workerMessage = data.data ? data.data : [];
1302
-        that.initTopCount();
1303
-      });
1304
     }
1359
     }
1305
-
1306
   }
1360
   }
1307
 
1361
 
1308
   // 获取回访列表
1362
   // 获取回访列表
@@ -1313,7 +1367,7 @@ export class FuwutaiComponent implements OnInit {
1313
       sum: 1,
1367
       sum: 1,
1314
       incident: {
1368
       incident: {
1315
         "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1369
         "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1316
-        "hosIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1370
+        "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1317
         "urgentType": +this.itsmData.orderScopeRadio + 1,
1371
         "urgentType": +this.itsmData.orderScopeRadio + 1,
1318
         "queryTask": "callback",
1372
         "queryTask": "callback",
1319
         "assignee": this.tool.getCurrentUserId(),
1373
         "assignee": this.tool.getCurrentUserId(),
@@ -1383,7 +1437,7 @@ export class FuwutaiComponent implements OnInit {
1383
 
1437
 
1384
         postData.workOrderQuery = {
1438
         postData.workOrderQuery = {
1385
           workOrder: {
1439
           workOrder: {
1386
-            serTaskTypes: types || "null",
1440
+            serTaskTypes: types || undefined,
1387
             serGdState: stateId,
1441
             serGdState: stateId,
1388
             range: this.orderScopeRadio,
1442
             range: this.orderScopeRadio,
1389
             platform: 3,
1443
             platform: 3,
@@ -1408,7 +1462,7 @@ export class FuwutaiComponent implements OnInit {
1408
       if(stateId == 1){
1462
       if(stateId == 1){
1409
         postData.incidentQuery.incident = {
1463
         postData.incidentQuery.incident = {
1410
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1464
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1411
-          "hosIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1465
+          "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1412
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1466
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1413
           "queryTask": "storageAccept",
1467
           "queryTask": "storageAccept",
1414
           "assignee": this.tool.getCurrentUserId(),
1468
           "assignee": this.tool.getCurrentUserId(),
@@ -1417,7 +1471,7 @@ export class FuwutaiComponent implements OnInit {
1417
       }else if(stateId == 2){
1471
       }else if(stateId == 2){
1418
         postData.incidentQuery.incident = {
1472
         postData.incidentQuery.incident = {
1419
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1473
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1420
-          "hosIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1474
+          "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1421
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1475
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1422
           "queryTask": "todoReassign",
1476
           "queryTask": "todoReassign",
1423
           "deleteFlag": 0,
1477
           "deleteFlag": 0,
@@ -1425,7 +1479,7 @@ export class FuwutaiComponent implements OnInit {
1425
       }else if(stateId == 3){
1479
       }else if(stateId == 3){
1426
         postData.incidentQuery.incident = {
1480
         postData.incidentQuery.incident = {
1427
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1481
           "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1428
-          "hosIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1482
+          "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1429
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1483
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1430
           "queryTask": "doing",
1484
           "queryTask": "doing",
1431
           "assignee": this.tool.getCurrentUserId(),
1485
           "assignee": this.tool.getCurrentUserId(),
@@ -1491,21 +1545,6 @@ export class FuwutaiComponent implements OnInit {
1491
       });
1545
       });
1492
   }
1546
   }
1493
 
1547
 
1494
-  // 页面resize
1495
-  windowResize() {
1496
-    let fixedMenu = document.getElementById("fixedMenu");
1497
-    if (!fixedMenu) return;
1498
-    window.addEventListener("resize", () => {
1499
-      let wh = window.innerHeight;
1500
-      let _y = parseFloat(fixedMenu.style.top);
1501
-      if (!_y) return;
1502
-      if (_y > wh - fixedMenu.clientHeight) {
1503
-        _y = wh - fixedMenu.clientHeight;
1504
-      }
1505
-      fixedMenu.style.top = _y + "px";
1506
-    });
1507
-  }
1508
-
1509
   // 计算顶部行数
1548
   // 计算顶部行数
1510
   showRowNum: number; // 已展示行数
1549
   showRowNum: number; // 已展示行数
1511
   maxNum: number; //可展示行数最大值
1550
   maxNum: number; //可展示行数最大值
@@ -1643,7 +1682,7 @@ export class FuwutaiComponent implements OnInit {
1643
     }
1682
     }
1644
     localStorage.removeItem("user");
1683
     localStorage.removeItem("user");
1645
     localStorage.removeItem("menu");
1684
     localStorage.removeItem("menu");
1646
-    localStorage.removeItem("phones");
1685
+    this.incomingService.removePhoneNumber();
1647
     localStorage.removeItem("index");
1686
     localStorage.removeItem("index");
1648
     // 假退出
1687
     // 假退出
1649
     this.mainService.logOut().subscribe((data) => {
1688
     this.mainService.logOut().subscribe((data) => {
@@ -1657,7 +1696,7 @@ export class FuwutaiComponent implements OnInit {
1657
         }
1696
         }
1658
         localStorage.removeItem("user");
1697
         localStorage.removeItem("user");
1659
         localStorage.removeItem("menu");
1698
         localStorage.removeItem("menu");
1660
-        localStorage.removeItem("phones");
1699
+        this.incomingService.removePhoneNumber();
1661
         localStorage.removeItem("index");
1700
         localStorage.removeItem("index");
1662
       }
1701
       }
1663
     });
1702
     });
@@ -1766,7 +1805,7 @@ export class FuwutaiComponent implements OnInit {
1766
         this.incidentModel.department = isInit ? this.incidentModel.department : null;
1805
         this.incidentModel.department = isInit ? this.incidentModel.department : null;
1767
 
1806
 
1768
         //正常初始化
1807
         //正常初始化
1769
-        this.getAutoWorkTypes();
1808
+        this.getAutoWorkTypes(false);
1770
         return;
1809
         return;
1771
       }
1810
       }
1772
     }
1811
     }
@@ -1830,7 +1869,7 @@ export class FuwutaiComponent implements OnInit {
1830
         this.searchTaskList.forEach((item) => {
1869
         this.searchTaskList.forEach((item) => {
1831
           item.sid = item.associationTypeId + "_" + item.id;
1870
           item.sid = item.associationTypeId + "_" + item.id;
1832
         });
1871
         });
1833
-        this.getAutoWorkTypes();
1872
+        this.getAutoWorkTypes(true);
1834
       }
1873
       }
1835
     });
1874
     });
1836
   }
1875
   }
@@ -1847,80 +1886,16 @@ export class FuwutaiComponent implements OnInit {
1847
       hosId: this.checkedHos,
1886
       hosId: this.checkedHos,
1848
     });
1887
     });
1849
   }
1888
   }
1850
-  //打开绑定分机
1851
-  showBindingExtension() {
1852
-    if (this.fixedTab == "bindingExtension") {
1853
-      this.fixedTab = "";
1854
-      this.bindingExtensionShow = false;
1855
-    } else {
1856
-      this.bindingExtensionShow = true;
1857
-      this.fixedTab = "bindingExtension";
1858
-    }
1859
-    if (this.phoneNumListBind.length) {
1860
-      this.binding = 2; //重新绑定
1861
-    } else {
1862
-      this.binding = 3; //绑定分机
1863
-    }
1864
-    this.getPhoneNumList();
1865
-  }
1866
-  //获取所有分机号码列表
1867
-  getPhoneNumList() {
1868
-    if(!this.hsmsData.hsmsSwitch){
1869
-      return;
1870
-    }
1871
-    this.phoneNumLoading = true;
1872
-    let postData = {
1873
-      idx: 0,
1874
-      sum: 100,
1875
-      hospitalConfig: { hosId: this.checkedHos },
1876
-    };
1877
-    this.mainService
1878
-      .getFetchDataList("simple/data", "hospitalConfig", postData)
1879
-      .subscribe((result) => {
1880
-        this.phoneNumLoading = false;
1881
-        this.phoneNumList = result.list.filter(
1882
-          (item) => item.key.includes("phone_num_port") && item.value
1883
-        );
1884
-        this.phoneNumList.map((item) => {
1885
-          return { ...item, checked: false };
1886
-        });
1887
-        this.phoneNumListBind.forEach((item) => {
1888
-          let obj = this.phoneNumList.find((item1) => item1.value === item);
1889
-          if (obj) {
1890
-            obj.checked = true;
1891
-          }
1892
-        });
1893
-      });
1894
-  }
1889
+
1895
   getPhoneNum(flag = true) {
1890
   getPhoneNum(flag = true) {
1896
     if (!flag) {
1891
     if (!flag) {
1897
       //切换院区的时候清除掉缓存中的号码
1892
       //切换院区的时候清除掉缓存中的号码
1898
-      localStorage.removeItem("phones");
1899
-    }
1900
-    this.phoneNumListBind = localStorage.getItem("phones")
1901
-      ? localStorage.getItem("phones").split("_")
1902
-      : [];
1903
-    this.phoneNumListSelected = localStorage.getItem("phones")
1904
-      ? localStorage.getItem("phones").split("_")
1905
-      : [];
1906
-    if (this.phoneNumListBind.length) {
1893
+      this.incomingService.removePhoneNumber();
1894
+    }
1895
+    if (this.incomingService.getPhoneNumber()) {
1907
       this.getWebsocketPhone();
1896
       this.getWebsocketPhone();
1908
     }
1897
     }
1909
   }
1898
   }
1910
-  // 绑定分机,重新绑定
1911
-  bindingHandle() {
1912
-    this.binding = 1;
1913
-    this.phoneNumList.forEach((item) => {
1914
-      item.checked = false;
1915
-    });
1916
-    this.phoneNumList.forEach((item) => {
1917
-      this.phoneNumListBind.forEach((v) => {
1918
-        if (item.value == v) {
1919
-          item.checked = true;
1920
-        }
1921
-      });
1922
-    });
1923
-  }
1924
   // 点击tab切换
1899
   // 点击tab切换
1925
   tabClick(key) {
1900
   tabClick(key) {
1926
     let preCurrentTabIndex = this.currentTabIndex;
1901
     let preCurrentTabIndex = this.currentTabIndex;
@@ -1943,11 +1918,11 @@ export class FuwutaiComponent implements OnInit {
1943
     this.deptQtList["startStatus"] = 0;
1918
     this.deptQtList["startStatus"] = 0;
1944
     this.deptQtList["endStatus"] = 0;
1919
     this.deptQtList["endStatus"] = 0;
1945
 
1920
 
1946
-    if(this.currentTabIndex === '99999'){
1947
-      if(this.incidentModel.department){
1921
+    if(preCurrentTabIndex === '99999'){
1922
+      if(this.applyDept){
1948
         this.rightTitle_tab = [
1923
         this.rightTitle_tab = [
1949
-          { id: 2, name: '近期维修' },
1950
-          { id: 3, name: '知识库' },
1924
+          { id: 0, name: '近期配送' },
1925
+          { id: 1, name: '转出院记录' },
1951
         ]
1926
         ]
1952
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1927
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1953
       }
1928
       }
@@ -1964,11 +1939,11 @@ export class FuwutaiComponent implements OnInit {
1964
       if(!this.incidentModel.source && source){
1939
       if(!this.incidentModel.source && source){
1965
         this.incidentModel.source = source.id;
1940
         this.incidentModel.source = source.id;
1966
       }
1941
       }
1967
-    }else if(preCurrentTabIndex === '99999'){
1968
-      if(this.applyDept){
1942
+    }else if(this.currentTabIndex === '99999'){
1943
+      if(this.incidentModel.department){
1969
         this.rightTitle_tab = [
1944
         this.rightTitle_tab = [
1970
-          { id: 0, name: '近期配送' },
1971
-          { id: 1, name: '转出院记录' },
1945
+          { id: 2, name: '近期维修' },
1946
+          { id: 3, name: '知识库' },
1972
         ]
1947
         ]
1973
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1948
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1974
       }
1949
       }
@@ -2588,6 +2563,7 @@ export class FuwutaiComponent implements OnInit {
2588
               this.changeApplicationDepartment("");
2563
               this.changeApplicationDepartment("");
2589
             } else if (e === "&ks&") {
2564
             } else if (e === "&ks&") {
2590
               //绑定了科室
2565
               //绑定了科室
2566
+              // 配送--start
2591
               let obj = this.applicationDepartmentList.find(
2567
               let obj = this.applicationDepartmentList.find(
2592
                 (item) => item.id == this.applyDeptMiddle.id
2568
                 (item) => item.id == this.applyDeptMiddle.id
2593
               );
2569
               );
@@ -2596,6 +2572,7 @@ export class FuwutaiComponent implements OnInit {
2596
               }
2572
               }
2597
               this.applyDept = this.applyDeptMiddle.id;
2573
               this.applyDept = this.applyDeptMiddle.id;
2598
               this.changeApplicationDepartment("&ks&");
2574
               this.changeApplicationDepartment("&ks&");
2575
+              // 配送--end
2599
             } else if (e === "&go&") {
2576
             } else if (e === "&go&") {
2600
               //继续建单
2577
               //继续建单
2601
               let obj = this.applicationDepartmentList.find(
2578
               let obj = this.applicationDepartmentList.find(
@@ -2730,14 +2707,15 @@ export class FuwutaiComponent implements OnInit {
2730
       phone !== "&ks&" &&
2707
       phone !== "&ks&" &&
2731
       phone !== "&go&"
2708
       phone !== "&go&"
2732
     ) {
2709
     ) {
2733
-      this.callNumber = phone;
2710
+      // this.incidentModel.incomingPhone = this.callNumber = phone;
2734
       this.applyDept = null;
2711
       this.applyDept = null;
2735
       this.noArrives = []; //近期配送
2712
       this.noArrives = []; //近期配送
2736
     } else if (phone === "&ks&") {
2713
     } else if (phone === "&ks&") {
2737
       let filter = this.applicationDepartmentList.filter(
2714
       let filter = this.applicationDepartmentList.filter(
2738
         (item) => item.id == this.applyDept
2715
         (item) => item.id == this.applyDept
2739
       );
2716
       );
2740
-      this.callNumber = filter[0].phone;
2717
+      console.log('filter', filter)
2718
+      // this.incidentModel.incomingPhone = this.callNumber = filter[0].phone;
2741
       console.log(this.callNumber); //ceshi
2719
       console.log(this.callNumber); //ceshi
2742
       if (this.currentTabIndex == "255") {
2720
       if (this.currentTabIndex == "255") {
2743
         //患者转运
2721
         //患者转运
@@ -3024,12 +3002,13 @@ export class FuwutaiComponent implements OnInit {
3024
       this.showPromptModal("操作", true, "", "");
3002
       this.showPromptModal("操作", true, "", "");
3025
     }else{
3003
     }else{
3026
       this.newOrderShow = false; //关闭弹窗
3004
       this.newOrderShow = false; //关闭弹窗
3005
+      this.newOrderShowOpen = false; //此时可出现新的弹窗
3027
       this.showPromptModal("操作", true, "", "");
3006
       this.showPromptModal("操作", true, "", "");
3028
     }
3007
     }
3029
   }
3008
   }
3030
 
3009
 
3031
   // 新建工单->获取新建类型
3010
   // 新建工单->获取新建类型
3032
-  getAutoWorkTypes() {
3011
+  getAutoWorkTypes(isFirst) {
3033
     this.workTypesArrange = {};
3012
     this.workTypesArrange = {};
3034
     // 运维
3013
     // 运维
3035
     if(this.itsmData.mdv2Switch){
3014
     if(this.itsmData.mdv2Switch){
@@ -3066,7 +3045,7 @@ export class FuwutaiComponent implements OnInit {
3066
           this.workTypesFlag = arr.length >= 5;
3045
           this.workTypesFlag = arr.length >= 5;
3067
           // 默认选中第一项
3046
           // 默认选中第一项
3068
           if (arr.length > 0) {
3047
           if (arr.length > 0) {
3069
-            this.tabClick(arr[arr.length - 1]);
3048
+            isFirst ? this.tabClick(arr[0]) : this.tabClick(arr[arr.length - 1]);
3070
           }
3049
           }
3071
         }
3050
         }
3072
       });
3051
       });
@@ -4150,7 +4129,7 @@ export class FuwutaiComponent implements OnInit {
4150
     tipsMsg2: string,
4129
     tipsMsg2: string,
4151
     type: string,
4130
     type: string,
4152
   ) {
4131
   ) {
4153
-    e.stopPropagation();
4132
+    e && e.stopPropagation();
4154
     this.confirmDelType = type;
4133
     this.confirmDelType = type;
4155
     this.delModal = true;
4134
     this.delModal = true;
4156
     this.coopData = data;
4135
     this.coopData = data;
@@ -4190,6 +4169,14 @@ export class FuwutaiComponent implements OnInit {
4190
             this.showPromptModal(this.tipsMsg2, false, data.msg);
4169
             this.showPromptModal(this.tipsMsg2, false, data.msg);
4191
           }
4170
           }
4192
         });
4171
         });
4172
+    }else if (this.confirmDelType === "checkout") {
4173
+      //签出
4174
+      this.btnLoading = false;
4175
+      this.delModal = false;
4176
+      this.msg.info('签出成功');
4177
+
4178
+      this.incomingService.closeWs(true);
4179
+      this.incomingService.removePhoneNumber();
4193
     }
4180
     }
4194
   }
4181
   }
4195
 
4182
 

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

@@ -17,6 +17,7 @@ import { IncidentSerVisitModule } from 'src/app/components/incidentManagement/in
17
 import { IncidentSerMessageModule } from 'src/app/components/incidentManagement/incident-ser-message/incident-ser-message.module';
17
 import { IncidentSerMessageModule } from 'src/app/components/incidentManagement/incident-ser-message/incident-ser-message.module';
18
 import { IncidentSerCallModule } from 'src/app/components/incidentManagement/incident-ser-call/incident-ser-call.module';
18
 import { IncidentSerCallModule } from 'src/app/components/incidentManagement/incident-ser-call/incident-ser-call.module';
19
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
19
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
20
+import { BindExtensionNumberModule } from 'src/app/components/bind-extension-number/bind-extension-number.module';
20
 
21
 
21
 
22
 
22
 @NgModule({
23
 @NgModule({
@@ -39,6 +40,7 @@ import { VirtualScrollerModule } from 'ngx-virtual-scroller';
39
     IncidentSerMessageModule,
40
     IncidentSerMessageModule,
40
     IncidentSerCallModule,
41
     IncidentSerCallModule,
41
     VirtualScrollerModule,
42
     VirtualScrollerModule,
43
+    BindExtensionNumberModule,
42
   ]
44
   ]
43
 })
45
 })
44
 export class FuwutaiModule { }
46
 export class FuwutaiModule { }

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

@@ -4473,7 +4473,6 @@ export class HushijiandanComponent implements OnInit {
4473
     }
4473
     }
4474
     localStorage.removeItem("user");
4474
     localStorage.removeItem("user");
4475
     localStorage.removeItem("menu");
4475
     localStorage.removeItem("menu");
4476
-    localStorage.removeItem("phones");
4477
     localStorage.removeItem("index");
4476
     localStorage.removeItem("index");
4478
 
4477
 
4479
     // 假退出
4478
     // 假退出
@@ -4486,7 +4485,6 @@ export class HushijiandanComponent implements OnInit {
4486
         }
4485
         }
4487
         localStorage.removeItem("user");
4486
         localStorage.removeItem("user");
4488
         localStorage.removeItem("menu");
4487
         localStorage.removeItem("menu");
4489
-        localStorage.removeItem("phones");
4490
         localStorage.removeItem("index");
4488
         localStorage.removeItem("index");
4491
       }
4489
       }
4492
     });
4490
     });

+ 0 - 2
src/app/views/main/main.component.ts

@@ -504,7 +504,6 @@ export class MainComponent implements OnInit {
504
     }
504
     }
505
     localStorage.removeItem("user");
505
     localStorage.removeItem("user");
506
     localStorage.removeItem("menu");
506
     localStorage.removeItem("menu");
507
-    localStorage.removeItem("phones");
508
     localStorage.removeItem("index");
507
     localStorage.removeItem("index");
509
 
508
 
510
     // 假退出
509
     // 假退出
@@ -517,7 +516,6 @@ export class MainComponent implements OnInit {
517
         }
516
         }
518
         localStorage.removeItem("user");
517
         localStorage.removeItem("user");
519
         localStorage.removeItem("menu");
518
         localStorage.removeItem("menu");
520
-        localStorage.removeItem("phones");
521
         localStorage.removeItem("index");
519
         localStorage.removeItem("index");
522
       }
520
       }
523
     });
521
     });

+ 72 - 74
src/app/views/pathology/pathology.component.ts

@@ -48,8 +48,8 @@ export class PathologyComponent implements OnInit, OnDestroy {
48
   })
48
   })
49
   osComponentRef5: OverlayScrollbarsComponent;
49
   osComponentRef5: OverlayScrollbarsComponent;
50
   constructor(
50
   constructor(
51
-	private mainService: MainService, 
52
-	public router: Router, 
51
+	private mainService: MainService,
52
+	public router: Router,
53
 	private route: ActivatedRoute,
53
 	private route: ActivatedRoute,
54
 	public tool: ToolService,
54
 	public tool: ToolService,
55
 	private fb: FormBuilder,
55
 	private fb: FormBuilder,
@@ -95,7 +95,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
95
   completedFlag = false;
95
   completedFlag = false;
96
   completedSearchKey = "";
96
   completedSearchKey = "";
97
   completedLoad = false;
97
   completedLoad = false;
98
-	
98
+
99
 	barCode:any; //条码搜索
99
 	barCode:any; //条码搜索
100
   // other
100
   // other
101
   loginUser: any = localStorage.getItem("user")
101
   loginUser: any = localStorage.getItem("user")
@@ -117,7 +117,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
117
 	fixationModal:boolean = false //标本接收固定
117
 	fixationModal:boolean = false //标本接收固定
118
 	verificationMoadl:boolean = false //标本核验
118
 	verificationMoadl:boolean = false //标本核验
119
 	specimenCode:any; //标本条码
119
 	specimenCode:any; //标本条码
120
-	listOneData:any=[]; 
120
+	listOneData:any=[];
121
 	listOneLength:any;
121
 	listOneLength:any;
122
 	pageOneIndex:any = 1;
122
 	pageOneIndex:any = 1;
123
 	pageSize:any = 10;
123
 	pageSize:any = 10;
@@ -223,7 +223,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
223
       this.runTime();
223
       this.runTime();
224
     }, 500);
224
     }, 500);
225
   }
225
   }
226
-	
226
+
227
 	//tab切换
227
 	//tab切换
228
 	tabClick(type){
228
 	tabClick(type){
229
 		this.activeIndex = type
229
 		this.activeIndex = type
@@ -237,7 +237,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
237
 			this.getHospitalData()
237
 			this.getHospitalData()
238
 		}
238
 		}
239
 	}
239
 	}
240
-	
240
+
241
 	// 获取今日接收数据
241
 	// 获取今日接收数据
242
 	getToday(){
242
 	getToday(){
243
 		this.mainService
243
 		this.mainService
@@ -252,7 +252,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
252
 	changeUserInp(e){
252
 	changeUserInp(e){
253
 		this.changeInpSubjectUser.next([e]);
253
 		this.changeInpSubjectUser.next([e]);
254
 	}
254
 	}
255
-	
255
+
256
 	// 获取配送人
256
 	// 获取配送人
257
 	getUserData(e){
257
 	getUserData(e){
258
 		let query={
258
 		let query={
@@ -269,7 +269,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
269
 			this.userData = res.list
269
 			this.userData = res.list
270
 		});
270
 		});
271
 	}
271
 	}
272
-	
272
+
273
 	// 搜索
273
 	// 搜索
274
 	search() {
274
 	search() {
275
 	  this.pageOneIndex = 1;
275
 	  this.pageOneIndex = 1;
@@ -308,7 +308,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
308
 	      that.listOneLength = data.totalNum;
308
 	      that.listOneLength = data.totalNum;
309
 	    });
309
 	    });
310
 	}
310
 	}
311
-	
311
+
312
 	// 实时术中快速数据
312
 	// 实时术中快速数据
313
 	getSpeedinessList() {
313
 	getSpeedinessList() {
314
 		var that = this;
314
 		var that = this;
@@ -330,7 +330,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
330
 		    that.listTwoLength = data.totalNum;
330
 		    that.listTwoLength = data.totalNum;
331
 		  });
331
 		  });
332
 	}
332
 	}
333
-	
333
+
334
 	// 打包配送
334
 	// 打包配送
335
 	getPackList() {
335
 	getPackList() {
336
 	  var that = this;
336
 	  var that = this;
@@ -350,7 +350,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
350
 	      that.listThreeLength = data.totalNum;
350
 	      that.listThreeLength = data.totalNum;
351
 	    });
351
 	    });
352
 	}
352
 	}
353
-	
353
+
354
 	// 查看
354
 	// 查看
355
 	project:any = [];
355
 	project:any = [];
356
 	oneLook(e,data){
356
 	oneLook(e,data){
@@ -372,7 +372,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
372
 			}
372
 			}
373
 		});
373
 		});
374
 	}
374
 	}
375
-	
375
+
376
 	// 关闭查看
376
 	// 关闭查看
377
 	closeDetail(){
377
 	closeDetail(){
378
 		this.listDetailMoadl = false
378
 		this.listDetailMoadl = false
@@ -380,7 +380,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
380
 			document.getElementById('Binput').focus();
380
 			document.getElementById('Binput').focus();
381
 		},200)
381
 		},200)
382
 	}
382
 	}
383
-	
383
+
384
 	// 接收
384
 	// 接收
385
 	connect(){
385
 	connect(){
386
 		this.mainService.generateBatchNumber()
386
 		this.mainService.generateBatchNumber()
@@ -395,7 +395,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
395
 			}
395
 			}
396
 		})
396
 		})
397
 	}
397
 	}
398
-	
398
+
399
 	// 打包
399
 	// 打包
400
 	packaging(){
400
 	packaging(){
401
 		this.mainService.generateBatchNumber()
401
 		this.mainService.generateBatchNumber()
@@ -410,14 +410,14 @@ export class PathologyComponent implements OnInit, OnDestroy {
410
 			}
410
 			}
411
 		})
411
 		})
412
 	}
412
 	}
413
-	
413
+
414
 	//打包查看标本
414
 	//打包查看标本
415
 	threeLook(e,data){
415
 	threeLook(e,data){
416
 		localStorage.setItem("pathologyActiveIndex",this.activeIndex)
416
 		localStorage.setItem("pathologyActiveIndex",this.activeIndex)
417
 		localStorage.setItem("dataType",'');
417
 		localStorage.setItem("dataType",'');
418
 		this.router.navigateByUrl(`/pathologyScan?packId=${data.id}&businessType=packagLook`);
418
 		this.router.navigateByUrl(`/pathologyScan?packId=${data.id}&businessType=packagLook`);
419
 	}
419
 	}
420
-	
420
+
421
 	// 配送
421
 	// 配送
422
 	distributionModal:boolean = false
422
 	distributionModal:boolean = false
423
 	distribution(e,data){
423
 	distribution(e,data){
@@ -431,7 +431,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
431
 		this.handoverUserId = null
431
 		this.handoverUserId = null
432
 		this.distributionModal = true
432
 		this.distributionModal = true
433
 	}
433
 	}
434
-	
434
+
435
 	// 确定配送
435
 	// 确定配送
436
 	submitDistributionForm(){
436
 	submitDistributionForm(){
437
 		for (const i in this.validateForm.controls) {
437
 		for (const i in this.validateForm.controls) {
@@ -459,9 +459,9 @@ export class PathologyComponent implements OnInit, OnDestroy {
459
 		      this.message.error(data.msg)
459
 		      this.message.error(data.msg)
460
 		    }
460
 		    }
461
 		  });
461
 		  });
462
-		
462
+
463
 	}
463
 	}
464
-	
464
+
465
 	// 取消配送
465
 	// 取消配送
466
 	hideDistributionModal(){
466
 	hideDistributionModal(){
467
 		this.distributionModal = false
467
 		this.distributionModal = false
@@ -469,16 +469,16 @@ export class PathologyComponent implements OnInit, OnDestroy {
469
 			document.getElementById('Binput').focus();
469
 			document.getElementById('Binput').focus();
470
 		},200)
470
 		},200)
471
 	}
471
 	}
472
-	
472
+
473
 	changeHospitalInp(e){
473
 	changeHospitalInp(e){
474
 		// this.changeInpSubjectHospital.next([e]);
474
 		// this.changeInpSubjectHospital.next([e]);
475
 	}
475
 	}
476
-	
476
+
477
 	changeDepartmentInp(e){
477
 	changeDepartmentInp(e){
478
 		this.isDeptLoading = true
478
 		this.isDeptLoading = true
479
 		this.changeInpSubjectDepartment.next([e]);
479
 		this.changeInpSubjectDepartment.next([e]);
480
 	}
480
 	}
481
-	
481
+
482
 	// 获取院区
482
 	// 获取院区
483
 	getHospitalData(){
483
 	getHospitalData(){
484
 		let arr = this.tool.getHospitalList().filter(i=>i.parent==undefined)
484
 		let arr = this.tool.getHospitalList().filter(i=>i.parent==undefined)
@@ -496,7 +496,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
496
 		//     this.hospital = res.list;
496
 		//     this.hospital = res.list;
497
 		//   });
497
 		//   });
498
 	}
498
 	}
499
-	
499
+
500
 	// 选择院区
500
 	// 选择院区
501
 	hospitalId:any=null;
501
 	hospitalId:any=null;
502
 	changeHospDate(e){
502
 	changeHospDate(e){
@@ -504,7 +504,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
504
 		this.hospitalId = e
504
 		this.hospitalId = e
505
 		this.getDepartmentData('',e)
505
 		this.getDepartmentData('',e)
506
 	}
506
 	}
507
-	
507
+
508
 	// 获取科室
508
 	// 获取科室
509
 	isDeptLoading:boolean = false;
509
 	isDeptLoading:boolean = false;
510
 	getDepartmentData(e,hospital){
510
 	getDepartmentData(e,hospital){
@@ -527,7 +527,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
527
 			  });
527
 			  });
528
 		});
528
 		});
529
 	}
529
 	}
530
-	
530
+
531
 	// 补打
531
 	// 补打
532
 	printModal:boolean = false;
532
 	printModal:boolean = false;
533
 	parintLoading:boolean = false;
533
 	parintLoading:boolean = false;
@@ -535,7 +535,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
535
 		this.rowData = item
535
 		this.rowData = item
536
 		this.printModal = true
536
 		this.printModal = true
537
 	}
537
 	}
538
-	
538
+
539
 	// 取消补打
539
 	// 取消补打
540
 	hidePrintModal(){
540
 	hidePrintModal(){
541
 		this.printModal = false
541
 		this.printModal = false
@@ -543,7 +543,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
543
 			document.getElementById('Binput').focus();
543
 			document.getElementById('Binput').focus();
544
 		},200)
544
 		},200)
545
 	}
545
 	}
546
-	
546
+
547
 	// 确定补打
547
 	// 确定补打
548
 	confirmPrintDel(){
548
 	confirmPrintDel(){
549
 		this.parintLoading = true
549
 		this.parintLoading = true
@@ -571,9 +571,9 @@ export class PathologyComponent implements OnInit, OnDestroy {
571
 				this.message.error(data.msg)
571
 				this.message.error(data.msg)
572
 			}
572
 			}
573
 		});
573
 		});
574
-		
574
+
575
 	}
575
 	}
576
-	
576
+
577
 	// 接收时间
577
 	// 接收时间
578
 	startDate:any;
578
 	startDate:any;
579
 	endDate:any;
579
 	endDate:any;
@@ -582,12 +582,12 @@ export class PathologyComponent implements OnInit, OnDestroy {
582
 		this.endDate = format(result[1], 'yyyy-MM-dd' +' '+'23:59:59');
582
 		this.endDate = format(result[1], 'yyyy-MM-dd' +' '+'23:59:59');
583
 		this.acceptTime = [this.startDate,this.endDate]
583
 		this.acceptTime = [this.startDate,this.endDate]
584
 	}
584
 	}
585
-	
585
+
586
 	// 获取批次号
586
 	// 获取批次号
587
 	generateBatchNumber(){
587
 	generateBatchNumber(){
588
 
588
 
589
 	}
589
 	}
590
-	
590
+
591
 	// 标本条码搜索
591
 	// 标本条码搜索
592
 	errorcODEMsg:any = null
592
 	errorcODEMsg:any = null
593
 	batchNo:any = null;
593
 	batchNo:any = null;
@@ -625,7 +625,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
625
 				})
625
 				})
626
 			}
626
 			}
627
 		})
627
 		})
628
-		
628
+
629
 	}
629
 	}
630
 	// 获取标本接收数据
630
 	// 获取标本接收数据
631
 	pageReceptionIndex:any = 1;
631
 	pageReceptionIndex:any = 1;
@@ -661,7 +661,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
661
 				this.listReceptionLength = res.totalNum;
661
 				this.listReceptionLength = res.totalNum;
662
 		  });
662
 		  });
663
 	}
663
 	}
664
-	
664
+
665
 	// 确定接收包
665
 	// 确定接收包
666
 	submitReceptionForm(){
666
 	submitReceptionForm(){
667
 		for (const i in this.validateConnectForm.controls) {
667
 		for (const i in this.validateConnectForm.controls) {
@@ -692,7 +692,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
692
 		    }
692
 		    }
693
 		  });
693
 		  });
694
 	}
694
 	}
695
-	
695
+
696
 	// 关闭配送接收
696
 	// 关闭配送接收
697
 	hideReceptionModal(){
697
 	hideReceptionModal(){
698
 		this.receptionModal = false
698
 		this.receptionModal = false
@@ -700,12 +700,12 @@ export class PathologyComponent implements OnInit, OnDestroy {
700
 			document.getElementById('Binput').focus();
700
 			document.getElementById('Binput').focus();
701
 		},200)
701
 		},200)
702
 	}
702
 	}
703
-	
703
+
704
 	// 选择固定时间
704
 	// 选择固定时间
705
 	formChangeDate(result){
705
 	formChangeDate(result){
706
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
706
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
707
 	}
707
 	}
708
-	
708
+
709
 	// 监听人员交接接收人工号输入
709
 	// 监听人员交接接收人工号输入
710
 	connectUserId:any = null;
710
 	connectUserId:any = null;
711
 	receptionName:any = null;
711
 	receptionName:any = null;
@@ -729,7 +729,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
729
 				}
729
 				}
730
 		  });
730
 		  });
731
 	}
731
 	}
732
-	
732
+
733
 	// 监听人员交接配送人工号输入
733
 	// 监听人员交接配送人工号输入
734
 	dispatchingUserId:any = null;
734
 	dispatchingUserId:any = null;
735
 	dispatchingName:any = null;
735
 	dispatchingName:any = null;
@@ -753,7 +753,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
753
 				}
753
 				}
754
 		  });
754
 		  });
755
 	}
755
 	}
756
-	
756
+
757
 	// 确定交接
757
 	// 确定交接
758
 	mustReceived:any = null;
758
 	mustReceived:any = null;
759
 	currReceived:any = null;
759
 	currReceived:any = null;
@@ -779,7 +779,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
779
 				this.dispatchingName = null;
779
 				this.dispatchingName = null;
780
 				this.dispatchingUserId = null
780
 				this.dispatchingUserId = null
781
 			}
781
 			}
782
-			
782
+
783
 			this.receptionName = null;
783
 			this.receptionName = null;
784
 			this.connectUserId = null
784
 			this.connectUserId = null
785
 			this.connectModal = true
785
 			this.connectModal = true
@@ -789,7 +789,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
789
 	hideConnectModal(){
789
 	hideConnectModal(){
790
 		this.connectModal = false
790
 		this.connectModal = false
791
 	}
791
 	}
792
-	
792
+
793
 	// 确定人员交接
793
 	// 确定人员交接
794
 	btnConnectLoading:boolean = false;
794
 	btnConnectLoading:boolean = false;
795
 	submitConnectForm(){
795
 	submitConnectForm(){
@@ -815,21 +815,21 @@ export class PathologyComponent implements OnInit, OnDestroy {
815
 		    }
815
 		    }
816
 		  });
816
 		  });
817
 	}
817
 	}
818
-	
818
+
819
 	// 确定打包
819
 	// 确定打包
820
 	packModal:boolean = false;
820
 	packModal:boolean = false;
821
 	submitScanForm(){
821
 	submitScanForm(){
822
 		this.packModal = true
822
 		this.packModal = true
823
 		// this.hideSpecimenModal()
823
 		// this.hideSpecimenModal()
824
 	}
824
 	}
825
-	
825
+
826
 	// 确定打包并打印
826
 	// 确定打包并打印
827
 	btnPackLoading:boolean = false;
827
 	btnPackLoading:boolean = false;
828
 	printData:any = [];
828
 	printData:any = [];
829
 	submitPackForm(){
829
 	submitPackForm(){
830
 		let that = this
830
 		let that = this
831
 		let data: any = {
831
 		let data: any = {
832
-			
832
+
833
 		};
833
 		};
834
 
834
 
835
 		this.btnPackLoading = true;
835
 		this.btnPackLoading = true;
@@ -857,7 +857,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
857
 				}
857
 				}
858
 		  });
858
 		  });
859
 	}
859
 	}
860
-	
860
+
861
 	// 关闭打包并打印
861
 	// 关闭打包并打印
862
 	hidePackModal(){
862
 	hidePackModal(){
863
 		this.packModal = false
863
 		this.packModal = false
@@ -865,7 +865,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
865
 			document.getElementById('specimen').focus();
865
 			document.getElementById('specimen').focus();
866
 		},200)
866
 		},200)
867
 	}
867
 	}
868
-	
868
+
869
 	// 关闭交接/打包
869
 	// 关闭交接/打包
870
 	hideSpecimenModal(){
870
 	hideSpecimenModal(){
871
 		this.barCode = null;
871
 		this.barCode = null;
@@ -875,7 +875,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
875
 			document.getElementById('Binput').focus();
875
 			document.getElementById('Binput').focus();
876
 		},200)
876
 		},200)
877
 	}
877
 	}
878
-	
878
+
879
 	// 获取标本详情
879
 	// 获取标本详情
880
 	getSampleData(item){
880
 	getSampleData(item){
881
 		// this.isSpinning = true
881
 		// this.isSpinning = true
@@ -896,7 +896,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
896
 			}
896
 			}
897
 		});
897
 		});
898
 	}
898
 	}
899
-	
899
+
900
 	// 获取科室
900
 	// 获取科室
901
 	getDept(){
901
 	getDept(){
902
 		this.setSpecimen()
902
 		this.setSpecimen()
@@ -925,7 +925,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
925
 			  .subscribe((res) => {
925
 			  .subscribe((res) => {
926
 			    that.operationData = res.list;
926
 			    that.operationData = res.list;
927
 			  });
927
 			  });
928
-				
928
+
929
 			that.mainService
929
 			that.mainService
930
 			  .getFetchDataList("data", "department", data2)
930
 			  .getFetchDataList("data", "department", data2)
931
 			  .subscribe((res) => {
931
 			  .subscribe((res) => {
@@ -934,7 +934,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
934
 			  });
934
 			  });
935
 		});
935
 		});
936
 	}
936
 	}
937
-	
937
+
938
 	// 获取关联科室详情
938
 	// 获取关联科室详情
939
 	getDeptDetail(){
939
 	getDeptDetail(){
940
 		this.mainService
940
 		this.mainService
@@ -954,7 +954,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
954
 				}
954
 				}
955
 		  });
955
 		  });
956
 	}
956
 	}
957
-	
957
+
958
 	// 获取是否关联标本间
958
 	// 获取是否关联标本间
959
 	setSpecimen(){
959
 	setSpecimen(){
960
 		this.validateForm = this.fb.group({
960
 		this.validateForm = this.fb.group({
@@ -964,7 +964,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
964
 		});
964
 		});
965
 		this.relevanceModal = true
965
 		this.relevanceModal = true
966
 	}
966
 	}
967
-	
967
+
968
 	// 确定关联科室
968
 	// 确定关联科室
969
 	btnLoading:boolean = false;
969
 	btnLoading:boolean = false;
970
 	submitForm(){
970
 	submitForm(){
@@ -998,7 +998,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
998
 		    }
998
 		    }
999
 		  });
999
 		  });
1000
 	}
1000
 	}
1001
-	
1001
+
1002
 	getNewDept(){
1002
 	getNewDept(){
1003
 		let postData = {
1003
 		let postData = {
1004
 		  currentHosId: this.hosId,
1004
 		  currentHosId: this.hosId,
@@ -1024,12 +1024,12 @@ export class PathologyComponent implements OnInit, OnDestroy {
1024
 		  }
1024
 		  }
1025
 		});
1025
 		});
1026
 	}
1026
 	}
1027
-	
1027
+
1028
 	// 获取当前用户信息
1028
 	// 获取当前用户信息
1029
 	getCurrentUserNow() {
1029
 	getCurrentUserNow() {
1030
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
1030
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
1031
 	    if (data["status"] == 200) {
1031
 	    if (data["status"] == 200) {
1032
-				this.loginUser = data.data 
1032
+				this.loginUser = data.data
1033
 	      let user = JSON.parse(localStorage.getItem("user"));
1033
 	      let user = JSON.parse(localStorage.getItem("user"));
1034
 	      user.user.dept = data["data"].dept;
1034
 	      user.user.dept = data["data"].dept;
1035
 	      user.user.currentHospital = data["data"].currentHospital;
1035
 	      user.user.currentHospital = data["data"].currentHospital;
@@ -1037,7 +1037,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1037
 	    }
1037
 	    }
1038
 	  });
1038
 	  });
1039
 	}
1039
 	}
1040
-	
1040
+
1041
 	// 输入工号查询姓名
1041
 	// 输入工号查询姓名
1042
 	handoverUserId:any = null;
1042
 	handoverUserId:any = null;
1043
 	numberChange(e){
1043
 	numberChange(e){
@@ -1060,7 +1060,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1060
 				}
1060
 				}
1061
 		  });
1061
 		  });
1062
 	}
1062
 	}
1063
-	
1063
+
1064
 	// 提交固定标本接收
1064
 	// 提交固定标本接收
1065
 	submitVerificationForm(){
1065
 	submitVerificationForm(){
1066
 		for (const i in this.validateVerificationForm.controls) {
1066
 		for (const i in this.validateVerificationForm.controls) {
@@ -1068,7 +1068,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1068
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
1068
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
1069
 		}
1069
 		}
1070
 		if (this.validateVerificationForm.invalid) return;
1070
 		if (this.validateVerificationForm.invalid) return;
1071
-		
1071
+
1072
 		let data: any = {
1072
 		let data: any = {
1073
 			id:this.codeData.id,
1073
 			id:this.codeData.id,
1074
 			specimenDeptId:this.validateForm.value.specimen,
1074
 			specimenDeptId:this.validateForm.value.specimen,
@@ -1092,14 +1092,14 @@ export class PathologyComponent implements OnInit, OnDestroy {
1092
 			}
1092
 			}
1093
 		});
1093
 		});
1094
 	}
1094
 	}
1095
-	
1095
+
1096
 	// 成功/失败提示框
1096
 	// 成功/失败提示框
1097
 	closeModel(){
1097
 	closeModel(){
1098
 		this.hideReceptionModal()
1098
 		this.hideReceptionModal()
1099
 		this.hideConnectModal()
1099
 		this.hideConnectModal()
1100
 		this.hideSpecimenModal()
1100
 		this.hideSpecimenModal()
1101
 	}
1101
 	}
1102
-	
1102
+
1103
 	// 关闭配送信息
1103
 	// 关闭配送信息
1104
 	hideVerificationModal(){
1104
 	hideVerificationModal(){
1105
 		this.verificationMoadl = false
1105
 		this.verificationMoadl = false
@@ -1113,13 +1113,13 @@ export class PathologyComponent implements OnInit, OnDestroy {
1113
 		this.businessType = 'connect'
1113
 		this.businessType = 'connect'
1114
 		this.changeInpSubjectSpecimen.next([e]);
1114
 		this.changeInpSubjectSpecimen.next([e]);
1115
 	}
1115
 	}
1116
-	
1116
+
1117
 	// 监听交接/打包扫描条码
1117
 	// 监听交接/打包扫描条码
1118
 	tableLoading:boolean = false;
1118
 	tableLoading:boolean = false;
1119
 	codeChange(e){
1119
 	codeChange(e){
1120
 		this.changeInpSubject.next([e]);
1120
 		this.changeInpSubject.next([e]);
1121
 	}
1121
 	}
1122
-	
1122
+
1123
 	// 标本接收搜索条码
1123
 	// 标本接收搜索条码
1124
 	errorMsg:any = null;
1124
 	errorMsg:any = null;
1125
 	searchSpecimenData(e){
1125
 	searchSpecimenData(e){
@@ -1154,7 +1154,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1154
 			}
1154
 			}
1155
 		})
1155
 		})
1156
 	}
1156
 	}
1157
-	
1157
+
1158
 	// 关闭多只标本
1158
 	// 关闭多只标本
1159
 	hideMultiModal(){
1159
 	hideMultiModal(){
1160
 		this.multiModal = false
1160
 		this.multiModal = false
@@ -1162,7 +1162,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1162
 			document.getElementById('specimen').focus();
1162
 			document.getElementById('specimen').focus();
1163
 		},200)
1163
 		},200)
1164
 	}
1164
 	}
1165
-	
1165
+
1166
 	// 监听多只标本扫描
1166
 	// 监听多只标本扫描
1167
 	codeMultiChange(e){
1167
 	codeMultiChange(e){
1168
 		if(!e){
1168
 		if(!e){
@@ -1191,7 +1191,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1191
 			})
1191
 			})
1192
 		},500)
1192
 		},500)
1193
 	}
1193
 	}
1194
-	
1194
+
1195
 	// 多只标本确定接受
1195
 	// 多只标本确定接受
1196
 	btnMultiLoading:boolean = false;
1196
 	btnMultiLoading:boolean = false;
1197
 	submitMultiForm(){
1197
 	submitMultiForm(){
@@ -1199,7 +1199,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1199
 		this.btnMultiLoading = false
1199
 		this.btnMultiLoading = false
1200
 		this.hideMultiModal()
1200
 		this.hideMultiModal()
1201
 	}
1201
 	}
1202
-	
1202
+
1203
 	pathologyLogs:any=[];
1203
 	pathologyLogs:any=[];
1204
 	specimenList:any=[]
1204
 	specimenList:any=[]
1205
 	stepLength:any = 0;
1205
 	stepLength:any = 0;
@@ -1208,19 +1208,19 @@ export class PathologyComponent implements OnInit, OnDestroy {
1208
 	// 	this.getSampleData(item)
1208
 	// 	this.getSampleData(item)
1209
 	// 	clearInterval(this.logTimer);
1209
 	// 	clearInterval(this.logTimer);
1210
 	// 	if(type==1){
1210
 	// 	if(type==1){
1211
-			
1211
+
1212
 	// 	}else if(type==2){
1212
 	// 	}else if(type==2){
1213
-			
1213
+
1214
 	// 	}else{
1214
 	// 	}else{
1215
-			
1215
+
1216
 	// 	}
1216
 	// 	}
1217
 	// }
1217
 	// }
1218
-	
1218
+
1219
 	closeDetailMoadl(){
1219
 	closeDetailMoadl(){
1220
 		this.detailMoadl = false
1220
 		this.detailMoadl = false
1221
 	}
1221
 	}
1222
-	
1223
- 
1222
+
1223
+
1224
   // 自动刷新倒计时
1224
   // 自动刷新倒计时
1225
   autoUpdate(flag = true) {
1225
   autoUpdate(flag = true) {
1226
     if (flag) {
1226
     if (flag) {
@@ -1246,7 +1246,6 @@ export class PathologyComponent implements OnInit, OnDestroy {
1246
     }
1246
     }
1247
     localStorage.removeItem("user");
1247
     localStorage.removeItem("user");
1248
     localStorage.removeItem("menu");
1248
     localStorage.removeItem("menu");
1249
-    localStorage.removeItem("phones");
1250
     localStorage.removeItem("index");
1249
     localStorage.removeItem("index");
1251
 		localStorage.removeItem("scanCodeData");
1250
 		localStorage.removeItem("scanCodeData");
1252
 		localStorage.removeItem("dataType");
1251
 		localStorage.removeItem("dataType");
@@ -1261,7 +1260,6 @@ export class PathologyComponent implements OnInit, OnDestroy {
1261
         }
1260
         }
1262
         localStorage.removeItem("user");
1261
         localStorage.removeItem("user");
1263
         localStorage.removeItem("menu");
1262
         localStorage.removeItem("menu");
1264
-        localStorage.removeItem("phones");
1265
         localStorage.removeItem("index");
1263
         localStorage.removeItem("index");
1266
 				localStorage.removeItem("scanCodeData");
1264
 				localStorage.removeItem("scanCodeData");
1267
 				localStorage.removeItem("dataType");
1265
 				localStorage.removeItem("dataType");
@@ -1357,7 +1355,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1357
       }
1355
       }
1358
     }, 1000);
1356
     }, 1000);
1359
   }
1357
   }
1360
-	
1358
+
1361
 	promptModalShow:boolean = false;
1359
 	promptModalShow:boolean = false;
1362
 	promptContent:any = null;
1360
 	promptContent:any = null;
1363
 	ifSuccess:any = null;
1361
 	ifSuccess:any = null;

+ 66 - 68
src/app/views/pathologyScan/pathologyScan.component.ts

@@ -48,14 +48,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
48
   })
48
   })
49
   osComponentRef5: OverlayScrollbarsComponent;
49
   osComponentRef5: OverlayScrollbarsComponent;
50
   constructor(
50
   constructor(
51
-	private mainService: MainService, 
52
-	public router: Router, 
51
+	private mainService: MainService,
52
+	public router: Router,
53
 	private route: ActivatedRoute,
53
 	private route: ActivatedRoute,
54
 	public tool: ToolService,
54
 	public tool: ToolService,
55
 	private fb: FormBuilder,
55
 	private fb: FormBuilder,
56
 	private message: NzMessageService,
56
 	private message: NzMessageService,
57
 	private sanitizer: DomSanitizer,
57
 	private sanitizer: DomSanitizer,
58
-	
58
+
59
 	) {}
59
 	) {}
60
   // 今日药单量
60
   // 今日药单量
61
   todayTotal: undefined;
61
   todayTotal: undefined;
@@ -96,7 +96,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
96
   completedFlag = false;
96
   completedFlag = false;
97
   completedSearchKey = "";
97
   completedSearchKey = "";
98
   completedLoad = false;
98
   completedLoad = false;
99
-	
99
+
100
 	barCode:any; //条码搜索
100
 	barCode:any; //条码搜索
101
   // other
101
   // other
102
   loginUser: any = localStorage.getItem("user")
102
   loginUser: any = localStorage.getItem("user")
@@ -118,7 +118,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
118
 	fixationModal:boolean = false //标本接收固定
118
 	fixationModal:boolean = false //标本接收固定
119
 	verificationMoadl:boolean = false //标本核验
119
 	verificationMoadl:boolean = false //标本核验
120
 	specimenCode:any; //标本条码
120
 	specimenCode:any; //标本条码
121
-	listOneData:any=[]; 
121
+	listOneData:any=[];
122
 	listOneLength:any;
122
 	listOneLength:any;
123
 	pageOneIndex:any = 1;
123
 	pageOneIndex:any = 1;
124
 	pageSize:any = 10;
124
 	pageSize:any = 10;
@@ -210,7 +210,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
210
 			if(this.dataType=='pathologyPack'){
210
 			if(this.dataType=='pathologyPack'){
211
 				this.getJsData(4)
211
 				this.getJsData(4)
212
 			}
212
 			}
213
-			if(this.scanCodeData.pathologySpecimenDTOList && 
213
+			if(this.scanCodeData.pathologySpecimenDTOList &&
214
 			this.scanCodeData.pathologySpecimenDTOList.length>1){
214
 			this.scanCodeData.pathologySpecimenDTOList.length>1){
215
 				this.muArr = []
215
 				this.muArr = []
216
 				for(let i of this.scanCodeData.pathologySpecimenDTOList){
216
 				for(let i of this.scanCodeData.pathologySpecimenDTOList){
@@ -219,7 +219,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
219
 					}
219
 					}
220
 				}
220
 				}
221
 				this.getJsData(3)
221
 				this.getJsData(3)
222
-			}else if(this.scanCodeData.pathologySpecimenDTOList && 
222
+			}else if(this.scanCodeData.pathologySpecimenDTOList &&
223
 			this.scanCodeData.pathologySpecimenDTOList.length==1){
223
 			this.scanCodeData.pathologySpecimenDTOList.length==1){
224
 				this.getJsData(1)
224
 				this.getJsData(1)
225
 			}
225
 			}
@@ -233,9 +233,9 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
233
 			}
233
 			}
234
 			this.getJsData(1)
234
 			this.getJsData(1)
235
 		}
235
 		}
236
-		
236
+
237
   }
237
   }
238
-	
238
+
239
 	// 分页
239
 	// 分页
240
 	noType:any='none';
240
 	noType:any='none';
241
 	pageChange(){
241
 	pageChange(){
@@ -248,7 +248,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
248
 			this.getJsData(1)
248
 			this.getJsData(1)
249
 		}
249
 		}
250
 	}
250
 	}
251
-	
251
+
252
   // 当前时间日期
252
   // 当前时间日期
253
   runTime() {
253
   runTime() {
254
     clearTimeout(this.timer);
254
     clearTimeout(this.timer);
@@ -266,7 +266,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
266
 			document.getElementById('specimen').focus();
266
 			document.getElementById('specimen').focus();
267
 		},200)
267
 		},200)
268
 	}
268
 	}
269
-	
269
+
270
 	// 打包
270
 	// 打包
271
 	packaging(){
271
 	packaging(){
272
 		this.fixationModal = true
272
 		this.fixationModal = true
@@ -275,7 +275,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
275
 			document.getElementById('specimen').focus();
275
 			document.getElementById('specimen').focus();
276
 		},200)
276
 		},200)
277
 	}
277
 	}
278
-	
278
+
279
 	// 配送
279
 	// 配送
280
 	distributionModal:boolean = false
280
 	distributionModal:boolean = false
281
 	distribution(e,data){
281
 	distribution(e,data){
@@ -288,14 +288,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
288
 		this.handoverUserId = null
288
 		this.handoverUserId = null
289
 		this.distributionModal = true
289
 		this.distributionModal = true
290
 	}
290
 	}
291
-	
291
+
292
 	// 确定配送
292
 	// 确定配送
293
 	submitDistributionForm(){
293
 	submitDistributionForm(){
294
 		this.btnLoading = true
294
 		this.btnLoading = true
295
 		this.btnLoading = false
295
 		this.btnLoading = false
296
 		this.hideDistributionModal()
296
 		this.hideDistributionModal()
297
 	}
297
 	}
298
-	
298
+
299
 	// 取消配送
299
 	// 取消配送
300
 	hideDistributionModal(){
300
 	hideDistributionModal(){
301
 		this.distributionModal = false
301
 		this.distributionModal = false
@@ -303,23 +303,23 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
303
 			document.getElementById('Binput').focus();
303
 			document.getElementById('Binput').focus();
304
 		},200)
304
 		},200)
305
 	}
305
 	}
306
-	
306
+
307
 	changeHospitalInp(e){
307
 	changeHospitalInp(e){
308
 		// this.changeInpSubjectHospital.next([e]);
308
 		// this.changeInpSubjectHospital.next([e]);
309
 	}
309
 	}
310
-	
310
+
311
 	changeDepartmentInp(e){
311
 	changeDepartmentInp(e){
312
 		// this.isDeptLoading = true
312
 		// this.isDeptLoading = true
313
 		// this.changeInpSubjectDepartment.next([e]);
313
 		// this.changeInpSubjectDepartment.next([e]);
314
 	}
314
 	}
315
-	
315
+
316
 	// 补打
316
 	// 补打
317
 	printModal:boolean = false;
317
 	printModal:boolean = false;
318
 	parintLoading:boolean = false;
318
 	parintLoading:boolean = false;
319
 	reprint(e,data){
319
 	reprint(e,data){
320
 		this.printModal = true
320
 		this.printModal = true
321
 	}
321
 	}
322
-	
322
+
323
 	// 取消补打
323
 	// 取消补打
324
 	hidePrintModal(){
324
 	hidePrintModal(){
325
 		this.printModal = false
325
 		this.printModal = false
@@ -327,7 +327,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
327
 			document.getElementById('Binput').focus();
327
 			document.getElementById('Binput').focus();
328
 		},200)
328
 		},200)
329
 	}
329
 	}
330
-	
330
+
331
 	// 确定补打
331
 	// 确定补打
332
 	confirmPrintDel(){
332
 	confirmPrintDel(){
333
 		this.parintLoading = true
333
 		this.parintLoading = true
@@ -338,9 +338,9 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
338
 		// } else {
338
 		// } else {
339
 		// 	this.showPromptModal("操作", false, res.msg);
339
 		// 	this.showPromptModal("操作", false, res.msg);
340
 		// }
340
 		// }
341
-		
341
+
342
 	}
342
 	}
343
-	
343
+
344
 	// 接收时间
344
 	// 接收时间
345
 	startDate:any;
345
 	startDate:any;
346
 	endDate:any;
346
 	endDate:any;
@@ -348,12 +348,12 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
348
 		this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
348
 		this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
349
 		this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
349
 		this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
350
 	}
350
 	}
351
-	
351
+
352
 	// 获取批次号
352
 	// 获取批次号
353
 	generateBatchNumber(){
353
 	generateBatchNumber(){
354
 
354
 
355
 	}
355
 	}
356
-	
356
+
357
 	// 获取标本接收数据
357
 	// 获取标本接收数据
358
 	pageReceptionIndex:any = 1;
358
 	pageReceptionIndex:any = 1;
359
 	listReceptionLength:any = 0;
359
 	listReceptionLength:any = 0;
@@ -403,7 +403,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
403
 				this.listReceptionLength = res.totalNum;
403
 				this.listReceptionLength = res.totalNum;
404
 		  });
404
 		  });
405
 	}
405
 	}
406
-	
406
+
407
 	// 配送中包交接完成
407
 	// 配送中包交接完成
408
 	connectAccomplish(){
408
 	connectAccomplish(){
409
 		this.validateConnectForm = this.fb.group({
409
 		this.validateConnectForm = this.fb.group({
@@ -412,14 +412,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
412
 		});
412
 		});
413
 		this.dispatchingName = this.scanCodeData.deliveryUserDTO.name;
413
 		this.dispatchingName = this.scanCodeData.deliveryUserDTO.name;
414
 		this.dispatchingUserId = this.scanCodeData.deliveryUserDTO.id
414
 		this.dispatchingUserId = this.scanCodeData.deliveryUserDTO.id
415
-		
415
+
416
 		this.receptionName = this.userInfo.name;
416
 		this.receptionName = this.userInfo.name;
417
 		this.connectUserId = this.userInfo.id;
417
 		this.connectUserId = this.userInfo.id;
418
-		
418
+
419
 		this.receptionModal = true
419
 		this.receptionModal = true
420
 		this.barCode = null
420
 		this.barCode = null
421
 	}
421
 	}
422
-	
422
+
423
 	// 确定接收包
423
 	// 确定接收包
424
 	submitReceptionForm(){
424
 	submitReceptionForm(){
425
 		for (const i in this.validateConnectForm.controls) {
425
 		for (const i in this.validateConnectForm.controls) {
@@ -448,17 +448,17 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
448
 				}
448
 				}
449
 		  });
449
 		  });
450
 	}
450
 	}
451
-	
451
+
452
 	// 关闭配送接收
452
 	// 关闭配送接收
453
 	hideReceptionModal(){
453
 	hideReceptionModal(){
454
 		this.receptionModal = false
454
 		this.receptionModal = false
455
 	}
455
 	}
456
-	
456
+
457
 	// 选择固定时间
457
 	// 选择固定时间
458
 	formChangeDate(result){
458
 	formChangeDate(result){
459
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
459
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
460
 	}
460
 	}
461
-	
461
+
462
 	// 监听人员交接接收人工号输入
462
 	// 监听人员交接接收人工号输入
463
 	connectUserId:any = null;
463
 	connectUserId:any = null;
464
 	receptionName:any = null;
464
 	receptionName:any = null;
@@ -482,7 +482,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
482
 				}
482
 				}
483
 		  });
483
 		  });
484
 	}
484
 	}
485
-	
485
+
486
 	// 监听人员交接配送人工号输入
486
 	// 监听人员交接配送人工号输入
487
 	dispatchingUserId:any = null;
487
 	dispatchingUserId:any = null;
488
 	dispatchingName:any = null;
488
 	dispatchingName:any = null;
@@ -506,7 +506,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
506
 				}
506
 				}
507
 		  });
507
 		  });
508
 	}
508
 	}
509
-	
509
+
510
 	// 确定交接
510
 	// 确定交接
511
 	mustReceived:any = null;
511
 	mustReceived:any = null;
512
 	currReceived:any = null;
512
 	currReceived:any = null;
@@ -541,7 +541,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
541
 	hideConnectModal(){
541
 	hideConnectModal(){
542
 		this.connectModal = false
542
 		this.connectModal = false
543
 	}
543
 	}
544
-	
544
+
545
 	// 确定人员交接
545
 	// 确定人员交接
546
 	btnConnectLoading:boolean = false;
546
 	btnConnectLoading:boolean = false;
547
 	submitConnectForm(){
547
 	submitConnectForm(){
@@ -568,21 +568,21 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
568
 		    }
568
 		    }
569
 		  });
569
 		  });
570
 	}
570
 	}
571
-	
571
+
572
 	// 确定打包
572
 	// 确定打包
573
 	packModal:boolean = false;
573
 	packModal:boolean = false;
574
 	submitScanForm(){
574
 	submitScanForm(){
575
 		this.packModal = true
575
 		this.packModal = true
576
 		// this.hideSpecimenModal()
576
 		// this.hideSpecimenModal()
577
 	}
577
 	}
578
-	
578
+
579
 	// 确定打包并打印
579
 	// 确定打包并打印
580
 	btnPackLoading:boolean = false;
580
 	btnPackLoading:boolean = false;
581
 	printData:any = [];
581
 	printData:any = [];
582
 	submitPackForm(){
582
 	submitPackForm(){
583
 		let that = this
583
 		let that = this
584
 		let data: any = {
584
 		let data: any = {
585
-			batchNo:this.batchNo, 
585
+			batchNo:this.batchNo,
586
 			deptId:this.deptId
586
 			deptId:this.deptId
587
 		};
587
 		};
588
 
588
 
@@ -613,7 +613,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
613
 				}
613
 				}
614
 		  });
614
 		  });
615
 	}
615
 	}
616
-	
616
+
617
 	// 关闭打包并打印
617
 	// 关闭打包并打印
618
 	hidePackModal(){
618
 	hidePackModal(){
619
 		this.packModal = false
619
 		this.packModal = false
@@ -621,14 +621,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
621
 			document.getElementById('specimen').focus();
621
 			document.getElementById('specimen').focus();
622
 		},200)
622
 		},200)
623
 	}
623
 	}
624
-	
624
+
625
 	// 关闭交接/打包
625
 	// 关闭交接/打包
626
 	hideSpecimenModal(){
626
 	hideSpecimenModal(){
627
 		// 清空data
627
 		// 清空data
628
 		localStorage.setItem("scanCodeData",'')
628
 		localStorage.setItem("scanCodeData",'')
629
 		this.router.navigateByUrl(`/pathology?type=detail`)
629
 		this.router.navigateByUrl(`/pathology?type=detail`)
630
 	}
630
 	}
631
-	
631
+
632
 	// 获取标本详情
632
 	// 获取标本详情
633
 	project:any = [];
633
 	project:any = [];
634
 	getSampleData(item){
634
 	getSampleData(item){
@@ -649,7 +649,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
649
 			}
649
 			}
650
 		});
650
 		});
651
 	}
651
 	}
652
-	
652
+
653
 	// 获取科室
653
 	// 获取科室
654
 	getDept(){
654
 	getDept(){
655
 		this.setSpecimen()
655
 		this.setSpecimen()
@@ -678,7 +678,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
678
 			  .subscribe((res) => {
678
 			  .subscribe((res) => {
679
 			    that.operationData = res.list;
679
 			    that.operationData = res.list;
680
 			  });
680
 			  });
681
-				
681
+
682
 			that.mainService
682
 			that.mainService
683
 			  .getFetchDataList("data", "department", data2)
683
 			  .getFetchDataList("data", "department", data2)
684
 			  .subscribe((res) => {
684
 			  .subscribe((res) => {
@@ -687,7 +687,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
687
 			  });
687
 			  });
688
 		});
688
 		});
689
 	}
689
 	}
690
-	
690
+
691
 	// 获取关联科室详情
691
 	// 获取关联科室详情
692
 	getDeptDetail(){
692
 	getDeptDetail(){
693
 		this.mainService
693
 		this.mainService
@@ -707,7 +707,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
707
 				}
707
 				}
708
 		  });
708
 		  });
709
 	}
709
 	}
710
-	
710
+
711
 	// 获取是否关联标本间
711
 	// 获取是否关联标本间
712
 	setSpecimen(){
712
 	setSpecimen(){
713
 		this.validateForm = this.fb.group({
713
 		this.validateForm = this.fb.group({
@@ -717,7 +717,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
717
 		});
717
 		});
718
 		this.relevanceModal = true
718
 		this.relevanceModal = true
719
 	}
719
 	}
720
-	
720
+
721
 	// 确定关联科室
721
 	// 确定关联科室
722
 	btnLoading:boolean = false;
722
 	btnLoading:boolean = false;
723
 	submitForm(){
723
 	submitForm(){
@@ -751,7 +751,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
751
 		    }
751
 		    }
752
 		  });
752
 		  });
753
 	}
753
 	}
754
-	
754
+
755
 	getNewDept(){
755
 	getNewDept(){
756
 		let postData = {
756
 		let postData = {
757
 		  currentHosId: this.hosId,
757
 		  currentHosId: this.hosId,
@@ -777,12 +777,12 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
777
 		  }
777
 		  }
778
 		});
778
 		});
779
 	}
779
 	}
780
-	
780
+
781
 	// 获取当前用户信息
781
 	// 获取当前用户信息
782
 	getCurrentUserNow() {
782
 	getCurrentUserNow() {
783
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
783
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
784
 	    if (data["status"] == 200) {
784
 	    if (data["status"] == 200) {
785
-				this.loginUser = data.data 
785
+				this.loginUser = data.data
786
 	      let user = JSON.parse(localStorage.getItem("user"));
786
 	      let user = JSON.parse(localStorage.getItem("user"));
787
 	      user.user.dept = data["data"].dept;
787
 	      user.user.dept = data["data"].dept;
788
 	      user.user.currentHospital = data["data"].currentHospital;
788
 	      user.user.currentHospital = data["data"].currentHospital;
@@ -790,7 +790,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
790
 	    }
790
 	    }
791
 	  });
791
 	  });
792
 	}
792
 	}
793
-	
793
+
794
 	// 输入工号查询姓名
794
 	// 输入工号查询姓名
795
 	handoverUserId:any = null;
795
 	handoverUserId:any = null;
796
 	numberChange(e){
796
 	numberChange(e){
@@ -813,7 +813,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
813
 				}
813
 				}
814
 		  });
814
 		  });
815
 	}
815
 	}
816
-	
816
+
817
 	// 提交固定标本接收
817
 	// 提交固定标本接收
818
 	submitVerificationForm(){
818
 	submitVerificationForm(){
819
 		for (const i in this.validateVerificationForm.controls) {
819
 		for (const i in this.validateVerificationForm.controls) {
@@ -821,7 +821,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
821
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
821
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
822
 		}
822
 		}
823
 		if (this.validateVerificationForm.invalid) return;
823
 		if (this.validateVerificationForm.invalid) return;
824
-		
824
+
825
 		let data: any = {
825
 		let data: any = {
826
 			id:this.codeData.id,
826
 			id:this.codeData.id,
827
 			specimenDeptId:this.validateForm.value.specimen,
827
 			specimenDeptId:this.validateForm.value.specimen,
@@ -845,13 +845,13 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
845
 			}
845
 			}
846
 		});
846
 		});
847
 	}
847
 	}
848
-	
848
+
849
 	// 成功/失败提示框
849
 	// 成功/失败提示框
850
 	closeModel(){
850
 	closeModel(){
851
 		localStorage.setItem("scanCodeData",'')
851
 		localStorage.setItem("scanCodeData",'')
852
 		this.router.navigateByUrl(`/pathology?type=detail`);
852
 		this.router.navigateByUrl(`/pathology?type=detail`);
853
 	}
853
 	}
854
-	
854
+
855
 	// 关闭配送信息
855
 	// 关闭配送信息
856
 	hideVerificationModal(){
856
 	hideVerificationModal(){
857
 		this.verificationMoadl = false
857
 		this.verificationMoadl = false
@@ -860,13 +860,13 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
860
 		},200)
860
 		},200)
861
 	}
861
 	}
862
 
862
 
863
-	
863
+
864
 	// 监听交接/打包扫描条码
864
 	// 监听交接/打包扫描条码
865
 	tableLoading:boolean = false;
865
 	tableLoading:boolean = false;
866
 	codeChange(e){
866
 	codeChange(e){
867
 		this.changeInpSubject.next([e]);
867
 		this.changeInpSubject.next([e]);
868
 	}
868
 	}
869
-	
869
+
870
 	// 标本接收搜索条码
870
 	// 标本接收搜索条码
871
 	errorMsg:any = null;
871
 	errorMsg:any = null;
872
 	searchSpecimenData(e){
872
 	searchSpecimenData(e){
@@ -916,7 +916,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
916
 			}
916
 			}
917
 		})
917
 		})
918
 	}
918
 	}
919
-	
919
+
920
 	// 关闭多只标本
920
 	// 关闭多只标本
921
 	hideMultiModal(){
921
 	hideMultiModal(){
922
 		localStorage.setItem("scanCodeData",'');
922
 		localStorage.setItem("scanCodeData",'');
@@ -928,7 +928,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
928
 			document.getElementById('specimen').focus();
928
 			document.getElementById('specimen').focus();
929
 		},200)
929
 		},200)
930
 	}
930
 	}
931
-	
931
+
932
 	// 监听多只标本扫描
932
 	// 监听多只标本扫描
933
 	codeMultiChange(e){
933
 	codeMultiChange(e){
934
 		if(!e){
934
 		if(!e){
@@ -975,7 +975,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
975
 			})
975
 			})
976
 		},500)
976
 		},500)
977
 	}
977
 	}
978
-	
978
+
979
 	// 多只标本确定接受
979
 	// 多只标本确定接受
980
 	btnMultiLoading:boolean = false;
980
 	btnMultiLoading:boolean = false;
981
 	submitMultiForm(){
981
 	submitMultiForm(){
@@ -1003,7 +1003,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1003
 			},500)
1003
 			},500)
1004
 		});
1004
 		});
1005
 	}
1005
 	}
1006
-	
1006
+
1007
 	// 多只标本打包
1007
 	// 多只标本打包
1008
 	submitMultiScanForm(){
1008
 	submitMultiScanForm(){
1009
 		let data1 = JSON.parse(localStorage.getItem("scanCodeData"))
1009
 		let data1 = JSON.parse(localStorage.getItem("scanCodeData"))
@@ -1030,7 +1030,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1030
 			},500)
1030
 			},500)
1031
 		});
1031
 		});
1032
 	}
1032
 	}
1033
-	
1033
+
1034
 	// 查看详情
1034
 	// 查看详情
1035
 	pathologyLogs:any=[];
1035
 	pathologyLogs:any=[];
1036
 	specimenList:any=[]
1036
 	specimenList:any=[]
@@ -1040,19 +1040,19 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1040
 		this.getSampleData(item)
1040
 		this.getSampleData(item)
1041
 		clearInterval(this.logTimer);
1041
 		clearInterval(this.logTimer);
1042
 		if(type==1){
1042
 		if(type==1){
1043
-			
1043
+
1044
 		}else if(type==2){
1044
 		}else if(type==2){
1045
-			
1045
+
1046
 		}else{
1046
 		}else{
1047
-			
1047
+
1048
 		}
1048
 		}
1049
 	}
1049
 	}
1050
-	
1050
+
1051
 	closeDetailMoadl(){
1051
 	closeDetailMoadl(){
1052
 		this.detailMoadl = false
1052
 		this.detailMoadl = false
1053
 	}
1053
 	}
1054
-	
1055
- 
1054
+
1055
+
1056
   // 自动刷新倒计时
1056
   // 自动刷新倒计时
1057
   autoUpdate(flag = true) {
1057
   autoUpdate(flag = true) {
1058
     if (flag) {
1058
     if (flag) {
@@ -1078,7 +1078,6 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1078
     }
1078
     }
1079
     localStorage.removeItem("user");
1079
     localStorage.removeItem("user");
1080
     localStorage.removeItem("menu");
1080
     localStorage.removeItem("menu");
1081
-    localStorage.removeItem("phones");
1082
     localStorage.removeItem("index");
1081
     localStorage.removeItem("index");
1083
     // 假退出
1082
     // 假退出
1084
     this.mainService.logOut().subscribe((data) => {
1083
     this.mainService.logOut().subscribe((data) => {
@@ -1090,7 +1089,6 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1090
         }
1089
         }
1091
         localStorage.removeItem("user");
1090
         localStorage.removeItem("user");
1092
         localStorage.removeItem("menu");
1091
         localStorage.removeItem("menu");
1093
-        localStorage.removeItem("phones");
1094
         localStorage.removeItem("index");
1092
         localStorage.removeItem("index");
1095
       }
1093
       }
1096
     });
1094
     });
@@ -1183,7 +1181,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1183
       }
1181
       }
1184
     }, 1000);
1182
     }, 1000);
1185
   }
1183
   }
1186
-	
1184
+
1187
 	promptModalShow:boolean = false;
1185
 	promptModalShow:boolean = false;
1188
 	promptContent:any = null;
1186
 	promptContent:any = null;
1189
 	ifSuccess:any = null;
1187
 	ifSuccess:any = null;

+ 0 - 2
src/app/views/pharmacy/pharmacy.component.ts

@@ -256,7 +256,6 @@ export class PharmacyComponent implements OnInit {
256
     }
256
     }
257
     localStorage.removeItem("user");
257
     localStorage.removeItem("user");
258
     localStorage.removeItem("menu");
258
     localStorage.removeItem("menu");
259
-    localStorage.removeItem("phones");
260
     localStorage.removeItem("index");
259
     localStorage.removeItem("index");
261
 
260
 
262
     // 假退出
261
     // 假退出
@@ -269,7 +268,6 @@ export class PharmacyComponent implements OnInit {
269
         }
268
         }
270
         localStorage.removeItem("user");
269
         localStorage.removeItem("user");
271
         localStorage.removeItem("menu");
270
         localStorage.removeItem("menu");
272
-        localStorage.removeItem("phones");
273
         localStorage.removeItem("index");
271
         localStorage.removeItem("index");
274
       }
272
       }
275
     });
273
     });

+ 0 - 2
src/app/views/pharmacy2/pharmacy2.component.ts

@@ -427,7 +427,6 @@ export class Pharmacy2Component implements OnInit, OnDestroy {
427
     }
427
     }
428
     localStorage.removeItem("user");
428
     localStorage.removeItem("user");
429
     localStorage.removeItem("menu");
429
     localStorage.removeItem("menu");
430
-    localStorage.removeItem("phones");
431
     localStorage.removeItem("index");
430
     localStorage.removeItem("index");
432
 
431
 
433
     // 假退出
432
     // 假退出
@@ -440,7 +439,6 @@ export class Pharmacy2Component implements OnInit, OnDestroy {
440
         }
439
         }
441
         localStorage.removeItem("user");
440
         localStorage.removeItem("user");
442
         localStorage.removeItem("menu");
441
         localStorage.removeItem("menu");
443
-        localStorage.removeItem("phones");
444
         localStorage.removeItem("index");
442
         localStorage.removeItem("index");
445
       }
443
       }
446
     });
444
     });

+ 35 - 37
src/app/views/specimen-room-view/specimen-room-view.component.ts

@@ -47,8 +47,8 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
47
   })
47
   })
48
   osComponentRef5: OverlayScrollbarsComponent;
48
   osComponentRef5: OverlayScrollbarsComponent;
49
   constructor(
49
   constructor(
50
-	private mainService: MainService, 
51
-	public router: Router, 
50
+	private mainService: MainService,
51
+	public router: Router,
52
 	public tool: ToolService,
52
 	public tool: ToolService,
53
 	private fb: FormBuilder,
53
 	private fb: FormBuilder,
54
 	private message: NzMessageService,
54
 	private message: NzMessageService,
@@ -92,7 +92,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
92
   completedFlag = false;
92
   completedFlag = false;
93
   completedSearchKey = "";
93
   completedSearchKey = "";
94
   completedLoad = false;
94
   completedLoad = false;
95
-	
95
+
96
 	barCode:any; //条码搜索
96
 	barCode:any; //条码搜索
97
   // other
97
   // other
98
   loginUser: any = localStorage.getItem("user")
98
   loginUser: any = localStorage.getItem("user")
@@ -113,7 +113,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
113
 	fixationModal:boolean = false //标本接收固定
113
 	fixationModal:boolean = false //标本接收固定
114
 	verificationMoadl:boolean = false //标本核验
114
 	verificationMoadl:boolean = false //标本核验
115
 	specimenCode:any; //标本条码
115
 	specimenCode:any; //标本条码
116
-	listOfData:any=[]; 
116
+	listOfData:any=[];
117
 	fixativeData:any = []; //固体液类型
117
 	fixativeData:any = []; //固体液类型
118
 	hosId:any;
118
 	hosId:any;
119
 	userId:any;
119
 	userId:any;
@@ -161,7 +161,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
161
       this.runTime();
161
       this.runTime();
162
     }, 500);
162
     }, 500);
163
   }
163
   }
164
-	
164
+
165
 	// 标本条码搜索
165
 	// 标本条码搜索
166
 	searchSpecimen(e){
166
 	searchSpecimen(e){
167
 		if(!this.barCode){
167
 		if(!this.barCode){
@@ -199,12 +199,12 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
199
 			}
199
 			}
200
 		})
200
 		})
201
 	}
201
 	}
202
-	
202
+
203
 	// 选择固定时间
203
 	// 选择固定时间
204
 	formChangeDate(result){
204
 	formChangeDate(result){
205
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
205
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
206
 	}
206
 	}
207
-	
207
+
208
 	// 确定接受固定标本
208
 	// 确定接受固定标本
209
 	startDate:any;
209
 	startDate:any;
210
 	submitFixationForm(){
210
 	submitFixationForm(){
@@ -224,7 +224,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
224
 			this.verificationMoadl = true
224
 			this.verificationMoadl = true
225
 		});
225
 		});
226
 	}
226
 	}
227
-	
227
+
228
 	// 关闭接受固定标本
228
 	// 关闭接受固定标本
229
 	hideSpecimenModal(){
229
 	hideSpecimenModal(){
230
 		this.autoUpdate()
230
 		this.autoUpdate()
@@ -236,7 +236,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
236
 			document.getElementById('Binput').focus();
236
 			document.getElementById('Binput').focus();
237
 		},200)
237
 		},200)
238
 	}
238
 	}
239
-	
239
+
240
 	// 获取标本详情
240
 	// 获取标本详情
241
 	project:any = [];
241
 	project:any = [];
242
 	getSampleData(item){
242
 	getSampleData(item){
@@ -256,7 +256,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
256
 		  this.detailMoadl = true
256
 		  this.detailMoadl = true
257
 		});
257
 		});
258
 	}
258
 	}
259
-	
259
+
260
 	// 获取科室
260
 	// 获取科室
261
 	getDept(){
261
 	getDept(){
262
 		this.setSpecimen()
262
 		this.setSpecimen()
@@ -285,7 +285,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
285
 			  .subscribe((res) => {
285
 			  .subscribe((res) => {
286
 			    that.operationData = res.list;
286
 			    that.operationData = res.list;
287
 			  });
287
 			  });
288
-				
288
+
289
 			that.mainService
289
 			that.mainService
290
 			  .getFetchDataList("data", "department", data2)
290
 			  .getFetchDataList("data", "department", data2)
291
 			  .subscribe((res) => {
291
 			  .subscribe((res) => {
@@ -294,7 +294,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
294
 			  });
294
 			  });
295
 		});
295
 		});
296
 	}
296
 	}
297
-	
297
+
298
 	// 获取关联科室详情
298
 	// 获取关联科室详情
299
 	getDeptDetail(){
299
 	getDeptDetail(){
300
 		this.mainService
300
 		this.mainService
@@ -314,7 +314,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
314
 				}
314
 				}
315
 		  });
315
 		  });
316
 	}
316
 	}
317
-	
317
+
318
 	// 获取是否关联标本间
318
 	// 获取是否关联标本间
319
 	setSpecimen(){
319
 	setSpecimen(){
320
 		this.validateForm = this.fb.group({
320
 		this.validateForm = this.fb.group({
@@ -324,7 +324,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
324
 		});
324
 		});
325
 		this.relevanceModal = true
325
 		this.relevanceModal = true
326
 	}
326
 	}
327
-	
327
+
328
 	// 确定关联科室
328
 	// 确定关联科室
329
 	btnLoading:boolean = false;
329
 	btnLoading:boolean = false;
330
 	submitForm(){
330
 	submitForm(){
@@ -364,7 +364,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
364
 		    }
364
 		    }
365
 		  });
365
 		  });
366
 	}
366
 	}
367
-	
367
+
368
 	getNewDept(){
368
 	getNewDept(){
369
 		let postData = {
369
 		let postData = {
370
 		  currentHosId: this.hosId,
370
 		  currentHosId: this.hosId,
@@ -390,12 +390,12 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
390
 		  }
390
 		  }
391
 		});
391
 		});
392
 	}
392
 	}
393
-	
393
+
394
 	// 获取当前用户信息
394
 	// 获取当前用户信息
395
 	getCurrentUserNow() {
395
 	getCurrentUserNow() {
396
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
396
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
397
 	    if (data["status"] == 200) {
397
 	    if (data["status"] == 200) {
398
-				this.loginUser = data.data 
398
+				this.loginUser = data.data
399
 	      let user = JSON.parse(localStorage.getItem("user"));
399
 	      let user = JSON.parse(localStorage.getItem("user"));
400
 	      user.user.dept = data["data"].dept;
400
 	      user.user.dept = data["data"].dept;
401
 	      user.user.currentHospital = data["data"].currentHospital;
401
 	      user.user.currentHospital = data["data"].currentHospital;
@@ -403,7 +403,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
403
 	    }
403
 	    }
404
 	  });
404
 	  });
405
 	}
405
 	}
406
-	
406
+
407
 	// 输入工号查询姓名
407
 	// 输入工号查询姓名
408
 	handoverUserId:any = null;
408
 	handoverUserId:any = null;
409
 	numberChange(e){
409
 	numberChange(e){
@@ -427,7 +427,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
427
 				}
427
 				}
428
 		  });
428
 		  });
429
 	}
429
 	}
430
-	
430
+
431
 	// 提交固定标本接收
431
 	// 提交固定标本接收
432
 	submitVerificationForm(){
432
 	submitVerificationForm(){
433
 		for (const i in this.validateVerificationForm.controls) {
433
 		for (const i in this.validateVerificationForm.controls) {
@@ -435,7 +435,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
435
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
435
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
436
 		}
436
 		}
437
 		if (this.validateVerificationForm.invalid) return;
437
 		if (this.validateVerificationForm.invalid) return;
438
-		
438
+
439
 		let data: any = {
439
 		let data: any = {
440
 			id:this.codeData.id,
440
 			id:this.codeData.id,
441
 			specimenDeptId:this.validateForm.value.specimen,
441
 			specimenDeptId:this.validateForm.value.specimen,
@@ -466,7 +466,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
466
 			}
466
 			}
467
 		});
467
 		});
468
 	}
468
 	}
469
-	
469
+
470
 	closeModel(){
470
 	closeModel(){
471
 		this.verificationMoadl = false
471
 		this.verificationMoadl = false
472
 		this.fixationModal = false
472
 		this.fixationModal = false
@@ -474,7 +474,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
474
 			document.getElementById('Binput').focus();
474
 			document.getElementById('Binput').focus();
475
 		},200)
475
 		},200)
476
 	}
476
 	}
477
-	
477
+
478
 	// 关闭固定接受标本
478
 	// 关闭固定接受标本
479
 	hideVerificationModal(){
479
 	hideVerificationModal(){
480
 		this.verificationMoadl = false
480
 		this.verificationMoadl = false
@@ -482,19 +482,19 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
482
 			document.getElementById('Binput').focus();
482
 			document.getElementById('Binput').focus();
483
 		},200)
483
 		},200)
484
 	}
484
 	}
485
-	
485
+
486
 
486
 
487
 	// 监听标本条码
487
 	// 监听标本条码
488
 	specimenCodeChange(e){
488
 	specimenCodeChange(e){
489
 		this.changeInpSubjectSpecimen.next([e]);
489
 		this.changeInpSubjectSpecimen.next([e]);
490
 	}
490
 	}
491
-	
491
+
492
 	// 监听接受固定标本条码
492
 	// 监听接受固定标本条码
493
 	tableLoading:boolean = false;
493
 	tableLoading:boolean = false;
494
 	codeChange(e){
494
 	codeChange(e){
495
 		this.changeInpSubject.next([e]);
495
 		this.changeInpSubject.next([e]);
496
 	}
496
 	}
497
-	
497
+
498
 	fixationError:any;
498
 	fixationError:any;
499
 	searchSpecimenData(e){
499
 	searchSpecimenData(e){
500
 		if(!e){
500
 		if(!e){
@@ -514,13 +514,13 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
514
 			this.specimenCode = null
514
 			this.specimenCode = null
515
 			if(res.status==200){
515
 			if(res.status==200){
516
 				this.codeData = res.data[0]
516
 				this.codeData = res.data[0]
517
-				this.fixationError = null 
517
+				this.fixationError = null
518
 			}else{
518
 			}else{
519
-				this.fixationError = res.msg 
519
+				this.fixationError = res.msg
520
 			}
520
 			}
521
 		})
521
 		})
522
 	}
522
 	}
523
-	
523
+
524
 	// 查看详情
524
 	// 查看详情
525
 	detailMoadl:boolean = false;
525
 	detailMoadl:boolean = false;
526
 	pathologyLogs:any=[];
526
 	pathologyLogs:any=[];
@@ -531,14 +531,14 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
531
 		this.getSampleData(item)
531
 		this.getSampleData(item)
532
 		clearInterval(this.logTimer);
532
 		clearInterval(this.logTimer);
533
 		if(type==1){
533
 		if(type==1){
534
-			
534
+
535
 		}else if(type==2){
535
 		}else if(type==2){
536
-			
536
+
537
 		}else{
537
 		}else{
538
-			
538
+
539
 		}
539
 		}
540
 	}
540
 	}
541
-	
541
+
542
 	closeDetailMoadl(){
542
 	closeDetailMoadl(){
543
 		setTimeout(_=>{
543
 		setTimeout(_=>{
544
 			document.getElementById('Binput').focus();
544
 			document.getElementById('Binput').focus();
@@ -546,7 +546,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
546
 		this.detailMoadl = false
546
 		this.detailMoadl = false
547
 		this.autoUpdate(false);
547
 		this.autoUpdate(false);
548
 	}
548
 	}
549
-	
549
+
550
   // 统计
550
   // 统计
551
   // total() {
551
   // total() {
552
   //   let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
552
   //   let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
@@ -570,7 +570,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
570
   //   console.log(item);
570
   //   console.log(item);
571
   //   this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
571
   //   this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
572
   // }
572
   // }
573
-	
573
+
574
   // // 查看流程信息弹窗
574
   // // 查看流程信息弹窗
575
   // logPromptModalShow = false; //弹窗开关
575
   // logPromptModalShow = false; //弹窗开关
576
   // scode = ""; //查看记录携带
576
   // scode = ""; //查看记录携带
@@ -807,7 +807,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
807
     }
807
     }
808
     localStorage.removeItem("user");
808
     localStorage.removeItem("user");
809
     localStorage.removeItem("menu");
809
     localStorage.removeItem("menu");
810
-    localStorage.removeItem("phones");
811
     localStorage.removeItem("index");
810
     localStorage.removeItem("index");
812
     // 假退出
811
     // 假退出
813
     this.mainService.logOut().subscribe((data) => {
812
     this.mainService.logOut().subscribe((data) => {
@@ -819,7 +818,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
819
         }
818
         }
820
         localStorage.removeItem("user");
819
         localStorage.removeItem("user");
821
         localStorage.removeItem("menu");
820
         localStorage.removeItem("menu");
822
-        localStorage.removeItem("phones");
823
         localStorage.removeItem("index");
821
         localStorage.removeItem("index");
824
       }
822
       }
825
     });
823
     });
@@ -906,7 +904,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
906
       }
904
       }
907
     }, 1000);
905
     }, 1000);
908
   }
906
   }
909
-	
907
+
910
 	promptModalShow:boolean = false;
908
 	promptModalShow:boolean = false;
911
 	promptContent:any = null;
909
 	promptContent:any = null;
912
 	ifSuccess:any = null;
910
 	ifSuccess:any = null;

+ 0 - 2
src/app/views/specimen-view2/specimen-view2.component.ts

@@ -461,7 +461,6 @@ export class SpecimenView2Component implements OnInit, OnDestroy {
461
     }
461
     }
462
     localStorage.removeItem("user");
462
     localStorage.removeItem("user");
463
     localStorage.removeItem("menu");
463
     localStorage.removeItem("menu");
464
-    localStorage.removeItem("phones");
465
     localStorage.removeItem("index");
464
     localStorage.removeItem("index");
466
     // 假退出
465
     // 假退出
467
     this.mainService.logOut().subscribe((data) => {
466
     this.mainService.logOut().subscribe((data) => {
@@ -473,7 +472,6 @@ export class SpecimenView2Component implements OnInit, OnDestroy {
473
         }
472
         }
474
         localStorage.removeItem("user");
473
         localStorage.removeItem("user");
475
         localStorage.removeItem("menu");
474
         localStorage.removeItem("menu");
476
-        localStorage.removeItem("phones");
477
         localStorage.removeItem("index");
475
         localStorage.removeItem("index");
478
       }
476
       }
479
     });
477
     });

+ 2 - 1
src/assets/js/http.ts

@@ -5,6 +5,7 @@ const port: string = location.port; //端口
5
 const protocolName: string = document.location.protocol; //http协议
5
 const protocolName: string = document.location.protocol; //http协议
6
 const wsName: string = protocolName === "http:" ? "ws" : "wss"; //ws协议
6
 const wsName: string = protocolName === "http:" ? "ws" : "wss"; //ws协议
7
 const baseUrl: baseUrlType = {
7
 const baseUrl: baseUrlType = {
8
+  wsName,
8
   domain: `${protocolName}//${domainName}:${port}`, //chrome下载地址
9
   domain: `${protocolName}//${domainName}:${port}`, //chrome下载地址
9
   host: `${protocolName}//${domainName}:${port}/service`, //接口地址
10
   host: `${protocolName}//${domainName}:${port}/service`, //接口地址
10
   specimenViewHost: `${protocolName}//${domainName}:${port}/specimenView`, //业务视图地址
11
   specimenViewHost: `${protocolName}//${domainName}:${port}/specimenView`, //业务视图地址
@@ -15,6 +16,6 @@ const baseUrl: baseUrlType = {
15
   nurseWs: `${wsName}://${domainName}:${port}/webSocket/message/nurse`, //websocket护士端地址
16
   nurseWs: `${wsName}://${domainName}:${port}/webSocket/message/nurse`, //websocket护士端地址
16
   fwtWs: `${wsName}://${domainName}:${port}/webSocket/message/ser`, //websocket服务台地址
17
   fwtWs: `${wsName}://${domainName}:${port}/webSocket/message/ser`, //websocket服务台地址
17
   // phoneWs: `${wsName}://${domainName}:${port}/webSocket/message/phone`, //websocket服务台来电地址
18
   // phoneWs: `${wsName}://${domainName}:${port}/webSocket/message/phone`, //websocket服务台来电地址
18
-  phoneWs: `${wsName}://192.168.3.111:29999/webSocket/message/phone`, //websocket服务台来电地址
19
+  phoneWs: `${wsName}://192.168.3.108:29999/webSocket/message/phone`, //websocket服务台来电地址-测试
19
 };
20
 };
20
 export default baseUrl;
21
 export default baseUrl;

+ 10 - 0
src/common.less

@@ -183,6 +183,16 @@
183
   overflow: hidden;
183
   overflow: hidden;
184
   text-overflow: ellipsis;
184
   text-overflow: ellipsis;
185
 }
185
 }
186
+
187
+.ellipsis-oneline {
188
+  overflow: hidden;
189
+  text-overflow: ellipsis;
190
+  white-space: nowrap;
191
+}
192
+
193
+.cursorDefault{
194
+  cursor: default!important;
195
+}
186
 // list模板样式 end
196
 // list模板样式 end
187
 
197
 
188
 // button
198
 // button