Преглед изворни кода

更新龙岗二院需求问题

XMLWAN пре 5 година
родитељ
комит
76a7de74fc
1 измењених фајлова са 13 додато и 10 уклоњено
  1. 13 10
      src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue

+ 13 - 10
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue Прегледај датотеку

@@ -294,19 +294,22 @@ export default {
294 294
       this.accepts = accepts;
295 295
       console.log("accepts", accepts);
296 296
       var arr = [];
297
-      var precaution = this.accepts.precaution.split(",");
298
-      console.log("precaution", precaution);
299
-      console.log("hhh", this.precaution_arr);
300
-      for (let i = 0; i < precaution.length; i++) {
301
-        for (let j = 0; j < this.precaution_arr.length; j++) {
302
-          if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
303
-            console.log("aaaa");
304
-            arr.push(this.precaution_arr[j].name);
297
+      if (this.accepts.precaution) {
298
+        var precaution = this.accepts.precaution.split(",");
299
+        console.log("precaution", precaution);
300
+        console.log("hhh", this.precaution_arr);
301
+        for (let i = 0; i < precaution.length; i++) {
302
+          for (let j = 0; j < this.precaution_arr.length; j++) {
303
+            if (parseInt(precaution[i]) == this.precaution_arr[j].id) {
304
+              console.log("aaaa");
305
+              arr.push(this.precaution_arr[j].name);
306
+            }
305 307
           }
306 308
         }
309
+        this.precautionTwo = arr;
310
+        console.log("arr", arr);
307 311
       }
308
-      this.precautionTwo = arr;
309
-      console.log("arr", arr);
312
+
310 313
       this.getPermission();
311 314
       for (var index in this.receiveTreatmentAsses) {
312 315
         if (