seimin před 2 měsíci
rodič
revize
f641e1c55f
34 změnil soubory, kde provedl 2798 přidání a 80 odebrání
  1. 5 0
      src/app/app-routing.module.ts
  2. 7 0
      src/app/services/main.service.ts
  3. 6 0
      src/app/services/tool.service.ts
  4. 80 0
      src/app/share/add-inspect-info/add-inspect-info.component.html
  5. 185 0
      src/app/share/add-inspect-info/add-inspect-info.component.less
  6. 174 0
      src/app/share/add-inspect-info/add-inspect-info.component.ts
  7. 71 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html
  8. 185 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.less
  9. 134 0
      src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts
  10. 44 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.html
  11. 160 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.less
  12. 70 0
      src/app/share/edit-inspect-info/edit-inspect-info.component.ts
  13. 44 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.html
  14. 165 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.less
  15. 55 0
      src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.ts
  16. 37 0
      src/app/share/select-remark/select-remark.component.html
  17. 123 0
      src/app/share/select-remark/select-remark.component.less
  18. 83 0
      src/app/share/select-remark/select-remark.component.ts
  19. 15 0
      src/app/share/share.module.ts
  20. 1 1
      src/app/views/batch-inspection/batch-inspection.component.ts
  21. 7 1
      src/app/views/hushijiandan/hushijiandan.component.ts
  22. 22 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html
  23. 35 0
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts
  24. 17 0
      src/app/views/inspect-info-config/inspect-info-config-routing.module.ts
  25. 109 0
      src/app/views/inspect-info-config/inspect-info-config.component.html
  26. 152 0
      src/app/views/inspect-info-config/inspect-info-config.component.less
  27. 379 0
      src/app/views/inspect-info-config/inspect-info-config.component.ts
  28. 17 0
      src/app/views/inspect-info-config/inspect-info-config.module.ts
  29. 52 42
      src/app/views/inspect-search/inspect-search.component.html
  30. 157 7
      src/app/views/inspect-search/inspect-search.component.ts
  31. 53 21
      src/app/views/patient-search/patient-search.component.html
  32. 23 0
      src/app/views/patient-search/patient-search.component.less
  33. 115 3
      src/app/views/patient-search/patient-search.component.ts
  34. 16 5
      src/common.less

+ 5 - 0
src/app/app-routing.module.ts

@@ -202,6 +202,11 @@ const routes: Routes = [
202 202
     path: 'batchInspection',
203 203
     loadChildren: () => import('./views/batch-inspection/batch-inspection.module').then(m => m.BatchInspectionModule),
204 204
   },
205
+  // 陪检信息配置
206
+  {
207
+    path: 'inspectInfoConfig',
208
+    loadChildren: () => import('./views/inspect-info-config/inspect-info-config.module').then(m => m.InspectInfoConfigModule),
209
+  },
205 210
   // 陪检闭环视图
206 211
   {
207 212
     path: 'inspectClosedLoopView',

+ 7 - 0
src/app/services/main.service.ts

@@ -1231,4 +1231,11 @@ export class MainService {
1231 1231
 		});
1232 1232
 	}
1233 1233
 
1234
+  // 患者-清空标记
1235
+	clearPatientMark(data = {}){
1236
+		return this.http.post(host.host + `/nurse/inspect/clearPatientMark`, data, {
1237
+		  headers: this.headers,
1238
+		});
1239
+	}
1240
+
1234 1241
 }

+ 6 - 0
src/app/services/tool.service.ts

@@ -322,6 +322,12 @@ export class ToolService {
322 322
 				case "download":
323 323
 				  coopBtns.download = true; //下载
324 324
 				  break;
325
+        case "removeSign":
326
+				  coopBtns.removeSign = true; //清空标记
327
+				  break;
328
+        case "lookLog":
329
+				  coopBtns.lookLog = true; //查看日志
330
+				  break;
325 331
       }
326 332
     });
327 333
     console.log(coopBtns);

+ 80 - 0
src/app/share/add-inspect-info/add-inspect-info.component.html

@@ -0,0 +1,80 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1000px;">
3
+    <div class="title">新增检查信息<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="tableWrap">
6
+        <div class="row">
7
+          <div class="formItem flex_1">
8
+            <div class="name"><i class="icon_transport transport-required red"></i>患者信息:</div>
9
+            <div class="value">
10
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.patientId" nzShowSearch nzPlaceHolder="请选择患者信息" nzServerSearch (nzOnSearch)="searchPatient($event)" (nzOpenChange)="openPatient($event)">
11
+                <ng-container *ngFor="let data of patientList">
12
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.patientName + '(' + (data.bedNum || '') + ')' + '-' + data.residenceNo" [nzValue]="data.id">
13
+                  </nz-option>
14
+                </ng-container>
15
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
16
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
17
+                </nz-option>
18
+              </nz-select>
19
+            </div>
20
+          </div>
21
+        </div>
22
+
23
+        <div class="row">
24
+          <div class="formItem flex_1">
25
+            <div class="name"><i class="icon_transport transport-required red"></i>检查项目:</div>
26
+            <div class="value">
27
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.id" nzShowSearch nzPlaceHolder="请选择检查项目" nzServerSearch (nzOnSearch)="searchInspect($event)" (nzOpenChange)="openInspect($event)" (ngModelChange)="changeInspect($event)">
28
+                <ng-container *ngFor="let data of inspectList">
29
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
30
+                  </nz-option>
31
+                </ng-container>
32
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
33
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
34
+                </nz-option>
35
+              </nz-select>
36
+            </div>
37
+          </div>
38
+        </div>
39
+
40
+        <div class="row">
41
+          <div class="formItem flex_2">
42
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
43
+            <div class="value">
44
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.execDeptId" nzPlaceHolder="请选择检查科室">
45
+                <ng-container *ngFor="let data of execDeptList">
46
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
47
+                  </nz-option>
48
+                </ng-container>
49
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
50
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
51
+                </nz-option>
52
+              </nz-select>
53
+            </div>
54
+          </div>
55
+          <div class="formItem flex_1 justify-content_flex-end">
56
+            检查项目标识:{{inspectData.sign}}
57
+          </div>
58
+          <div class="formItem flex_1 justify-content_flex-end">
59
+            检查类型:{{inspectData.type}}
60
+          </div>
61
+        </div>
62
+
63
+        <div class="row">
64
+          <div class="formItem flex_1">
65
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
66
+            <div class="value">
67
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false"></nz-date-picker>
68
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false"></nz-time-picker>
69
+              <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
70
+            </div>
71
+          </div>
72
+        </div>
73
+      </div>
74
+    </div>
75
+    <div class="display_flex justify-content_flex-center">
76
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
77
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
78
+    </div>
79
+  </div>
80
+</div>

+ 185 - 0
src/app/share/add-inspect-info/add-inspect-info.component.less

@@ -0,0 +1,185 @@
1
+@import "../../../../src/theme.less";
2
+.transport-required{
3
+  font-size: 10px;
4
+  margin-right: 4px;
5
+  position: relative;
6
+  bottom: 2px;
7
+}
8
+.patient{
9
+  display: flex;
10
+  align-items: center;
11
+  justify-content: space-between;
12
+  height: 56px;
13
+  font-size: 18px;
14
+  padding: 0 24px;
15
+  border-bottom: 1px solid #e5e9ed;
16
+}
17
+.tabs{
18
+  display: flex;
19
+  align-items: center;
20
+  justify-content: space-between;
21
+  height: 45px;
22
+  font-size: 14px;
23
+  border-top: 1px solid #e5e9ed;
24
+  border-bottom: 1px solid #e5e9ed;
25
+  .tab{
26
+    flex: 1;
27
+    display: flex;
28
+    align-items: center;
29
+    justify-content: center;
30
+    height: 100%;
31
+    cursor: pointer;
32
+    &.active{
33
+      background-color: #F0F6ED;
34
+    }
35
+  }
36
+}
37
+.tableWrap{
38
+  padding: 32px 16px;
39
+  .row{
40
+    display: flex;
41
+    align-items: center;
42
+    text-align: left;
43
+    margin-top: 32px;
44
+    &:first-of-type{
45
+      margin-top: 0;
46
+    }
47
+    .formItem{
48
+      display: flex;
49
+      align-items: center;
50
+      justify-content: space-between;
51
+      margin-right: 24px;
52
+      &:last-of-type{
53
+        margin-right: 0;
54
+      }
55
+      .name{}
56
+      .value{
57
+        flex: 1;
58
+      }
59
+    }
60
+  }
61
+}
62
+.modal {
63
+  position: fixed;
64
+  left: 0;
65
+  top: 0;
66
+  width: 100%;
67
+  height: 100%;
68
+  background: rgba(0, 0, 0, 0.4);
69
+  z-index: 999;
70
+  .hospitalTable {
71
+    width: 100%;
72
+    td {
73
+      text-align: center !important;
74
+      position: relative;
75
+      word-break: break-all;
76
+    }
77
+    .thead {
78
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
79
+      th {
80
+        text-align: center !important;
81
+        color: #fff;
82
+        background: transparent;
83
+      }
84
+    }
85
+  }
86
+
87
+  .ji {
88
+    position: absolute;
89
+    right: 0px;
90
+    top: -3px;
91
+    width: 30px;
92
+  }
93
+
94
+  .list-template__top{
95
+    div{
96
+      text-align: left!important;
97
+    }
98
+  }
99
+
100
+  .modalBody {
101
+    width: 700px;
102
+    min-height: 220px;
103
+    background: #fff;
104
+    border-radius: 5px;
105
+    padding: 10px 20px;
106
+    color: #333;
107
+    &.modalBody-search {
108
+      width: 480px;
109
+      min-height: 250px;
110
+    }
111
+
112
+    .title {
113
+      width: 100%;
114
+      text-align: center;
115
+      font-size: 18px;
116
+      position: relative;
117
+
118
+      i {
119
+        position: absolute;
120
+        right: 0;
121
+        top: 0;
122
+        font-size: 20px;
123
+        color: #666;
124
+        cursor: pointer;
125
+        padding: 0 5px;
126
+      }
127
+    }
128
+
129
+    .content {
130
+      background: #f9fafb;
131
+      border: 1px solid #e5e9ed;
132
+      border-radius: 5px;
133
+      overflow: hidden;
134
+      margin-top: 12px;
135
+    }
136
+
137
+    button {
138
+      margin-top: 10px;
139
+
140
+      &.btn {
141
+        margin-left: 8px;
142
+      }
143
+    }
144
+  }
145
+
146
+  // 新增
147
+  &.add {
148
+    .modalBody {
149
+      width: 480px;
150
+      height: auto;
151
+
152
+      .content {
153
+        width: 100%;
154
+        height: auto;
155
+        padding: 18px 14px 0 14px;
156
+
157
+        .addForm {
158
+          .ant-form-item {
159
+            margin-bottom: 15px;
160
+
161
+            .ant-form-item-label {
162
+              line-height: 0;
163
+            }
164
+          }
165
+        }
166
+
167
+        .editForm {
168
+          .ant-form-item {
169
+            margin-bottom: 15px;
170
+
171
+            .ant-form-item-label {
172
+              line-height: 0;
173
+            }
174
+          }
175
+        }
176
+      }
177
+
178
+      button {
179
+        &:nth-child(1) {
180
+          margin-right: 20px;
181
+        }
182
+      }
183
+    }
184
+  }
185
+}

+ 174 - 0
src/app/share/add-inspect-info/add-inspect-info.component.ts

@@ -0,0 +1,174 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { startOfDay, format, addDays } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { Subject } from "rxjs";
7
+import { debounceTime } from "rxjs/operators";
8
+@Component({
9
+  selector: 'app-add-inspect-info',
10
+  templateUrl: './add-inspect-info.component.html',
11
+  styleUrls: ['./add-inspect-info.component.less']
12
+})
13
+export class AddInspectInfoComponent implements OnInit {
14
+  // 切换科室,切换弹窗
15
+  listOfDisplayData2: any[] = [];
16
+  currentDept; //当前科室
17
+
18
+  hosId;
19
+  hsLoading = false;
20
+
21
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
23
+
24
+  constructor(
25
+    private mainService: MainService,
26
+    private tool: ToolService,
27
+    private message: NzMessageService,
28
+  ) { }
29
+
30
+  inspectData:any = {
31
+    date: new Date(),
32
+  }; //检查项目
33
+  changeInspectSubject = new Subject(); //防抖
34
+  changePatientSubject = new Subject(); //防抖
35
+
36
+  ngOnInit() {
37
+    //防抖
38
+    this.changeInspectSubject.pipe(debounceTime(500)).subscribe((v) => {
39
+      this.getInspectList(v[0]);
40
+    });
41
+    this.changePatientSubject.pipe(debounceTime(500)).subscribe((v) => {
42
+      this.getPatientList(v[0]);
43
+    });
44
+    this.hosId = this.tool.getCurrentHospital().id;
45
+    this.currentDept = this.tool.getCurrentUserDept();
46
+  }
47
+
48
+  // 确认弹窗
49
+  confirmModal() {
50
+    if(!this.inspectData.patientId){
51
+      this.message.warning('请选择患者!');
52
+      return;
53
+    }
54
+    if(!this.inspectData.id){
55
+      this.message.warning('请选择检查项目!');
56
+      return;
57
+    }
58
+    if(!this.inspectData.execDeptId){
59
+      this.message.warning('请选择检查科室!');
60
+      return;
61
+    }
62
+    if(!this.inspectData.date){
63
+      this.message.warning('请选择预约时间!');
64
+      return;
65
+    }
66
+    if(!this.inspectData.time){
67
+      this.message.warning('请选择预约时间!');
68
+      return;
69
+    }
70
+    let patientDTO = this.patientList.find(v => v.id == this.inspectData.patientId);
71
+    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData, patientDTO }));//emits(向上弹射)事件
72
+  }
73
+
74
+  // 关闭弹窗
75
+  hideModal() {
76
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
77
+  }
78
+
79
+  // 下一日
80
+  nextDay() {
81
+    this.inspectData.date = addDays(this.inspectData.date, 1);
82
+  }
83
+
84
+  isLoading = false;
85
+  inspectList: Array<any>; //检查项目列表
86
+  // 获取检查项目
87
+  getInspectList(keyword = '') {
88
+    let postData = {
89
+      dictionary: {
90
+        key: "inspect_check_type",
91
+        name: keyword || undefined,
92
+      },
93
+      idx: 0,
94
+      sum: 9999,
95
+    };
96
+    this.isLoading = true;
97
+    this.mainService
98
+      .getFetchDataList("simple/data", "dictionary", postData)
99
+      .subscribe((data) => {
100
+        this.isLoading = false;
101
+        this.inspectList = data.list || [];
102
+      });
103
+  }
104
+
105
+  // 边输边搜节流阀
106
+  searchInspect(e) {
107
+    this.isLoading = true;
108
+    this.changeInspectSubject.next([e]);
109
+  }
110
+
111
+  // 修改检查项目
112
+  inspectDTO:any = {};
113
+  execDeptList:any[] = [];
114
+  changeInspect(id){
115
+    this.inspectDTO = this.inspectList.find(v => v.id == id);
116
+    if(this.inspectDTO){
117
+      this.inspectData.id = this.inspectDTO.id;
118
+      this.execDeptList = this.inspectDTO.deptList || [];
119
+      this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
120
+      this.inspectData.sign = this.inspectDTO.extra6 || '';
121
+      this.inspectData.type = this.inspectDTO.extra5DTO ? this.inspectDTO.extra5DTO.name : '';
122
+    }else{
123
+      this.inspectData.id = undefined;
124
+      this.inspectData.execDeptId= undefined;
125
+      this.execDeptList = [];
126
+      this.inspectData.sign = '';
127
+      this.inspectData.type = '';
128
+    }
129
+  }
130
+
131
+  // 打开班次
132
+  openInspect(e){
133
+    if(e){
134
+      this.getInspectList();
135
+    }
136
+  }
137
+
138
+  // =========================患者=====================
139
+  patientList: Array<any>; //检查项目列表
140
+  // 获取检查项目
141
+  getPatientList(keyword = '') {
142
+    let postData = {
143
+      idx: 0,
144
+      sum: 10,
145
+      hosId: this.hosId,
146
+      patientName: keyword || undefined,
147
+      hasBedNum: 1,//有床号
148
+    };
149
+    this.isLoading = true;
150
+    this.mainService
151
+      .listMsgByMain('listPatient',postData)
152
+      .subscribe((data:any) => {
153
+        this.isLoading = false;
154
+        this.patientList = data.list || [];
155
+      });
156
+  }
157
+
158
+  // 边输边搜节流阀
159
+  searchPatient(e) {
160
+    this.isLoading = true;
161
+    this.changePatientSubject.next([e]);
162
+  }
163
+
164
+  // 打开
165
+  openPatient(e){
166
+    if(e){
167
+      this.getPatientList();
168
+    }
169
+  }
170
+  // =========================患者=====================
171
+}
172
+
173
+
174
+

