Quellcode durchsuchen

搜索类别没数据时不展示

zhangxc vor 6 Jahren
Ursprung
Commit
84631f477c

+ 4 - 3
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -147,11 +147,12 @@ export default {
             api.searchTagList(param).then((res) => {
             api.searchTagList(param).then((res) => {
                 if (res.data.code === '0') {
                 if (res.data.code === '0') {
                      if (type == 1) {
                      if (type == 1) {
-                         this.$refs['mealNameList'].style.display='block'
                         this.mealNameList = res.data.data
                         this.mealNameList = res.data.data
+                        if(this.mealNameList.length > 0){ this.$refs['mealNameList'].style.display='block' }
                     } else if (type == 2) {
                     } else if (type == 2) {
-                        this.$refs['itemNameList'].style.display='block'
+                       
                         this.itemNameList = res.data.data
                         this.itemNameList = res.data.data
+                        if(this.itemNameList.length > 0) { this.$refs['itemNameList'].style.display='block' }
                     }
                     }
                 }
                 }
             })
             })
@@ -163,8 +164,8 @@ export default {
             }
             }
             api.getAllLisConcept(param).then((res) => {
             api.getAllLisConcept(param).then((res) => {
                 if(res.data.code === '0') {
                 if(res.data.code === '0') {
-                    this.$refs['uniqueNameList'].style.display='block'
                     this.uniqueNameList = res.data.data
                     this.uniqueNameList = res.data.data
+                    if(this.uniqueNameList.length > 0){this.$refs['uniqueNameList'].style.display='block'}
                 }
                 }
             })
             })
         },
         },

+ 10 - 11
src/components/icss/AddChronicAndIndexRelation.vue

@@ -124,7 +124,7 @@
             api.queryIndexConfigDiseaseNames(param).then((res)=>{
             api.queryIndexConfigDiseaseNames(param).then((res)=>{
                if(res.data.code === '0') {
                if(res.data.code === '0') {
                    this.diagList = res.data.data
                    this.diagList = res.data.data
-                   this.$refs['diagList'].style.display='block'
+                   if(this.diagList.length>0) {this.$refs['diagList'].style.display = 'block'}
                 }
                 }
             })
             })
         },
         },
@@ -150,14 +150,14 @@
                if(res.data.code === '0') {
                if(res.data.code === '0') {
                    console.log('res.data.data', res.data.data)
                    console.log('res.data.data', res.data.data)
                 //    this.indexList = res.data.data
                 //    this.indexList = res.data.data
-                this.indexList =[
-                    {conceptName : '空腹血糖'},
-                    {conceptName : '餐后2小时血糖'},
-                    {conceptName : '随机血糖'},
-                    {conceptName : '糖化血红蛋白'},
-                    {conceptName : '血常规'},
-                ]
-                   this.$refs['indexList'].style.display='block'
+                    this.indexList =[
+                        {conceptName : '空腹血糖'},
+                        {conceptName : '餐后2小时血糖'},
+                        {conceptName : '随机血糖'},
+                        {conceptName : '糖化血红蛋白'},
+                        {conceptName : '血常规'},
+                    ]
+                   if(this.indexList.length > 0){this.$refs['indexList'].style.display='block'}
                 }
                 }
             })
             })
         },
         },
@@ -270,8 +270,7 @@
             display: none;
             display: none;
             background: #fff;
             background: #fff;
             width: 162px;
             width: 162px;
-            height: 80px;
-            // max-height: 80px;
+            max-height: 80px;
             border: 1px solid gray;
             border: 1px solid gray;
             left: 110px;
             left: 110px;
             top: 35px;
             top: 35px;

+ 1 - 1
src/components/icss/AddDisAndScaleRelation.vue

@@ -159,7 +159,7 @@
             api.searchTagList(param).then((res)=>{
             api.searchTagList(param).then((res)=>{
                if(res.data.code === '0') {
                if(res.data.code === '0') {
                    this.diagList = res.data.data
                    this.diagList = res.data.data
-                   this.$refs['diagList'].style.display='block'
+                   if(this.diagList.length > 0){ this.$refs['diagList'].style.display='block' }
                 }
                 }
             })
             })
         },
         },