seimin месяцев назад: 6
Родитель
Сommit
faba4f7335

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-		"target": "http://192.168.4.105",
3
+		"target": "http://192.168.3.108",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 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 38
               this.message.info('登录失效,请重新登录!').onClose!.subscribe(() => {
39 39
                 localStorage.removeItem("user");
40 40
                 localStorage.removeItem("menu");
41
-                localStorage.removeItem("phones");
42 41
                 localStorage.removeItem("index");
43 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 8
 import { Injectable } from "@angular/core";
2 9
 import { Subject, Observable, from } from "rxjs";
3 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 13
 export interface baseUrlType {
14
+  wsName: string;//ws/wss
14 15
   domain: string; //chrome下载地址
15 16
   host: string; //接口地址
16 17
   specimenViewHost: string; //业务视图地址

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

@@ -22,7 +22,7 @@
22 22
     <div class="message_cot">
23 23
       <!-- 配送人员信息 -->
24 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 26
           <div id="cotAll" class="cot_all" *ngIf="patientCareCol != 6">
27 27
             <div [ngClass]="{cot: true, fourCol: patientCareCol == 4, sevenCol: patientCareCol == 7}" *ngFor="let data of workerMessage">
28 28
               <div class="first" *ngIf="data">
@@ -47,7 +47,7 @@
47 47
             </div>
48 48
           </div>
49 49
         </ng-container>
50
-        <ng-container *ngIf="!wLoading && typeData.type === 3">
50
+        <ng-container *ngIf="!wLoading && typeData && typeData.type === 3">
51 51
           <div id="cotAll" class="cot_all">
52 52
             <div [ngClass]="{cot: true, sevenCol: true}" *ngFor="let data of workerMessage">
53 53
               <div class="first" *ngIf="data">
@@ -717,59 +717,6 @@
717 717
   <!-- 右侧悬浮框 -->
718 718
   <div id="fixedMenu" class="fixed">
719 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 721
       <div class="con" *ngIf="fixedTab == 'colType' && fixedTab != 'newOrder'">
775 722
         <div class="title">展示形式</div>
@@ -970,76 +917,67 @@
970 917
       </div>
971 918
     </div>
972 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 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 945
           </button>
984 946
         </div>
985 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 962
       <div class="fixedMenu">
987 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 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 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 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 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 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 982
             </div>
1045 983
           </div>
@@ -1171,7 +1109,6 @@
1171 1109
             </nz-select>
1172 1110
           </div>
1173 1111
           <div class="newTopItem">
1174
-            <span class="tel grayFont" *ngIf="callNumber">来电号码:{{ callNumber }}</span>
1175 1112
             <span class="grayFont">任务类型:</span>
1176 1113
             <nz-select *ngIf="applyDept" style="width: 146px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="onSearchTaskBuild($event)" nzPlaceHolder="请选择任务类型" [(ngModel)]="taskBuild" (ngModelChange)="changeTaskBuild($event)">
1177 1114
               <ng-container *ngFor="let option of searchTaskList">
@@ -1183,6 +1120,9 @@
1183 1120
               </nz-option>
1184 1121
             </nz-select>
1185 1122
           </div>
1123
+          <div class="newTopItem">
1124
+            <span class="grayFont">来电电话:{{callNumber}}</span>
1125
+          </div>
1186 1126
         </div>
1187 1127
       </div>
1188 1128
       <div class="title" *ngIf="currentTabIndex === '99999'">
@@ -2364,6 +2304,8 @@
2364 2304
     content="您确认要退出系统吗?"
2365 2305
   ></app-dialog-delete>
2366 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 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 1715
       position: relative;
1716 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 1729
       .fixedMenu {
1719 1730
         border: 1px solid #e5e9ed;
1720 1731
         color: @primary-color;
1721 1732
         background: rgb(255, 255, 255);
1722 1733
         text-align: center;
1723 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 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 1747
           .item {
1732 1748
             height: 35px;
1733 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 24
 import { UploadFile } from 'ng-zorro-antd';
25 25
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
26 26
 import cloneDeep from 'lodash-es/cloneDeep'
27
+import { WebsocketIncomingService } from 'src/app/services/websocket-incoming.service';
27 28
 
28 29
 // 日期禁用
29 30
 function range(start: number, end: number): number[] {
@@ -110,6 +111,7 @@ export class FuwutaiComponent implements OnInit {
110 111
     private tool: ToolService,
111 112
     private http: HttpClient,
112 113
     public route: ActivatedRoute,
114
+    public incomingService: WebsocketIncomingService,
113 115
   ) {}
114 116
   validateFormZy!: FormGroup;
115 117
   validateFormQt!: FormGroup;
@@ -145,13 +147,6 @@ export class FuwutaiComponent implements OnInit {
145 147
   targetDept; //目标科室
146 148
   noArrives = []; //未到达列表
147 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 151
   changeInpSubject = new Subject();
157 152
   changeCommonInpSubject = new Subject();
@@ -229,7 +224,7 @@ export class FuwutaiComponent implements OnInit {
229 224
     types = types.slice(0, types.length - 1);
230 225
     let postData = {
231 226
       workOrder: {
232
-        serTaskTypes: types || "null",
227
+        serTaskTypes: types || undefined,
233 228
         serGdState: 1,
234 229
         range: this.orderScopeRadio,
235 230
         platform: 3,
@@ -436,7 +431,7 @@ export class FuwutaiComponent implements OnInit {
436 431
           if (go === "&go&") {
437 432
             this.applyDept = data["startDept"].id;
438 433
             this.applyStartDept = data["startDept"];
439
-            this.callNumber = data["phone"];
434
+            this.incidentModel.incomingPhone = this.callNumber = data["phone"];
440 435
             this.showPromptModal("建单", true, "", "closeGo");
441 436
           } else {
442 437
             this.showPromptModal("建单", true, "", "close");
@@ -471,7 +466,7 @@ export class FuwutaiComponent implements OnInit {
471 466
         if (go === "&go&") {
472 467
           this.applyDept = data["startDept"].id;
473 468
           this.applyStartDept = data["startDept"];
474
-          this.callNumber = data["phone"];
469
+          this.incidentModel.incomingPhone = this.callNumber = data["phone"];
475 470
           this.showPromptModal("建单", true, "", "closeGo");
476 471
         } else {
477 472
           this.showPromptModal("建单", true, "", "close");
@@ -530,7 +525,7 @@ export class FuwutaiComponent implements OnInit {
530 525
         if (go === "&go&") {
531 526
           this.applyDept = data["startDept"].id;
532 527
           this.applyStartDept = data["startDept"];
533
-          this.callNumber = data["phone"];
528
+          this.incidentModel.incomingPhone = this.callNumber = data["phone"];
534 529
           this.showPromptModal("建单", true, "", "closeGo");
535 530
         } else {
536 531
           this.showPromptModal("建单", true, "", "close");
@@ -696,7 +691,6 @@ export class FuwutaiComponent implements OnInit {
696 691
     this.initRole();
697 692
     this.initLogin();
698 693
     this.retract();
699
-    this.windowResize();
700 694
     this.refresh();
701 695
     this.initOrderScope();
702 696
     this.getOrderList(1);
@@ -715,7 +709,7 @@ export class FuwutaiComponent implements OnInit {
715 709
     document.removeEventListener("keydown", this.quickShowNewOrder.bind(this));
716 710
     this.quickShowNewOrder = null;
717 711
     clearTimeout(this.refreshTimerId);
718
-    this.phones.closeWs(true);
712
+    this.incomingService.closeWs(true);
719 713
     this.sers.closeWs(true);
720 714
   }
721 715
   ngAfterViewInit() {
@@ -800,6 +794,7 @@ export class FuwutaiComponent implements OnInit {
800 794
 
801 795
   // 工单范围设置回显
802 796
   checkedHos;// 配送-院区选择
797
+  checkedHosDTO;// 配送-院区选择
803 798
   scopeGroups = []; //配送-当前所属人员分组
804 799
   orderScopeRadio;// 配送-工单范围
805 800
 
@@ -825,6 +820,7 @@ export class FuwutaiComponent implements OnInit {
825 820
     }
826 821
     let scopeInfo = this.user.user.scope;
827 822
     this.checkedHos = scopeInfo.hospitalId ? scopeInfo.hospitalId.id : undefined;
823
+    this.checkedHosDTO = scopeInfo.hospitalId || undefined;
828 824
     this.orderScopeRadio = scopeInfo.range + "";
829 825
     let groupIds = scopeInfo.groupIds || [];
830 826
     let dutyGroupList = scopeInfo.dutyGroupList || [];
@@ -834,6 +830,7 @@ export class FuwutaiComponent implements OnInit {
834 830
     }
835 831
     this.hsmsData = {
836 832
       checkedHos: this.checkedHos,
833
+      checkedHosDTO: this.checkedHosDTO,
837 834
       scopeGroups: this.scopeGroups,
838 835
       orderScopeRadio: this.orderScopeRadio || '0',
839 836
       hsmsSwitch: scopeInfo.hsmsSwitch === 1,
@@ -865,7 +862,7 @@ export class FuwutaiComponent implements OnInit {
865 862
       this.cancelOrderScope();
866 863
       this.showPromptModal("保存", true, "");
867 864
       // 关闭phone的websocket
868
-      this.phones.closeWs(true);
865
+      this.incomingService.closeWs(true);
869 866
       this.getPhoneNum(false);
870 867
       this.user.user.scope = data.data;
871 868
       localStorage.setItem("user", JSON.stringify(this.user));
@@ -886,6 +883,28 @@ export class FuwutaiComponent implements OnInit {
886 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 908
   // 连接websocket
890 909
   getWebsocketSer() {
891 910
     this.sers
@@ -895,94 +914,128 @@ export class FuwutaiComponent implements OnInit {
895 914
         if (result && result.content) {
896 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 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 1040
   onChange(value: number): void {
988 1041
     console.log(`onChange: ${value}`);
@@ -1256,53 +1309,54 @@ export class FuwutaiComponent implements OnInit {
1256 1309
     let that = this;
1257 1310
     that.typeId = typeId;
1258 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 1367
       sum: 1,
1314 1368
       incident: {
1315 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 1371
         "urgentType": +this.itsmData.orderScopeRadio + 1,
1318 1372
         "queryTask": "callback",
1319 1373
         "assignee": this.tool.getCurrentUserId(),
@@ -1383,7 +1437,7 @@ export class FuwutaiComponent implements OnInit {
1383 1437
 
1384 1438
         postData.workOrderQuery = {
1385 1439
           workOrder: {
1386
-            serTaskTypes: types || "null",
1440
+            serTaskTypes: types || undefined,
1387 1441
             serGdState: stateId,
1388 1442
             range: this.orderScopeRadio,
1389 1443
             platform: 3,
@@ -1408,7 +1462,7 @@ export class FuwutaiComponent implements OnInit {
1408 1462
       if(stateId == 1){
1409 1463
         postData.incidentQuery.incident = {
1410 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 1466
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1413 1467
           "queryTask": "storageAccept",
1414 1468
           "assignee": this.tool.getCurrentUserId(),
@@ -1417,7 +1471,7 @@ export class FuwutaiComponent implements OnInit {
1417 1471
       }else if(stateId == 2){
1418 1472
         postData.incidentQuery.incident = {
1419 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 1475
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1422 1476
           "queryTask": "todoReassign",
1423 1477
           "deleteFlag": 0,
@@ -1425,7 +1479,7 @@ export class FuwutaiComponent implements OnInit {
1425 1479
       }else if(stateId == 3){
1426 1480
         postData.incidentQuery.incident = {
1427 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 1483
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1430 1484
           "queryTask": "doing",
1431 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 1549
   showRowNum: number; // 已展示行数
1511 1550
   maxNum: number; //可展示行数最大值
@@ -1643,7 +1682,7 @@ export class FuwutaiComponent implements OnInit {
1643 1682
     }
1644 1683
     localStorage.removeItem("user");
1645 1684
     localStorage.removeItem("menu");
1646
-    localStorage.removeItem("phones");
1685
+    this.incomingService.removePhoneNumber();
1647 1686
     localStorage.removeItem("index");
1648 1687
     // 假退出
1649 1688
     this.mainService.logOut().subscribe((data) => {
@@ -1657,7 +1696,7 @@ export class FuwutaiComponent implements OnInit {
1657 1696
         }
1658 1697
         localStorage.removeItem("user");
1659 1698
         localStorage.removeItem("menu");
1660
-        localStorage.removeItem("phones");
1699
+        this.incomingService.removePhoneNumber();
1661 1700
         localStorage.removeItem("index");
1662 1701
       }
1663 1702
     });
@@ -1766,7 +1805,7 @@ export class FuwutaiComponent implements OnInit {
1766 1805
         this.incidentModel.department = isInit ? this.incidentModel.department : null;
1767 1806
 
1768 1807
         //正常初始化
1769
-        this.getAutoWorkTypes();
1808
+        this.getAutoWorkTypes(false);
1770 1809
         return;
1771 1810
       }
1772 1811
     }
@@ -1830,7 +1869,7 @@ export class FuwutaiComponent implements OnInit {
1830 1869
         this.searchTaskList.forEach((item) => {
1831 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 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 1890
   getPhoneNum(flag = true) {
1896 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 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 1899
   // 点击tab切换
1925 1900
   tabClick(key) {
1926 1901
     let preCurrentTabIndex = this.currentTabIndex;
@@ -1943,11 +1918,11 @@ export class FuwutaiComponent implements OnInit {
1943 1918
     this.deptQtList["startStatus"] = 0;
1944 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 1923
         this.rightTitle_tab = [
1949
-          { id: 2, name: '近期维修' },
1950
-          { id: 3, name: '知识库' },
1924
+          { id: 0, name: '近期配送' },
1925
+          { id: 1, name: '转出院记录' },
1951 1926
         ]
1952 1927
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1953 1928
       }
@@ -1964,11 +1939,11 @@ export class FuwutaiComponent implements OnInit {
1964 1939
       if(!this.incidentModel.source && source){
1965 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 1944
         this.rightTitle_tab = [
1970
-          { id: 0, name: '近期配送' },
1971
-          { id: 1, name: '转出院记录' },
1945
+          { id: 2, name: '近期维修' },
1946
+          { id: 3, name: '知识库' },
1972 1947
         ]
1973 1948
         this.rightTitleHandler(this.rightTitle_tab[0].id);
1974 1949
       }
@@ -2588,6 +2563,7 @@ export class FuwutaiComponent implements OnInit {
2588 2563
               this.changeApplicationDepartment("");
2589 2564
             } else if (e === "&ks&") {
2590 2565
               //绑定了科室
2566
+              // 配送--start
2591 2567
               let obj = this.applicationDepartmentList.find(
2592 2568
                 (item) => item.id == this.applyDeptMiddle.id
2593 2569
               );
@@ -2596,6 +2572,7 @@ export class FuwutaiComponent implements OnInit {
2596 2572
               }
2597 2573
               this.applyDept = this.applyDeptMiddle.id;
2598 2574
               this.changeApplicationDepartment("&ks&");
2575
+              // 配送--end
2599 2576
             } else if (e === "&go&") {
2600 2577
               //继续建单
2601 2578
               let obj = this.applicationDepartmentList.find(
@@ -2730,14 +2707,15 @@ export class FuwutaiComponent implements OnInit {
2730 2707
       phone !== "&ks&" &&
2731 2708
       phone !== "&go&"
2732 2709
     ) {
2733
-      this.callNumber = phone;
2710
+      // this.incidentModel.incomingPhone = this.callNumber = phone;
2734 2711
       this.applyDept = null;
2735 2712
       this.noArrives = []; //近期配送
2736 2713
     } else if (phone === "&ks&") {
2737 2714
       let filter = this.applicationDepartmentList.filter(
2738 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 2719
       console.log(this.callNumber); //ceshi
2742 2720
       if (this.currentTabIndex == "255") {
2743 2721
         //患者转运
@@ -3024,12 +3002,13 @@ export class FuwutaiComponent implements OnInit {
3024 3002
       this.showPromptModal("操作", true, "", "");
3025 3003
     }else{
3026 3004
       this.newOrderShow = false; //关闭弹窗
3005
+      this.newOrderShowOpen = false; //此时可出现新的弹窗
3027 3006
       this.showPromptModal("操作", true, "", "");
3028 3007
     }
3029 3008
   }
3030 3009
 
3031 3010
   // 新建工单->获取新建类型
3032
-  getAutoWorkTypes() {
3011
+  getAutoWorkTypes(isFirst) {
3033 3012
     this.workTypesArrange = {};
3034 3013
     // 运维
3035 3014
     if(this.itsmData.mdv2Switch){
@@ -3066,7 +3045,7 @@ export class FuwutaiComponent implements OnInit {
3066 3045
           this.workTypesFlag = arr.length >= 5;
3067 3046
           // 默认选中第一项
3068 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 4129
     tipsMsg2: string,
4151 4130
     type: string,
4152 4131
   ) {
4153
-    e.stopPropagation();
4132
+    e && e.stopPropagation();
4154 4133
     this.confirmDelType = type;
4155 4134
     this.delModal = true;
4156 4135
     this.coopData = data;
@@ -4190,6 +4169,14 @@ export class FuwutaiComponent implements OnInit {
4190 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 17
 import { IncidentSerMessageModule } from 'src/app/components/incidentManagement/incident-ser-message/incident-ser-message.module';
18 18
 import { IncidentSerCallModule } from 'src/app/components/incidentManagement/incident-ser-call/incident-ser-call.module';
19 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 23
 @NgModule({
@@ -39,6 +40,7 @@ import { VirtualScrollerModule } from 'ngx-virtual-scroller';
39 40
     IncidentSerMessageModule,
40 41
     IncidentSerCallModule,
41 42
     VirtualScrollerModule,
43
+    BindExtensionNumberModule,
42 44
   ]
43 45
 })
44 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 4474
     localStorage.removeItem("user");
4475 4475
     localStorage.removeItem("menu");
4476
-    localStorage.removeItem("phones");
4477 4476
     localStorage.removeItem("index");
4478 4477
 
4479 4478
     // 假退出
@@ -4486,7 +4485,6 @@ export class HushijiandanComponent implements OnInit {
4486 4485
         }
4487 4486
         localStorage.removeItem("user");
4488 4487
         localStorage.removeItem("menu");
4489
-        localStorage.removeItem("phones");
4490 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 505
     localStorage.removeItem("user");
506 506
     localStorage.removeItem("menu");
507
-    localStorage.removeItem("phones");
508 507
     localStorage.removeItem("index");
509 508
 
510 509
     // 假退出
@@ -517,7 +516,6 @@ export class MainComponent implements OnInit {
517 516
         }
518 517
         localStorage.removeItem("user");
519 518
         localStorage.removeItem("menu");
520
-        localStorage.removeItem("phones");
521 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 49
   osComponentRef5: OverlayScrollbarsComponent;
50 50
   constructor(
51
-	private mainService: MainService, 
52
-	public router: Router, 
51
+	private mainService: MainService,
52
+	public router: Router,
53 53
 	private route: ActivatedRoute,
54 54
 	public tool: ToolService,
55 55
 	private fb: FormBuilder,
@@ -95,7 +95,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
95 95
   completedFlag = false;
96 96
   completedSearchKey = "";
97 97
   completedLoad = false;
98
-	
98
+
99 99
 	barCode:any; //条码搜索
100 100
   // other
101 101
   loginUser: any = localStorage.getItem("user")
@@ -117,7 +117,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
117 117
 	fixationModal:boolean = false //标本接收固定
118 118
 	verificationMoadl:boolean = false //标本核验
119 119
 	specimenCode:any; //标本条码
120
-	listOneData:any=[]; 
120
+	listOneData:any=[];
121 121
 	listOneLength:any;
122 122
 	pageOneIndex:any = 1;
123 123
 	pageSize:any = 10;
@@ -223,7 +223,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
223 223
       this.runTime();
224 224
     }, 500);
225 225
   }
226
-	
226
+
227 227
 	//tab切换
228 228
 	tabClick(type){
229 229
 		this.activeIndex = type
@@ -237,7 +237,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
237 237
 			this.getHospitalData()
238 238
 		}
239 239
 	}
240
-	
240
+
241 241
 	// 获取今日接收数据
242 242
 	getToday(){
243 243
 		this.mainService
@@ -252,7 +252,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
252 252
 	changeUserInp(e){
253 253
 		this.changeInpSubjectUser.next([e]);
254 254
 	}
255
-	
255
+
256 256
 	// 获取配送人
257 257
 	getUserData(e){
258 258
 		let query={
@@ -269,7 +269,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
269 269
 			this.userData = res.list
270 270
 		});
271 271
 	}
272
-	
272
+
273 273
 	// 搜索
274 274
 	search() {
275 275
 	  this.pageOneIndex = 1;
@@ -308,7 +308,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
308 308
 	      that.listOneLength = data.totalNum;
309 309
 	    });
310 310
 	}
311
-	
311
+
312 312
 	// 实时术中快速数据
313 313
 	getSpeedinessList() {
314 314
 		var that = this;
@@ -330,7 +330,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
330 330
 		    that.listTwoLength = data.totalNum;
331 331
 		  });
332 332
 	}
333
-	
333
+
334 334
 	// 打包配送
335 335
 	getPackList() {
336 336
 	  var that = this;
@@ -350,7 +350,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
350 350
 	      that.listThreeLength = data.totalNum;
351 351
 	    });
352 352
 	}
353
-	
353
+
354 354
 	// 查看
355 355
 	project:any = [];
356 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 377
 	closeDetail(){
378 378
 		this.listDetailMoadl = false
@@ -380,7 +380,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
380 380
 			document.getElementById('Binput').focus();
381 381
 		},200)
382 382
 	}
383
-	
383
+
384 384
 	// 接收
385 385
 	connect(){
386 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 400
 	packaging(){
401 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 415
 	threeLook(e,data){
416 416
 		localStorage.setItem("pathologyActiveIndex",this.activeIndex)
417 417
 		localStorage.setItem("dataType",'');
418 418
 		this.router.navigateByUrl(`/pathologyScan?packId=${data.id}&businessType=packagLook`);
419 419
 	}
420
-	
420
+
421 421
 	// 配送
422 422
 	distributionModal:boolean = false
423 423
 	distribution(e,data){
@@ -431,7 +431,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
431 431
 		this.handoverUserId = null
432 432
 		this.distributionModal = true
433 433
 	}
434
-	
434
+
435 435
 	// 确定配送
436 436
 	submitDistributionForm(){
437 437
 		for (const i in this.validateForm.controls) {
@@ -459,9 +459,9 @@ export class PathologyComponent implements OnInit, OnDestroy {
459 459
 		      this.message.error(data.msg)
460 460
 		    }
461 461
 		  });
462
-		
462
+
463 463
 	}
464
-	
464
+
465 465
 	// 取消配送
466 466
 	hideDistributionModal(){
467 467
 		this.distributionModal = false
@@ -469,16 +469,16 @@ export class PathologyComponent implements OnInit, OnDestroy {
469 469
 			document.getElementById('Binput').focus();
470 470
 		},200)
471 471
 	}
472
-	
472
+
473 473
 	changeHospitalInp(e){
474 474
 		// this.changeInpSubjectHospital.next([e]);
475 475
 	}
476
-	
476
+
477 477
 	changeDepartmentInp(e){
478 478
 		this.isDeptLoading = true
479 479
 		this.changeInpSubjectDepartment.next([e]);
480 480
 	}
481
-	
481
+
482 482
 	// 获取院区
483 483
 	getHospitalData(){
484 484
 		let arr = this.tool.getHospitalList().filter(i=>i.parent==undefined)
@@ -496,7 +496,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
496 496
 		//     this.hospital = res.list;
497 497
 		//   });
498 498
 	}
499
-	
499
+
500 500
 	// 选择院区
501 501
 	hospitalId:any=null;
502 502
 	changeHospDate(e){
@@ -504,7 +504,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
504 504
 		this.hospitalId = e
505 505
 		this.getDepartmentData('',e)
506 506
 	}
507
-	
507
+
508 508
 	// 获取科室
509 509
 	isDeptLoading:boolean = false;
510 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 532
 	printModal:boolean = false;
533 533
 	parintLoading:boolean = false;
@@ -535,7 +535,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
535 535
 		this.rowData = item
536 536
 		this.printModal = true
537 537
 	}
538
-	
538
+
539 539
 	// 取消补打
540 540
 	hidePrintModal(){
541 541
 		this.printModal = false
@@ -543,7 +543,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
543 543
 			document.getElementById('Binput').focus();
544 544
 		},200)
545 545
 	}
546
-	
546
+
547 547
 	// 确定补打
548 548
 	confirmPrintDel(){
549 549
 		this.parintLoading = true
@@ -571,9 +571,9 @@ export class PathologyComponent implements OnInit, OnDestroy {
571 571
 				this.message.error(data.msg)
572 572
 			}
573 573
 		});
574
-		
574
+
575 575
 	}
576
-	
576
+
577 577
 	// 接收时间
578 578
 	startDate:any;
579 579
 	endDate:any;
@@ -582,12 +582,12 @@ export class PathologyComponent implements OnInit, OnDestroy {
582 582
 		this.endDate = format(result[1], 'yyyy-MM-dd' +' '+'23:59:59');
583 583
 		this.acceptTime = [this.startDate,this.endDate]
584 584
 	}
585
-	
585
+
586 586
 	// 获取批次号
587 587
 	generateBatchNumber(){
588 588
 
589 589
 	}
590
-	
590
+
591 591
 	// 标本条码搜索
592 592
 	errorcODEMsg:any = null
593 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 631
 	pageReceptionIndex:any = 1;
@@ -661,7 +661,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
661 661
 				this.listReceptionLength = res.totalNum;
662 662
 		  });
663 663
 	}
664
-	
664
+
665 665
 	// 确定接收包
666 666
 	submitReceptionForm(){
667 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 697
 	hideReceptionModal(){
698 698
 		this.receptionModal = false
@@ -700,12 +700,12 @@ export class PathologyComponent implements OnInit, OnDestroy {
700 700
 			document.getElementById('Binput').focus();
701 701
 		},200)
702 702
 	}
703
-	
703
+
704 704
 	// 选择固定时间
705 705
 	formChangeDate(result){
706 706
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
707 707
 	}
708
-	
708
+
709 709
 	// 监听人员交接接收人工号输入
710 710
 	connectUserId:any = null;
711 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 734
 	dispatchingUserId:any = null;
735 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 758
 	mustReceived:any = null;
759 759
 	currReceived:any = null;
@@ -779,7 +779,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
779 779
 				this.dispatchingName = null;
780 780
 				this.dispatchingUserId = null
781 781
 			}
782
-			
782
+
783 783
 			this.receptionName = null;
784 784
 			this.connectUserId = null
785 785
 			this.connectModal = true
@@ -789,7 +789,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
789 789
 	hideConnectModal(){
790 790
 		this.connectModal = false
791 791
 	}
792
-	
792
+
793 793
 	// 确定人员交接
794 794
 	btnConnectLoading:boolean = false;
795 795
 	submitConnectForm(){
@@ -815,21 +815,21 @@ export class PathologyComponent implements OnInit, OnDestroy {
815 815
 		    }
816 816
 		  });
817 817
 	}
818
-	
818
+
819 819
 	// 确定打包
820 820
 	packModal:boolean = false;
821 821
 	submitScanForm(){
822 822
 		this.packModal = true
823 823
 		// this.hideSpecimenModal()
824 824
 	}
825
-	
825
+
826 826
 	// 确定打包并打印
827 827
 	btnPackLoading:boolean = false;
828 828
 	printData:any = [];
829 829
 	submitPackForm(){
830 830
 		let that = this
831 831
 		let data: any = {
832
-			
832
+
833 833
 		};
834 834
 
835 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 862
 	hidePackModal(){
863 863
 		this.packModal = false
@@ -865,7 +865,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
865 865
 			document.getElementById('specimen').focus();
866 866
 		},200)
867 867
 	}
868
-	
868
+
869 869
 	// 关闭交接/打包
870 870
 	hideSpecimenModal(){
871 871
 		this.barCode = null;
@@ -875,7 +875,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
875 875
 			document.getElementById('Binput').focus();
876 876
 		},200)
877 877
 	}
878
-	
878
+
879 879
 	// 获取标本详情
880 880
 	getSampleData(item){
881 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 901
 	getDept(){
902 902
 		this.setSpecimen()
@@ -925,7 +925,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
925 925
 			  .subscribe((res) => {
926 926
 			    that.operationData = res.list;
927 927
 			  });
928
-				
928
+
929 929
 			that.mainService
930 930
 			  .getFetchDataList("data", "department", data2)
931 931
 			  .subscribe((res) => {
@@ -934,7 +934,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
934 934
 			  });
935 935
 		});
936 936
 	}
937
-	
937
+
938 938
 	// 获取关联科室详情
939 939
 	getDeptDetail(){
940 940
 		this.mainService
@@ -954,7 +954,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
954 954
 				}
955 955
 		  });
956 956
 	}
957
-	
957
+
958 958
 	// 获取是否关联标本间
959 959
 	setSpecimen(){
960 960
 		this.validateForm = this.fb.group({
@@ -964,7 +964,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
964 964
 		});
965 965
 		this.relevanceModal = true
966 966
 	}
967
-	
967
+
968 968
 	// 确定关联科室
969 969
 	btnLoading:boolean = false;
970 970
 	submitForm(){
@@ -998,7 +998,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
998 998
 		    }
999 999
 		  });
1000 1000
 	}
1001
-	
1001
+
1002 1002
 	getNewDept(){
1003 1003
 		let postData = {
1004 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 1029
 	getCurrentUserNow() {
1030 1030
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
1031 1031
 	    if (data["status"] == 200) {
1032
-				this.loginUser = data.data 
1032
+				this.loginUser = data.data
1033 1033
 	      let user = JSON.parse(localStorage.getItem("user"));
1034 1034
 	      user.user.dept = data["data"].dept;
1035 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 1042
 	handoverUserId:any = null;
1043 1043
 	numberChange(e){
@@ -1060,7 +1060,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1060 1060
 				}
1061 1061
 		  });
1062 1062
 	}
1063
-	
1063
+
1064 1064
 	// 提交固定标本接收
1065 1065
 	submitVerificationForm(){
1066 1066
 		for (const i in this.validateVerificationForm.controls) {
@@ -1068,7 +1068,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1068 1068
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
1069 1069
 		}
1070 1070
 		if (this.validateVerificationForm.invalid) return;
1071
-		
1071
+
1072 1072
 		let data: any = {
1073 1073
 			id:this.codeData.id,
1074 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 1097
 	closeModel(){
1098 1098
 		this.hideReceptionModal()
1099 1099
 		this.hideConnectModal()
1100 1100
 		this.hideSpecimenModal()
1101 1101
 	}
1102
-	
1102
+
1103 1103
 	// 关闭配送信息
1104 1104
 	hideVerificationModal(){
1105 1105
 		this.verificationMoadl = false
@@ -1113,13 +1113,13 @@ export class PathologyComponent implements OnInit, OnDestroy {
1113 1113
 		this.businessType = 'connect'
1114 1114
 		this.changeInpSubjectSpecimen.next([e]);
1115 1115
 	}
1116
-	
1116
+
1117 1117
 	// 监听交接/打包扫描条码
1118 1118
 	tableLoading:boolean = false;
1119 1119
 	codeChange(e){
1120 1120
 		this.changeInpSubject.next([e]);
1121 1121
 	}
1122
-	
1122
+
1123 1123
 	// 标本接收搜索条码
1124 1124
 	errorMsg:any = null;
1125 1125
 	searchSpecimenData(e){
@@ -1154,7 +1154,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1154 1154
 			}
1155 1155
 		})
1156 1156
 	}
1157
-	
1157
+
1158 1158
 	// 关闭多只标本
1159 1159
 	hideMultiModal(){
1160 1160
 		this.multiModal = false
@@ -1162,7 +1162,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1162 1162
 			document.getElementById('specimen').focus();
1163 1163
 		},200)
1164 1164
 	}
1165
-	
1165
+
1166 1166
 	// 监听多只标本扫描
1167 1167
 	codeMultiChange(e){
1168 1168
 		if(!e){
@@ -1191,7 +1191,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1191 1191
 			})
1192 1192
 		},500)
1193 1193
 	}
1194
-	
1194
+
1195 1195
 	// 多只标本确定接受
1196 1196
 	btnMultiLoading:boolean = false;
1197 1197
 	submitMultiForm(){
@@ -1199,7 +1199,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1199 1199
 		this.btnMultiLoading = false
1200 1200
 		this.hideMultiModal()
1201 1201
 	}
1202
-	
1202
+
1203 1203
 	pathologyLogs:any=[];
1204 1204
 	specimenList:any=[]
1205 1205
 	stepLength:any = 0;
@@ -1208,19 +1208,19 @@ export class PathologyComponent implements OnInit, OnDestroy {
1208 1208
 	// 	this.getSampleData(item)
1209 1209
 	// 	clearInterval(this.logTimer);
1210 1210
 	// 	if(type==1){
1211
-			
1211
+
1212 1212
 	// 	}else if(type==2){
1213
-			
1213
+
1214 1214
 	// 	}else{
1215
-			
1215
+
1216 1216
 	// 	}
1217 1217
 	// }
1218
-	
1218
+
1219 1219
 	closeDetailMoadl(){
1220 1220
 		this.detailMoadl = false
1221 1221
 	}
1222
-	
1223
- 
1222
+
1223
+
1224 1224
   // 自动刷新倒计时
1225 1225
   autoUpdate(flag = true) {
1226 1226
     if (flag) {
@@ -1246,7 +1246,6 @@ export class PathologyComponent implements OnInit, OnDestroy {
1246 1246
     }
1247 1247
     localStorage.removeItem("user");
1248 1248
     localStorage.removeItem("menu");
1249
-    localStorage.removeItem("phones");
1250 1249
     localStorage.removeItem("index");
1251 1250
 		localStorage.removeItem("scanCodeData");
1252 1251
 		localStorage.removeItem("dataType");
@@ -1261,7 +1260,6 @@ export class PathologyComponent implements OnInit, OnDestroy {
1261 1260
         }
1262 1261
         localStorage.removeItem("user");
1263 1262
         localStorage.removeItem("menu");
1264
-        localStorage.removeItem("phones");
1265 1263
         localStorage.removeItem("index");
1266 1264
 				localStorage.removeItem("scanCodeData");
1267 1265
 				localStorage.removeItem("dataType");
@@ -1357,7 +1355,7 @@ export class PathologyComponent implements OnInit, OnDestroy {
1357 1355
       }
1358 1356
     }, 1000);
1359 1357
   }
1360
-	
1358
+
1361 1359
 	promptModalShow:boolean = false;
1362 1360
 	promptContent:any = null;
1363 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 49
   osComponentRef5: OverlayScrollbarsComponent;
50 50
   constructor(
51
-	private mainService: MainService, 
52
-	public router: Router, 
51
+	private mainService: MainService,
52
+	public router: Router,
53 53
 	private route: ActivatedRoute,
54 54
 	public tool: ToolService,
55 55
 	private fb: FormBuilder,
56 56
 	private message: NzMessageService,
57 57
 	private sanitizer: DomSanitizer,
58
-	
58
+
59 59
 	) {}
60 60
   // 今日药单量
61 61
   todayTotal: undefined;
@@ -96,7 +96,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
96 96
   completedFlag = false;
97 97
   completedSearchKey = "";
98 98
   completedLoad = false;
99
-	
99
+
100 100
 	barCode:any; //条码搜索
101 101
   // other
102 102
   loginUser: any = localStorage.getItem("user")
@@ -118,7 +118,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
118 118
 	fixationModal:boolean = false //标本接收固定
119 119
 	verificationMoadl:boolean = false //标本核验
120 120
 	specimenCode:any; //标本条码
121
-	listOneData:any=[]; 
121
+	listOneData:any=[];
122 122
 	listOneLength:any;
123 123
 	pageOneIndex:any = 1;
124 124
 	pageSize:any = 10;
@@ -210,7 +210,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
210 210
 			if(this.dataType=='pathologyPack'){
211 211
 				this.getJsData(4)
212 212
 			}
213
-			if(this.scanCodeData.pathologySpecimenDTOList && 
213
+			if(this.scanCodeData.pathologySpecimenDTOList &&
214 214
 			this.scanCodeData.pathologySpecimenDTOList.length>1){
215 215
 				this.muArr = []
216 216
 				for(let i of this.scanCodeData.pathologySpecimenDTOList){
@@ -219,7 +219,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
219 219
 					}
220 220
 				}
221 221
 				this.getJsData(3)
222
-			}else if(this.scanCodeData.pathologySpecimenDTOList && 
222
+			}else if(this.scanCodeData.pathologySpecimenDTOList &&
223 223
 			this.scanCodeData.pathologySpecimenDTOList.length==1){
224 224
 				this.getJsData(1)
225 225
 			}
@@ -233,9 +233,9 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
233 233
 			}
234 234
 			this.getJsData(1)
235 235
 		}
236
-		
236
+
237 237
   }
238
-	
238
+
239 239
 	// 分页
240 240
 	noType:any='none';
241 241
 	pageChange(){
@@ -248,7 +248,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
248 248
 			this.getJsData(1)
249 249
 		}
250 250
 	}
251
-	
251
+
252 252
   // 当前时间日期
253 253
   runTime() {
254 254
     clearTimeout(this.timer);
@@ -266,7 +266,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
266 266
 			document.getElementById('specimen').focus();
267 267
 		},200)
268 268
 	}
269
-	
269
+
270 270
 	// 打包
271 271
 	packaging(){
272 272
 		this.fixationModal = true
@@ -275,7 +275,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
275 275
 			document.getElementById('specimen').focus();
276 276
 		},200)
277 277
 	}
278
-	
278
+
279 279
 	// 配送
280 280
 	distributionModal:boolean = false
281 281
 	distribution(e,data){
@@ -288,14 +288,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
288 288
 		this.handoverUserId = null
289 289
 		this.distributionModal = true
290 290
 	}
291
-	
291
+
292 292
 	// 确定配送
293 293
 	submitDistributionForm(){
294 294
 		this.btnLoading = true
295 295
 		this.btnLoading = false
296 296
 		this.hideDistributionModal()
297 297
 	}
298
-	
298
+
299 299
 	// 取消配送
300 300
 	hideDistributionModal(){
301 301
 		this.distributionModal = false
@@ -303,23 +303,23 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
303 303
 			document.getElementById('Binput').focus();
304 304
 		},200)
305 305
 	}
306
-	
306
+
307 307
 	changeHospitalInp(e){
308 308
 		// this.changeInpSubjectHospital.next([e]);
309 309
 	}
310
-	
310
+
311 311
 	changeDepartmentInp(e){
312 312
 		// this.isDeptLoading = true
313 313
 		// this.changeInpSubjectDepartment.next([e]);
314 314
 	}
315
-	
315
+
316 316
 	// 补打
317 317
 	printModal:boolean = false;
318 318
 	parintLoading:boolean = false;
319 319
 	reprint(e,data){
320 320
 		this.printModal = true
321 321
 	}
322
-	
322
+
323 323
 	// 取消补打
324 324
 	hidePrintModal(){
325 325
 		this.printModal = false
@@ -327,7 +327,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
327 327
 			document.getElementById('Binput').focus();
328 328
 		},200)
329 329
 	}
330
-	
330
+
331 331
 	// 确定补打
332 332
 	confirmPrintDel(){
333 333
 		this.parintLoading = true
@@ -338,9 +338,9 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
338 338
 		// } else {
339 339
 		// 	this.showPromptModal("操作", false, res.msg);
340 340
 		// }
341
-		
341
+
342 342
 	}
343
-	
343
+
344 344
 	// 接收时间
345 345
 	startDate:any;
346 346
 	endDate:any;
@@ -348,12 +348,12 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
348 348
 		this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
349 349
 		this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
350 350
 	}
351
-	
351
+
352 352
 	// 获取批次号
353 353
 	generateBatchNumber(){
354 354
 
355 355
 	}
356
-	
356
+
357 357
 	// 获取标本接收数据
358 358
 	pageReceptionIndex:any = 1;
359 359
 	listReceptionLength:any = 0;
@@ -403,7 +403,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
403 403
 				this.listReceptionLength = res.totalNum;
404 404
 		  });