+ 71 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.html

@@ -0,0 +1,71 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1000px;">
3
+    <div class="title">追加检查项目<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="patient">
6
+        <span>患者姓名:{{patientDTO.patientName}}</span>
7
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'I'">住院号:{{patientDTO.patientCode}}({{patientDTO.bedNum}})</span>
8
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'O'">门诊号:{{patientDTO.patientCode}}</span>
9
+        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'E'">急诊号:{{patientDTO.patientCode}}</span>
10
+        <span>护理级别:{{patientDTO.careLevel?.name}}</span>
11
+        <span>危重等级:{{patientDTO.illnessState?.name}}</span>
12
+      </div>
13
+      <div class="tableWrap">
14
+        <div class="row">
15
+          <div class="formItem flex_1">
16
+            <div class="name"><i class="icon_transport transport-required red"></i>检查项目:</div>
17
+            <div class="value">
18
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.id" nzShowSearch nzPlaceHolder="请选择检查项目" nzServerSearch (nzOnSearch)="searchInspect($event)" (nzOpenChange)="openInspect($event)" (ngModelChange)="changeInspect($event)">
19
+                <ng-container *ngFor="let data of inspectList">
20
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
21
+                  </nz-option>
22
+                </ng-container>
23
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
24
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
25
+                </nz-option>
26
+              </nz-select>
27
+            </div>
28
+          </div>
29
+        </div>
30
+
31
+        <div class="row">
32
+          <div class="formItem flex_2">
33
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
34
+            <div class="value">
35
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.execDeptId" nzPlaceHolder="请选择检查科室">
36
+                <ng-container *ngFor="let data of execDeptList">
37
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
38
+                  </nz-option>
39
+                </ng-container>
40
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
41
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
42
+                </nz-option>
43
+              </nz-select>
44
+            </div>
45
+          </div>
46
+          <div class="formItem flex_1 justify-content_flex-end">
47
+            检查项目标识:{{inspectData.sign}}
48
+          </div>
49
+          <div class="formItem flex_1 justify-content_flex-end">
50
+            检查类型:{{inspectData.type}}
51
+          </div>
52
+        </div>
53
+
54
+        <div class="row">
55
+          <div class="formItem flex_1">
56
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
57
+            <div class="value">
58
+              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false"></nz-date-picker>
59
+              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false"></nz-time-picker>
60
+              <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
61
+            </div>
62
+          </div>
63
+        </div>
64
+      </div>
65
+    </div>
66
+    <div class="display_flex justify-content_flex-center">
67
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
68
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
69
+    </div>
70
+  </div>
71
+</div>

+ 185 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.less

@@ -0,0 +1,185 @@
1
+@import "../../../../src/theme.less";
2
+.transport-required{
3
+  font-size: 10px;
4
+  margin-right: 4px;
5
+  position: relative;
6
+  bottom: 2px;
7
+}
8
+.patient{
9
+  display: flex;
10
+  align-items: center;
11
+  justify-content: space-between;
12
+  height: 56px;
13
+  font-size: 18px;
14
+  padding: 0 24px;
15
+  border-bottom: 1px solid #e5e9ed;
16
+}
17
+.tabs{
18
+  display: flex;
19
+  align-items: center;
20
+  justify-content: space-between;
21
+  height: 45px;
22
+  font-size: 14px;
23
+  border-top: 1px solid #e5e9ed;
24
+  border-bottom: 1px solid #e5e9ed;
25
+  .tab{
26
+    flex: 1;
27
+    display: flex;
28
+    align-items: center;
29
+    justify-content: center;
30
+    height: 100%;
31
+    cursor: pointer;
32
+    &.active{
33
+      background-color: #F0F6ED;
34
+    }
35
+  }
36
+}
37
+.tableWrap{
38
+  padding: 32px 16px;
39
+  .row{
40
+    display: flex;
41
+    align-items: center;
42
+    text-align: left;
43
+    margin-top: 32px;
44
+    &:first-of-type{
45
+      margin-top: 0;
46
+    }
47
+    .formItem{
48
+      display: flex;
49
+      align-items: center;
50
+      justify-content: space-between;
51
+      margin-right: 24px;
52
+      &:last-of-type{
53
+        margin-right: 0;
54
+      }
55
+      .name{}
56
+      .value{
57
+        flex: 1;
58
+      }
59
+    }
60
+  }
61
+}
62
+.modal {
63
+  position: fixed;
64
+  left: 0;
65
+  top: 0;
66
+  width: 100%;
67
+  height: 100%;
68
+  background: rgba(0, 0, 0, 0.4);
69
+  z-index: 999;
70
+  .hospitalTable {
71
+    width: 100%;
72
+    td {
73
+      text-align: center !important;
74
+      position: relative;
75
+      word-break: break-all;
76
+    }
77
+    .thead {
78
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
79
+      th {
80
+        text-align: center !important;
81
+        color: #fff;
82
+        background: transparent;
83
+      }
84
+    }
85
+  }
86
+
87
+  .ji {
88
+    position: absolute;
89
+    right: 0px;
90
+    top: -3px;
91
+    width: 30px;
92
+  }
93
+
94
+  .list-template__top{
95
+    div{
96
+      text-align: left!important;
97
+    }
98
+  }
99
+
100
+  .modalBody {
101
+    width: 700px;
102
+    min-height: 220px;
103
+    background: #fff;
104
+    border-radius: 5px;
105
+    padding: 10px 20px;
106
+    color: #333;
107
+    &.modalBody-search {
108
+      width: 480px;
109
+      min-height: 250px;
110
+    }
111
+
112
+    .title {
113
+      width: 100%;
114
+      text-align: center;
115
+      font-size: 18px;
116
+      position: relative;
117
+
118
+      i {
119
+        position: absolute;
120
+        right: 0;
121
+        top: 0;
122
+        font-size: 20px;
123
+        color: #666;
124
+        cursor: pointer;
125
+        padding: 0 5px;
126
+      }
127
+    }
128
+
129
+    .content {
130
+      background: #f9fafb;
131
+      border: 1px solid #e5e9ed;
132
+      border-radius: 5px;
133
+      overflow: hidden;
134
+      margin-top: 12px;
135
+    }
136
+
137
+    button {
138
+      margin-top: 10px;
139
+
140
+      &.btn {
141
+        margin-left: 8px;
142
+      }
143
+    }
144
+  }
145
+
146
+  // 新增
147
+  &.add {
148
+    .modalBody {
149
+      width: 480px;
150
+      height: auto;
151
+
152
+      .content {
153
+        width: 100%;
154
+        height: auto;
155
+        padding: 18px 14px 0 14px;
156
+
157
+        .addForm {
158
+          .ant-form-item {
159
+            margin-bottom: 15px;
160
+
161
+            .ant-form-item-label {
162
+              line-height: 0;
163
+            }
164
+          }
165
+        }
166
+
167
+        .editForm {
168
+          .ant-form-item {
169
+            margin-bottom: 15px;
170
+
171
+            .ant-form-item-label {
172
+              line-height: 0;
173
+            }
174
+          }
175
+        }
176
+      }
177
+
178
+      button {
179
+        &:nth-child(1) {
180
+          margin-right: 20px;
181
+        }
182
+      }
183
+    }
184
+  }
185
+}

+ 134 - 0
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts

@@ -0,0 +1,134 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { startOfDay, format, addDays } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+import { Subject } from "rxjs";
7
+import { debounceTime } from "rxjs/operators";
8
+@Component({
9
+  selector: 'app-add-inspect-three-modal',
10
+  templateUrl: './add-inspect-three-modal.component.html',
11
+  styleUrls: ['./add-inspect-three-modal.component.less']
12
+})
13
+export class AddInspectThreeModalComponent implements OnInit {
14
+  // 切换科室,切换弹窗
15
+  listOfDisplayData2: any[] = [];
16
+  currentDept; //当前科室
17
+
18
+  hosId;
19
+  hsLoading = false;
20
+
21
+  @Input() patientDTO: any;
22
+  @Input() deptDisplay: any;
23
+
24
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
25
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
26
+
27
+  constructor(
28
+    private mainService: MainService,
29
+    private tool: ToolService,
30
+    private message: NzMessageService,
31
+  ) { }
32
+
33
+  inspectData:any = {
34
+    date: new Date(),
35
+  }; //检查项目
36
+  changeInspectSubject = new Subject(); //防抖
37
+
38
+  ngOnInit() {
39
+    //防抖
40
+    this.changeInspectSubject.pipe(debounceTime(500)).subscribe((v) => {
41
+      this.getInspectList(v[0]);
42
+    });
43
+    this.hosId = this.tool.getCurrentHospital().id;
44
+    this.currentDept = this.tool.getCurrentUserDept();
45
+  }
46
+
47
+  // 确认弹窗
48
+  confirmModal() {
49
+    if(!this.inspectData.id){
50
+      this.message.warning('请选择检查项目!');
51
+      return;
52
+    }
53
+    if(!this.inspectData.execDeptId){
54
+      this.message.warning('请选择检查科室!');
55
+      return;
56
+    }
57
+    if(!this.inspectData.date){
58
+      this.message.warning('请选择预约时间!');
59
+      return;
60
+    }
61
+    if(!this.inspectData.time){
62
+      this.message.warning('请选择预约时间!');
63
+      return;
64
+    }
65
+    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData }));//emits(向上弹射)事件
66
+  }
67
+
68
+  // 关闭弹窗
69
+  hideModal() {
70
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
71
+  }
72
+
73
+  // 下一日
74
+  nextDay() {
75
+    this.inspectData.date = addDays(this.inspectData.date, 1);
76
+  }
77
+
78
+  isLoading = false;
79
+  inspectList: Array<any>; //检查项目列表
80
+  // 获取检查项目
81
+  getInspectList(keyword = '') {
82
+    let postData = {
83
+      dictionary: {
84
+        key: "inspect_check_type",
85
+        name: keyword || undefined,
86
+      },
87
+      idx: 0,
88
+      sum: 9999,
89
+    };
90
+    this.isLoading = true;
91
+    this.mainService
92
+      .getFetchDataList("simple/data", "dictionary", postData)
93
+      .subscribe((data) => {
94
+        this.isLoading = false;
95
+        this.inspectList = data.list || [];
96
+      });
97
+  }
98
+
99
+  // 边输边搜节流阀
100
+  searchInspect(e) {
101
+    this.isLoading = true;
102
+    this.changeInspectSubject.next([e]);
103
+  }
104
+
105
+  // 修改检查项目
106
+  inspectDTO:any = {};
107
+  execDeptList:any[] = [];
108
+  changeInspect(id){
109
+    this.inspectDTO = this.inspectList.find(v => v.id == id);
110
+    if(this.inspectDTO){
111
+      this.inspectData.id = this.inspectDTO.id;
112
+      this.execDeptList = this.inspectDTO.deptList || [];
113
+      this.inspectData.execDeptId = this.execDeptList.length === 1 ? this.execDeptList[0].id : undefined;
114
+      this.inspectData.sign = this.inspectDTO.extra6 || '';
115
+      this.inspectData.type = this.inspectDTO.extra5DTO ? this.inspectDTO.extra5DTO.name : '';
116
+    }else{
117
+      this.inspectData.id = undefined;
118
+      this.inspectData.execDeptId= undefined;
119
+      this.execDeptList = [];
120
+      this.inspectData.sign = '';
121
+      this.inspectData.type = '';
122
+    }
123
+  }
124
+
125
+  // 打开班次
126
+  openInspect(e){
127
+    if(e){
128
+      this.getInspectList();
129
+    }
130
+  }
131
+}
132
+
133
+
134
+

+ 44 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.html

@@ -0,0 +1,44 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center">
2
+  <div class="modalBody">
3
+    <div class="title">修改检查信息<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+    </div>
5
+    <div class="content">
6
+      <div class="addForm">
7
+        <div class="row">
8
+          <div class="formItem flex_1">
9
+            <div class="name"><i class="icon_transport transport-required red"></i>检查科室:</div>
10
+            <div class="value">
11
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="deptId" nzPlaceHolder="请选择检查科室">
12
+                <ng-container *ngFor="let data of deptList">
13
+                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
14
+                  </nz-option>
15
+                </ng-container>
16
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
17
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+                </nz-option>
19
+              </nz-select>
20
+            </div>
21
+          </div>
22
+        </div>
23
+
24
+        <div class="row">
25
+          <div class="formItem flex_1">
26
+            <div class="name"><i class="icon_transport transport-required red"></i>预约时间:</div>
27
+            <div class="value">
28
+              <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false"></nz-date-picker>
29
+              <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false">
30
+              </nz-time-picker>
31
+              <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
32
+                下一日
33
+              </button>
34
+            </div>
35
+          </div>
36
+        </div>
37
+      </div>
38
+    </div>
39
+    <div class="display_flex justify-content_flex-center">
40
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
41
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
42
+    </div>
43
+  </div>
44
+</div>

