Jelajahi Sumber

适宜技术操作取值判断,处方操作,穴位操作判断是否可以累计
tag = "\u2060:\u2060" 不可见字符标志

cc12458 11 bulan lalu
induk
melakukan
326e0d83f7
2 mengubah file dengan 16 tambahan dan 11 penghapusan
  1. 4 2
      src/components/SuitScience.vue
  2. 12 9
      src/views/diagnosis/Prescribing.vue

+ 4 - 2
src/components/SuitScience.vue

@@ -384,14 +384,16 @@ export default {
         return;
       }
       let _self = this;
+      const tag = "\u2060:\u2060"
+      const merge = !this.bottom_form.caozuo || this.bottom_form.caozuo.includes(tag)
       this.acupointList.forEach(item => {
         if (item.acuid == e) {
           _self.tableData4[index].acuname = item.acuname;
           _self.tableData4[index].name = item.acuname;
           _self.tableData4[index].acuid = item.acuid;
 
-          _self.bottom_form.caozuo +=
-            item.acuname + ":" + item.acuoperation + " ";
+          if (merge && item.acuoperation) _self.bottom_form.caozuo +=
+            item.acuname + tag + item.acuoperation + " ";
         }
       });
 

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

@@ -2956,7 +2956,7 @@ export default {
       this.changeExpre(info);
     },
     // 适宜技术处方 专方 和方
-    suitChnageOrJoin(type = "") {
+    suitChnageOrJoin(type = "", info) {
       // type = '' 专访 type == 1 和方
       if (this.container_i == 1) return;
 
@@ -2975,8 +2975,9 @@ export default {
       this.setRecipeId('');
       this.tjRecipeId = recipeId
 
+      const merge = !(info && info.operation)
       if (type == "") {
-        child.bottom_form.caozuo = '';
+        child.bottom_form.caozuo = merge || !info ? '' : info.operation;
         // 转方
         child.tableData4 = [];
         drugs.forEach((item, index) => {
@@ -2987,7 +2988,7 @@ export default {
             acuid: item.acuid
           };
           // 锚点
-          if (item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
+          if (merge && item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
           child.tableData4.push(obj);
         });
         child.tableData4.push({
@@ -3011,7 +3012,7 @@ export default {
             acuid: item.acuid,
           };
           // 锚点
-          if (item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
+          if (merge && item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
           child.tableData4.push(obj);
         }
         child.tableData4.push({
@@ -3037,7 +3038,7 @@ export default {
       if (type == 1 && type1 == 1) {
         this.setDrugsInfo(item.items);
         this.setRecipeId('');
-        this.suitChnageOrJoin();
+        this.suitChnageOrJoin('', item);
         return;
       }
       console.log(item, "item");
@@ -3054,7 +3055,7 @@ export default {
       if (type == 1 && type1 == 1) {
         this.setDrugsInfo(item.items);
         this.setRecipeId('');
-        this.suitChnageOrJoin(1);
+        this.suitChnageOrJoin(1, item);
         return;
       }
 
@@ -3069,7 +3070,7 @@ export default {
       }
       if (!this.preInfo.prename) {
         this.addRecipeFrom("4", 2);
-        this.suitChnageOrJoin(1);
+        this.suitChnageOrJoin(1, this.preInfo);
         return;
       }
       this.addRecipeFrom("4");
@@ -3087,7 +3088,7 @@ export default {
       if (!this.preInfo.prename) {
         this.addRecipeFrom("4", 2);
         // 适宜技术处方
-        this.suitChnageOrJoin();
+        this.suitChnageOrJoin('', this.preInfo);
         return;
       }
       this.addRecipeFrom("4");
@@ -3900,13 +3901,15 @@ export default {
             }
           } else if (this.container_i == 2) {
             //  && child2.tableData4.length == 1
+            let info
             if (arr2.length > 0) {
               this.setDrugsInfo(arr2[0].items);
               this.setRecipeId(arr2[0].acupreid);
+              info = arr2[0]
             }
 
             this.addRecipeFrom("4", 2);
-            this.suitChnageOrJoin();
+            this.suitChnageOrJoin('', info);
             if (type == 3) {
               this.isTuiDaoSuit = true;
             }