405 405
 	}
406
-	
406
+
407 407
 	// 配送中包交接完成
408 408
 	connectAccomplish(){
409 409
 		this.validateConnectForm = this.fb.group({
@@ -412,14 +412,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
412 412
 		});
413 413
 		this.dispatchingName = this.scanCodeData.deliveryUserDTO.name;
414 414
 		this.dispatchingUserId = this.scanCodeData.deliveryUserDTO.id
415
-		
415
+
416 416
 		this.receptionName = this.userInfo.name;
417 417
 		this.connectUserId = this.userInfo.id;
418
-		
418
+
419 419
 		this.receptionModal = true
420 420
 		this.barCode = null
421 421
 	}
422
-	
422
+
423 423
 	// 确定接收包
424 424
 	submitReceptionForm(){
425 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 453
 	hideReceptionModal(){
454 454
 		this.receptionModal = false
455 455
 	}
456
-	
456
+
457 457
 	// 选择固定时间
458 458
 	formChangeDate(result){
459 459
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
460 460
 	}
461
-	
461
+
462 462
 	// 监听人员交接接收人工号输入
463 463
 	connectUserId:any = null;
464 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 487
 	dispatchingUserId:any = null;
488 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 511
 	mustReceived:any = null;
512 512
 	currReceived:any = null;
@@ -541,7 +541,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
541 541
 	hideConnectModal(){
542 542
 		this.connectModal = false
543 543
 	}
544
-	
544
+
545 545
 	// 确定人员交接
546 546
 	btnConnectLoading:boolean = false;
547 547
 	submitConnectForm(){
@@ -568,21 +568,21 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
568 568
 		    }
569 569
 		  });
