seimin il y a 2 mois
Parent
commit
ad2354c63f

+ 23 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -181,6 +181,12 @@
181 181
 								  <nz-form-label class="label">是否默认展开</nz-form-label>
182 182
 								  <nz-checkbox-group [(ngModel)]="speDefaultExpandTube"></nz-checkbox-group>
183 183
 								</div>
184
+
185
+                <!-- 是否空单自动关单 -->
186
+								<div class="display_flex align-items_center mb8">
187
+								  <nz-form-label class="label">是否空单自动关单</nz-form-label>
188
+								  <nz-checkbox-group [(ngModel)]="speAutoCloseEmptyOrder"></nz-checkbox-group>
189
+								</div>
184 190
               </div>
185 191
               <!-- 自动建单配置 -->
186 192
               <div *ngIf="tabModalName=='automaticOrderCreation'">
@@ -418,8 +424,25 @@
418 424
                   <nz-form-label class="label">条码打印尺寸</nz-form-label>
419 425
                   <nz-select class="w320px" nzPlaceHolder="请选择条码打印尺寸" [(ngModel)]="spePackageCodeSize" nzAllowClear>
420 426
                     <nz-option nzLabel="80*80" [nzValue]="1"></nz-option>
427
+                    <nz-option nzLabel="70*50" [nzValue]="2"></nz-option>
421 428
                   </nz-select>
422 429
                 </div>
430
+
431
+                <!-- 是否同时打印试管类型 -->
432
+                <div class="display_flex align-items_center mb8">
433
+                  <nz-form-label class="label">是否同时打印试管类型</nz-form-label>
434
+                  <nz-checkbox-group [(ngModel)]="spePrintTubeType"></nz-checkbox-group>
435
+                </div>
436
+
437
+                <!-- 打印位置 -->
438
+                <div class="display_flex align-items_center mb8">
439
+                  <nz-form-label class="label">打印位置</nz-form-label>
440
+                  <nz-radio-group [(ngModel)]="spePrintPosition">
441
+                    <label nz-radio [nzValue]="1">居左</label>
442
+                    <label nz-radio [nzValue]="2">居中</label>
443
+                    <label nz-radio [nzValue]="3">居右</label>
444
+                  </nz-radio-group>
445
+                </div>
423 446
               </div>
424 447
               <!-- 自动建单配置 -->