+ 160 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.less

@@ -0,0 +1,160 @@
1
+.yyTimeError {
2
+  ::ng-deep .ant-time-picker-input,
3
+  ::ng-deep .ant-calendar-picker-input {
4
+    border: 1px solid red !important;
5
+  }
6
+}
7
+.transport-required{
8
+  font-size: 10px;
9
+  margin-right: 4px;
10
+  position: relative;
11
+  bottom: 2px;
12
+}
13
+.row{
14
+  display: flex;
15
+  align-items: center;
16
+  text-align: left;
17
+  margin-top: 32px;
18
+  &:first-of-type{
19
+    margin-top: 0;
20
+  }
21
+  .formItem{
22
+    display: flex;
23
+    align-items: center;
24
+    justify-content: space-between;
25
+    margin-right: 24px;
26
+    &:last-of-type{
27
+      margin-right: 0;
28
+    }
29
+    .name{}
30
+    .value{
31
+      flex: 1;
32
+    }
33
+  }
34
+}
35
+.save {
36
+  position: fixed;
37
+  left: 0;
38
+  top: 0;
39
+  width: 100%;
40
+  height: 100%;
41
+  background: rgba(0, 0, 0, 0.4);
42
+  z-index: 999;
43
+
44
+  .modalBody {
45
+    width: 350px;
46
+    background: #fff;
47
+    border-radius: 5px;
48
+    padding: 10px 20px;
49
+    color: #333;
50
+
51
+    .title {
52
+      width: 100%;
53
+      text-align: center;
54
+      font-size: 18px;
55
+      position: relative;
56
+
57
+      i {
58
+        position: absolute;
59
+        right: 0;
60
+        top: 0;
61
+        font-size: 20px;
62
+        color: #666;
63
+        cursor: pointer;
64
+        padding: 0 5px;
65
+      }
66
+    }
67
+
68
+    .content {
69
+      width: 100%;
70
+      height: 117px;
71
+      background: #f9fafb;
72
+      border: 1px solid #e5e9ed;
73
+      border-radius: 5px;
74
+      overflow: hidden;
75
+      margin-top: 12px;
76
+
77
+      .tips{
78
+        margin-bottom: 19px;
79
+      }
80
+
81
+      div {
82
+        &.icon {
83
+          margin-top: 17px;
84
+
85
+          i {
86
+            color: #34b349;
87
+            font-size: 30px !important;
88
+
89
+            &.transport-wenhao {
90
+              color: #f5a523;
91
+            }
92
+
93
+            &.transport-shibai {
94
+              color: #ff3a52;
95
+            }
96
+          }
97
+        }
98
+
99
+        &.defeat {
100
+          color: #333;
101
+          font-size: 16px;
102
+        }
103
+
104
+        &:nth-child(3) {
105
+          font-size: 14px;
106
+          color: #666;
107
+        }
108
+      }
109
+    }
110
+
111
+    button {
112
+      margin-top: 10px;
113
+
114
+      &.btn {
115
+        margin-left: 8px;
116
+      }
117
+    }
118
+  }
119
+
120
+  // 新增
121
+  &.add {
122
+    .modalBody {
123
+      width: 560px;
124
+      height: auto;
125
+
126
+      .content {
127
+        width: 100%;
128
+        height: auto;
129
+        padding: 32px 16px;
130
+        max-height: 500px;
131
+        overflow-y: auto;
132
+
133
+        .addForm {
134
+          .ant-form-item {
135
+            margin-bottom: 14px;
136
+
137
+            .ant-form-item-label {
138
+              line-height: 14px;
139
+              text-align: left;
140
+            }
141
+          }
142
+        }
143
+
144
+        .editForm {
145
+          .ant-form-item {
146
+            margin-bottom: 14px;
147
+
148
+            .ant-form-item-label {
149
+              line-height: 0;
150
+            }
151
+          }
152
+        }
153
+      }
154
+
155
+      button:nth-child(1) {
156
+        margin-right: 20px;
157
+      }
158
+    }
159
+  }
160
+}

+ 70 - 0
src/app/share/edit-inspect-info/edit-inspect-info.component.ts

@@ -0,0 +1,70 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { addDays, startOfMinute, format } from 'date-fns';
5
+
6
+@Component({
7
+  selector: 'app-edit-inspect-info',
8
+  templateUrl: './edit-inspect-info.component.html',
9
+  styleUrls: ['./edit-inspect-info.component.less']
10
+})
11
+
12
+export class EditInspectInfoComponent implements OnInit {
13
+  @Input() date:any;
14
+  @Input() execDeptId:any;
15
+  @Input() execDeptList:any[] = [];
16
+  @Output() submitFormHand = new EventEmitter();
17
+  @Output() cancelFlagHand = new EventEmitter();
18
+  yyDate = null; //预约日期-患者其他服务
19
+  yyTime = null; //预约时间-患者其他服务
20
+  deptId = null;
21
+  deptList:any[] = [];
22
+  constructor(
23
+    private message: NzMessageService,
24
+  ) { }
25
+
26
+  ngOnInit() {
27
+    if(this.date){
28
+      this.yyDate = new Date(this.date);
29
+      this.yyTime = new Date(this.date);
30
+    }
31
+
32
+    if(this.execDeptList){
33
+      this.deptList = this.execDeptList;
34
+    }
35
+
36
+    if(this.execDeptId){
37
+      let flag = this.deptList.some(v => v.id == this.execDeptId);
38
+      if(flag){
39
+        this.deptId = this.execDeptId;
40
+      }
41
+    }
42
+  }
43
+
44
+  // 下一日(患者其他服务)
45
+  nextDay() {
46
+    this.yyDate = addDays(this.yyDate, 1);
47
+  }
48
+
49
+  // 隐藏模态框
50
+  hideModal() {
51
+    this.cancelFlagHand.emit(false)
52
+  }
53
+
54
+  // 表单提交
55
+  submitForm(): void {
56
+    if(!this.deptId) {
57
+      this.message.warning('请选择检查科室!');
58
+      return;
59
+    }
60
+    if(!this.yyDate || !this.yyTime) {
61
+      this.message.warning('请选择完整预约时间!');
62
+      return;
63
+    }
64
+    this.submitFormHand.emit({
65
+      deptId: this.deptId,
66
+      date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),
67
+    });
68
+  }
69
+}
70
+

+ 44 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.html

@@ -0,0 +1,44 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody">
3
+    <div class="title">
4
+      日志<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
5
+    </div>
6
+    <div class="content">
7
+      <nz-table class="hospitalTable" [nzData]="historySpecimenList" nzSize="middle" [nzShowPagination]="false" [nzLoading]="hsLoading">
8
+        <thead>
9
+          <tr class="thead">
10
+            <th nzWidth="8%">序号</th>
11
+            <th nzWidth="23%">动作</th>
12
+            <th nzWidth="23%">时间</th>
13
+            <th nzWidth="23%">备注</th>
14
+            <th nzWidth="23%">操作人</th>
15
+          </tr>
16
+        </thead>
17
+        <tbody>
18
+          <tr *ngFor="let data of historySpecimenList; let i = index">
19
+            <td>{{ i+(historySpecimenPageIndex-1) * historySpecimenPageSize + 1 }}</td>
20
+            <td>{{ data.operationType?.name }}</td>
21
+            <td>{{ data.createTime | date: "MM-dd HH:mm:ss" }}</td>
22
+            <td>{{ data.logRemarks }}</td>
23
+            <td>{{ data.operationUserDTO?.name }}</td>
24
+          </tr>
25
+        </tbody>
26
+      </nz-table>
27
+      <div class="pagination">
28
+        <nz-pagination
29
+          [(nzPageIndex)]="historySpecimenPageIndex"
30
+          [(nzTotal)]="historySpecimenListLength"
31
+          [(nzPageSize)]="historySpecimenPageSize"
32
+          (nzPageIndexChange)="getHistorySpecimen()"
33
+          (nzPageSizeChange)="getHistorySpecimen()"
34
+        >
35
+        </nz-pagination>
36
+      </div>
37
+    </div>
38
+    <div class="display_flex justify-content_flex-center">
39
+      <button class="btn cancel" nz-button (click)="hideModal()">
40
+        关闭
41
+      </button>
42
+    </div>
43
+  </div>
44
+</div>

+ 165 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.less

@@ -0,0 +1,165 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+    }
15
+    .thead {
16
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
17
+      th {
18
+        text-align: center !important;
19
+        color: #fff;
20
+        background: transparent;
21
+      }
22
+    }
23
+  }
24
+
25
+  .pagination{
26
+    padding: 8px;
27
+    margin-left: auto;
28
+  }
29
+
30
+  .modalBody {
31
+    width: 700px;
32
+    min-height: 220px;
33
+    background: #fff;
34
+    border-radius: 5px;
35
+    padding: 10px 20px;
36
+    color: #333;
37
+    &.modalBody-search {
38
+      width: 480px;
39
+      min-height: 250px;
40
+    }
41
+
42
+    .title {
43
+      width: 100%;
44
+      text-align: center;
45
+      font-size: 18px;
46
+      position: relative;
47
+
48
+      i {
49
+        position: absolute;
50
+        right: 0;
51
+        top: 0;
52
+        font-size: 20px;
53
+        color: #666;
54
+        cursor: pointer;
55
+        padding: 0 5px;
56
+      }
57
+    }
58
+
59
+    .content {
60
+      min-height: 117px;
61
+      background: #f9fafb;
62
+      border: 1px solid #e5e9ed;
63
+      border-radius: 5px;
64
+      overflow: hidden;
65
+      margin-top: 12px;
66
+      display: flex;
67
+      flex-direction: column;
68
+      justify-content: center;
69
+      align-items: center;
70
+      &.content-search {
71
+        min-height: 147px;
72
+        justify-content: start;
73
+        .defeat-search {
74
+          width: 100%;
75
+          height: 52px;
76
+          display: flex;
77
+          justify-content: center;
78
+          align-items: center;
79
+          border-bottom: solid 1px #e5e9ed;
80
+          em {
81
+            color: #666;
82
+            font-style: normal;
83
+          }
84
+        }
85
+        .form {
86
+          width: 100%;
87
+          padding: 0 16px;
88
+          .ant-form-item-label,
89
+          .ant-form-explain {
90
+            text-align: left !important;
91
+          }
92
+        }
93
+      }
94
+
95
+      div {
96
+        &.defeat {
97
+          color: #333;
98
+          font-size: 28px;
99
+        }
100
+        &.countDown {
101
+          font-size: 14px;
102
+          color: 666;
103
+          em {
104
+            font-style: normal;
105
+            color: @primary-color;
106
+          }
107
+        }
108
+
109
+        &:nth-child(3) {
110
+          font-size: 14px;
111
+          color: #666;
112
+          padding-bottom: 10px;
113
+        }
114
+      }
115
+    }
116
+
117
+    button {
118
+      margin-top: 10px;
119
+
120
+      &.btn {
121
+        margin-left: 8px;
122
+      }
123
+    }
124
+  }
125
+
126
+  // 新增
127
+  &.add {
128
+    .modalBody {
129
+      width: 480px;
130
+      height: auto;
131
+
132
+      .content {
133
+        width: 100%;
134
+        height: auto;
135
+        padding: 18px 14px 0 14px;
136
+
137
+        .addForm {
138
+          .ant-form-item {
139
+            margin-bottom: 15px;
140
+
141
+            .ant-form-item-label {
142
+              line-height: 0;
143
+            }
144
+          }
145
+        }
146
+
147
+        .editForm {
148
+          .ant-form-item {
149
+            margin-bottom: 15px;
150
+
151
+            .ant-form-item-label {
152
+              line-height: 0;
153
+            }
154
+          }
155
+        }
156
+      }
157
+
158
+      button {
159
+        &:nth-child(1) {
160
+          margin-right: 20px;
161
+        }
162
+      }
163
+    }
164
+  }
165
+}

+ 55 - 0
src/app/share/inspect-log-prompt-modal/inspect-log-prompt-modal.component.ts

@@ -0,0 +1,55 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+
5
+@Component({
6
+  selector: "app-inspect-log-prompt-modal",
7
+  templateUrl: "./inspect-log-prompt-modal.component.html",
8
+  styleUrls: ["./inspect-log-prompt-modal.component.less"],
9
+})
10
+export class InspectLogPromptModalComponent implements OnInit {
11
+  hosId;
12
+  // 切换科室,切换弹窗
13
+  hsLoading = false;
14
+  historySpecimenList: any = [];
15
+  historySpecimenPageIndex: number = 1; //表格当前页码
16
+  historySpecimenPageSize: number = 5; //表格每页展示条数
17
+  historySpecimenListLength: number = 10; //表格总数据量
18
+  @Input() show: Boolean;
19
+  @Input() id: String;
20
+
21
+  @Output() closeModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
+
23
+  constructor(private mainService: MainService, private tool: ToolService) {}
24
+
25
+  ngOnInit() {
26
+    this.hosId = this.tool.getCurrentHospital().id;
27
+    this.getHistorySpecimen();
28
+  }
29
+  // 关闭弹窗
30
+  hideModal() {
31
+    this.closeModelHs.emit(JSON.stringify({ show: false })); //emits(向上弹射)事件
32
+  }
33
+  // 获取列表数据
34
+  getHistorySpecimen(idx?) {
35
+    if (idx) {
36
+      this.historySpecimenPageIndex = 1;
37
+    }
38
+    let postData = {
39
+      idx: this.historySpecimenPageIndex - 1,
40
+      sum: this.historySpecimenPageSize,
41
+      inspectLog: {
42
+        hosId: this.hosId,
43
+        inspectId: this.id,
44
+      },
45
+    };
46
+    this.hsLoading = true;
47
+    this.mainService
48
+      .getFetchDataList("simple/data", "inspectLog", postData)
49
+      .subscribe((data) => {
50
+        this.hsLoading = false;
51
+        this.historySpecimenList = data.list || [];
52
+        this.historySpecimenListLength = data.totalNum || 0;
53
+      });
54
+  }
55
+}

+ 37 - 0
src/app/share/select-remark/select-remark.component.html

