Browse Source

任务类型列表代码优化

seimin 1 year ago
parent
commit
d25942accc

+ 16 - 24
src/app/views/task-type-management/task-type-management.component.html

@@ -56,15 +56,15 @@
56
           (ngModelChange)="asso(association)" [nzDisabled]="!add">
56
           (ngModelChange)="asso(association)" [nzDisabled]="!add">
57
           <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allAssociation"></nz-option>
57
           <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allAssociation"></nz-option>
58
         </nz-select>
58
         </nz-select>
59
-        <ng-container *ngIf="association.id == 20044">
59
+        <ng-container *ngIf="association.value == 'ordinary'">
60
           <nz-form-label class="label" nzRequired>关联业务</nz-form-label>
60
           <nz-form-label class="label" nzRequired>关联业务</nz-form-label>
61
           <!-- 关联业务禁止修改 -->
61
           <!-- 关联业务禁止修改 -->
62
           <nz-select class="mb8 w100" nzShowSearch nzAllowClear nzPlaceHolder="请选择关联业务" [(ngModel)]="relatedBusiness.id" [nzDisabled]="!add">
62
           <nz-select class="mb8 w100" nzShowSearch nzAllowClear nzPlaceHolder="请选择关联业务" [(ngModel)]="relatedBusiness.id" [nzDisabled]="!add">
63
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allRelatedBusiness"></nz-option>
63
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allRelatedBusiness"></nz-option>
64
           </nz-select>
64
           </nz-select>
65
         </ng-container>
65
         </ng-container>
