Bladeren bron

优化级

seimin 8 maanden geleden
bovenliggende
commit
096c49975d

+ 37 - 5
src/app/components/configurationCenter/configuration-priority/configuration-priority.component.html

@@ -12,11 +12,13 @@
12 12
             [nzLoading]="loading1" [nzScroll]="{ y: tablePriorityHeight + 'px' }">
13 13
             <thead>
14 14
               <tr class="thead">
15
-                <th nzWidth="20%">优先级名称</th>
16
-                <th nzWidth="20%">排序</th>
17
-                <th nzWidth="20%">响应时间(分钟)</th>
18
-                <th nzWidth="20%">解决时间(分钟)</th>
19
-                <th nzWidth="20%">操作</th>
15
+                <th nzWidth="14%">优先级名称</th>
16
+                <th nzWidth="14%">排序</th>
17
+                <th nzWidth="14%">响应时间(分钟)</th>
18
+                <th nzWidth="14%">解决时间(分钟)</th>
19
+                <th nzWidth="14%">节假日班次</th>
20
+                <th nzWidth="14%">工作日班次</th>
21
+                <th nzWidth="16%">操作</th>
20 22
               </tr>
21 23
             </thead>
22 24
             <tbody>
@@ -25,6 +27,8 @@
25 27
                 <td>{{data.orders}}</td>
26 28
                 <td>{{data.responseTime}}</td>
27 29
                 <td>{{data.handleTime}}</td>
30
+                <td>{{data.holidayClassDTO?.name}}</td>
31
+                <td>{{data.workdayClassDTO?.name}}</td>
28 32
                 <td>
29 33
                   <div class="coop">
30 34
                     <span (click)="showDelModal(data,'您确认要删除吗?','删除','delPriority')">删除</span>
@@ -87,6 +91,34 @@
87 91
             </nz-input-group>
88 92
           </nz-form-control>
89 93
         </nz-form-item>
94
+        <nz-form-item>
95
+          <nz-form-label [nzSpan]="6" nzFor="holidayClassId">&nbsp;&nbsp;节假日班次</nz-form-label>
96
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择节假日班次!">
97
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="holidayClassId"
98
+              nzPlaceHolder="请选择节假日班次" nzServerSearch>
99
+              <ng-container *ngFor="let data of classList1">
100
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
101
+              </ng-container>
102
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
103
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
104
+              </nz-option>
105
+            </nz-select>
106
+          </nz-form-control>
107
+        </nz-form-item>
108
+        <nz-form-item>
109
+          <nz-form-label [nzSpan]="6" nzFor="workdayClassId">&nbsp;&nbsp;工作日班次</nz-form-label>
110
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择工作日班次!">
111
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="workdayClassId"
112
+              nzPlaceHolder="请选择工作日班次" nzServerSearch>
113
+              <ng-container *ngFor="let data of classList2">
114
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
115
+              </ng-container>
116
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
117
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
118
+              </nz-option>
119
+            </nz-select>
120
+          </nz-form-control>
121
+        </nz-form-item>
90 122
       </form>
91 123
     </div>
92 124
     <div class=" display_flex justify-content_flex-center">

+ 34 - 0
src/app/components/configurationCenter/configuration-priority/configuration-priority.component.ts

@@ -22,16 +22,20 @@ export class ConfigurationPriorityComponent implements OnInit {
22 22
   ) {}
23 23
 
24 24
   coopData: any = {}; //当前操作列
25
+  currentHospital; //当前院区
25 26
 
26 27
   formatterMinute = (value: number) => `${value} 分钟`;
27 28
   parserMinute = (value: string) => value.replace(' 分钟', '');
28 29
 
29 30
   ngOnInit() {
31
+    this.currentHospital = this.tool.getCurrentHospital();
30 32
     // 优先级
31 33
     setTimeout(() => {
32 34
       this.tablePriorityHeight = document.querySelector('#priorityTable').clientHeight - document.querySelector('#priorityTable .list-template__top').clientHeight - 8 - document.querySelector('#priorityTable .thead').clientHeight;
33 35
     }, 0)
34 36
     this.getPriorityList();
37
+    this.getClassList(1);
38
+    this.getClassList(2);
35 39
   }
36 40
 
37 41
   // 新增优先级弹框
@@ -61,6 +65,8 @@ export class ConfigurationPriorityComponent implements OnInit {
61 65
     this.validatePriorityForm.controls.orders.setValue(data.orders);
62 66
     this.validatePriorityForm.controls.responseTime.setValue(data.responseTime);
63 67
     this.validatePriorityForm.controls.handleTime.setValue(data.handleTime);
68
+    this.validatePriorityForm.controls.holidayClassId.setValue(data.holidayClassId);
69
+    this.validatePriorityForm.controls.workdayClassId.setValue(data.workdayClassId);
64 70
   }
65 71
 
66 72
   // 新增/编辑表单提交
@@ -85,6 +91,8 @@ export class ConfigurationPriorityComponent implements OnInit {
85 91
           orders: this.validatePriorityForm.value.orders,
86 92
           responseTime: this.validatePriorityForm.value.responseTime,
87 93
           handleTime: this.validatePriorityForm.value.handleTime,
94
+          holidayClassId: this.validatePriorityForm.value.holidayClassId,
95
+          workdayClassId: this.validatePriorityForm.value.workdayClassId,
88 96
         // }
89 97
       };
90 98
     } else {
@@ -97,6 +105,8 @@ export class ConfigurationPriorityComponent implements OnInit {
97 105
             orders: this.validatePriorityForm.value.orders,
98 106
             responseTime: this.validatePriorityForm.value.responseTime,
99 107
             handleTime: this.validatePriorityForm.value.handleTime,
108
+            holidayClassId: this.validatePriorityForm.value.holidayClassId,
109
+            workdayClassId: this.validatePriorityForm.value.workdayClassId,
100 110
           }
101 111
         // }
102 112
       };
@@ -128,6 +138,8 @@ export class ConfigurationPriorityComponent implements OnInit {
128 138
       orders: [null, [Validators.required]],//排序号
129 139
       responseTime: [0, [Validators.required]],//响应时间
130 140
       handleTime: [0, [Validators.required]],//解决时间
141
+      holidayClassId: [null],//节假日班次
142
+      workdayClassId: [null],//工作日班次
131 143
     });
132 144
     console.log(this.validatePriorityForm.controls)
133 145
   }
@@ -155,6 +167,28 @@ export class ConfigurationPriorityComponent implements OnInit {
155 167
       });
156 168
   }
157 169
 
170
+  // 获取班次
171
+  isLoading:boolean = false;
172
+  classList1: any = [];
173
+  classList2: any = [];
174
+  // type: 1工作日,2节假日
175
+  getClassList(type:number) {
176
+    let postData = {
177
+      idx: 0,
178
+      sum: 9999,
179
+      scheduleClass: {
180
+        hospital: { id: this.currentHospital.id },
181
+        type,
182
+      },
183
+    };
184
+    this.mainService
185
+      .getFetchDataList("simple/data", "scheduleClass", postData)
186
+      .subscribe((data) => {
187
+        this.isLoading = false;
188
+        this['classList' + type] = data.list || [];
189
+      });
190
+  }
191
+
158 192
   delModal: boolean = false; //删除模态框
159 193
   tipsMsg1: string; //提示框信息
160 194
   tipsMsg2: string; //操作后信息