@@ -0,0 +1,37 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center" (click)="clickExtra($event)">
2
+  <div class="modalBody">
3
+    <div class="title">编辑注意事项<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+    </div>
5
+    <div class="content">
6
+      <div class="addForm">
7
+        <div class="display_flex align-items_center">
8
+          <form class="w100" nz-form [formGroup]="validateForm">
9
+            <nz-form-item>
10
+              <nz-form-label [nzSpan]="6" nzRequired nzFor="remark">注意事项</nz-form-label>
11
+              <nz-form-control [nzSpan]="18" nzErrorTip="请填写注意事项!">
12
+                <div class="noteSign">
13
+                  <textarea formControlName="remark" class="noteFocus" id="noteFocus" (focus)="focusNote()" nz-input rows="5" placeholder="请填写注意事项" #remarkEle></textarea>
14
+                  <div class="noteList" id="noteList" *ngIf="isShowNoteList">
15
+                    <ng-container *ngIf="!noteLoading && noteList.length">
16
+                      <div class="noteItem ellipsis-oneline" *ngFor="let item of noteList" [title]="item.name" (click)="selectNote(item.name)">{{item.name}}</div>
17
+                    </ng-container>
18
+                    <div *ngIf="!noteLoading && !noteList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
19
+                      <nz-empty></nz-empty>
20
+                    </div>
21
+                    <div *ngIf="noteLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
22
+                      <nz-spin nzSimple></nz-spin>
23
+                    </div>
24
+                  </div>
25
+                </div>
26
+              </nz-form-control>
27
+            </nz-form-item>
28
+          </form>
29
+        </div>
30
+      </div>
31
+    </div>
32
+    <div class="display_flex justify-content_flex-center">
33
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
34
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
35
+    </div>
36
+  </div>
37
+</div>

+ 123 - 0
src/app/share/select-remark/select-remark.component.less

@@ -0,0 +1,123 @@
1
+.noteSign{
2
+  position: relative;
3
+  .noteList{
4
+    position: absolute;
5
+    bottom: 100%;
6
+    left: 0;
7
+    width: 100%;
8
+    max-height: 256px;
9
+    z-index: 99;
10
+    background: #fff;
11
+    border: 1px solid #d9d9d9;
12
+    border-radius: 4px;
13
+    overflow: hidden auto;
14
+    .noteItem{
15
+      padding: 5px 12px;
16
+      cursor: pointer;
17
+      line-height: normal;
18
+      &:hover{
19
+        background-color: #e9f7e9;
20
+      }
21
+    }
22
+  }
23
+}
24
+.save {
25
+  position: fixed;
26
+  left: 0;
27
+  top: 0;
28
+  width: 100%;
29
+  height: 100%;
30
+  background: rgba(0, 0, 0, 0.4);
31
+  z-index: 999;
32
+
33
+  .modalBody {
34
+    width: 350px;
35
+    background: #fff;
36
+    border-radius: 5px;
37
+    padding: 10px 20px;
38
+    color: #333;
39
+
40
+    .title {
41
+      width: 100%;
42
+      text-align: center;
43
+      font-size: 18px;
44
+      position: relative;
45
+
46
+      i {
47
+        position: absolute;
48
+        right: 0;
49
+        top: 0;
50
+        font-size: 20px;
51
+        color: #666;
52
+        cursor: pointer;
53
+        padding: 0 5px;
54
+      }
55
+    }
56
+
57
+    .content {
58
+      width: 100%;
59
+      height: 117px;
60
+      background: #f9fafb;
61
+      border: 1px solid #e5e9ed;
62
+      border-radius: 5px;
63
+      // overflow: hidden;
64
+      margin-top: 12px;
65
+
66
+      .tips{
67
+        margin-bottom: 19px;
68
+      }
69
+
70
+    }
71
+
72
+    button {
73
+      margin-top: 10px;
74
+
75
+      &.btn {
76
+        margin-left: 8px;
77
+      }
78
+    }
79
+  }
80
+
81
+  // 新增
82
+  &.add {
83
+    .modalBody {
84
+      width: 480px;
85
+      height: auto;
86
+
87
+      .content {
88
+        width: 100%;
89
+        height: auto;
90
+        padding: 24px;
91
+        max-height: 500px;
92
+        // overflow-y: auto;
93
+
94
+        .addForm {
95
+          .ant-form-item {
96
+            margin-bottom: 14px;
97
+            &:last-of-type{
98
+              margin-bottom: 0;
99
+            }
100
+
101
+            .ant-form-item-label {
102
+              text-align: left;
103
+            }
104
+          }
105
+        }
106
+
107
+        .editForm {
108
+          .ant-form-item {
109
+            margin-bottom: 14px;
110
+
111
+            .ant-form-item-label {
112
+              line-height: 0;
113
+            }
114
+          }
115
+        }
116
+      }
117
+
118
+      button:nth-child(1) {
119
+        margin-right: 20px;
120
+      }
121
+    }
122
+  }
123
+}

+ 83 - 0
src/app/share/select-remark/select-remark.component.ts

@@ -0,0 +1,83 @@
1
+import { Component, OnInit, Output, Input, ViewChild, ElementRef } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { FormBuilder, Validators, FormGroup } from '@angular/forms';
4
+import { MainService } from 'src/app/services/main.service';
5
+
6
+@Component({
7
+  selector: 'app-select-remark',
8
+  templateUrl: './select-remark.component.html',
9
+  styleUrls: ['./select-remark.component.less']
10
+})
11
+export class SelectRemarkComponent implements OnInit {
12
+  @ViewChild("remarkEle", { static: false }) remarkEle: ElementRef;
13
+  @Input() inspect:any = {};
14
+  @Output() submitFormHand = new EventEmitter();
15
+  @Output() cancelFlagHand = new EventEmitter();
16
+
17
+  validateForm: FormGroup;
18
+
19
+  constructor(
20
+    private fb: FormBuilder,
21
+    private mainService: MainService,
22
+  ) { }
23
+
24
+  ngOnInit() {
25
+    this.initForm();
26
+  }
27
+
28
+  initForm(){
29
+    this.validateForm = this.fb.group({
30
+      remark: [this.inspect.remark || '', [Validators.required, Validators.pattern(/\S/)]],
31
+    });
32
+  }
33
+
34
+  // 注意事项获取焦点
35
+  isShowNoteList:boolean = false;
36
+  focusNote(){
37
+    this.isShowNoteList = true;
38
+    this.getNoteList();
39
+  }
40
+
41
+  // 选择注意事项
42
+  selectNote(name){
43
+    this.validateForm.controls.remark.setValue(name);
44
+    this.isShowNoteList = false;
45
+    // this.remarkEle.nativeElement.focus();
46
+  }
47
+
48
+  // 获取注意事项列表
49
+  noteList:any[] = [];
50
+  noteLoading:boolean = false;
51
+  getNoteList() {
52
+    this.noteLoading = true;
53
+    this.mainService.getDictionary('list', 'inspect_notes',).subscribe(result=>{
54
+      this.noteLoading = false;
55
+      this.noteList = result || [];
56
+    });
57
+  }
58
+
59
+  // 点击其他位置
60
+  clickExtra(e){
61
+    if(document.documentElement.contains(document.querySelector('#noteList')) && e.target !== document.querySelector('#noteFocus')){
62
+      this.isShowNoteList = false;
63
+    }
64
+  }
65
+
66
+  // 隐藏模态框
67
+  hideModal() {
68
+    this.cancelFlagHand.emit(false)
69
+  }
70
+
71
+  // 表单提交
72
+  submitForm(): void {
73
+    for (const i in this.validateForm.controls) {
74
+      this.validateForm.controls[i].markAsDirty();
75
+      this.validateForm.controls[i].updateValueAndValidity();
76
+    }
77
+    if (this.validateForm.invalid) {
78
+      return;
79
+    }
80
+    this.submitFormHand.emit(this.validateForm.value.remark);
81
+  }
82
+}
83
+

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

@@ -60,13 +60,18 @@ import { PathologyDetailComponent } from './pathology-detail/pathology-detail.co
60 60
 import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
61 61
 import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info-modal/businessData-detail-info-modal.component';
62 62
 import { SelectDateComponent } from './select-date/select-date.component';
63
+import { EditInspectInfoComponent } from './edit-inspect-info/edit-inspect-info.component';
64
+import { AddInspectInfoComponent } from './add-inspect-info/add-inspect-info.component';
65
+import { SelectRemarkComponent } from './select-remark/select-remark.component';
63 66
 import { AddInspectModalComponent } from './add-inspect-modal/add-inspect-modal.component';
64 67
 import { SelectDateYytimeComponent } from './select-date-yytime/select-date-yytime.component';
65 68
 import { PackageSpecimenRuleComponent } from './package-specimen-rule/package-specimen-rule.component';
66 69
 import { SpecimenPackageListModalComponent } from './specimen-package-list-modal/specimen-package-list-modal.component';
67 70
 import { NgxPrintModule } from 'ngx-print';
68 71
 import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-prompt-modal/specimen-package-log-prompt-modal.component';
72
+import { InspectLogPromptModalComponent } from './inspect-log-prompt-modal/inspect-log-prompt-modal.component';
69 73
 import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect-two-modal.component';
74
+import { AddInspectThreeModalComponent } from './add-inspect-three-modal/add-inspect-three-modal.component';
70 75
 
71 76
 @NgModule({
72 77
   declarations: [
@@ -130,12 +135,17 @@ import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect
130 135
     MedicalWasteHistoryPromptModalComponent,
131 136
     MedicalWasteLogPromptModalComponent,
132 137
     SelectDateComponent,
138
+    EditInspectInfoComponent,
139
+    AddInspectInfoComponent,
140
+    SelectRemarkComponent,
133 141
     AddInspectModalComponent,
134 142
     AddInspectTwoModalComponent,
143
+    AddInspectThreeModalComponent,
135 144
     SelectDateYytimeComponent,
136 145
     PackageSpecimenRuleComponent,
137 146
     SpecimenPackageListModalComponent,
138 147
     SpecimenPackageLogPromptModalComponent,
148
+    InspectLogPromptModalComponent,
139 149
   ],
140 150
   imports: [
141 151
     CommonModule,
@@ -208,12 +218,17 @@ import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect
208 218
     MedicalWasteHistoryPromptModalComponent,
209 219
     MedicalWasteLogPromptModalComponent,
210 220
     SelectDateComponent,
221
+    EditInspectInfoComponent,
222
+    AddInspectInfoComponent,
223
+    SelectRemarkComponent,
211 224
     AddInspectModalComponent,
212 225
     AddInspectTwoModalComponent,
226
+    AddInspectThreeModalComponent,
213 227
     SelectDateYytimeComponent,
214 228
     PackageSpecimenRuleComponent,
215 229
     SpecimenPackageListModalComponent,
216 230
     SpecimenPackageLogPromptModalComponent,
231
+    InspectLogPromptModalComponent,
217 232
   ]
218 233
 })
219 234
 export class ShareModule { }

+ 1 - 1
src/app/views/batch-inspection/batch-inspection.component.ts

@@ -61,7 +61,7 @@ export class BatchInspectionComponent implements OnInit {
61 61
         this.message.success("修改陪检方式成功");
62 62
       } else {
63 63
         this.getList();
64
-        this.message.success(data.msg || "修改陪检方式失败");
64
+        this.message.error(data.msg || "修改陪检方式失败");
65 65
       }
66 66
     });
67 67
   }

+ 7 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -5348,7 +5348,13 @@ export class HushijiandanComponent implements OnInit {
5348 5348
       this.isShowBuildQuickConfirm = true;
5349 5349
     }else if(data.bussType.value === 'inspect'){
5350 5350
       // 陪检
5351
-      this.router.navigateByUrl("/batchInspection");
5351
+      if(this.inspectAndPatientTransportConfig.batchInspectType == 1){
5352
+        // 预约陪检
5353
+        this.router.navigateByUrl("/batchInspection");
5354
+      }else if(this.inspectAndPatientTransportConfig.batchInspectType == 2){
5355
+        // 陪检信息配置
5356
+        this.router.navigateByUrl("/inspectInfoConfig");
5357
+      }
5352 5358
     }
5353 5359
   }