425 448
               <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 14 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -45,7 +45,9 @@ export class ConfigurationSpecimenComponent implements OnInit {
45 45
   spePackageTubeIds:any[] = [];// 自动关联试管类型
46 46
   spePackageTubeList:any[] = [];// 自动关联试管类型列表
47 47
   spePackageInventoryTypes:any[] = [{label: '患者', value: 1}, {label: '试管', value: 2}];//清点方式
48
+  spePrintPosition:any = undefined;//打印位置
48 49
   spePackageCreateOrder:any = [{ label:'是否开启', value: 0 }];//生成配送工单
50
+  spePrintTubeType:any = [{ label:'是否开启', value: 0 }];//是否同时打印试管类型
49 51
   spePackageCodeSize:any = undefined;//条码打印尺寸
50 52
 	// 是否允许转派
51 53
 	handoverOrder:any[] = [
@@ -62,6 +64,11 @@ export class ConfigurationSpecimenComponent implements OnInit {
62 64
 	  {label:'是否开启',value: 0}
63 65
 	];
64 66
 
67
+  // 是否空单自动关单
68
+	speAutoCloseEmptyOrder:any[] = [
69
+	  {label:'是否开启',value: 0}
70
+	];
71
+
65 72
   // 工单模式
66 73
   spePackageModelList:any[] = [
67 74
     { label: '一单一包', value: 1 },
@@ -421,6 +428,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
421 428
 			handoverOrder: this.handoverOrder[0].checked ? 1 : 0,
422 429
 			speExpandTube: this.speExpandTube[0].checked ? 1 : 0,
423 430
 			speDefaultExpandTube: this.speDefaultExpandTube[0].checked ? 1 : 0,
431
+			speAutoCloseEmptyOrder: this.speAutoCloseEmptyOrder[0].checked ? 1 : 0,
424 432
 		};
425 433
 		if(this.speCollectLimit[0].checked){
426 434
 			postData.speCollectSupportNotStartDept = this.speCollectSupportNotStartDept[0].checked ? 1 : 0;
@@ -490,7 +498,9 @@ export class ConfigurationSpecimenComponent implements OnInit {
490 498
       spePackageDeptIds: this.spePackageDeptIds.length ? this.spePackageDeptIds.toString() : undefined,
491 499
       spePackageTubeIds: this.spePackageTubeIds.length ? this.spePackageTubeIds.toString() : undefined,
492 500
       spePackageInventoryTypes: this.spePackageInventoryTypes.filter(v => v.checked).map(v => v.value).toString() || undefined,
501
+      spePrintPosition: this.spePrintPosition,
493 502
       spePackageCreateOrder: this.spePackageCreateOrder[0].checked ? 1 : 0,
503
+      spePrintTubeType: this.spePrintTubeType[0].checked ? 1 : 0,
494 504
       spePackageCodeSize: this.spePackageCodeSize || undefined,
495 505
     };
496 506
     this.btnLoading = true;
@@ -642,6 +652,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
642 652
 						this.handoverOrder[0].checked = this.configs.handoverOrder == 1;
643 653
 						this.speExpandTube[0].checked = this.configs.speExpandTube == 1;
644 654
 						this.speDefaultExpandTube[0].checked = this.configs.speDefaultExpandTube == 1;
655
+						this.speAutoCloseEmptyOrder[0].checked = this.configs.speAutoCloseEmptyOrder == 1;
645 656
 						if(this.configs.speCollectLimit == 1){
646 657
 							this.speCollectSupportNotStartDept[0].checked = this.configs.speCollectSupportNotStartDept == 1;
647 658
 							this.speCollectLimitRepeat[0].checked  = this.configs.speCollectLimitRepeat == 1;
@@ -683,7 +694,10 @@ export class ConfigurationSpecimenComponent implements OnInit {
683 694
             this.spePackageTubeIds = this.configs.spePackageTubeIds ? this.configs.spePackageTubeIds.split(',').map(v => +v) : [];
684 695
             this.spePackageInventoryTypes = this.spePackageInventoryTypes.map(v => ({...v, checked: (this.configs.spePackageInventoryTypes || '').split(',').includes(v.value.toString())}));
685 696
             this.spePackageCreateOrder[0].checked = this.configs.spePackageCreateOrder == 1;
697
+            this.spePrintTubeType[0].checked = this.configs.spePrintTubeType == 1;
686 698
             this.spePackageCodeSize = this.configs.spePackageCodeSize || undefined;
699
+
700
+            this.spePrintPosition = this.configs.spePrintPosition;
687 701
 					}
688 702
         }
689 703
       });

+ 1 - 1
src/app/share/add-inspect-info/add-inspect-info.component.html

@@ -7,7 +7,7 @@
7 7
           <div class="formItem flex_1">
8 8
             <div class="name"><i class="icon_transport transport-required red"></i>患者信息:</div>
9 9
             <div class="value">
10
-              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.patientId" nzShowSearch nzPlaceHolder="请选择患者信息" nzServerSearch (nzOnSearch)="searchPatient($event)" (nzOpenChange)="openPatient($event)">
10
+              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.patientId" nzShowSearch nzPlaceHolder="请选择患者信息" nzServerSearch (nzOnSearch)="searchPatient($event)" (nzOpenChange)="openPatient($event)" (ngModelChange)="changePatient($event)">
11 11
                 <ng-container *ngFor="let data of patientList">
12 12
                   <nz-option *ngIf="!isLoading" [nzLabel]="data.patientName + '(' + (data.bedNum || '') + ')' + '-' + data.residenceNo" [nzValue]="data.id">
13 13
                   </nz-option>

+ 6 - 2
src/app/share/add-inspect-info/add-inspect-info.component.ts

@@ -27,6 +27,7 @@ export class AddInspectInfoComponent implements OnInit {
27 27
     private message: NzMessageService,
28 28
   ) { }
29 29
 
30
+  patientDTO:any = {};
30 31
   inspectData:any = {
31 32
     date: new Date(),
32 33
   }; //检查项目
@@ -67,8 +68,11 @@ export class AddInspectInfoComponent implements OnInit {
67 68
       this.message.warning('请选择预约时间!');
68 69
       return;
69 70
     }
70
-    let patientDTO = this.patientList.find(v => v.id == this.inspectData.patientId);
71
-    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData, patientDTO }));//emits(向上弹射)事件
71
+    this.confirmModelHs.emit(JSON.stringify({ show: false, inspectData: this.inspectData, patientDTO: this.patientDTO }));//emits(向上弹射)事件
72
+  }
73
+
74
+  changePatient(e){
75
+    this.patientDTO = this.patientList.find(v => v.id == this.inspectData.patientId) || {};
72 76
   }
