seimin 2 meses atrás
pai
commit
ac2ae024bc

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

@@ -58,7 +58,7 @@
58 58
         </td>
59 59
         <td>
60 60
           <ng-container *ngIf="configs.updatePatientIllness == 1;else elseIllnessStateTpl">
61
-            <nz-radio-group [(ngModel)]="data.illnessState.id" (ngModelChange)="changeIllnessState($event, data.id)">
61
+            <nz-radio-group [(ngModel)]="data.illnessStateCopy" (ngModelChange)="changeIllnessState($event, data.id)">
62 62
               <label nz-radio class="display_block" [nzValue]="item.id" *ngFor="let item of illnessStateList">{{item.name}}</label>
63 63
             </nz-radio-group>
64 64
           </ng-container>

+ 4 - 8
src/app/views/inspect-info-config/inspect-info-config.component.ts

@@ -53,9 +53,6 @@ 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
-    }
59 56
     this.mainService
60 57
     .simplePost("addData", 'patient', postData)
61 58
     .subscribe((data) => {
@@ -76,8 +73,8 @@ export class InspectInfoConfigComponent implements OnInit {
76 73
       nzDuration: 0,
77 74
     }).messageId;
78 75
     let postData = this.listOfData.find(v => v.id == id);
79
-    if(!postData.illnessState.id){
80
-      postData.illnessState = undefined
76
+    postData.illnessState = {
77
+      id: illnessStateId,
81 78
     }
82 79
     this.mainService
83 80
     .simplePost("addData", 'patient', postData)
@@ -261,7 +258,6 @@ export class InspectInfoConfigComponent implements OnInit {
261 258
     let postData = {
262 259
       ...this.coopData.data,
263 260
       remark,
264
-      illnessState: this.coopData.data.illnessState.id ? this.coopData.data.illnessState : undefined,
265 261
     };
266 262
 
267 263
     this.mainService
@@ -326,8 +322,8 @@ export class InspectInfoConfigComponent implements OnInit {
326 322
         if (data.status == 200) {
327 323
           let listOfData = data.list || [];
328 324
           listOfData.forEach(v => {
329
-            if(!v.illnessState){
330
-              v.illnessState = {};
325
+            if(v.illnessState){
326
+              v.illnessStateCopy = v.illnessState.id;
331 327
             }
332 328
           })
333 329
           this.listOfData = listOfData;