Browse Source

检查页面控制增加开关

seimin 1 year ago
parent
commit
10f1aa2e27

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

@@ -65,6 +65,44 @@
65
             </nz-option>
65
             </nz-option>
66
           </nz-select>
66
           </nz-select>
67
         </div>
67
         </div>
68
+        <!-- 是否起点签到成功展示患者其他服务 -->
69
+        <div class="display_flex align-items_center mb8">
70
+          <nz-form-label class="label">是否起点签到成功展示患者其他服务</nz-form-label>
71
+          <nz-checkbox-group [(ngModel)]="startShowAnotherService"></nz-checkbox-group>
72
+        </div>
73
+        <!-- 是否终点签到成功展示患者其他服务 -->
74
+        <div class="display_flex align-items_center mb8">
75
+          <nz-form-label class="label">是否终点签到成功展示患者其他服务</nz-form-label>
76
+          <nz-checkbox-group [(ngModel)]="endShowAnotherService"></nz-checkbox-group>
77
+        </div>
78
+        <!-- 是否允许交接工单 -->
79
+        <div class="display_flex align-items_center mb8">
80
+          <nz-form-label class="label">是否允许交接工单</nz-form-label>
81
+          <nz-checkbox-group [(ngModel)]="handoverOrder"></nz-checkbox-group>
82
+        </div>
83
+        <!-- 是否开启结束服务 -->
84
+        <div class="display_flex align-items_center mb8">
85
+          <nz-form-label class="label">是否开启结束服务</nz-form-label>
86
+          <nz-checkbox-group [(ngModel)]="finishService"></nz-checkbox-group>
87
+        </div>
88
+        <!-- 是否允许追加服务 -->
89
+        <div class="display_flex align-items_center mb8">
90
+          <nz-form-label class="label">是否允许追加服务</nz-form-label>
91
+          <nz-checkbox-group [(ngModel)]="addService" (ngModelChange)="changeAddService($event)"></nz-checkbox-group>
92
+        </div>
93
+        <!-- 追加服务任务类型 -->
94
+        <div class="display_flex align-items_center mb8" *ngIf="addService[0].checked">
95
+          <nz-form-label class="label" nzRequired>追加服务任务类型</nz-form-label>
96
+          <nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
97
+            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择追加服务任务类型" [(ngModel)]="addServiceTaskIds">
98
+            <ng-container *ngFor="let option of taskTypes">
99
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
100
+            </ng-container>
101
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
102
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
103
+            </nz-option>
104
+          </nz-select>
105
+        </div>
68
 
106
 
69
         <!-- 自动关单 -->
107
         <!-- 自动关单 -->
70
         <!-- <div class="display_flex align-items_center mb8">
108
         <!-- <div class="display_flex align-items_center mb8">

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

@@ -2,6 +2,8 @@ import { Component, OnInit } from "@angular/core";
2
 import { MainService } from 'src/app/services/main.service';
2
 import { MainService } from 'src/app/services/main.service';
3
 import { ToolService } from 'src/app/services/tool.service';
3
 import { ToolService } from 'src/app/services/tool.service';
4
 import { NzMessageService } from 'ng-zorro-antd';
4
 import { NzMessageService } from 'ng-zorro-antd';
5
+import { Subject } from 'rxjs';
6
+import { debounceTime } from 'rxjs/operators';
5
 
7
 
6
 @Component({
8
 @Component({
7
   selector: "app-inspect-and-patient-transport-config",
9
   selector: "app-inspect-and-patient-transport-config",
@@ -27,6 +29,29 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
27
   queuingInformation:any[] = [
29
   queuingInformation:any[] = [
28
     {label:'是否开启',value: 0}
30
     {label:'是否开启',value: 0}
29
   ];
31
   ];
32
+
33
+  // 是否起点签到成功展示患者其他服务
34
+  startShowAnotherService:any[] = [
35
+    {label:'是否开启',value: 0}
36
+  ];
37
+  // 是否终点签到成功展示患者其他服务
38
+  endShowAnotherService:any[] = [
39
+    {label:'是否开启',value: 0}
40
+  ];
41
+  // 是否允许交接工单
42
+  handoverOrder:any[] = [
43
+    {label:'是否开启',value: 0}
44
+  ];
45
+  // 是否开启结束服务
46
+  finishService:any[] = [
47
+    {label:'是否开启',value: 0}
48
+  ];
49
+  // 是否允许追加服务
50
+  addService:any[] = [
51
+    {label:'是否开启',value: 0}
52
+  ];
53
+
54
+
30
   timeMod:any;
55
   timeMod:any;
31
   // 交接方式
56
   // 交接方式
32
   // handoverMode:any;
57
   // handoverMode:any;
@@ -55,10 +80,17 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
55
   configs:any = {};
80
   configs:any = {};
56
   // 任务类型
81
   // 任务类型
57
   tasktype:any = {};
82
   tasktype:any = {};
83
+  searchTimerSubject = new Subject();
58
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
84
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
59
 
85
 
60
   ngOnInit():void {
86
   ngOnInit():void {
61
     // todo
87
     // todo
88
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
89
+      let fun = v[0];
90
+      fun.call(this, v[1]);
91
+    });
92
+    this.getTaskTypes();
93
+    // todo
62
     // this.getHandoverModes();
94
     // this.getHandoverModes();
63
     // this.getCheckModes();
95
     // this.getCheckModes();
64
     this.getCheckInModes();
96
     this.getCheckInModes();
@@ -79,6 +111,51 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
79
       this.timeMod = null;
111
       this.timeMod = null;
80
     }
112
     }
81
   }
113
   }