73 77
 
74 78
   // 关闭弹窗

+ 1 - 1
src/app/share/add-inspect-three-modal/add-inspect-three-modal.component.ts

@@ -82,7 +82,7 @@ export class AddInspectThreeModalComponent implements OnInit {
82 82
     let postData = {
83 83
       dictionary: {
84 84
         key: "inspect_check_type",
85
-        name: keyword || undefined,
85
+        keyword: keyword || undefined,
86 86
       },
87 87
       idx: 0,
88 88
       sum: 9999,

+ 31 - 14
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.html

@@ -69,22 +69,39 @@
69 69
 
70 70
 <!-- 打印的内容 -->
71 71
 <div id="print-section-package" hidden>
72
-  <!-- 80mm*80mm -->
73
-  <ng-container *ngIf="configs.spePackageCodeSize == 1">
74
-    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;">
75
-      <div style="display: flex;">
76
-        <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
77
-        <div style="flex: 1;">
78
-          <div>包号:{{package.packCode}}</div>
79
-          <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
80
-          <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
72
+  <ng-container *ngIf="configs.spePackageCodeSize">
73
+    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;display: flex;" [ngStyle]="{'justify-content': configs.spePrintPosition == 2 ? 'center' : (configs.spePrintPosition == 3 ? 'right' : 'left')}">
74
+      <!-- 80mm*80mm -->
75
+      <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;max-height: 80mm;" *ngIf="configs.spePackageCodeSize == 1">
76
+        <div style="display: flex;">
77
+          <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
78
+          <div style="flex: 1;">
79
+            <div>包号:{{package.packCode}}</div>
80
+            <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
81
+            <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
82
+          </div>
83
+        </div>
84
+        <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
85
+        <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
86
+        <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
87
+        <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
88
+          <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
81 89
         </div>
82 90
       </div>
83
-      <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
84
-      <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
85
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
86
-      <div style="display: flex;flex-wrap: wrap;">
87
-        <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
91
+      <!-- 70mm*50mm -->
92
+      <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 70mm;max-height: 50mm;" *ngIf="configs.spePackageCodeSize == 2">
93
+        <div style="display: flex;">
94
+          <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
95
+          <div style="flex: 1;">
96
+            <div>包号:{{package.packCode}}</div>
97
+            <div>{{package.packDeptDTO?.dept}}</div>
98
+            <div>{{package.packTime | date: 'yyyy-MM-dd'}}</div>
99
+            <div>标本总数:{{package.specimenNum}}</div>
100
+          </div>
101
+        </div>
102
+        <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
103
+          <div *ngFor="let item of typeSpecimentList">{{item.name}}:{{item.size}}</div>
104
+        </div>
88 105
       </div>
89 106
     </div>
90 107
   </ng-container>

+ 32 - 14
src/app/views/batch-specimen/batch-specimen.component.html

@@ -79,22 +79,40 @@
79 79
 
80 80
 <!-- 打印的内容 -->
81 81
 <div id="print-section" hidden>
82
-  <!-- 80mm*80mm -->
83
-  <ng-container *ngIf="configs.spePackageCodeSize == 1">
84
-    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;">
85
-      <div style="display: flex;">
86
-        <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
87
-        <div style="flex: 1;">
88
-          <div>包号:{{package.packCode}}</div>
89
-          <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
90
-          <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
82
+  <ng-container *ngIf="configs.spePackageCodeSize">
83
+    <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;height: 80mm;display: flex;" [ngStyle]="{'justify-content': configs.spePrintPosition == 2 ? 'center' : (configs.spePrintPosition == 3 ? 'right' : 'left')}">
84
+      <!-- 80mm*80mm -->
85
+      <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 80mm;max-height: 80mm;" *ngIf="configs.spePackageCodeSize == 1">
86
+        <div style="display: flex;">
87
+          <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 3mm;">
88
+          <div style="flex: 1;">
89
+            <div>包号:{{package.packCode}}</div>
90
+            <div style="margin-top: 3mm;">打包人:{{package.packUserDTO?.name}}</div>
91
+            <div style="margin-top: 3mm;">标本总数:{{package.specimenNum}}</div>
92
+          </div>
93
+        </div>
94
+        <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
95
+        <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
96
+        <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
97
+        <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
98
+          <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
91 99
         </div>
92 100
       </div>
93
-      <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
94
-      <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
95
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
96
-      <div style="display: flex;flex-wrap: wrap;">
97
-        <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
101
+
102
+      <!-- 70mm*50mm -->
103
+      <div style="overflow: hidden;padding: 4mm;font-size: 4mm;width: 70mm;max-height: 50mm;" *ngIf="configs.spePackageCodeSize == 2">
104
+        <div style="display: flex;">
105
+          <img [src]="base64" style="width: 23mm;height: 23mm;margin-right: 1mm;">
106
+          <div style="flex: 1;">
107
+            <div>包号:{{package.packCode}}</div>
108
+            <div>{{package.packDeptDTO?.dept}}</div>
109
+            <div>{{package.packTime | date: 'yyyy-MM-dd'}}</div>
110
+            <div>标本总数:{{package.specimenNum}}</div>
111
+          </div>
112
+        </div>
113
+        <div style="display: flex;flex-wrap: wrap;" *ngIf="configs.spePrintTubeType == 1">
114
+          <div *ngFor="let item of typeSpecimentList">{{item.name}}:{{item.size}}</div>
115
+        </div>
98 116
       </div>
99 117
     </div>
100 118
   </ng-container>

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

@@ -180,6 +180,11 @@
180 180
           <nz-checkbox-group [(ngModel)]="batchInspectAutoClear" (ngModelChange)="changeBatchInspectAutoClear($event)"></nz-checkbox-group>
181 181
           <nz-time-picker *ngIf="batchInspectAutoClear[0].checked" [(ngModel)]="batchInspectAutoClearTime" nzFormat="HH:mm"></nz-time-picker>
182 182
         </div>
183
+        <!-- 是否修改危重等级 -->
184
+        <div class="display_flex align-items_center mb8">
185
+          <nz-form-label class="label">是否修改危重等级</nz-form-label>
186
+          <nz-checkbox-group [(ngModel)]="updatePatientIllness"></nz-checkbox-group>
187
+        </div>
183 188
         <!-- 检查预约不进行工单合并 -->
184 189
         <!-- <div class="display_flex align-items_center mb8">
185 190
           <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>

+ 6 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -105,6 +105,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
105 105
   signReassign:any[] = [
106 106
     {label:'是否开启',value: 0}
107 107
   ];
108
+  // 是否修改危重等级
109
+  updatePatientIllness:any[] = [
110
+    {label:'是否开启',value: 0}
111
+  ];
108 112
   // 检查预约不进行工单合并
109 113
   // yyInspectMergeOrder:any[] = [
110 114
   //   {label:'是否开启',value: 0}
@@ -331,6 +335,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
331 335
       enableTripType: this.enableTripType[0].checked ? 1 : 0,
332 336
       nurseAppendInspect: this.nurseAppendInspect[0].checked ? 1 : 0,
333 337
       signReassign: this.signReassign[0].checked ? 1 : 0,
338
+      updatePatientIllness: this.updatePatientIllness[0].checked ? 1 : 0,
334 339
       // yyInspectMergeOrder: this.yyInspectMergeOrder[0].checked ? 1 : 0,
335 340
       addService: this.addService[0].checked ? 1 : 0,
336 341
       addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
@@ -469,6 +474,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
469 474
           this.enableTripType[0].checked = this.configs.enableTripType == 1;
470 475
           this.nurseAppendInspect[0].checked = this.configs.nurseAppendInspect == 1;
471 476
           this.signReassign[0].checked = this.configs.signReassign == 1;
477
+          this.updatePatientIllness[0].checked = this.configs.updatePatientIllness == 1;
472 478
           // this.yyInspectMergeOrder[0].checked = this.configs.yyInspectMergeOrder == 1;
473 479
           this.addService[0].checked = this.configs.addService == 1;
474 480
           this.addServiceTaskIds = this.configs.addServiceTaskIds ? this.configs.addServiceTaskIds.split(',').map(v => +v) : [];

+ 21 - 2
src/app/views/inspect-info-config/inspect-info-config.component.html

@@ -46,8 +46,27 @@
46 46
     </thead>
47 47
     <tbody>
48 48
       <tr *ngFor="let data of listOfData">
49
-        <td><span>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container></span><br><ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container></td>
50
-        <td>{{data.careLevel?.name}}<br>{{data.illnessState?.name}}</td>
49
+        <td>
50
+          <span class="patient">
51
+            <ng-container *ngIf="!data.tripType">
52
+              <span class="circle red" title="未标记患者"></span>
53
+            </ng-container>
54
+            <span>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container></span>
55
+          </span>
56
+          <br>
57
+          <ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container>
58
+        </td>
59
+        <td>
60
+          {{data.careLevel?.name}}<br>
61
+          <ng-container *ngIf="configs.updatePatientIllness == 1;else elseIllnessStateTpl">
62
+            <nz-radio-group [(ngModel)]="data.illnessState.id" (ngModelChange)="changeIllnessState($event, data.id)">
63
+              <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of illnessStateList">{{item.name}}</label>
64
+            </nz-radio-group>
65
+          </ng-container>
66
+          <ng-template #elseIllnessStateTpl>
67
+            {{data.illnessState?.name}}
68
+          </ng-template>
69
+        </td>
51 70
         <td>
52 71
           <nz-radio-group [(ngModel)]="data.tripType" (ngModelChange)="changeTripType($event, data.id)">
53 72
             <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of workOrderInspectScoreList">{{item.inspectMode}}</label>

+ 95 - 2
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -43,7 +43,7 @@ export class InspectInfoConfigComponent implements OnInit {
43 43
         this.deptDisplay = result.list[0].valueconfig;
44 44
       }
45 45
     });