5354 5360
   cancelBuildQuickConfirm(e){

+ 22 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html

@@ -167,6 +167,28 @@
167 167
           <nz-form-label class="label">是否支持签到并转派</nz-form-label>
168 168
           <nz-checkbox-group [(ngModel)]="signReassign"></nz-checkbox-group>
169 169
         </div>
170
+        <!-- 批量陪检配置方式 -->
171
+        <div class="display_flex align-items_center mb8">
172
+          <nz-form-label class="label" nzRequired>批量陪检配置方式</nz-form-label>
173
+          <nz-radio-group [(ngModel)]="radioBatchInspectTypesValue">
174
+            <label style="display: block;" nz-radio [nzValue]="item.value" *ngFor="let item of batchInspectTypes">{{ item.label }}</label>
175
+          </nz-radio-group>
176
+        </div>
177
+        <!-- 是否自动清空患者标记 -->
178
+        <div class="display_flex align-items_center mb8">
179
+          <nz-form-label class="label">是否自动清空患者标记</nz-form-label>
180
+          <!-- <nz-checkbox-group [(ngModel)]="accurateTimeFilling" (ngModelChange)="changeAccurateTimeFilling($event)"></nz-checkbox-group> -->
181
+          <nz-checkbox-group [(ngModel)]="batchInspectAutoClear" (ngModelChange)="changeBatchInspectAutoClear($event)"></nz-checkbox-group>
182
+          <nz-time-picker *ngIf="batchInspectAutoClear[0].checked" [(ngModel)]="batchInspectAutoClearTime" nzFormat="HH:mm"></nz-time-picker>
183
+          <!-- <nz-select *ngIf="accurateTimeFilling[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择精确时间模式" [(ngModel)]="timeMod">
184
+            <ng-container *ngFor="let option of timeModes">
185
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
186
+            </ng-container>
187
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
188
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
189
+            </nz-option>
190
+          </nz-select> -->
191
+        </div>
170 192
         <!-- 检查预约不进行工单合并 -->
171 193
         <!-- <div class="display_flex align-items_center mb8">
172 194
           <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>

+ 35 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -4,6 +4,7 @@ import { ToolService } from 'src/app/services/tool.service';
4 4
 import { NzMessageService } from 'ng-zorro-antd';
5 5
 import { Subject } from 'rxjs';
6 6
 import { debounceTime } from 'rxjs/operators';
7
+import { format } from 'date-fns';
7 8
 
8 9
 @Component({
9 10
   selector: "app-inspect-and-patient-transport-config",
@@ -25,6 +26,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
25 26
   accurateTimeFilling:any[] = [
26 27
     {label:'是否开启',value: 0}
27 28
   ];
29
+  // 是否自动清空患者标记
30
+  batchInspectAutoClear:any[] = [
31
+    {label:'是否开启',value: 0}
32
+  ];
28 33
   // 是否显示排队信息
29 34
   queuingInformation:any[] = [
30 35
     {label:'是否开启',value: 0}
@@ -105,6 +110,12 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
105 110
   //   {label:'是否开启',value: 0}
106 111
   // ];
107 112
 
113
+  // 批量陪检配置方式
114
+  batchInspectTypes:any[] = [
115
+    { label: '预约陪检', value: 1, },
116
+    { label: '陪检信息配置', value: 2, },
117
+  ];
118
+
108 119
   changeBatchSignExecutionDept(e){
109 120
     if(!e[0].checked){
110 121
       this.batchSignExecutionParent = [
@@ -122,6 +133,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
122 133
   }
123 134
 
124 135
   timeMod:any;
136
+  batchInspectAutoClearTime:any;
125 137
   // 交接方式
126 138
   // handoverMode:any;
127 139
   // handoverModes:any[] = [];
@@ -180,6 +192,14 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
180 192
       this.timeMod = null;
181 193
     }
182 194
   }
195
+  // 修改是否自动清空患者标记
196
+  changeBatchInspectAutoClear(e){
197
+    console.log(e);
198
+    if(!e[0].checked){
199
+      // todo
200
+      this.batchInspectAutoClearTime = null;
201
+    }
202
+  }
183 203
   // 修改是否允许追加服务
184 204
   changeAddService(e){
185 205
     console.log(e);
@@ -263,10 +283,18 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
263 283
       this.msg.create("warning", "请选择精确时间模式!");
264 284
       return;
265 285
     }
286
+    if(this.batchInspectAutoClear[0].checked && !this.batchInspectAutoClearTime){
287
+      this.msg.create("warning", "请选择时分!");
288
+      return;
289
+    }
266 290
     if(this.addService[0].checked && !this.addServiceTaskIds.length){
267 291
       this.msg.create("warning", "请选择追加服务任务类型!");
268 292
       return;
269 293
     }
294
+    if(!this.radioBatchInspectTypesValue){
295
+      this.msg.create("warning", "请选择批量陪检配置方式!");
296
+      return;
297
+    }
270 298
     // if(!this.handoverMode){
271 299
     //   this.msg.create("warning", "请选择交接方式!");
272 300
     //   return;
@@ -284,6 +312,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
284 312
       multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,
285 313
       integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
286 314
       accurateTimeFilling: this.accurateTimeFilling[0].checked ? 1 : 0,
315
+      batchInspectAutoClear: this.batchInspectAutoClear[0].checked ? 1 : 0,
287 316
       queuingInformation: this.queuingInformation[0].checked ? 1 : 0,
288 317
 
289 318
       startShowAnotherService: this.startShowAnotherService[0].checked ? 1 : 0,
@@ -305,9 +334,11 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
305 334
       // yyInspectMergeOrder: this.yyInspectMergeOrder[0].checked ? 1 : 0,
306 335
       addService: this.addService[0].checked ? 1 : 0,
307 336
       addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
337
+      batchInspectType: this.radioBatchInspectTypesValue || undefined,
308 338
 
309 339
 
310 340
       timeMod: this.timeMod || undefined,
341
+      batchInspectAutoClearTime: this.batchInspectAutoClearTime ? format(this.batchInspectAutoClearTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
311 342
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
312 343
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
313 344
       // handoverType: {id: this.handoverMode},
@@ -383,6 +414,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
383 414
   }
384 415
   // 获取配置
385 416
   // radioCheckModesValue = '';
417
+  radioBatchInspectTypesValue = '';
386 418
   getConfig() {
387 419
     this.loading = true;
388 420
     let postData = {
@@ -408,6 +440,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
408 440
           // this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
409 441
           // this.autoDepts[0].checked = this.configs.autoDept == 1;
410 442
 
443
+          this.radioBatchInspectTypesValue = this.configs.batchInspectType || undefined;
411 444
           if(this.configs.signTypeIds){
412 445
             let ids = this.configs.signTypeIds.split(',');
413 446
             this.checkInModes = this.checkInModes.map(v => ({...v, checked: ids.includes(v.value.toString())}));
@@ -415,7 +448,9 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
415 448
           this.multiplayerMode[0].checked = this.configs.multiplayerMode == 1;
416 449
           this.integralCalculationMethod = this.configs.integralCalculationMethod;
417 450
           this.accurateTimeFilling[0].checked = this.configs.accurateTimeFilling == 1;
451
+          this.batchInspectAutoClear[0].checked = this.configs.batchInspectAutoClear == 1;
418 452
           this.timeMod = this.configs.timeMod || null;
453
+          this.batchInspectAutoClearTime = this.configs.batchInspectAutoClearTime || null;
419 454
           this.queuingInformation[0].checked = this.configs.queuingInformation == 1;
420 455
 
421 456
           this.startShowAnotherService[0].checked = this.configs.startShowAnotherService == 1;

+ 17 - 0
src/app/views/inspect-info-config/inspect-info-config-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectInfoConfigComponent } from './inspect-info-config.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: InspectInfoConfigComponent,
10
+  },
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule]
16
+})
17
+export class InspectInfoConfigRoutingModule { }

+ 109 - 0
src/app/views/inspect-info-config/inspect-info-config.component.html

@@ -0,0 +1,109 @@
1
+<div class="header">
2
+  <div class="display_flex align-items_center">
3
+    <div class="dept">{{deptDisplay == 2 ? deptDTO.deptalias : deptDTO.dept}}</div>
4
+    <div class="yyTime">
5
+      <span class="label">检查时间:</span>
6
+      <nz-date-picker [(ngModel)]="searchData.dateRange" [nzAllowClear]="false"></nz-date-picker>
7
+    </div>
8
+    <div class="patient">
9
+      <span class="label">患者:</span>
10
+      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择患者" [(ngModel)]="searchData.id" nzServerSearch nzShowSearch (nzOnSearch)="changeInp('patient', $event)" (nzOpenChange)="openChangePatient($event)">
11
+        <ng-container *ngFor="let option of patientList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.patientName + '(' + (option.bedNum || '') + ')' + '-' + option.residenceNo" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+    <div class="patient">
20
+        <div><label nz-checkbox [(ngModel)]="searchData.noneTripType">未标记患者</label></div>
21
+        <div><label nz-checkbox [(ngModel)]="searchData.noneEndDept">未标记检查科室</label></div>
22
+        <div><label nz-checkbox [(ngModel)]="searchData.noneYY">无预约时间检查</label></div>
23
+    </div>
24
+  </div>
25
+  <div class="display_flex align-items_center">
26
+    <button nz-button class="btn default" (click)='reset()'>重置</button>
27
+    <button nz-button class="btn default ml8" (click)='getList()'>搜索</button>
28
+    <button nz-button nzType="default" class="ml8" (click)='goBack()'>返回</button>
29
+    <div class="info">
30
+      <span>患者:{{listOfData.length}}</span>
31
+      <span class="infoNum">检查项:{{inspectTotalCount}}</span>
32
+    </div>
33
+  </div>
34
+</div>
35
+<div class="table">
36
+  <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
37
+    <thead>
38
+      <tr class="thead">
39
+        <th nzWidth="12%">患者信息</th>
40
+        <th nzWidth="12%">护理信息</th>
41
+        <th nzWidth="12%">陪检方式</th>
42
+        <th nzWidth="22%">注意事项</th>
43
+        <th nzWidth="30%">检查项目</th>
44
+        <th nzWidth="12%">操作</th>
45
+      </tr>
46
+    </thead>
47
+    <tbody>
48
+      <tr *ngFor="let data of listOfData">
49
+        <td><span>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container></span><br><ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container></td>
50
+        <td>{{data.careLevel?.name}}<br>{{data.illnessState?.name}}</td>
51
+        <td>
52
+          <nz-radio-group [(ngModel)]="data.tripType" (ngModelChange)="changeTripType($event, data.id)">
53
+            <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of workOrderInspectScoreList">{{item.inspectMode}}</label>
54
+          </nz-radio-group>
55
+        </td>
56
+        <td class="text_align_left">
57
+          <div class="remarkText">
58
+            <span class="remarkTextInner">{{data.remark}}<span style="margin-top: 2px;" class="icon_transport transport-weibiaoti2010104 remarkTextEdit" (click)="editRemark({data: data, inspect: inspect})"></span></span>
59
+          </div>
60
+        </td>
61
+        <td>
62
+          <div *ngFor="let inspect of data.inspects" class="display_flex align-items_center" style="padding-left: 30px;">
63
+            <span class="patient">
64
+              <ng-container *ngIf="!inspect.execDept;else elseTpl">
65
+                <span class="circle red" title="未标记检查科室"></span>
66
+                <span class="circle red" style="left: -21px;" title="未标记检查科室"></span>
67
+              </ng-container>
68
+              <ng-template #elseTpl>
69
+                <ng-container *ngIf="!inspect.yyTime">
70
+                  <span class="circle red" title="无预约时间检查"></span>
71
+                </ng-container>
72
+              </ng-template>
73
+              {{(inspect.yyTime || "") + " " + (inspect.execDept ? (deptDisplay == 2 ? inspect.execDept.deptalias : inspect.execDept.dept) : '') + " 进行 " + (inspect.inspectName || "检查")}}
74
+            </span>
75
+            <span class="icon_transport transport-weibiaoti2010104" (click)="editInspect({data: data, inspect: inspect})"></span>
76
+            <span class="icon_transport transport-shanchu1" (click)="showDelModal({data: data, inspect: inspect}, '您确认要删除吗?','删除','delInspect')"></span>
77
+          </div>
78
+        </td>
79
+        <td>
80
+          <div class="coop">
81
+            <span (click)="showDelModal(data, '您确认要清空标记吗?','清空标记','clearSign')">清空标记</span>
82
+            <span (click)="addInspect(data)">增加检查项目</span>
83
+          </div>
84
+        </td>
85
+      </tr>
86
+    </tbody>
87
+  </nz-table>
88
+</div>
89
+
90
+<!-- 操作成功/失败提示框 -->
91
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
92
+  [info]="promptInfo">
93
+</app-prompt-modal>
94
+
95
+<!-- 删除模态框 -->
96
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
97
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
98
+
99
+<!-- 遮罩 -->
100
+<app-mask *ngIf="maskFlag"></app-mask>
101
+
102
+<!-- 修改检查 -->
103
+<app-edit-inspect-info [execDeptList]="coopData.inspect && coopData.inspect.inspectCheckType && coopData.inspect.inspectCheckType.deptList" [execDeptId]="coopData.inspect && coopData.inspect.execDeptId" [date]="coopData.inspect && coopData.inspect.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info>
104
+
105
+<!-- 修改注意事项 -->
106
+<app-select-remark [inspect]="coopData.data" *ngIf="isShowSelectRemark" (submitFormHand)="submitSelectRemark($event)" (cancelFlagHand)="cancelSelectRemark($event)"></app-select-remark>
107
+
108
+<!-- 追加检查项目 -->
109
+<app-add-inspect-three-modal *ngIf="isShowAddInspect" [patientDTO]="patientDTO" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-three-modal>

+ 152 - 0
src/app/views/inspect-info-config/inspect-info-config.component.less

@@ -0,0 +1,152 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  width: 100vw;
5
+  height: 100vh;
6
+  overflow: hidden;
7
+  background-color: #F0F2F5;
8
+  display: flex;
9
+  flex-direction: column;
10
+  .remarkText{
11
+    padding-right: 24px;
12
+    .remarkTextInner{
13
+      position: relative;
14
+      display: inline-block;
15
+      .remarkTextEdit{
16
+        position: absolute;
17
+        top: 50%;
18
+        right: -24px;
19
+        transform: translateY(-50%);
20
+      }
21
+    }
22
+  }
23
+  .header{
24
+    height: 100px;
25
+    background-color: #fff;
26
+    display: flex;
27
+    align-items: center;
28
+    justify-content: space-between;
29
+    padding: 0 24px;
30
+    font-size: 16px;
31
+    .dept{
32
+      margin-right: 48px;
33
+    }
34
+    .patient{
35
+      margin-left: 24px;
36
+    }
37
+    .label{
38
+      padding-right: 16px;
39
+      font-size: 14px;
40
+    }
41
+    .formItem{
42
+      width: 173px;
43
+    }
44
+    .info{
45
+      margin-left: 24px;
46
+      font-weight: bold;
47
+      .infoNum{
48
+        margin-left: 10px;
49
+      }
50
+    }
51
+  }
52
+  .table{
53
+    flex: 1;
54
+    min-height: 0;
55
+    margin-top: 10px;
56
+    background-color: #fff;
57
+    overflow: auto;
58
+    padding: 8px 16px;
59
+    .patient{
60
+      position: relative;
61
+      text-align: left;
62
+      .circle{
63
+        width: 8px;
64
+        height: 8px;
65
+        border-radius: 50%;
66
+        background-color: @primary-color;
67
+        position: absolute;
68
+        top: 50%;
69
+        left: -8px;
70
+        transform: translate(-50%,-50%);
71
+        &.red{
72
+          background-color: red;
73
+        }
74
+      }
75
+    }
76
+    .transport-weibiaoti2010104{
77
+      font-size: 15px;
78
+      color: #999;
79
+      margin-left: 10px;
80
+      margin-top: 3px;
81
+      cursor: pointer;
82
+    }
83
+    .transport-shanchu1{
84
+      font-size: 15px;
85
+      color: #999;
86
+      margin-left: 5px;
87
+      margin-top: 3px;
88
+      cursor: pointer;
89
+    }
90
+    .thead{
91
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
92
+      th {
93
+        background: transparent;
94
+        color: #fff;
95
+        text-align: center;
96
+      }
97
+    }
98
+    .ant-table-body {
99
+      border-bottom: 1px solid #e5e9ed;
100
+    }
101
+
102
+    .ant-table-tbody {
103
+      tr {
104
+        text-align: center;
105
+        color: #333;
106
+
107
+        td {
108
+          border: none;
109
+
110
+          &.tab_hover:hover{
111
+            text-decoration: underline;
112
+            cursor: pointer;
113
+          }
114
+
115
+          .coop {
116
+            button{
117
+              color: #333;
118
+            }
119
+            span,button {
120
+              display: inline-block;
121
+              padding: 0 8px;
122
+              cursor: pointer;
123
+              position: relative;
124
+
125
+              &::after {
126
+                content: "|";
127
+                position: absolute;
128
+                top: 0;
129
+                right: 0;
130
+              }
131
+
132
+              &:hover,
133
+              &:active {
134
+                color: @primary-color;
135
+              }
136
+
137
+              &:nth-last-child(1) {
138
+                &::after {
139
+                  content: "";
140
+                }
141
+              }
142
+            }
143
+          }
144
+        }
145
+      }
146
+    }
147
+  }
148
+  .footer{
149
+    height: 60px;
150
+    background-color: #fff;
151
+  }
152
+}

+ 379 - 0
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -0,0 +1,379 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
6
+import { Subject } from 'rxjs';
7
+import { debounceTime } from 'rxjs/operators';
8
+import { Location } from '@angular/common';
9
+import cloneDeep from 'lodash-es/cloneDeep'
10
+@Component({
11
+  selector: 'app-inspect-info-config',
12
+  templateUrl: './inspect-info-config.component.html',
13
+  styleUrls: ['./inspect-info-config.component.less']
14
+})
15
+export class InspectInfoConfigComponent implements OnInit {
16
+
17
+  constructor(
18
+    private mainService: MainService,
19
+    private tool: ToolService,
20
+    private message: NzMessageService,
21
+    private _location: Location,
22
+  ) { }
23
+
24
+  searchData:any = {
25
+    dateRange: new Date(), //检查时间
26
+  }
27
+  hosId:any = this.tool.getCurrentHospital().id; //当前院区
28
+  deptDTO:any = this.tool.getCurrentUserDept(); //当前科室
29
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
30
+  listOfData: any[] = []; //表格数据
31
+
32
+  searchTimerSubject = new Subject(); //防抖
33
+
34
+  ngOnInit() {
35
+    //防抖
36
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
37
+      let fun = v[0];
38
+      fun.call(this, v[1]);
39
+    });
40
+
41
+    this.tool.getDeptDisplay().subscribe((result) => {
42
+      if (result.status == 200) {
43
+        this.deptDisplay = result.list[0].valueconfig;
44
+      }
45
+    });
46
+
47
+    this.init();
48
+  }
49
+
50
+  // 修改陪检方式
51
+  changeTripType(tripTypeId, id){
52
+    this.maskFlag = this.message.loading("正在加载中..", {
53
+      nzDuration: 0,
54
+    }).messageId;
55
+    let postData = this.listOfData.find(v => v.id == id);
56
+    this.mainService
57
+    .simplePost("addData", 'patient', postData)
58
+    .subscribe((data) => {
59
+      this.message.remove(this.maskFlag);
60
+      this.maskFlag = false;
61
+      if (data.status == 200) {
62
+        this.message.success("修改陪检方式成功");
63
+      } else {
64
+        this.getList();
65
+        this.message.error(data.msg || "修改陪检方式失败");
66
+      }
67
+    });
68
+  }
69
+
70
+  init(){
71
+    this.getWorkOrderInspectScore();
72
+    this.getList();
73
+  }
74
+
75
+  // 防抖
76
+  isLoading = false;
77
+  isSelecting:boolean = false; // 是否在选中状态
78
+  searchTimer(fun, e) {
79
+    if (this.isSelecting) {
80
+      this.isSelecting = false; // 重置标志
81
+      return; // 跳过处理
82
+    }
83
+    this.isLoading = true;
84
+    this.searchTimerSubject.next([fun, e]);
85
+  }
86
+
87
+  // 搜索
88
+  changeInp(type, e) {
89
+    if(type === 'patient'){
90
+      this.searchTimer(this.getPatientList, e);
91
+    }
92
+  }
93
+
94
+  // 设置标志
95
+  setIsSelecting(flag){
96
+    this.isSelecting = flag; // 设置标志
97
+  }
98
+
99
+
100
+  openChangePatient(flag){
101
+    flag && this.setIsSelecting(false);
102
+    flag && this.getPatientList();
103
+  }
104
+
105
+  // 获取患者
106
+  patientList: any = [];
107
+  getPatientList(e = undefined) {
108
+    let postData = {
109
+      idx: 0,
110
+      sum: 10,
111
+      hosId: this.hosId,
112
+      department: this.deptDTO.id,
113
+      hasBedNum: 1,//有床号
114
+      patientName: e,
115
+    };
116
+    this.isLoading = true;
117
+    this.mainService
118
+      .listMsgByMain('listPatient',postData)
119
+      .subscribe((data:any) => {
120
+        this.isLoading = false;
121
+        this.patientList = data.list || [];
122
+      });
123
+  }
124
+
125
+  maskFlag: any = false;
126
+
127
+  inspectActiveList: any = [];//选中检查列表
128
+  patientActiveList: any = [];//选中患者列表
129
+
130
+  coopData: any = {}; //当前操作列
131
+  btnLoading: boolean = false; //提交按钮loading状态
132
+
133
+  delModal: boolean = false; //删除模态框
134
+  tipsMsg1: string; //提示框信息
135
+  tipsMsg2: string; //操作后信息
136
+  confirmDelType: string; //确认的类型(启用/停用,删除)
137
+  showDelModal(
138
+    data,
139
+    tipsMsg1: string,
140
+    tipsMsg2: string,
141
+    type: string,
142
+  ) {
143
+    this.confirmDelType = type;
144
+    this.delModal = true;
145
+    this.coopData = data;
146
+    this.tipsMsg1 = tipsMsg1;
147
+    this.tipsMsg2 = tipsMsg2;
148
+  }
149
+  // 隐藏删除框
150
+  hideDelModal() {
151
+    this.delModal = false;
152
+  }
153
+  // 确认删除
154
+  confirmDel() {
155
+    this.btnLoading = true;
156
+    if (this.confirmDelType === "clearSign") {
157
+      //清空标记
158
+      this.mainService
159
+        .clearPatientMark({ patientId: this.coopData.id })
160
+        .subscribe((data:any) => {
161
+          this.btnLoading = false;
162
+          this.delModal = false;
163
+          if (data.status == 200) {
164
+            this.showPromptModal(this.tipsMsg2, true, "");
165
+          } else {
166
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
167
+          }
168
+        });
169
+    }else if (this.confirmDelType === "delInspect") {
170
+      //删除-检查
171
+      this.mainService
172
+        .simplePost("rmvData", "inspect", [this.coopData.inspect.id])
173
+        .subscribe((data) => {
174
+          this.btnLoading = false;
175
+          this.delModal = false;
176
+          if (data.status == 200) {
177
+            this.showPromptModal(this.tipsMsg2, true, "");
178
+          } else {
179
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
180
+          }
181
+        });
182
+    }
183
+  }
184
+
185
+  // 修改检验项目
186
+  isShowSelectDate:boolean = false;
187
+  editInspect(data){
188
+    this.isShowSelectDate = true;
189
+    this.coopData = data;
190
+  }
191
+
192
+  // 修改检查项目-确定
193
+  submitSelectDate({date, deptId}){
194
+    let postData = {
195
+      id: this.coopData.inspect.id,
196
+      yyTime: date || undefined,
197
+      execDeptId: deptId,
198
+    }
199
+    this.maskFlag = this.message.loading("正在加载中..", {
200
+      nzDuration: 0,
201
+    }).messageId;
202
+    this.mainService
203
+      .simplePost("updData", 'inspect', postData)
204
+      .subscribe((data:any) => {
205
+        this.message.remove(this.maskFlag);
206
+        this.maskFlag = false;
207
+        if (data.status == 200) {
208
+          this.isShowSelectDate = false;
209
+          this.showPromptModal('修改', true, "");
210
+        } else {
211
+          this.showPromptModal('修改', false, data.msg);
212
+        }
213
+      });
214
+  }
215
+
216
+  // 修改检验项目-取消
217
+  cancelSelectDate(e) {
218
+    this.isShowSelectDate = false;
219
+  }
220
+
221
+  // 修改注意事项
222
+  isShowSelectRemark:boolean = false;
223
+  editRemark(data){
224
+    this.isShowSelectRemark = true;
225
+    this.coopData = data;
226
+  }
227
+
228
+  // 修改注意事项-确定
229
+  submitSelectRemark(remark){
230
+    this.maskFlag = this.message.loading("正在加载中..", {
231
+      nzDuration: 0,
232
+    }).messageId;
233
+
234
+    let postData = {
235
+      ...this.coopData.data,
236
+      remark,
237
+    };
238
+
239
+    this.mainService
240
+    .simplePost("addData", 'patient', postData)
241
+    .subscribe((data) => {
242
+      this.message.remove(this.maskFlag);
243
+      this.maskFlag = false;
244
+      this.getList();
245
+      if (data.status == 200) {
246
+        this.isShowSelectRemark = false;
247
+        this.message.success("编辑注意事项成功");
248
+      } else {
249
+        this.message.error(data.msg || "编辑注意事项失败");
250
+      }
251
+    });
252
+  }
253
+
254
+  // 修改注意事项-取消
255
+  cancelSelectRemark(e) {
256
+    this.isShowSelectRemark = false;
257
+  }
258
+
259
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
260
+  promptContent: string; //操作提示框提示信息
261
+  ifSuccess: boolean; //操作成功/失败
262
+  promptInfo: string; //操作结果提示信息
263
+  promptModalShow: boolean; //操作提示框是否展示
264
+  showPromptModal(con, success, promptInfo?) {
265
+    this.promptModalShow = false;
266
+    this.promptContent = con;
267
+    this.ifSuccess = success;
268
+    this.promptInfo = promptInfo;
269
+    setTimeout(() => {
270
+      this.promptModalShow = true;
271
+    }, 100);
272
+    this.getList();
273
+  }
274
+
275
+  loading1:boolean = false;
276
+  inspectTotalCount:number = 0;
277
+
278
+  getList(){
279
+    let postData = {
280
+      idx: 0,
281
+      sum: 99999,
282
+      hosId: this.hosId,
283
+      department: this.deptDTO.id,
284
+      queryInspect: 1,//带inspects
285
+      hasBedNum: 1,//有床号
286
+      startTime: this.searchData.dateRange ? format(startOfDay(this.searchData.dateRange), 'yyyy-MM-dd HH:mm:ss') : undefined,
287
+      endTime: this.searchData.dateRange ? format(endOfDay(this.searchData.dateRange), 'yyyy-MM-dd HH:mm:ss') : undefined,
288
+      id: this.searchData.id || undefined,
289
+      noneTripType: this.searchData.noneTripType || undefined,
290
+      noneEndDept: this.searchData.noneEndDept || undefined,
291
+      noneYY: this.searchData.noneYY || undefined,
292
+    };
293
+    this.loading1 = true;
294
+    this.mainService
295
+      .listMsgByMain('listPatient',postData)
296
+      .subscribe((data:any) => {
297
+        this.loading1 = false;
298
+        if (data.status == 200) {
299
+          this.listOfData = data.list;
300
+          this.inspectTotalCount = this.listOfData.reduce((v, i) => v + i.inspects.length, 0);
301
+        }else{
302
+          this.message.error(data.msg || "请求数据失败");
303
+        }
304
+      });
305
+  }
306
+
307
+  // 重置
308
+  reset(){
309
+    this.searchData = {
310
+      dateRange: new Date(),
311
+    };
312
+    this.getList();
313
+  }
314
+
315
+  //获取陪检方式
316
+  workOrderInspectScoreList:any[] = [];
317
+  getWorkOrderInspectScore() {
318
+    let postData = { idx: 0, sum: 9999, workOrderInspectScore: { hosId: this.hosId } };
319
+    this.mainService
320
+      .getFetchDataList("simple/data", "workOrderInspectScore", postData)
321
+      .subscribe((result) => {
322
+        if (result.status == 200) {
323
+          this.workOrderInspectScoreList = result.list || [];
324
+        } else {
325
+          this.message.error("请求数据失败");
326
+        }
327
+      });
328
+  }
329
+
330
+  // 返回
331
+  goBack(){
332
+    this._location.back();
333
+  }
334
+
335
+  // 追加项目
336
+  patientDTO:any = {};
337
+  isShowAddInspect = false; //弹窗开关
338
+  addInspect(patientDTO){
339
+    this.patientDTO = patientDTO;
340
+    this.isShowAddInspect = true;
341
+  }
342
+  // 关闭弹窗
343
+  closeAddInspectModel(e) {
344
+    this.isShowAddInspect = JSON.parse(e).show;
345
+  }
346
+  // 确定弹窗
347
+  confirmAddInspectModel(e) {
348
+    console.log(e);
349
+    let obj = JSON.parse(e);
350
+    let postData:any = {
351
+      inspectList: [{
352
+        patientCode: this.patientDTO.patientCode,
353
+        patientName: this.patientDTO.patientName,
354
+        barCode: this.patientDTO.barCode,
355
+        inspectCheckType: { id: obj.inspectData.id },
356
+        applyDeptId: this.deptDTO.id,
357
+        execDeptId: obj.inspectData.execDeptId,
358
+        bedNum: this.patientDTO.bedNum,
359
+        hosId: this.hosId,
360
+        yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
361
+      }] || undefined,
362
+    };
363
+    this.maskFlag = this.message.loading("正在加载中..", {
364
+      nzDuration: 0,
365
+    }).messageId;
366
+    this.mainService
367
+      .simplePost("addData", "inspect", postData)
368
+      .subscribe((data:any) => {
369
+        this.message.remove(this.maskFlag);
370
+        this.maskFlag = false;
371
+        if (data.status == 200) {
372
+          this.isShowAddInspect = obj.show;
373
+          this.showPromptModal('添加', true, "");
374
+        } else {
375
+          this.showPromptModal('添加', false, data.msg);
376
+        }
377
+      });
378
+  }
379
+}

