소스 검색

院区报修是否开启配置

seimin 2 년 전
부모
커밋
d99be72a0e

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.170",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 22 - 0
src/app/views/hospital-config/hospital-config.component.html

@@ -432,6 +432,28 @@
432 432
                 </nz-form-control>
433 433
               </ng-container>
434 434
             </ng-container>
435
+            <ng-container *ngSwitchCase="'hos_itsmIncident'">
436
+              <ng-container *ngIf="isHosItsmIncident">
437
+                <nz-form-label
438
+                  [nzSpan]="24"
439
+                  [nzFor]="config.key"
440
+                  class="label"
441
+                  [nzRequired]="config.required"
442
+                  >{{config.desc}}</nz-form-label
443
+                >
444
+                <nz-form-control
445
+                  [nzSpan]="24"
446
+                  [nzErrorTip]="'请选择!'"
447
+                >
448
+                  <nz-radio-group
449
+                    [formControlName]="config.key"
450
+                  >
451
+                    <label nz-radio nzValue="1">是</label>
452
+                    <label nz-radio nzValue="0">否</label>
453
+                  </nz-radio-group>
454
+                </nz-form-control>
455
+              </ng-container>
456
+            </ng-container>
435 457
             <ng-container *ngSwitchDefault>
436 458
               <nz-form-label
437 459
                 [nzSpan]="24"

+ 15 - 6
src/app/views/hospital-config/hospital-config.component.ts

@@ -20,6 +20,7 @@ import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
20 20
 })
21 21
 export class HospitalConfigComponent implements OnInit {
22 22
   saveLoading = false;
23
+  isHosItsmIncident = false;
23 24
   hosId;
24 25
   validateForm: FormGroup;
25 26
   isLoading: boolean = false;
@@ -39,7 +40,7 @@ export class HospitalConfigComponent implements OnInit {
39 40
   repairSpecimenStatusMinute = 0; //验证时间
40 41
   repairSpecimenStatusCheckDeptIds = []; //验证检验科范围
41 42
   allowNucleicAcidPrinting = "0"; //是否允许核酸打印
42
-  nucleicAcidPrintingTaskType = []; //核酸打印任务类型
43
+  nucleicAcidPrintingTaskType = null; //核酸打印任务类型
43 44
   formatterDollar = (value) => Number(value);
44 45
   constructor(
45 46
     private mainService: MainService,
@@ -143,7 +144,7 @@ export class HospitalConfigComponent implements OnInit {
143 144
         }
144 145
         if (config.key === "nucleicAcidPrintingTaskType") {
145 146
           this.validateForm.controls[config.key].setValue(
146
-            config.value ? config.value.split(",").map(Number) : []
147
+            config.value ? Number(config.value) : null
147 148
           );
148 149
         }
149 150
       });
@@ -169,6 +170,7 @@ export class HospitalConfigComponent implements OnInit {
169 170
       this.getClassesList(),
170 171
       this.getDeptList2(this.hosId),
171 172
       this.getTaskTypeList(),
173
+      this.getSysConfig(),
172 174
     ])
173 175
       .then((result) => {
174 176
         if (result[0].status == 200) {
@@ -197,12 +199,16 @@ export class HospitalConfigComponent implements OnInit {
197 199
         if (result[6].status == 200) {
198 200
           this.allTaskTypeList = result[6].list;
199 201
         }
202
+        if (result[7].status == 200) {
203
+          this.isHosItsmIncident = result[7].list.find(v => v.keyconfig == 'itsmIncident').valueconfig == 1;
204
+        }
200 205
         this.getHospitalConfigList(this.hosId).subscribe((res) => {
201 206
           if (res.status == 200) {
202 207
             this.hospitalConfigList = res.list;
203 208
             //创建表单
204 209
             let fbGroup = {};
205 210
             this.hospitalConfigList.forEach((item) => {
211
+              item.show = true;
206 212
               if (
207 213
                 item.key === "repairSpecimenStatusMinute" ||
208 214
                 item.key === "repairSpecimenStatusCheckDeptIds"
@@ -216,8 +222,6 @@ export class HospitalConfigComponent implements OnInit {
216 222
                 } else {
217 223
                   item.show = false;
218 224
                 }
219
-              } else {
220
-                item.show = true;
221 225
               }
222 226
               if (
223 227
                 item.key === "nucleicAcidPrintingTaskType"
@@ -231,8 +235,6 @@ export class HospitalConfigComponent implements OnInit {
231 235
                 } else {
232 236
                   item.show = false;
233 237
                 }
234
-              } else {
235
-                item.show = true;
236 238
               }
237 239
               if (item.key.includes("phone_num_port")) {
238 240
                 //坐席号码
@@ -378,6 +380,13 @@ export class HospitalConfigComponent implements OnInit {
378 380
       .getFetchDataList("configuration", "taskType", postData)
379 381
       .toPromise();
380 382
   }
383
+  // 获取系统配置
384
+  getSysConfig() {
385
+    let postData: any = { idx: 0, sum: 99 };
386
+    return this.mainService
387
+      .getFetchDataList("simple/data", "systemConfiguration", postData)
388
+      .toPromise();
389
+  }
381 390
   /**
382 391
    * 获取科室列表
383 392
    * @param hosId 院区id

+ 4 - 10
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -148,6 +148,7 @@ export class HushijiandanComponent implements OnInit {
148 148
   deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
149 149
 
150 150
   ngOnInit() {
151
+    this.currentHospital = this.tool.getCurrentHospital();
151 152
     this.tool.getDeptDisplay().subscribe((result) => {
152 153
       if (result.status == 200) {
153 154
         this.deptDisplay = result.list[0].valueconfig;
@@ -171,7 +172,6 @@ export class HushijiandanComponent implements OnInit {
171 172
       .subscribe((v: string) => {
172 173
         this.getIncidentcategory(v);
173 174
       });
174
-    this.currentHospital = this.tool.getCurrentHospital();
175 175
 
176 176
     this.getTodayNum();
177 177
     this.initLogin();
@@ -397,16 +397,10 @@ export class HushijiandanComponent implements OnInit {
397 397
   // 获取系统配置,护士端是否显示报修
398 398
   isShowBx = false;
399 399
   getItsmIncident() {
400
-    let postData = {
401
-      idx: 0,
402
-      sum: 1,
403
-      systemConfiguration: { keyconfig: "itsmIncident" },
404
-    };
405
-    this.mainService
406
-      .getFetchDataList("simple/data", "systemConfiguration", postData)
407
-      .subscribe((result) => {
400
+    let postData = { idx: 0, sum: 100, hospitalConfig: { hosId: this.currentHospital.id } };
401
+    this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe((result) => {
408 402
         if (result.status == 200) {
409
-          this.isShowBx = result.list[0].valueconfig == 1;
403
+          this.isShowBx = result.list.find(v => v.key == 'hos_itsmIncident').value == 1;
410 404
           if (this.isShowBx) {
411 405
             this.smallTabs = [
412 406
               { id: 1, name: "综合日志" },

+ 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.25');
11
+    console.info('v2.4.26');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)