Sfoglia il codice sorgente

临床其他服务控制页面增加执行方式

seimin 1 anno fa
parent
commit
7c1ae3557d

+ 12 - 0
src/app/views/other-page-control/other-page-control.component.html

@@ -28,6 +28,18 @@
28 28
             </nz-option>
29 29
           </nz-select>
30 30
         </div>
31
+        <!-- 执行方式 -->
32
+        <div class="display_flex align-items_center mb8" *ngIf="clinicalMultiplayerMode[0].checked">
33
+          <nz-form-label class="label" nzRequired>执行方式</nz-form-label>
34
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="clinicalExecutionMethod">
35
+            <ng-container *ngFor="let data of clinicalExecutionMethods">
36
+              <nz-option *ngIf="!dLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
37
+            </ng-container>
38
+            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
39
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
40
+            </nz-option>
41
+          </nz-select>
42
+        </div>
31 43
         <!-- 关联任务类型 -->
32 44
         <div class="display_flex align-items_center mb8" *ngIf="clinicalMultiplayerMode[0].checked">
33 45
           <nz-form-label class="label" nzRequired>关联任务类型</nz-form-label>

+ 21 - 0
src/app/views/other-page-control/other-page-control.component.ts

@@ -26,6 +26,8 @@ export class OtherPageControlComponent implements OnInit {
26 26
   ];
27 27
   // 积分计算方式
28 28
   clinicalIntegralCalculationMethod:any = null;
29
+  // 执行方式
30
+  clinicalExecutionMethod:any = null;
29 31
   // 配置
30 32
   configs:any = {};
31 33
   searchTimerSubject = new Subject();
@@ -46,6 +48,7 @@ export class OtherPageControlComponent implements OnInit {
46 48
     console.log(e);
47 49
     if(!e[0].checked){
48 50
       this.clinicalIntegralCalculationMethod = null;
51
+      this.clinicalExecutionMethod = null;
49 52
       this.clinicalTaskIds = [];
50 53
       this.showAppendUser[0].checked = 0;
51 54
     }
@@ -114,6 +117,18 @@ export class OtherPageControlComponent implements OnInit {
114 117
       .subscribe((data) => {
115 118
         this.dLoading = false;
116 119
         this.clinicalIntegralCalculationMethods = data;
120
+        this.getClinicalExecutionMethod();
121
+      });
122
+  }
123
+  //获取执行方式
124
+  clinicalExecutionMethods:any = [];
125
+  getClinicalExecutionMethod() {
126
+    this.dLoading = true;
127
+    this.otherPageControlService
128
+      .getDictionary("clinical_execution_method")
129
+      .subscribe((data) => {
130
+        this.dLoading = false;
131
+        this.clinicalExecutionMethods = data;
117 132
         this.getConfig();
118 133
       });
119 134
   }
@@ -132,6 +147,10 @@ export class OtherPageControlComponent implements OnInit {
132 147
       this.msg.create("warning", "请选择积分计算方式!");
133 148
       return;
134 149
     }
150
+    if(this.clinicalMultiplayerMode[0].checked && !this.clinicalExecutionMethod){
151
+      this.msg.create("warning", "请选择执行方式!");
152
+      return;
153
+    }
135 154
     if(this.clinicalMultiplayerMode[0].checked && !this.clinicalTaskIds.length){
136 155
       this.msg.create("warning", "请选择关联任务类型!");
137 156
       return;
@@ -147,6 +166,7 @@ export class OtherPageControlComponent implements OnInit {
147 166
       hosId: this.hosId,
148 167
       clinicalMultiplayerMode: this.clinicalMultiplayerMode[0].checked ? 1 : 0,
149 168
       clinicalIntegralCalculationMethod: this.clinicalMultiplayerMode[0].checked ? this.clinicalIntegralCalculationMethod : undefined,
169
+      clinicalExecutionMethod: this.clinicalMultiplayerMode[0].checked ? this.clinicalExecutionMethod : undefined,
150 170
       showAppendUser: this.showAppendUser[0].checked ? 1 : 0,
151 171
     };
152 172
     this.btnLoading = true;
@@ -180,6 +200,7 @@ export class OtherPageControlComponent implements OnInit {
180 200
           this.clinicalMultiplayerMode[0].checked = this.configs.clinicalMultiplayerMode == 1;
181 201
           this.showAppendUser[0].checked = this.configs.showAppendUser == 1;
182 202
           this.clinicalIntegralCalculationMethod = this.configs.clinicalIntegralCalculationMethod;
203
+          this.clinicalExecutionMethod = this.configs.clinicalExecutionMethod;
183 204
           this.clinicalTaskIds = this.configs.clinicalTaskIds ? this.configs.clinicalTaskIds.split(',').map(v => +v) : [];
184 205
         }
185 206
       });