Przeglądaj źródła

推导按钮获取处方判断

cc12458 11 miesięcy temu
rodzic
commit
de5b6b4604
1 zmienionych plików z 12 dodań i 14 usunięć
  1. 12 14
      src/views/diagnosis/Prescribing.vue

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

@@ -1418,12 +1418,9 @@ export default {
       else if (query.doctorCase) await this.changeAndJoin();
       // 中医诊疗 -> 智能辩证
       else if (query.type === "tuidao") {
-        await Promise.all([
-          this.inferRecipe(4, "1"),
-          // this.inferRecipe(4, "3"),
-          this.inferRecipe(),
-        ])
-        this.isTuiDaoZy = true;
+        this.isTuiDaoSuit = false;
+        this.isTuiDaoZy = false;
+        await Pthis.inferRecipe();
       }
       // 处方编辑 recipeType
       else if (query.from !== 'his' && this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
@@ -1438,9 +1435,11 @@ export default {
         else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
       }
    },
-    // 参考医案
+
     // 中医诊断推导点击
     tcmClick(isauto = true) {
+     this.isTuiDaoZy = false;
+     this.isTuiDaoSuit = false;
       let params = this.$refs.TCM.getParams();
 
       if (!params.namemedicine || !params.syndrometypes) {
@@ -2715,9 +2714,7 @@ export default {
     changeContainer(item, type) {
       this.container_i = type;
       item.check = true;
-      if (type == 1) return;
-      if (this.isTuiDaoZy && item.id === '0') return;
-      if (this.isTuiDaoSuit && item.id === '2') return;
+      if (item.id === '1') return;
       // if (this.contentTabs[type].color == 'red') {
       this.inferRecipe(3, item.businesstype);
       // }
@@ -3791,8 +3788,7 @@ export default {
         let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
 
         if (type == 4) {
-          this.contentTabs[businesstype - 1].color =
-            arr2.length > 0 ? "red" : "";
+          try { this.contentTabs.find(tab => tab.businesstype === businesstype).color = arr2.length > 0 ? "red" : ""; } catch (e) {}
           return;
         }
         if (arr2.length > 0) {
@@ -3816,8 +3812,10 @@ export default {
         this.rRecomendR = arr2;
 
         if (this.$route.query.type != "tuidao" && type == 1) return;
-        if (type == 3 && this.container_i == 0 && this.isTuiDaoZy) return;
-        if (type == 3 && this.container_i == 2 && this.isTuiDaoSuit) return;
+        if (type === 3) {
+          try { if (this.contentTabs.find(tab => tab.id === '0') && this.isTuiDaoZy) return; } catch (e) {}
+          try { if (this.contentTabs.find(tab => tab.id === '2') && this.isTuiDaoSuit) return; } catch (e) {}
+        }
         if (this.rRecomendR.length == 0) return;
 
         let children = this.$children.filter(item => {