فهرست منبع

bug-3 名医名方—名医医案详情—转方
bug-4 名医名方—方剂查询—转方

cc12458 1 سال پیش
والد
کامیت
4a551e1bfc
2فایلهای تغییر یافته به همراه18 افزوده شده و 26 حذف شده
  1. 13 21
      src/views/diagnosis/Prescribing.vue
  2. 5 5
      src/views/knowledge/Prescription.vue

+ 13 - 21
src/views/diagnosis/Prescribing.vue

@@ -1414,6 +1414,13 @@ export default {
     }
   },
   methods: {
+    // 处理路由参数
+   async _processRouteQuery() {
+      const query = this.$route.query;
+      if (!query) return;
+      if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
+      else if (query.doctorCase) await this.changeAndJoin();
+    },
     // 参考医案
     // 中医诊断推导点击
     tcmClick(isauto = true) {
@@ -3038,19 +3045,9 @@ export default {
           }
 
           const recipeID = this.getEditPreNo();
-
-          if (!!recipeID) {
-            if (this.$route.query.kjType) {
-              if (this.$route.query.kjType == "kj-fj") {
-                this.getPreDetal(recipeID);
-              }
-            } else {
-              this.getRecipeDataByid(recipeID);
-            }
-          } else if (this.$route.query.doctorCase) {
-            setTimeout(() => {
-              this.changeAndJoin();
-            }, 1000);
+          debugger
+          if (!!recipeID && !this.$route.query.kjType) {
+            await this.getRecipeDataByid(recipeID);
           } else if (this.$route.query.type == "tuidao") {
             this.isTuiDaoZy = true;
             // setTimeout(() => {
@@ -3059,9 +3056,10 @@ export default {
           }
         } else {
           // 有处方号
-          this.getRecipeShowData();
+          await this.getRecipeShowData();
         }
       }
+      await this._processRouteQuery();
     },
     // 药方是否支付
     async _recipeIsPay(id, type, index) {
@@ -3233,7 +3231,7 @@ export default {
         if (!res.Data.flag) {
           loading.close();
           if (this.getPatiensInfo.pid) {
-            this.getPatiensBasisM();
+            await this.getPatiensBasisM();
           }
           return;
         }
@@ -3273,12 +3271,6 @@ export default {
         if (this.getPatiensInfo.pid) {
           this.getPatiensBasisM();
         }
-
-        if (this.$route.query.doctorCase) {
-          setTimeout(() => {
-            this.changeAndJoin();
-          }, 1000);
-        }
       }
     },
 

+ 5 - 5
src/views/knowledge/Prescription.vue

@@ -66,10 +66,10 @@ export default {
     };
   },
   created() {
-    this.getEffectQuery();
-    setTimeout(() => {
-      this.getPrescriptionsList();
-    }, 500);
+    this.getEffectQuery().then(() => this.getPrescriptionsList());
+    // setTimeout(() => {
+    //   this.getPrescriptionsList();
+    // }, 500);
   },
   methods: {
     clearFilter() {
@@ -95,7 +95,7 @@ export default {
         pagesize: 9999,
         searchtype: "",
         keyword: this.form.name,
-        effected: this.tabs[this.tab_current].effectid,
+        effected: this.tabs[this.tab_current] ? this.tabs[this.tab_current].effectid : null,
         effect: this.form.gongxiao
       };
       let res = await getPrescriptionsList(params);