570 570
 	}
571
-	
571
+
572 572
 	// 确定打包
573 573
 	packModal:boolean = false;
574 574
 	submitScanForm(){
575 575
 		this.packModal = true
576 576
 		// this.hideSpecimenModal()
577 577
 	}
578
-	
578
+
579 579
 	// 确定打包并打印
580 580
 	btnPackLoading:boolean = false;
581 581
 	printData:any = [];
582 582
 	submitPackForm(){
583 583
 		let that = this
584 584
 		let data: any = {
585
-			batchNo:this.batchNo, 
585
+			batchNo:this.batchNo,
586 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 618
 	hidePackModal(){
619 619
 		this.packModal = false
@@ -621,14 +621,14 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
621 621
 			document.getElementById('specimen').focus();
622 622
 		},200)
623 623
 	}
624
-	
624
+
625 625
 	// 关闭交接/打包
626 626
 	hideSpecimenModal(){
627 627
 		// 清空data
628 628
 		localStorage.setItem("scanCodeData",'')
629 629
 		this.router.navigateByUrl(`/pathology?type=detail`)
630 630
 	}
631
-	
631
+
632 632
 	// 获取标本详情
633 633
 	project:any = [];
634 634
 	getSampleData(item){
@@ -649,7 +649,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
649 649
 			}