46
-
46
+    this.getTaskType();
47 47
     this.init();
48 48
   }
49 49
 
@@ -53,6 +53,9 @@ export class InspectInfoConfigComponent implements OnInit {
53 53
       nzDuration: 0,
54 54
     }).messageId;
55 55
     let postData = this.listOfData.find(v => v.id == id);
56
+    if(!postData.illnessState.id){
57
+      postData.illnessState = undefined
58
+    }
56 59
     this.mainService
57 60
     .simplePost("addData", 'patient', postData)
58 61
     .subscribe((data) => {
@@ -67,7 +70,31 @@ export class InspectInfoConfigComponent implements OnInit {
67 70
     });
68 71
   }
69 72
 
73
+  // 修改危重等级
74
+  changeIllnessState(illnessStateId, id){
75
+    this.maskFlag = this.message.loading("正在加载中..", {
76
+      nzDuration: 0,
77
+    }).messageId;
78
+    let postData = this.listOfData.find(v => v.id == id);
79
+    if(!postData.illnessState.id){
80
+      postData.illnessState = undefined
81
+    }
82
+    this.mainService
83
+    .simplePost("addData", 'patient', postData)
84
+    .subscribe((data) => {
85
+      this.message.remove(this.maskFlag);
86
+      this.maskFlag = false;
87
+      if (data.status == 200) {
88
+        this.message.success("修改危重等级成功");
89
+      } else {
90
+        this.getList();
91
+        this.message.error(data.msg || "修改危重等级失败");
92
+      }
93
+    });
94
+  }
95
+
70 96
   init(){
97
+    this.getIllnessState();
71 98
     this.getWorkOrderInspectScore();
72 99
     this.getList();
73 100
   }
