wyq před 3 roky
rodič
revize
9272584c37
1 změnil soubory, kde provedl 22 přidání a 16 odebrání
  1. 22 16
      src/components/icss/MedicineInfoPg.vue

+ 22 - 16
src/components/icss/MedicineInfoPg.vue

@@ -158,12 +158,11 @@ export default {
         ]
       };
     }
-      setTimeout(()=>{
-          this.filterHiddenPosition();
-      },200)
-  },
-  mounted() {
+    setTimeout(() => {
+      this.filterHiddenPosition();
+    }, 200);
   },
+  mounted() {},
   methods: {
     reOrder(i) {
       this.$emit('reOrder', i, this.index);
@@ -174,16 +173,17 @@ export default {
     delEmit() {
       this.$emit('del', this.index);
     },
-      filterHiddenPosition(){
-        
-          const pos = this.data.position;
-          const pArr = this.positions.map((it)=>{return it.key});
-          const pStr = pArr.join(",");
-          const arr=pos.filter((it)=>{
-              return pStr.indexOf(it)>-1;
-          });
-          this.data.position=arr;
-      },
+    filterHiddenPosition() {
+      const pos = this.data.position;
+      const pArr = this.positions.map(it => {
+        return it.key;
+      });
+      const pStr = pArr.join(',');
+      const arr = pos.filter(it => {
+        return pStr.indexOf(it) > -1;
+      });
+      this.data.position = arr;
+    },
     // 渲染内容类型
     renderPositions() {
       //显示位置枚举列表
@@ -203,7 +203,13 @@ export default {
         this.positions = positions.filter(item => {
           return item.key <= 2;
         });
-      } else if (this.showType == 2 || this.showType == 7|| this.showType == 8|| this.showType == 9) {
+      } else if (
+        this.showType == 2 ||
+        this.showType == 7 ||
+        this.showType == 8 ||
+        this.showType == 9 ||
+        this.showType == 10
+      ) {
         // 药品/手术
         this.positions = positions.filter(item => item.key === 1);
       } else {