+ 17 - 0
src/app/views/inspect-info-config/inspect-info-config.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { InspectInfoConfigRoutingModule } from './inspect-info-config-routing.module';
5
+import { InspectInfoConfigComponent } from './inspect-info-config.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [InspectInfoConfigComponent],
11
+  imports: [
12
+    CommonModule,
13
+    InspectInfoConfigRoutingModule,
14
+    ShareModule,
15
+  ]
16
+})
17
+export class InspectInfoConfigModule { }

+ 52 - 42
src/app/views/inspect-search/inspect-search.component.html

@@ -1,7 +1,11 @@
1 1
 <div class="list-template">
2 2
   <div class="list-template__content">
3 3
     <div class="list-template__top" nz-row>
4
-      <div nz-col nzXl='16' class="list-template__searchBox">
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">入库时间</span>:
7
+          <nz-range-picker nzShowTime [(ngModel)]="dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
8
+        </div>
5 9
         <div class="list-template__searchItem">
6 10
           <span class="label">患者姓名:</span>
7 11
           <input nz-input class="formItem" placeholder="请输入患者姓名" [(ngModel)]="searchCriteria.patientName" />
@@ -16,7 +20,7 @@
16 20
             nzPlaceHolder="请选择配送人员" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
17 21
             (nzOpenChange)="changeSearch($event)">
18 22
             <ng-container *ngFor="let data of workerSearch">
19
-              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
23
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
20 24
             </ng-container>
21 25
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
22 26
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -25,22 +29,9 @@
25 29
         </div>
26 30
         <div class="list-template__searchItem">
27 31
           <span class="label">状态:</span>
