瀏覽代碼

任务类型列表代码优化

seimin 1 年之前
父節點
當前提交
d25942accc

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

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