650 650
 		});
651 651
 	}
652
-	
652
+
653 653
 	// 获取科室
654 654
 	getDept(){
655 655
 		this.setSpecimen()
@@ -678,7 +678,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
678 678
 			  .subscribe((res) => {
679 679
 			    that.operationData = res.list;
680 680
 			  });
681
-				
681
+
682 682
 			that.mainService
683 683
 			  .getFetchDataList("data", "department", data2)
684 684
 			  .subscribe((res) => {
@@ -687,7 +687,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
687 687
 			  });
688 688
 		});
689 689
 	}
690
-	
690
+
691 691
 	// 获取关联科室详情
692 692
 	getDeptDetail(){
693 693
 		this.mainService
@@ -707,7 +707,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
707 707
 				}
708 708
 		  });
709 709
 	}
710
-	
710
+
711 711
 	// 获取是否关联标本间
712 712
 	setSpecimen(){
713 713
 		this.validateForm = this.fb.group({
@@ -717,7 +717,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
717 717
 		});
718 718
 		this.relevanceModal = true
719 719
 	}
720
-	
720
+
721 721
 	// 确定关联科室
722 722
 	btnLoading:boolean = false;
723 723
 	submitForm(){
@@ -751,7 +751,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
751 751
 		    }
752 752
 		  });