28
-          <nz-select
29
-            [nzDropdownMatchSelectWidth]="false"
30
-            class="formItem"
31
-            nzServerSearch
32
-            nzShowSearch
33
-            nzAllowClear
34
-            nzPlaceHolder="请选择状态"
35
-            [(ngModel)]="searchCriteria.inspectState"
36
-            (nzOpenChange)="changeSearch1($event)"
37
-          >
32
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchCriteria.inspectState" (nzOpenChange)="changeSearch1($event)">
38 33
             <ng-container *ngFor="let data of types">
39
-              <nz-option
40
-                *ngIf="!isLoading1"
41
-                nzLabel="{{ data.name }}"
42
-                nzValue="{{ data.id }}"
43
-              ></nz-option>
34
+              <nz-option *ngIf="!isLoading1" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
44 35
             </ng-container>
45 36
             <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
46 37
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -48,44 +39,49 @@
48 39
           </nz-select>
49 40
         </div>
50 41
       </div>
51
-      <div nz-col nzXl="8" class="list-template__btns">
52
-        <button nz-button class="btn default" (click)='reset()'>重置</button>
53
-        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
42
+      <div nz-col nzXl="6" class="list-template__btns">
43
+        <button nz-button class="btn default" (click)='getList(1)'>搜索</button>
44
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
45
+        <button nz-button *ngIf="coopBtns.add" class="btn default ml8" (click)="addModal()">新增</button>
54 46
       </div>
55 47
     </div>
48
+    <div class="list-template__checkBoxes">
49
+      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="log(checkOptionsOne)"></nz-checkbox-group>
50
+    </div>
56 51
     <div class="list-template__bottom">
57 52
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
58 53
         [nzLoading]="loading1">
59 54
         <thead>
60 55
           <tr class="thead">
61
-            <th nzWidth="6%">序号</th>
62
-            <th nzWidth="8%">患者姓名</th>
63
-            <th nzWidth="8%">住院号</th>
64
-            <th nzWidth="8%">申请科室</th>
65
-            <th nzWidth="8%">检查科室</th>
66
-            <th nzWidth="8%">检查单号</th>
67
-            <th nzWidth="8%">患者床号</th>
68
-            <th nzWidth="8%">检查项目</th>
69
-            <th nzWidth="11%">预约时间</th>
70
-            <th nzWidth="11%">到达时间</th>
56
+            <th nzWidth="4%">序号</th>
57
+            <th nzWidth="8%">患者姓名|住院号</th>
58
+            <th nzWidth="10%">申请科室</th>
59
+            <th nzWidth="10%">检查科室</th>
60
+            <th nzWidth="14%">检查单号|检查项目</th>
61
+            <th nzWidth="14%">预约时间|入库时间</th>
71 62
             <th nzWidth="8%">检查状态</th>
72
-            <th nzWidth="8%">配送人员</th>
63
+            <th nzWidth="8%">陪检人员</th>
64
+            <th nzWidth="14%">出行方式|注意事项</th>
65
+            <th nzWidth="10%">操作</th>
73 66
           </tr>
74 67
         </thead>
75 68
         <tbody>
76 69
           <tr *ngFor="let data of listOfData;let i = index">
77 70
             <td>{{i+(pageIndex-1) * pageSize + 1}}</td>
78
-            <td>{{ data.patientName||'-' }}</td>
79
-            <td>{{ data.residenceNo||'-' }}</td>
80
-            <td>{{ data.applyDept ? data.applyDept.dept : '-' }}</td>
81
-            <td>{{ data.execDept ? data.execDept.dept : '-' }}</td>
82
-            <td>{{ data.inspectCode||'-' }}</td>
83
-            <td>{{ data.patientBedNum||'-' }}</td>
84
-            <td>{{data.inspectName||'-'}}</td>
85
-            <td>{{ data.yyTime||'-' }}</td>
86
-            <td>{{data.arriveTime||'-'}}</td>
87
-            <td>{{ data.inspectState?data.inspectState.name:''}}</td>
88
-            <td>{{ data.workerName||'-' }}</td>
71
+            <td>{{ data.patientName }}({{ data.patientBedNum }})<br>{{ data.residenceNo }}</td>
72
+            <td>{{ data.applyDept?.dept }}</td>
73
+            <td>{{ data.execDept?.dept }}</td>
74
+            <td>{{ data.inspectCode }}<br>{{data.inspectName}}</td>
75
+            <td>{{ data.yyTime }}<br>{{ data.createTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
76
+            <td>{{ data.inspectState?.name}}</td>
77
+            <td>{{ data.workerName }}</td>
78
+            <td>{{ data.patientDTO?.tripTypeDTO?.inspectMode }}<br>{{ data.patientDTO?.remark }}</td>
79
+            <td>
80
+              <div class="coop">
81
+                <span *ngIf="coopBtns.lookLog" (click)="showLogs(data)">查看日志</span>
82
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
83
+              </div>
84
+            </td>
89 85
           </tr>
90 86
         </tbody>
91 87
       </nz-table>
@@ -97,3 +93,17 @@
97 93
     </div>
98 94
   </div>
99 95
 </div>
96
+
97
+<!-- 操作成功/失败提示框 -->
98
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
99
+  [info]="promptInfo">
100
+</app-prompt-modal>
101
+
102
+<!-- 修改检查 -->
103
+<app-edit-inspect-info [execDeptList]="coopData.inspectCheckType && coopData.inspectCheckType.deptList" [execDeptId]="coopData.execDept && coopData.execDept.id" [date]="coopData.yyTime" *ngIf="isShowSelectDate" (submitFormHand)="submitSelectDate($event)" (cancelFlagHand)="cancelSelectDate($event)"></app-edit-inspect-info>
104
+
105
+<!-- 新增检查 -->
106
+<app-add-inspect-info *ngIf="isShowAddInspect" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-info>
107
+
108
+<!-- 查看日志 -->
109
+<app-inspect-log-prompt-modal *ngIf="logPromptModalShow" [show]="logPromptModalShow" [id]="inspectId" (closeModelHs)="closeModelLog($event)"></app-inspect-log-prompt-modal>

+ 157 - 7
src/app/views/inspect-search/inspect-search.component.ts

@@ -1,8 +1,11 @@
1 1
 import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
2 3
 import { Subject } from "rxjs";
3 4
 import { debounceTime } from "rxjs/operators";
4 5
 import { MainService } from "src/app/services/main.service";
5 6
 import { ToolService } from "src/app/services/tool.service";
7
+import { startOfDay, endOfDay, format, startOfMinute } from 'date-fns';
8
+import { NzMessageService } from 'ng-zorro-antd';
6 9
 
7 10
 @Component({
8 11
   selector: "app-inspect-search",
@@ -10,7 +13,22 @@ import { ToolService } from "src/app/services/tool.service";
10 13
   styleUrls: ["./inspect-search.component.less"],
11 14
 })
12 15
 export class InspectSearchComponent implements OnInit {
13
-  constructor(private mainService: MainService, private tool: ToolService) {}
16
+  constructor(
17
+    private mainService: MainService,
18
+    private tool: ToolService,
19
+    private route: ActivatedRoute,
20
+    private message: NzMessageService,
21
+  ) {}
22
+
23
+  // 初始化增删改按钮
24
+  coopBtns: any = {};
25
+
26
+  checkOptionsOne: Array<any> = [
27
+    { label: "未标记检查科室", value: "0", checked: false },
28
+    { label: "无预约时间检查", value: "1", checked: false },
29
+  ];
30
+
31
+  dateRange: any = []; //入库时间区间
14 32
 
15 33
   searchCriteria = {
16 34
     //搜索条件
@@ -27,12 +45,27 @@ export class InspectSearchComponent implements OnInit {
27 45
   pageSize: number = 10; //表格每页展示条数
28 46
   listLength: number = 10; //表格总数据量
29 47
   changeInpSubject = new Subject();
48
+
30 49
   ngOnInit() {
31 50
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
32 51
       this.searchWorker(v);
33 52
     });
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
34 54
     this.getAllHospital();
35 55
   }
56
+
57
+  // 表格筛选
58
+  log(value: object[]): void {
59
+    this.getList(1);
60
+  }
61
+
62
+  // 日期选择
63
+  onCalendarChangeDate(dateArr){
64
+    if(dateArr.length == 2){
65
+      this.dateRange = [startOfDay(dateArr[0]), endOfDay(dateArr[1])];
66
+    }
67
+  }
68
+
36 69
   // 搜索类型
37 70
   isLoading1 = false;
38 71
   types = []; // 类型列表(搜索框)
@@ -51,11 +84,12 @@ export class InspectSearchComponent implements OnInit {
51 84
   }
52 85
   // 重置
53 86
   reset() {
87
+    this.dateRange = [];
54 88
     this.searchCriteria = {
55 89
       //搜索条件
56 90
       patientName: "",
57 91
       inspectCode: "",
58
-      hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
92
+      hospital: this.allHospital[0] ? this.allHospital[0]["id"] : null,
59 93
       workerId: null,
60 94
       inspectState: null,
61 95
     };
@@ -65,7 +99,7 @@ export class InspectSearchComponent implements OnInit {
65 99
   // 获取所有院区
66 100
   getAllHospital() {
67 101
     this.allHospital = [this.tool.getCurrentHospital()];
68
-    this.searchCriteria.hospital = this.tool.getCurrentHospital().id + "";
102
+    this.searchCriteria.hospital = this.tool.getCurrentHospital().id;
69 103
     this.getList(1);
70 104
   }
71 105
   // 查看标本历史记录
@@ -127,11 +161,16 @@ export class InspectSearchComponent implements OnInit {
127 161
     let postData = {
128 162
       idx: this.pageIndex - 1,
129 163
       sum: this.pageSize,
130
-      hosId: this.searchCriteria.hospital,
131
-      patientName: this.searchCriteria.patientName,
132
-      inspectCode: this.searchCriteria.inspectCode,
133
-      workerId: this.searchCriteria.workerId,
164
+      hosId: this.searchCriteria.hospital || undefined,
165
+      patientName: this.searchCriteria.patientName || undefined,
166
+      inspectCode: this.searchCriteria.inspectCode || undefined,
167
+      workerId: this.searchCriteria.workerId || undefined,
134 168
       inspectState: this.searchCriteria.inspectState || undefined,
169
+      createStartTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
170
+      createEndTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
171
+      noneEndDept: this.checkOptionsOne[0].checked ? true : undefined,
172
+      noneYytime: this.checkOptionsOne[1].checked ? true : undefined,
173
+      queryInspect: 1,//带检查项目
135 174
     };
136 175
     this.loading1 = true;
137 176
     this.mainService
@@ -144,4 +183,115 @@ export class InspectSearchComponent implements OnInit {
144 183
         }
145 184
       });
146 185
   }
186
+
187
+  // 查看日志弹窗
188
+  logPromptModalShow = false; //弹窗开关
189
+  inspectId = ""; //查看记录携带id
190
+  showLogs(data) {
191
+    this.inspectId = data.id;
192
+    this.logPromptModalShow = true;
193
+  }
194
+  // 关闭日志弹窗
195
+  closeModelLog(e) {
196
+    this.logPromptModalShow = JSON.parse(e).show;
197
+  }
198
+
199
+  // ============================add start==================
200
+  // 新增检查
201
+  isShowAddInspect = false; //弹窗开关
202
+  addModal(){
203
+    this.isShowAddInspect = true;
204
+  }
205
+  // 关闭弹窗
206
+  closeAddInspectModel(e) {
207
+    this.isShowAddInspect = JSON.parse(e).show;
208
+  }
209
+  // 确定弹窗
210
+  confirmAddInspectModel(e) {
211
+    console.log(e);
212
+    let obj = JSON.parse(e);
213
+    let postData:any = {
214
+      inspectList: [{
215
+        patientCode: obj.patientDTO.patientCode,
216
+        patientName: obj.patientDTO.patientName,
217
+        barCode: obj.patientDTO.barCode,
218
+        inspectCheckType: { id: obj.inspectData.id },
219
+        applyDeptId: this.tool.getCurrentUserDept().id,
220
+        execDeptId: obj.inspectData.execDeptId,
221
+        bedNum: obj.patientDTO.bedNum,
222
+        hosId: this.searchCriteria.hospital,
223
+        yyTime: format(new Date(obj.inspectData.date), 'yyyy-MM-dd ') + format(startOfMinute(new Date(obj.inspectData.time)), 'HH:mm:ss'),
224
+      }] || undefined,
225
+    };
226
+    this.maskFlag = this.message.loading("正在加载中..", {
227
+      nzDuration: 0,
228
+    }).messageId;
229
+    this.mainService
230
+      .simplePost("addData", "inspect", postData)
231
+      .subscribe((data:any) => {
232
+        this.message.remove(this.maskFlag);
233
+        this.maskFlag = false;
234
+        if (data.status == 200) {
235
+          this.isShowAddInspect = obj.show;
236
+          this.showPromptModal('添加', true, "");
237
+        } else {
238
+          this.showPromptModal('添加', false, data.msg);
239
+        }
240
+      });
241
+  }
242
+  // ============================add end==================
243
+
244
+  coopData: any = {}; //当前操作列
245
+  // 修改检验项目
246
+  isShowSelectDate:boolean = false;
247
+  edit(data){
248
+    this.isShowSelectDate = true;
249
+    this.coopData = data;
250
+  }
251
+
252
+  // 修改检查项目-确定
253
+  maskFlag: any = false;
254
+  submitSelectDate({date, deptId}){
255
+    let postData = {
256
+      id: this.coopData.id,
257
+      yyTime: date || undefined,
258
+      execDeptId: deptId,
259
+    }
260
+    this.maskFlag = this.message.loading("正在加载中..", {
261
+      nzDuration: 0,
262
+    }).messageId;
263
+    this.mainService
264
+      .simplePost("updData", 'inspect', postData)
265
+      .subscribe((data:any) => {
266
+        this.message.remove(this.maskFlag);
267
+        this.maskFlag = false;
268
+        if (data.status == 200) {
269
+          this.isShowSelectDate = false;
270
+          this.showPromptModal('修改', true, "");
271
+        } else {
272
+          this.showPromptModal('修改', false, data.msg);
273
+        }
274
+      });
275
+  }
276
+
277
+  // 修改检验项目-取消
278
+  cancelSelectDate(e) {
279
+    this.isShowSelectDate = false;
280
+  }
281
+
282
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
283
+  promptContent: string; //操作提示框提示信息
284
+  ifSuccess: boolean; //操作成功/失败
285
+  promptInfo: string; //操作结果提示信息
286
+  promptModalShow: boolean; //操作提示框是否展示
287
+  showPromptModal(con, success, promptInfo?) {
288
+    this.promptModalShow = false;
289
+    this.promptContent = con;
290
+    this.ifSuccess = success;
291
+    this.promptInfo = promptInfo;
292
+    setTimeout(() => {
293
+      this.promptModalShow = true;
294
+    }, 100);
295
+    this.getList(1);
296
+  }
147 297
 }

+ 53 - 21
src/app/views/patient-search/patient-search.component.html

@@ -74,37 +74,32 @@
74 74
         <thead>
75 75
           <tr class="thead">
76 76
             <th nzWidth="8%">患者类别</th>
77
-            <th nzWidth="8%">患者姓名</th>
78
-            <th nzWidth="8%">患者标识</th>
79
-            <th nzWidth="8%">住院号</th>
80
-            <th nzWidth="8%">条码号</th>
81
-            <th nzWidth="8%">床号</th>
82
-            <th nzWidth="8%">院区</th>
83
-            <th nzWidth="8%">当前科室</th>
84
-            <th nzWidth="8%">护理等级</th>
85
-            <th nzWidth="8%">病情级别</th>
86
-            <th nzWidth="8%">年龄</th>
87
-            <th nzWidth="8%">性别</th>
88
-            <th nzWidth="7%">操作</th>
77
+            <th nzWidth="10%">患者姓名(床号)</th>
78
+            <th nzWidth="10%">患者标识</th>
79
+            <th nzWidth="10%">住院号|条码号</th>
80
+            <th nzWidth="10%">院区|当前科室</th>
81
+            <th nzWidth="10%">护理等级</th>
82
+            <th nzWidth="10%">病情级别</th>
83
+            <th nzWidth="10%">性别、年龄</th>
84
+            <th nzWidth="12%">出行方式|注意事项</th>
85
+            <th nzWidth="10%">操作</th>
89 86
           </tr>
90 87
         </thead>
91 88
         <tbody>
92 89
           <tr *ngFor="let data of listOfData;let i = index">
93 90
             <td>{{ data.patientType?.name }}</td>
94
-            <td>{{ data.patientName }}</td>
91
+            <td>{{ data.patientName }}({{ data.bedNum }})</td>
95 92
             <td>{{ data.patientCode }}</td>
96
-            <td>{{ data.residenceNo }}</td>
97
-            <td>{{ data.barCode }}</td>
98
-            <td>{{ data.bedNum }}</td>
99
-            <td>{{ data.hospitalDTO?.hosName }}</td>
100
-            <td>{{ data.department?.dept }}</td>
93
+            <td>{{ data.residenceNo }}<br>{{ data.barCode }}</td>
94
+            <td>{{ data.hospitalDTO?.hosName }}<br>{{ data.department?.dept }}</td>
101 95
             <td>{{ data.careLevel?.name }}</td>
102 96
             <td>{{ data.illnessState?.name }}</td>
103
-            <td>{{ data.age }}</td>
104
-            <td>{{ data.gender?.name }}</td>
97
+            <td>{{ data.gender?.name }}、{{ data.age }}</td>
98
+            <td>{{ data.tripTypeDTO?.inspectMode }}<br>{{ data.remark }}</td>
105 99
             <td>
106 100
               <div class="coop">
107 101
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
102
+                <span *ngIf="coopBtns.removeSign" (click)="showDelModal(data, '您确认要清空标记吗?','清空标记','clearSign')">清空标记</span>
108 103
               </div>
109 104
             </td>
110 105
           </tr>
@@ -120,7 +115,7 @@
120 115
 </div>
121 116
 
122 117
 <!-- 新增/编辑模态框 -->
123
-<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
118
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal" (click)="clickExtra($event)">
124 119
   <div class="modalBody">
125 120
     <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
126 121
     </div>
@@ -251,6 +246,39 @@
251 246
             </nz-select>
252 247
           </nz-form-control>
253 248
         </nz-form-item>
249
+        <nz-form-item>
250
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tripType">出行方式</nz-form-label>
251
+          <nz-form-control nzErrorTip="请选择出行方式!">
252
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="tripType" nzAllowClear nzPlaceHolder="请选择出行方式" (nzOpenChange)="openTripType($event)">
253
+              <ng-container *ngFor="let data of tripTypeList">
254
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.inspectMode" [nzValue]="data.id">
255
+                </nz-option>
256
+              </ng-container>
257
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
258
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
259
+              </nz-option>
260
+            </nz-select>
261
+          </nz-form-control>
262
+        </nz-form-item>
263
+        <nz-form-item>
264
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="remark">注意事项</nz-form-label>
265
+          <nz-form-control nzErrorTip="请选择注意事项!">
266
+            <div class="noteSign">
267
+              <textarea formControlName="remark" class="noteFocus mt8" id="noteFocus" (focus)="focusNote()" nz-input rows="5" placeholder="请填写注意事项" #remarkEle></textarea>
268
+              <div class="noteList" id="noteList" *ngIf="isShowNoteList">
269
+                <ng-container *ngIf="!noteLoading && noteList.length">
270
+                  <div class="noteItem ellipsis-oneline" *ngFor="let item of noteList" [title]="item.name" (click)="selectNote(item.name)">{{item.name}}</div>
271
+                </ng-container>
272
+                <div *ngIf="!noteLoading && !noteList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
273
+                  <nz-empty></nz-empty>
274
+                </div>
275
+                <div *ngIf="noteLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
276
+                  <nz-spin nzSimple></nz-spin>
277
+                </div>
278
+              </div>
279
+            </div>
280
+          </nz-form-control>
281
+        </nz-form-item>
254 282
       </form>
255 283
     </overlay-scrollbars>
256 284
     <div class="display_flex justify-content_flex-center">
@@ -260,6 +288,10 @@
260 288
   </div>
261 289
 </div>
262 290
 
291
+<!-- 删除模态框 -->
292
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
293
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
294
+
263 295
 <!-- 操作成功/失败提示框 -->
264 296
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
265 297
   [info]="promptInfo"></app-prompt-modal>

+ 23 - 0
src/app/views/patient-search/patient-search.component.less

@@ -1,5 +1,28 @@
1 1
 @import "../../../../src/theme.less";
2 2
 
3
+.noteSign{
4
+  position: relative;
5
+  .noteList{
6
+    position: absolute;
7
+    bottom: 100%;
8
+    left: 0;
9
+    width: 100%;
10
+    max-height: 256px;
11
+    z-index: 99;
12
+    background: #fff;
13
+    border: 1px solid #d9d9d9;
14
+    border-radius: 4px;
15
+    overflow: hidden auto;
16
+    .noteItem{
17
+      padding: 5px 12px;
18
+      cursor: pointer;
19
+      line-height: normal;
20
+      &:hover{
21
+        background-color: #e9f7e9;
22
+      }
23
+    }
24
+  }
25
+}
3 26
 .save {
4 27
   position: fixed;
5 28
   left: 0;

+ 115 - 3
src/app/views/patient-search/patient-search.component.ts

@@ -1,4 +1,4 @@
1
-import { Component, OnInit } from "@angular/core";
1
+import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
2 2
 import { MainService } from "src/app/services/main.service";
3 3
 import { ToolService } from "src/app/services/tool.service";
4 4
 import { Subject } from 'rxjs';
@@ -12,6 +12,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
12 12
   styleUrls: ["./patient-search.component.less"],
13 13
 })
14 14
 export class PatientSearchComponent implements OnInit {
15
+  @ViewChild("remarkEle", { static: false }) remarkEle: ElementRef;
15 16
   constructor(
16 17
     private mainService: MainService,
17 18
     private tool: ToolService,
@@ -59,6 +60,9 @@ export class PatientSearchComponent implements OnInit {
59 60
   changeHospital(e){
60 61
     this.deptList = [];
61 62
     this.validateForm.controls.department.setValue(null);
63
+
64
+    this.tripTypeList = [];
65
+    this.validateForm.controls.tripType.setValue(null);
62 66
   }
63 67
 
64 68
   // 获取院区列表
@@ -140,6 +144,12 @@ export class PatientSearchComponent implements OnInit {
140 144
       this.changeInp("", "departmentSearch");
141 145
     }
142 146
   }
147
+  // 打开搜索框
148
+  openTripType(flag) {
149
+    if (flag) {
150
+      this.getTripTypeList();
151
+    }
152
+  }
143 153
   // 重置
144 154
   reset() {
145 155
     this.searchCriteria = {
@@ -218,6 +228,8 @@ export class PatientSearchComponent implements OnInit {
218 228
       careLevel: [null, [Validators.required]],
219 229
       illnessState: [null],
220 230
       patientType: [null, [Validators.required]],
231
+      tripType: [null],
232
+      remark: [null],
221 233
     });
222 234
   }
223 235
   // 表单提交
@@ -255,6 +267,8 @@ export class PatientSearchComponent implements OnInit {
255 267
           patientType: {
256 268
             id: this.validateForm.value.patientType,
257 269
           },
270
+          tripType:  this.validateForm.value.tripType || undefined,
271
+          remark:  this.validateForm.value.remark || undefined,
258 272
         }
259 273
       }
260 274
     }else{
@@ -283,6 +297,8 @@ export class PatientSearchComponent implements OnInit {
283 297
           patientType: {
284 298
             id: this.validateForm.value.patientType,
285 299
           },
300
+          tripType:  this.validateForm.value.tripType || undefined,
301
+          remark:  this.validateForm.value.remark || undefined,
286 302
         }
287 303
       }
288 304
     }
