Explorar o código

术语类型列表不缓存

zhouna %!s(int64=6) %!d(string=hai) anos
pai
achega
99641449bd
Modificáronse 1 ficheiros con 11 adicións e 2 borrados
  1. 11 2
      src/components/icss/MedicinePrompt.vue

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

@@ -103,7 +103,16 @@
       this.getTermTypes();
       this.getTermTypes();
     },
     },
     methods: {
     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');
         let types = localStorage.getItem('termTypes');
         if(!types){
         if(!types){
           types = await api.getAllType();
           types = await api.getAllType();
@@ -113,7 +122,7 @@
         }else{
         }else{
           this.termTypes = JSON.parse(types).records;
           this.termTypes = JSON.parse(types).records;
         }
         }
-      },
+      },*/
       toEditProduct(row){
       toEditProduct(row){
         this.$router.push({
         this.$router.push({
           name:'AddMedicinePrompt',
           name:'AddMedicinePrompt',