753 753
 	}
754
-	
754
+
755 755
 	getNewDept(){
756 756
 		let postData = {
757 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 782
 	getCurrentUserNow() {
783 783
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
784 784
 	    if (data["status"] == 200) {
785
-				this.loginUser = data.data 
785
+				this.loginUser = data.data
786 786
 	      let user = JSON.parse(localStorage.getItem("user"));
787 787
 	      user.user.dept = data["data"].dept;
788 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 795
 	handoverUserId:any = null;
796 796
 	numberChange(e){
@@ -813,7 +813,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
813 813
 				}
814 814
 		  });
815 815
 	}
816
-	
816
+
817 817
 	// 提交固定标本接收
818 818
 	submitVerificationForm(){
819 819
 		for (const i in this.validateVerificationForm.controls) {
@@ -821,7 +821,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
821 821
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
822 822
 		}
823 823
 		if (this.validateVerificationForm.invalid) return;
824
-		
824
+
825 825
 		let data: any = {
826 826
 			id:this.codeData.id,
827 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 850
 	closeModel(){
851 851
 		localStorage.setItem("scanCodeData",'')
852 852
 		this.router.navigateByUrl(`/pathology?type=detail`);
853 853
 	}
854
-	
854
+
855 855
 	// 关闭配送信息
856 856
 	hideVerificationModal(){
857 857
 		this.verificationMoadl = false
@@ -860,13 +860,13 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
860 860
 		},200)
861 861
 	}
862 862
 
863
-	
863
+
864 864
 	// 监听交接/打包扫描条码
865 865
 	tableLoading:boolean = false;
866 866
 	codeChange(e){
867 867
 		this.changeInpSubject.next([e]);
868 868
 	}
869
-	
869
+
870 870
 	// 标本接收搜索条码
871 871
 	errorMsg:any = null;
872 872
 	searchSpecimenData(e){
@@ -916,7 +916,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
916 916
 			}
917 917
 		})