@@ -317,8 +333,8 @@ export class PatientSearchComponent implements OnInit {
317 333
   }
318 334
 
319 335
   // 编辑
320
-  maskFlag: any = false;
321
-  coopData = {};
336
+  maskFlag:any = false;
337
+  coopData:any = {};
322 338
   edit(data) {
323 339
     this.initForm();
324 340
     this.validateForm.controls.hosId.setValue(data.hosId);
@@ -354,6 +370,8 @@ export class PatientSearchComponent implements OnInit {
354 370
     }else{
355 371
       this.validateForm.controls.patientType.setValue(null);
356 372
     }
373
+    this.validateForm.controls.tripType.setValue(data.tripType);
374
+    this.validateForm.controls.remark.setValue(data.remark);
357 375
 
358 376
     this.modal = true;
359 377
     this.add = false;
@@ -391,4 +409,98 @@ export class PatientSearchComponent implements OnInit {
391 409
       this.patientTypeList = data || [];
392 410
     });
393 411
 	}
412
+
413
+  // 获取出行方式
414
+	tripTypeList: any = [];
415
+	getTripTypeList() {
416
+    let postData = {
417
+      workOrderInspectScore: {
418
+        hosId: this.validateForm.value.hosId
419
+      },
420
+      idx: 0,
421
+      sum: 99999,
422
+    };
423
+    this.isLoading = true;
424
+    this.mainService
425
+      .getFetchDataList("simple/data", "workOrderInspectScore", postData)
426
+      .subscribe((res) => {
427
+        this.isLoading = false;
428
+        if (res.status == 200) {
429
+          this.tripTypeList = res.list;
430
+        }else{
431
+          this.tripTypeList = [];
432
+        }
433
+      });
434
+	}
435
+
436
+  // 注意事项获取焦点
437
+  isShowNoteList:boolean = false;
438
+  focusNote(){
439
+    this.isShowNoteList = true;
440
+    this.getNoteList();
441
+  }
442
+
443
+  // 选择注意事项
444
+  selectNote(name){
445
+    this.validateForm.controls.remark.setValue(name);
446
+    this.isShowNoteList = false;
447
+    // this.remarkEle.nativeElement.focus();
448
+  }
449
+
450
+  // 获取注意事项列表
451
+  noteList:any[] = [];
452
+  noteLoading:boolean = false;
453
+  getNoteList() {
454
+    this.noteLoading = true;
455
+    this.mainService.getDictionary('list', 'inspect_notes',).subscribe(result=>{
456
+      this.noteLoading = false;
457
+      this.noteList = result || [];
458
+    });
459
+  }
460
+
461
+  // 点击其他位置
462
+  clickExtra(e){
463
+    if(document.documentElement.contains(document.querySelector('#noteList')) && e.target !== document.querySelector('#noteFocus')){
464
+      this.isShowNoteList = false;
465
+    }
466
+  }
467
+
468
+  delModal: boolean = false; //删除模态框
469
+  tipsMsg1: string; //提示框信息
470
+  tipsMsg2: string; //操作后信息
471
+  confirmDelType: string; //确认的类型(启用/停用,删除)
472
+  showDelModal(
473
+    data,
474
+    tipsMsg1: string,
475
+    tipsMsg2: string,
476
+    type: string,
477
+  ) {
478
+    this.confirmDelType = type;
479
+    this.delModal = true;
480
+    this.coopData = data;
481
+    this.tipsMsg1 = tipsMsg1;
482
+    this.tipsMsg2 = tipsMsg2;
483
+  }
484
+  // 隐藏删除框
485
+  hideDelModal() {
486
+    this.delModal = false;
487
+  }
488
+  // 确认删除
489
+  confirmDel() {
490
+    this.btnLoading = true;
491
+    if (this.confirmDelType === "clearSign") {
492
+      //清空标记
493
+      this.mainService
494
+        .clearPatientMark({ patientId: this.coopData.id })
495
+        .subscribe((data:any) => {
496
+          this.btnLoading = false;
497
+          this.delModal = false;
498
+          if (data.status == 200) {
499
+            this.showPromptModal(this.tipsMsg2, true, "");
500
+          } else {
501
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
502
+          }
503
+        });
504
+    }
505
+  }
394 506
 }

+ 16 - 5
src/common.less

@@ -1,3 +1,6 @@
1
+textarea{
2
+  margin-bottom: 0!important;
3
+}
1 4
 .ant-table-tbody tr:nth-of-type(2n){
2 5
   background-color: #e9f7e9!important;
3 6
 }
@@ -117,7 +120,7 @@
117 120
 }
118 121
 
119 122
 .justify-content_flex-end {
120
-  justify-content: flex-end;
123
+  justify-content: flex-end !important;
121 124
 }
122 125
 
123 126
 .justify-content_space-between {
@@ -162,6 +165,14 @@
162 165
   width: 0;
163 166
   flex: 1;
164 167
 }
168
+.flex_2 {
169
+  width: 0;
170
+  flex: 2;
171
+}
172
+.flex_3 {
173
+  width: 0;
174
+  flex: 3;
175
+}
165 176
 
166 177
 /*显示顺序*/
167 178
 .order_2 {
@@ -226,10 +237,10 @@
226 237
   &.default {
227 238
     color: @primary-color;
228 239
     background: #fff;
229
-    height: @default-btn-height;
230
-    line-height: @default-btn-height;
231
-    padding: 0 8px 24px;
232
-    min-width: 80px;
240
+    // height: @default-btn-height;
241
+    // line-height: @default-btn-height;
242
+    // padding: 0 8px 24px;
243
+    // min-width: 80px;
233 244
     font-size: 14px;
234 245
   }
235 246
   &.ghost {