114
+  // 修改是否允许追加服务
115
+  changeAddService(e){
116
+    console.log(e);
117
+    if(!e[0].checked){
118
+      this.addServiceTaskIds = [];
119
+    }
120
+  }
121
+  // 用户输入搜索
122
+  isLoading: boolean = false;
123
+  addServiceTaskIds:any[] = [];
124
+  taskTypes:any[] = [];
125
+  changeTasktype(e) {
126
+    this.searchTimer(this.getTaskTypes, e);
127
+  }
128
+  // 边输入边搜索节流阀
129
+  searchTimer(fun, e) {
130
+    this.isLoading = true;
131
+    this.searchTimerSubject.next([fun, e]);
132
+  }
133
+  //获取患者其他服务任务类型
134
+  getTaskTypes(e:string = '') {
135
+    let postData:any = {
136
+      idx: 0,
137
+      sum: 9999,
138
+      taskType: {
139
+        taskName: e,
140
+        simpleQuery: true,
141
+        hosId: {
142
+          id: this.hosId
143
+        },
144
+        associationType: {
145
+          key: 'association_types',
146
+          value: 'patientTransport'
147
+        }
148
+      }
149
+    };
150
+    this.isLoading = true;
151
+    this.mainService.getFetchDataList("simple/data", "taskType", postData)
152
+      .subscribe((result) => {
153
+        this.isLoading = false;
154
+        if (result.status == 200) {
155
+          this.taskTypes = result.list || [];
156
+        }
157
+      });
158
+  }
82
   //获取积分计算方式
159
   //获取积分计算方式
83
   integralCalculationMethods:any = [];
160
   integralCalculationMethods:any = [];
84
   dLoading = false;
161
   dLoading = false;
@@ -117,6 +194,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
117
       this.msg.create("warning", "请选择精确时间模式!");
194
       this.msg.create("warning", "请选择精确时间模式!");
118
       return;
195
       return;
119
     }
196
     }
197
+    if(this.addService[0].checked && !this.addServiceTaskIds.length){
198
+      this.msg.create("warning", "请选择追加服务任务类型!");
199
+      return;
200
+    }
120
     // if(!this.handoverMode){
201
     // if(!this.handoverMode){
121
     //   this.msg.create("warning", "请选择交接方式!");
202
     //   this.msg.create("warning", "请选择交接方式!");
122
     //   return;
203
     //   return;
@@ -135,6 +216,15 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
135
       integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
216
       integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
136
       accurateTimeFilling: this.accurateTimeFilling[0].checked ? 1 : 0,
217
       accurateTimeFilling: this.accurateTimeFilling[0].checked ? 1 : 0,
137
       queuingInformation: this.queuingInformation[0].checked ? 1 : 0,
218
       queuingInformation: this.queuingInformation[0].checked ? 1 : 0,
219
+
220
+      startShowAnotherService: this.startShowAnotherService[0].checked ? 1 : 0,
221
+      endShowAnotherService: this.endShowAnotherService[0].checked ? 1 : 0,
222
+      handoverOrder: this.handoverOrder[0].checked ? 1 : 0,
223
+      finishService: this.finishService[0].checked ? 1 : 0,
224
+      addService: this.addService[0].checked ? 1 : 0,
225
+      addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
226
+
227
+
138
       timeMod: this.timeMod || undefined,
228
       timeMod: this.timeMod || undefined,
139
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
229
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
140
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
230
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
@@ -246,6 +336,13 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
246
           this.timeMod = this.configs.timeMod || null;
336
           this.timeMod = this.configs.timeMod || null;
247
           this.queuingInformation[0].checked = this.configs.queuingInformation == 1;
337
           this.queuingInformation[0].checked = this.configs.queuingInformation == 1;
248
 
338
 
339
+          this.startShowAnotherService[0].checked = this.configs.startShowAnotherService == 1;
340
+          this.endShowAnotherService[0].checked = this.configs.endShowAnotherService == 1;
341
+          this.handoverOrder[0].checked = this.configs.handoverOrder == 1;
342
+          this.finishService[0].checked = this.configs.finishService == 1;
343
+          this.addService[0].checked = this.configs.addService == 1;
344
+          this.addServiceTaskIds = this.configs.addServiceTaskIds ? this.configs.addServiceTaskIds.split(',').map(v => +v) : [];
345
+
249
 
346
 
250
           // if(this.configs.closeTypeIds){
347
           // if(this.configs.closeTypeIds){
251
           //   let ids = this.configs.closeTypeIds.split(',');
348
           //   let ids = this.configs.closeTypeIds.split(',');

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8
   enableProdMode();
8
   enableProdMode();
9
   if (window) {
9
   if (window) {
10
     window.console.log = function () { };
10
     window.console.log = function () { };
11
-    console.info('v2.4.56');
11
+    console.info('v2.4.57');
12
   }
12
   }
13
 }
13
 }
14
 platformBrowserDynamic().bootstrapModule(AppModule)
14
 platformBrowserDynamic().bootstrapModule(AppModule)