918 918
 	}
919
-	
919
+
920 920
 	// 关闭多只标本
921 921
 	hideMultiModal(){
922 922
 		localStorage.setItem("scanCodeData",'');
@@ -928,7 +928,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
928 928
 			document.getElementById('specimen').focus();
929 929
 		},200)
930 930
 	}
931
-	
931
+
932 932
 	// 监听多只标本扫描
933 933
 	codeMultiChange(e){
934 934
 		if(!e){
@@ -975,7 +975,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
975 975
 			})
976 976
 		},500)
977 977
 	}
978
-	
978
+
979 979
 	// 多只标本确定接受
980 980
 	btnMultiLoading:boolean = false;
981 981
 	submitMultiForm(){
@@ -1003,7 +1003,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1003 1003
 			},500)
1004 1004
 		});
1005 1005
 	}
1006
-	
1006
+
1007 1007
 	// 多只标本打包
1008 1008
 	submitMultiScanForm(){
1009 1009
 		let data1 = JSON.parse(localStorage.getItem("scanCodeData"))
@@ -1030,7 +1030,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1030 1030
 			},500)
1031 1031
 		});
1032 1032
 	}
1033
-	
1033
+
1034 1034
 	// 查看详情
1035 1035
 	pathologyLogs:any=[];
1036 1036
 	specimenList:any=[]
