Jelajahi Sumber

智能开方数据缓存逻辑调整防止异常

cc12458 11 bulan lalu
induk
melakukan
ce7b044e11
1 mengubah file dengan 7 tambahan dan 14 penghapusan
  1. 7 14
      src/views/diagnosis/Prescribing.vue

+ 7 - 14
src/views/diagnosis/Prescribing.vue

@@ -1486,6 +1486,7 @@ export default {
       let child3 = children[2];
 
       let obj = {
+        contentTabs: this.contentTabs,
         container_i: this.container_i,
         child1: {
           recipe_tabs: child1.recipe_tabs,
@@ -1495,12 +1496,7 @@ export default {
           tableData3: child2.tableData3,
           bottom_form: child2.bottom_form
         },
-        child3: {
-          tableData4: child3.tableData4,
-          listLeft: child3.listLeft,
-          listRight: child3.listRight,
-          bottom_form: child3.bottom_form
-        },
+        child3: Object.assign({...child3.$data}, {acupointList: []}),
         rationalMed: {
           // 保存右侧合理用药信息
           rationalMed: this.rationalMed,
@@ -1541,6 +1537,8 @@ export default {
       let child2 = children[1];
       let child3 = children[2];
 
+      child1.recipe_tabs = storageData.child1.recipe_tabs;
+      child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
       if (typeof child1.loaded === 'function') await child1.loaded(storageData.child1);
 
       if (storageData.child1.recipe_tabs[0].totalTableD.length > 1) {
@@ -1548,7 +1546,7 @@ export default {
       }
 
       if (storageData.child3.tableData4.length > 1) {
-        this.isTuiDaoZy = true;
+        this.isTuiDaoSuit = true;
       }
 
       if (ignoreTable) {
@@ -1560,10 +1558,8 @@ export default {
         storageData.child2.tableData3 = [];
         storageData.child3.tableData4 = [];
       }
-
+      this.contentTabs = storageData.contentTabs;
       this.container_i = storageData.container_i;
-      child1.recipe_tabs = storageData.child1.recipe_tabs;
-      child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
       // child1.getSelectType("剂型", 0);
       // child1.getSelectType("处方用法");
       // child1.getSelectType("中药服药时间");
@@ -1572,10 +1568,7 @@ export default {
       child2.tableData3 = storageData.child2.tableData3;
       child2.bottom_form = storageData.child2.bottom_form;
 
-      child3.tableData4 = storageData.child3.tableData4;
-      child3.listLeft = storageData.child3.listLeft;
-      child3.listRight = storageData.child3.listRight;
-      child3.bottom_form = storageData.child3.bottom_form;
+      for (const [key, value] of Object.entries(storageData.child3)) child3[key] = value;
 
       this.rationalMed = storageData.rationalMed.rationalMed;
       // 保存右侧合理用药信息