浏览代码

术语类型列表不缓存

zhouna 6 年之前
父节点
当前提交
99641449bd
共有 1 个文件被更改,包括 11 次插入2 次删除
  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',