@@ -1040,19 +1040,19 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1040 1040
 		this.getSampleData(item)
1041 1041
 		clearInterval(this.logTimer);
1042 1042
 		if(type==1){
1043
-			
1043
+
1044 1044
 		}else if(type==2){
1045
-			
1045
+
1046 1046
 		}else{
1047
-			
1047
+
1048 1048
 		}
1049 1049
 	}
1050
-	
1050
+
1051 1051
 	closeDetailMoadl(){
1052 1052
 		this.detailMoadl = false
1053 1053
 	}
1054
-	
1055
- 
1054
+
1055
+
1056 1056
   // 自动刷新倒计时
1057 1057
   autoUpdate(flag = true) {
1058 1058
     if (flag) {
@@ -1078,7 +1078,6 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1078 1078
     }
1079 1079
     localStorage.removeItem("user");
1080 1080
     localStorage.removeItem("menu");
1081
-    localStorage.removeItem("phones");
1082 1081
     localStorage.removeItem("index");
1083 1082
     // 假退出
1084 1083
     this.mainService.logOut().subscribe((data) => {
@@ -1090,7 +1089,6 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1090 1089
         }
1091 1090
         localStorage.removeItem("user");
1092 1091
         localStorage.removeItem("menu");
1093
-        localStorage.removeItem("phones");
1094 1092
         localStorage.removeItem("index");
1095 1093
       }
1096 1094
     });
@@ -1183,7 +1181,7 @@ export class PathologyScanComponent implements OnInit, OnDestroy {
1183 1181
       }
1184 1182
     }, 1000);
1185 1183
   }
1186
-	
1184
+
1187 1185
 	promptModalShow:boolean = false;
1188 1186
 	promptContent:any = null;
1189 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 257
     localStorage.removeItem("user");
258 258
     localStorage.removeItem("menu");
259
-    localStorage.removeItem("phones");
260 259
     localStorage.removeItem("index");
261 260
 
262 261
     // 假退出
@@ -269,7 +268,6 @@ export class PharmacyComponent implements OnInit {
269 268
         }
270 269
         localStorage.removeItem("user");
271 270
         localStorage.removeItem("menu");
272
-        localStorage.removeItem("phones");
273 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 428
     localStorage.removeItem("user");
429 429
     localStorage.removeItem("menu");
430
-    localStorage.removeItem("phones");
431 430
     localStorage.removeItem("index");
432 431
 
433 432
     // 假退出
@@ -440,7 +439,6 @@ export class Pharmacy2Component implements OnInit, OnDestroy {
440 439
         }
441 440
         localStorage.removeItem("user");
442 441
         localStorage.removeItem("menu");
443
-        localStorage.removeItem("phones");
444 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 48
   osComponentRef5: OverlayScrollbarsComponent;
49 49
   constructor(
50
-	private mainService: MainService, 
51
-	public router: Router, 
50
+	private mainService: MainService,
51
+	public router: Router,
52 52
 	public tool: ToolService,
53 53
 	private fb: FormBuilder,
54 54
 	private message: NzMessageService,
@@ -92,7 +92,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
92 92
   completedFlag = false;
93 93
   completedSearchKey = "";
94 94
   completedLoad = false;
95
-	
95
+
96 96
 	barCode:any; //条码搜索
97 97
   // other
98 98
   loginUser: any = localStorage.getItem("user")
@@ -113,7 +113,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
113 113
 	fixationModal:boolean = false //标本接收固定
114 114
 	verificationMoadl:boolean = false //标本核验
115 115
 	specimenCode:any; //标本条码
116
-	listOfData:any=[]; 
116
+	listOfData:any=[];
117 117
 	fixativeData:any = []; //固体液类型
118 118
 	hosId:any;
119 119
 	userId:any;
@@ -161,7 +161,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
161 161
       this.runTime();
162 162
     }, 500);
163 163
   }
164
-	
164
+
165 165
 	// 标本条码搜索
166 166
 	searchSpecimen(e){
167 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 204
 	formChangeDate(result){
205 205
 	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
206 206
 	}
207
-	
207
+
208 208
 	// 确定接受固定标本
209 209
 	startDate:any;
210 210
 	submitFixationForm(){
@@ -224,7 +224,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
224 224
 			this.verificationMoadl = true
225 225
 		});
226 226
 	}
227
-	
227
+
228 228
 	// 关闭接受固定标本
229 229
 	hideSpecimenModal(){
230 230
 		this.autoUpdate()
@@ -236,7 +236,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
236 236
 			document.getElementById('Binput').focus();
237 237
 		},200)
238 238
 	}
239
-	
239
+
240 240
 	// 获取标本详情
