Browse Source

多人模式支持

seimin 2 years ago
parent
commit
b735b09e34

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

@@ -30,6 +30,24 @@
30 30
           <nz-form-label class="label">签到方式</nz-form-label>
31 31
           <nz-checkbox-group class="w320px" [(ngModel)]="checkInModes"></nz-checkbox-group>
32 32
         </div>
33
+        <!-- 多人模式支持 -->
34
+        <div class="display_flex align-items_center mb8">
35
+          <nz-form-label class="label">多人模式支持</nz-form-label>
36
+          <nz-checkbox-group [(ngModel)]="multiplayerMode" (ngModelChange)="changeMultiplayerMode($event)"></nz-checkbox-group>
37
+        </div>
38
+        <!-- 积分计算方式 -->
39
+        <div class="display_flex align-items_center mb8" *ngIf="multiplayerMode[0].checked">
40
+          <nz-form-label class="label">积分计算方式</nz-form-label>
41
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="integralCalculationMethod">
42
+            <ng-container *ngFor="let data of integralCalculationMethods">
43
+              <nz-option *ngIf="!dLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
44
+            </ng-container>
45
+            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
46
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
47
+            </nz-option>
48
+          </nz-select>
49
+        </div>
50
+
33 51
         <!-- 自动关单 -->
34 52
         <!-- <div class="display_flex align-items_center mb8">
35 53
           <nz-form-label class="label">自动关单</nz-form-label>

+ 36 - 1
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -20,6 +20,12 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
20 20
   // checkModes:any[] = [];
21 21
   // 签到方式
22 22
   checkInModes:any[] = [];
23
+  // 多人模式支持
24
+  multiplayerMode:any[] = [
25
+    {label:'是否开启',value: 0}
26
+  ];
27
+  // 积分计算方式
28
+  integralCalculationMethod:any = null;
23 29
   // 自动关单
24 30
   // automaticCustomsOrders:any[] = [];
25 31
   // 自动建单
@@ -43,6 +49,26 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
43 49
     this.getCheckInModes();
44 50
   }
45 51
 
52
+  // 修改是否多人模式支持
53
+  changeMultiplayerMode(e){
54
+    console.log(e);
55
+    if(!e[0].checked){
56
+      this.integralCalculationMethod = null;
57
+    }
58
+  }
59
+  //获取积分计算方式
60
+  integralCalculationMethods:any = [];
61
+  dLoading = false;
62
+  getIntegralCalculationMethod() {
63
+    this.dLoading = true;
64
+    this.mainService
65
+      .getDictionary("list", "integral_calculation_method")
66
+      .subscribe((data) => {
67
+        this.dLoading = false;
68
+        this.integralCalculationMethods = data;
69
+        this.getTaskType();
70
+      });
71
+  }
46 72
   // 切换tab
47 73
   tabModal(tabModalName:string){
48 74
     this.tabModalName = tabModalName;
@@ -60,6 +86,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
60 86
       this.msg.create("warning", "请先配置患者陪检任务类型!");
61 87
       return;
62 88
     }
89
+    if(this.multiplayerMode[0].checked && !this.integralCalculationMethod){
90
+      this.msg.create("warning", "请选择积分计算方式!");
91
+      return;
92
+    }
63 93
     // if(!this.handoverMode){
64 94
     //   this.msg.create("warning", "请选择交接方式!");
65 95
     //   return;
@@ -74,6 +104,8 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
74 104
       id: this.configs.id,
75 105
       taskType: this.tasktype.id,
76 106
       hosId: this.hosId,
107
+      multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,
108
+      integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
77 109
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
78 110
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
79 111
       // handoverType: {id: this.handoverMode},
@@ -111,7 +143,8 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
111 143
     this.mainService.getDictionary("list", "inspect_config_sign_type").subscribe((data) => {
112 144
       this.checkInModes = data.map(v => ({label:v.name, value: v.id}));
113 145
       // this.getAutomaticCustomsOrders();
114
-      this.getTaskType();
146
+      // this.getTaskType();
147
+      this.getIntegralCalculationMethod();
115 148
     });
116 149
   }
117 150
   //获取自动关单
@@ -177,6 +210,8 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
177 210
             let ids = this.configs.signTypeIds.split(',');
178 211
             this.checkInModes = this.checkInModes.map(v => ({...v, checked: ids.includes(v.value.toString())}));
179 212
           }
213
+          this.multiplayerMode[0].checked = this.configs.multiplayerMode == 1;
214
+          this.integralCalculationMethod = this.configs.integralCalculationMethod;
180 215
 
181 216
           // if(this.configs.closeTypeIds){
182 217
           //   let ids = this.configs.closeTypeIds.split(',');

+ 1 - 1
src/main.ts

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