Browse Source

术语类型列表不缓存

zhouna 6 years ago
parent
commit
99641449bd
1 changed files with 11 additions and 2 deletions
  1. 11 2
      src/components/icss/MedicinePrompt.vue

+ 11 - 2
src/components/icss/MedicinePrompt.vue

@@ -103,7 +103,16 @@
       this.getTermTypes();
     },
     methods: {
-      async getTermTypes(){
+      getTermTypes(){
+        api.getAllType().then((res)=>{
+          if(res.data.code=='0'){
+            this.termTypes = res.data.data.records;
+          }
+        }).catch((error)=>{
+          console.log('获取术语类型失败');
+        });
+      },
+      /*async getTermTypes(){
         let types = localStorage.getItem('termTypes');
         if(!types){
           types = await api.getAllType();
@@ -113,7 +122,7 @@
         }else{
           this.termTypes = JSON.parse(types).records;
         }
-      },
+      },*/
       toEditProduct(row){
         this.$router.push({
           name:'AddMedicinePrompt',