241 241
 	project:any = [];
242 242
 	getSampleData(item){
@@ -256,7 +256,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
256 256
 		  this.detailMoadl = true
257 257
 		});
258 258
 	}
259
-	
259
+
260 260
 	// 获取科室
261 261
 	getDept(){
262 262
 		this.setSpecimen()
@@ -285,7 +285,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
285 285
 			  .subscribe((res) => {
286 286
 			    that.operationData = res.list;
287 287
 			  });
288
-				
288
+
289 289
 			that.mainService
290 290
 			  .getFetchDataList("data", "department", data2)
291 291
 			  .subscribe((res) => {
@@ -294,7 +294,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
294 294
 			  });
295 295
 		});
296 296
 	}
297
-	
297
+
298 298
 	// 获取关联科室详情
299 299
 	getDeptDetail(){
300 300
 		this.mainService
@@ -314,7 +314,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
314 314
 				}
315 315
 		  });
316 316
 	}
317
-	
317
+
318 318
 	// 获取是否关联标本间
319 319
 	setSpecimen(){
320 320
 		this.validateForm = this.fb.group({
@@ -324,7 +324,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
324 324
 		});
325 325
 		this.relevanceModal = true
326 326
 	}
327
-	
327
+
328 328
 	// 确定关联科室
329 329
 	btnLoading:boolean = false;
330 330
 	submitForm(){
@@ -364,7 +364,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
364 364
 		    }
365 365
 		  });
366 366
 	}
367
-	
367
+
368 368
 	getNewDept(){
369 369
 		let postData = {
370 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 395
 	getCurrentUserNow() {
396 396
 	  this.mainService.getCurrentUser1().subscribe((data:any) => {
397 397
 	    if (data["status"] == 200) {
398
-				this.loginUser = data.data 
398
+				this.loginUser = data.data
399 399
 	      let user = JSON.parse(localStorage.getItem("user"));
400 400
 	      user.user.dept = data["data"].dept;
401 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 408
 	handoverUserId:any = null;
409 409
 	numberChange(e){
@@ -427,7 +427,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
427 427
 				}
428 428
 		  });
429 429
 	}
430
-	
430
+
431 431
 	// 提交固定标本接收
432 432
 	submitVerificationForm(){
433 433
 		for (const i in this.validateVerificationForm.controls) {
@@ -435,7 +435,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
435 435
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
436 436
 		}
437 437
 		if (this.validateVerificationForm.invalid) return;
438
-		
438
+
439 439
 		let data: any = {
440 440
 			id:this.codeData.id,
441 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 470
 	closeModel(){
471 471
 		this.verificationMoadl = false
472 472
 		this.fixationModal = false
@@ -474,7 +474,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
474 474
 			document.getElementById('Binput').focus();
475 475
 		},200)
476 476
 	}
477
-	
477
+
478 478
 	// 关闭固定接受标本
479 479
 	hideVerificationModal(){
480 480
 		this.verificationMoadl = false
@@ -482,19 +482,19 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
482 482
 			document.getElementById('Binput').focus();
483 483
 		},200)
484 484
 	}
485
-	
485
+
486 486
 
487 487
 	// 监听标本条码
488 488
 	specimenCodeChange(e){
489 489
 		this.changeInpSubjectSpecimen.next([e]);
490 490
 	}
491
-	
491
+
492 492
 	// 监听接受固定标本条码
493 493
 	tableLoading:boolean = false;
494 494
 	codeChange(e){
495 495
 		this.changeInpSubject.next([e]);
496 496
 	}
497
-	
497
+
498 498
 	fixationError:any;
499 499
 	searchSpecimenData(e){
500 500
 		if(!e){
@@ -514,13 +514,13 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
514 514
 			this.specimenCode = null
515 515
 			if(res.status==200){
516 516
 				this.codeData = res.data[0]
517
-				this.fixationError = null 
517
+				this.fixationError = null
518 518
 			}else{
519
-				this.fixationError = res.msg 
519
+				this.fixationError = res.msg
520 520
 			}
521 521
 		})
522 522
 	}
523
-	
523
+
524 524
 	// 查看详情
525 525
 	detailMoadl:boolean = false;
526 526
 	pathologyLogs:any=[];
@@ -531,14 +531,14 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
531 531
 		this.getSampleData(item)
532 532
 		clearInterval(this.logTimer);
533 533
 		if(type==1){
534
-			
534
+
535 535
 		}else if(type==2){
536
-			
536
+
537 537
 		}else{
538
-			
538
+
539 539
 		}
540 540
 	}
541
-	
541
+
542 542
 	closeDetailMoadl(){
543 543
 		setTimeout(_=>{
544 544
 			document.getElementById('Binput').focus();
@@ -546,7 +546,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
546 546
 		this.detailMoadl = false
547 547
 		this.autoUpdate(false);
548 548
 	}
549
-	
549
+
550 550
   // 统计
551 551
   // total() {
552 552
   //   let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
@@ -570,7 +570,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
570 570
   //   console.log(item);
571 571
   //   this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
572 572
   // }
573
-	
573
+
574 574
   // // 查看流程信息弹窗
575 575
   // logPromptModalShow = false; //弹窗开关
576 576
   // scode = ""; //查看记录携带
@@ -807,7 +807,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
807 807
     }
808 808
     localStorage.removeItem("user");
809 809
     localStorage.removeItem("menu");
810
-    localStorage.removeItem("phones");
811 810
     localStorage.removeItem("index");
812 811
     // 假退出
813 812
     this.mainService.logOut().subscribe((data) => {
@@ -819,7 +818,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
819 818
         }
820 819
         localStorage.removeItem("user");
821 820
         localStorage.removeItem("menu");
822
-        localStorage.removeItem("phones");
823 821
         localStorage.removeItem("index");
824 822
       }
825 823
     });
@@ -906,7 +904,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
906 904
       }
907 905
     }, 1000);
908 906
   }
909
-	
907
+
910 908
 	promptModalShow:boolean = false;
911 909
 	promptContent:any = null;
912 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 462
     localStorage.removeItem("user");
463 463
     localStorage.removeItem("menu");
464
-    localStorage.removeItem("phones");
465 464
     localStorage.removeItem("index");
466 465
     // 假退出
467 466
     this.mainService.logOut().subscribe((data) => {
@@ -473,7 +472,6 @@ export class SpecimenView2Component implements OnInit, OnDestroy {
473 472
         }
474 473
         localStorage.removeItem("user");
475 474
         localStorage.removeItem("menu");
476
-        localStorage.removeItem("phones");
477 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 5
 const protocolName: string = document.location.protocol; //http协议
6 6
 const wsName: string = protocolName === "http:" ? "ws" : "wss"; //ws协议
7 7
 const baseUrl: baseUrlType = {
8
+  wsName,
8 9
   domain: `${protocolName}//${domainName}:${port}`, //chrome下载地址
9 10
   host: `${protocolName}//${domainName}:${port}/service`, //接口地址
10 11
   specimenViewHost: `${protocolName}//${domainName}:${port}/specimenView`, //业务视图地址
@@ -15,6 +16,6 @@ const baseUrl: baseUrlType = {
15 16
   nurseWs: `${wsName}://${domainName}:${port}/webSocket/message/nurse`, //websocket护士端地址
16 17
   fwtWs: `${wsName}://${domainName}:${port}/webSocket/message/ser`, //websocket服务台地址
17 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 21
 export default baseUrl;

+ 10 - 0
src/common.less

@@ -183,6 +183,16 @@
183 183
   overflow: hidden;
184 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 196
 // list模板样式 end
187 197
 
188 198
 // button