66
-        <nz-form-label *ngIf="association['id'] == 256" class="label" nzRequired>空单默认科室</nz-form-label>
67
-        <nz-select *ngIf="association['id'] == 256" class="mb8 w100" [ngClass]="{remandTypeId:!defaultNullDeptId}"
66
+        <nz-form-label *ngIf="association.value == 'specimen'" class="label" nzRequired>空单默认科室</nz-form-label>
67
+        <nz-select *ngIf="association.value == 'specimen'" class="mb8 w100" [ngClass]="{remandTypeId:!defaultNullDeptId}"
68
           [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeSearchDeptList($event)"
68
           [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeSearchDeptList($event)"
69
           nzPlaceHolder="请选择空单默认科室" [(ngModel)]="defaultNullDeptId">
69
           nzPlaceHolder="请选择空单默认科室" [(ngModel)]="defaultNullDeptId">
70
           <ng-container *ngFor="let option of searchDeptList">
70
           <ng-container *ngFor="let option of searchDeptList">
@@ -88,7 +88,7 @@
88
             <label nz-radio nzValue='0'>否</label>
88
             <label nz-radio nzValue='0'>否</label>
89
           </nz-radio-group>
89
           </nz-radio-group>
90
         </div>
90
         </div>
91
-        <div class="mb8 w100" *ngIf="association['id'] == 255||association['id'] == 256||association['id'] == 259">
91
+        <div class="mb8 w100" *ngIf="association.value == 'patientTransport'||association.value == 'specimen'||association.value == 'other'">
92
           <nz-form-label class="label" nzRequired>调度台是否可以新建工单</nz-form-label>
92
           <nz-form-label class="label" nzRequired>调度台是否可以新建工单</nz-form-label>
93
           <nz-radio-group class="handlerType" [(ngModel)]="autoFlag">
93
           <nz-radio-group class="handlerType" [(ngModel)]="autoFlag">
94
             <label nz-radio nzValue='1'>是</label>
94
             <label nz-radio nzValue='1'>是</label>
@@ -96,7 +96,7 @@
96
           </nz-radio-group>
96
           </nz-radio-group>
97
         </div>
97
         </div>
98
         <!-- 患者其他服务 -->
98
         <!-- 患者其他服务 -->
99
-        <div class="mb8 w100" *ngIf="association['id'] == 255">
99
+        <div class="mb8 w100" *ngIf="association.value == 'patientTransport'">
100
           <nz-form-label class="label" nzRequired>护士端是否允许预约建单</nz-form-label>
100
           <nz-form-label class="label" nzRequired>护士端是否允许预约建单</nz-form-label>
101
           <nz-radio-group class="handlerType" [(ngModel)]="appointmentBuildFlagZy">
101
           <nz-radio-group class="handlerType" [(ngModel)]="appointmentBuildFlagZy">
102
             <label nz-radio nzValue='1'>是</label>
102
             <label nz-radio nzValue='1'>是</label>
@@ -104,7 +104,7 @@
104
           </nz-radio-group>
104
           </nz-radio-group>
105
         </div>
105
         </div>
106
         <!-- 患者陪检业务 -->
106
         <!-- 患者陪检业务 -->
107
-        <div class="mb8 w100" *ngIf="association['id'] == 260">
107
+        <div class="mb8 w100" *ngIf="association.value == 'inspect'">
108
           <nz-form-label class="label" nzRequired>护士端是否允许预约建单</nz-form-label>
108
           <nz-form-label class="label" nzRequired>护士端是否允许预约建单</nz-form-label>
109
           <nz-radio-group class="handlerType" [(ngModel)]="appointmentBuildFlag"
109
           <nz-radio-group class="handlerType" [(ngModel)]="appointmentBuildFlag"
110
             (ngModelChange)="appointmentBuildClick()">
110
             (ngModelChange)="appointmentBuildClick()">
@@ -122,22 +122,14 @@
122
             分钟
122
             分钟
123
           </span>
123
           </span>
124
         </div>
124
         </div>
125
-        <div class="mb8 w100" *ngIf="association['id'] == 260">
125
+        <div class="mb8 w100" *ngIf="association.value == 'inspect'">
126
           <nz-form-label class="label" nzRequired>护士端是否能标记重点关注</nz-form-label>
126
           <nz-form-label class="label" nzRequired>护士端是否能标记重点关注</nz-form-label>
127
           <nz-radio-group class="handlerType" [(ngModel)]="followFlag">
127
           <nz-radio-group class="handlerType" [(ngModel)]="followFlag">
128
             <label nz-radio nzValue='1'>是</label>
128
             <label nz-radio nzValue='1'>是</label>
129
             <label nz-radio nzValue='0'>否</label>
129
             <label nz-radio nzValue='0'>否</label>
130
           </nz-radio-group>
130
           </nz-radio-group>
131
         </div>
131
         </div>
132
-        <!-- <div class="mb8 w100"
133
-          *ngIf="!(association['id'] == 255||association['id'] == 256||association['id'] == 257||association['id'] == 258||association['id'] == 259||association['id'] == 380)">
134
-          <nz-form-label class="label" nzRequired>支助中心是否能标记需要帮助</nz-form-label>
135
-          <nz-radio-group class="handlerType" [(ngModel)]="wechatFocusSwitch">
136
-            <label nz-radio nzValue='1'>是</label>
137
-            <label nz-radio nzValue='0'>否</label>
138
-          </nz-radio-group>
139
-        </div> -->
140
-        <div class="mb8 w100" *ngIf="association['id'] == 255 || association['id'] == 260 || association['id'] == 256 || association['id'] == 259">
132
+        <div class="mb8 w100" *ngIf="association.value == 'patientTransport' || association.value == 'inspect' || association.value == 'specimen' || association.value == 'other'">
141
           <nz-form-label class="label" nzRequired>是否需要备注信息</nz-form-label>
133
           <nz-form-label class="label" nzRequired>是否需要备注信息</nz-form-label>
142
           <nz-radio-group class="handlerType" [(ngModel)]="isRemarks" (ngModelChange)="isRemarksChange()">
134
           <nz-radio-group class="handlerType" [(ngModel)]="isRemarks" (ngModelChange)="isRemarksChange()">
143
             <label nz-radio nzValue='1'>是</label>
135
             <label nz-radio nzValue='1'>是</label>
@@ -160,7 +152,7 @@
160
             编辑
152
             编辑
161
           </button>
153
           </button>
162
         </div>
154
         </div>
163
-        <div class="mb8 w100" *ngIf="association['id'] == 255">
155
+        <div class="mb8 w100" *ngIf="association.value == 'patientTransport'">
164
           <nz-form-label class="label" nzRequired>是否开通自动送回</nz-form-label>
156
           <nz-form-label class="label" nzRequired>是否开通自动送回</nz-form-label>
165
           <nz-radio-group class="handlerType" [(ngModel)]="isRemand">
157
           <nz-radio-group class="handlerType" [(ngModel)]="isRemand">
166
             <label nz-radio nzValue='1'>是</label>
158
             <label nz-radio nzValue='1'>是</label>
@@ -188,21 +180,21 @@
188
             <label nz-radio nzValue='0'>否</label>
180
             <label nz-radio nzValue='0'>否</label>
189
           </nz-radio-group>
181
           </nz-radio-group>
190
         </div>
182
         </div>
191
-        <div class="mb8 w100" *ngIf="association['id'] == 255||association['id'] == 260">
183
+        <div class="mb8 w100" *ngIf="association.value == 'patientTransport' || association.value == 'inspect'">
192
           <nz-form-label class="label" nzRequired>是否需要医护陪同检查</nz-form-label>
184
           <nz-form-label class="label" nzRequired>是否需要医护陪同检查</nz-form-label>
193
           <nz-radio-group class="handlerType" [(ngModel)]="isAccompany">
185
           <nz-radio-group class="handlerType" [(ngModel)]="isAccompany">
194
             <label nz-radio nzValue='1'>是</label>
186
             <label nz-radio nzValue='1'>是</label>
195
             <label nz-radio nzValue='0'>否</label>
187
             <label nz-radio nzValue='0'>否</label>
196
           </nz-radio-group>
188
           </nz-radio-group>
197
         </div>
189
         </div>
198
-        <div class="mb8 w100" *ngIf="association['id'] == 260">
190
+        <div class="mb8 w100" *ngIf="association.value == 'inspect'">
199
           <nz-form-label class="label" nzRequired>是否半陪检</nz-form-label>
191
           <nz-form-label class="label" nzRequired>是否半陪检</nz-form-label>
200
           <nz-radio-group class="handlerType" [ngModel]="isHalfInspect" (ngModelChange)="isHalfInspectChange($event)">
192
           <nz-radio-group class="handlerType" [ngModel]="isHalfInspect" (ngModelChange)="isHalfInspectChange($event)">
201
             <label nz-radio nzValue='1'>是</label>
193
             <label nz-radio nzValue='1'>是</label>
202
             <label nz-radio nzValue='0'>否</label>
194
             <label nz-radio nzValue='0'>否</label>
203
           </nz-radio-group>
195
           </nz-radio-group>
204
         </div>
196
         </div>
205
-        <div class="mb8 w100" *ngIf="association['id'] == 260">
197
+        <div class="mb8 w100" *ngIf="association.value == 'inspect'">
206
           <nz-form-label class="label" nzRequired>关联检查是否允许多个科室</nz-form-label>
198
           <nz-form-label class="label" nzRequired>关联检查是否允许多个科室</nz-form-label>
207
           <nz-radio-group class="handlerType" [ngModel]="isMoreDept" (ngModelChange)="isMoreDeptChange($event)">
199
           <nz-radio-group class="handlerType" [ngModel]="isMoreDept" (ngModelChange)="isMoreDeptChange($event)">
208
             <label nz-radio nzValue='1'>是</label>
200
             <label nz-radio nzValue='1'>是</label>
@@ -217,7 +209,7 @@
217
             <label nz-radio nzValue='0'>不可重复建单</label>
209
             <label nz-radio nzValue='0'>不可重复建单</label>
218
           </nz-radio-group>
210
           </nz-radio-group>
219
         </div>
211
         </div>
220
-        <div class="mb8 w100" *ngIf="association['id'] == 257">
212
+        <div class="mb8 w100" *ngIf="association.value == 'drugsBag'">
221
           <nz-form-label class="label" nzRequired>药品自动建单</nz-form-label>
213
           <nz-form-label class="label" nzRequired>药品自动建单</nz-form-label>
222
           <nz-radio-group class="handlerType" [(ngModel)]="isDrugsCreateTime">
214
           <nz-radio-group class="handlerType" [(ngModel)]="isDrugsCreateTime">
223
             <label nz-radio nzValue='0'>不建单</label>
215
             <label nz-radio nzValue='0'>不建单</label>
@@ -226,21 +218,21 @@
226
             <label nz-radio nzValue='384'>审核可自动建单</label>
218
             <label nz-radio nzValue='384'>审核可自动建单</label>
227
           </nz-radio-group>
219
           </nz-radio-group>
228
         </div>
220
         </div>
229
-        <div class="mb8 w100" *ngIf="association['id'] == 257">
221
+        <div class="mb8 w100" *ngIf="association.value == 'drugsBag'">
230
           <nz-form-label class="label" nzRequired>是否允许一键签收</nz-form-label>
222
           <nz-form-label class="label" nzRequired>是否允许一键签收</nz-form-label>
231
           <nz-radio-group class="handlerType" [(ngModel)]="isOneClickSignIn">
223
           <nz-radio-group class="handlerType" [(ngModel)]="isOneClickSignIn">
232
             <label nz-radio nzValue='1'>是</label>
224
             <label nz-radio nzValue='1'>是</label>
233
             <label nz-radio nzValue='0'>否</label>
225
             <label nz-radio nzValue='0'>否</label>
234
           </nz-radio-group>
226
           </nz-radio-group>
235
         </div>
227
         </div>
236
-        <div class="mb8 w100" *ngIf="association['id'] == 380">
228
+        <div class="mb8 w100" *ngIf="association.value == 'specimenPlan'">
237
           <nz-form-label class="label" nzRequired>是否允许数字交接</nz-form-label>
229
           <nz-form-label class="label" nzRequired>是否允许数字交接</nz-form-label>
238
           <nz-radio-group class="handlerType" [(ngModel)]="isDigitalHandover">
230
           <nz-radio-group class="handlerType" [(ngModel)]="isDigitalHandover">
239
             <label nz-radio nzValue='1'>是</label>
231
             <label nz-radio nzValue='1'>是</label>
240
             <label nz-radio nzValue='0'>否</label>
232
             <label nz-radio nzValue='0'>否</label>
241
           </nz-radio-group>
233
           </nz-radio-group>
242
         </div>
234
         </div>
243
-        <div nz-row *ngIf='association.id == 260 || association.id == 255'>
235
+        <div nz-row *ngIf="association.value == 'inspect' || association.value == 'patientTransport'">
244
           <nz-form-label class="label">携带设备</nz-form-label>
236
           <nz-form-label class="label">携带设备</nz-form-label>
245
           <nz-checkbox-group class="handlerType" [nzDisabled]="isRemarks == 1" [(ngModel)]="carryEquipmentIds"></nz-checkbox-group>
237
           <nz-checkbox-group class="handlerType" [nzDisabled]="isRemarks == 1" [(ngModel)]="carryEquipmentIds"></nz-checkbox-group>
246
         </div>
238
         </div>

+ 3 - 3
src/app/views/task-type-management/task-type-management.component.ts

@@ -883,7 +883,7 @@ export class TaskTypeManagementComponent implements OnInit {
883
     //空单默认科室必选
883
     //空单默认科室必选
884
     if (
884
     if (
885
       (this.isRemand == "1" && !this.remandTypeId) ||
885
       (this.isRemand == "1" && !this.remandTypeId) ||
886
-      (this.association.id == 256 && !this.defaultNullDeptId)
886
+      (this.association.value == 'specimen' && !this.defaultNullDeptId)
887
     ) {
887
     ) {
888
       return;
888
       return;
889
     }
889
     }
@@ -1005,7 +1005,7 @@ export class TaskTypeManagementComponent implements OnInit {
1005
       let arr = this.remandTypeId.split("__");
1005
       let arr = this.remandTypeId.split("__");
1006
       this.taskData.taskType["remandTypeId"] = { id: arr[0], taskName: arr[1] };
1006
       this.taskData.taskType["remandTypeId"] = { id: arr[0], taskName: arr[1] };
1007
     }
1007
     }
1008
-    if (this.association.id == 256) {
1008
+    if (this.association.value == 'specimen') {
1009
       let arr = this.defaultNullDeptId.split("__");
1009
       let arr = this.defaultNullDeptId.split("__");
1010
       this.taskData.taskType["defaultNullDeptId"] = {
1010
       this.taskData.taskType["defaultNullDeptId"] = {
1011
         id: arr[0],
1011
         id: arr[0],
@@ -1013,7 +1013,7 @@ export class TaskTypeManagementComponent implements OnInit {
1013
       };
1013
       };
1014
     }
1014
     }
1015
     // 万能交接服务
1015
     // 万能交接服务
1016
-    if (this.association.id == 20044) {
1016
+    if (this.association.value == 'ordinary') {
1017
       console.log(this.relatedBusiness, this.allRelatedBusiness);
1017
       console.log(this.relatedBusiness, this.allRelatedBusiness);
1018
       if(this.relatedBusiness.id){
1018
       if(this.relatedBusiness.id){
1019
         let relatedBusiness = this.allRelatedBusiness.find(v => v.id == this.relatedBusiness.id);
1019
         let relatedBusiness = this.allRelatedBusiness.find(v => v.id == this.relatedBusiness.id);