@@ -234,6 +261,7 @@ export class InspectInfoConfigComponent implements OnInit {
234 261
     let postData = {
235 262
       ...this.coopData.data,
236 263
       remark,
264
+      illnessState: this.coopData.illnessState.id ? this.coopData.illnessState : undefined,
237 265
     };
238 266
 
239 267
     this.mainService
@@ -296,7 +324,13 @@ export class InspectInfoConfigComponent implements OnInit {
296 324
       .subscribe((data:any) => {
297 325
         this.loading1 = false;
298 326
         if (data.status == 200) {
299
-          this.listOfData = data.list;
327
+          let listOfData = data.list || [];
328
+          listOfData.forEach(v => {
329
+            if(!v.illnessState){
330
+              v.illnessState = {};
331
+            }
332
+          })
333
+          this.listOfData = listOfData;
300 334
           this.inspectTotalCount = this.listOfData.reduce((v, i) => v + i.inspects.length, 0);
301 335
         }else{
302 336
           this.message.error(data.msg || "请求数据失败");
@@ -327,6 +361,14 @@ export class InspectInfoConfigComponent implements OnInit {
327 361
       });
328 362
   }
329 363
 
364
+  //获取危重等级
365
+  illnessStateList:any[] = [];
366
+  getIllnessState() {
367
+    this.mainService.getDictionary('list', 'stateOfAnIllness').subscribe((data) => {
368
+      this.illnessStateList = data || [];
369
+    });
370
+  }
371
+
330 372
   // 返回
331 373
   goBack(){
332 374
     this._location.back();
@@ -376,4 +418,55 @@ export class InspectInfoConfigComponent implements OnInit {
376 418
         }
377 419
       });
378 420
   }
421
+
422
+  //获取任务类型
423
+  tasktype:any = {};// 任务类型
424
+ getTaskType() {
425
+   let postData = {
426
+     idx: 0,
427
+     sum: 1,
428
+     taskType: {
429
+       simpleQuery: true,
430
+       hosId: {
431
+         id: this.hosId
432
+       },
433
+       associationType: {
434
+         key: 'association_types',
435
+         value: 'inspect',
436
+       }
437
+     }
438
+   };
439
+   this.mainService
440
+     .getFetchDataList("simple/data", "taskType", postData)
441
+     .subscribe((result) => {
442
+       if (result.status == 200) {
443
+         this.tasktype = result.list[0] || {};
444
+         this.getConfig();
445
+       }
446
+     });
447
+ }
448
+
449
+  // 获取配置
450
+  configs:any = {};
451
+  getConfig() {
452
+    let postData = {
453
+      idx: 0,
454
+      sum: 1,
455
+      taskTypeConfig: {
456
+        taskTypeDTO: {
457
+          hosId: {
458
+            id: this.hosId
459
+          },
460
+          associationType: this.tasktype.associationType,
461
+        }
462
+      }
463
+    };
464
+    this.mainService
465
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
466
+      .subscribe((result) => {
467
+        if (result.status == 200) {
468
+          this.configs = result.list[0] || {};
469
+        }
470
+      });
471
+  }
379 472
 }