|
@@ -174,7 +174,8 @@
|
|
|
searchIndex: -1,
|
|
|
searchFiled: '',
|
|
|
searchResultList: [],
|
|
|
- loading: undefined
|
|
|
+ loading: undefined,
|
|
|
+ showSearchList: true //是否展示搜索列表(解决引接口回来比较迟输入内容为空搜索内容还存在)
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -316,7 +317,7 @@
|
|
|
type
|
|
|
}
|
|
|
api.diagBaseSearch(param).then((res)=>{
|
|
|
- if(res.data.code == '0') {
|
|
|
+ if(res.data.code == '0'&&this.showSearchList) {
|
|
|
this.searchResultList = res.data.data
|
|
|
} else {
|
|
|
this.searchResultList = []
|
|
@@ -894,13 +895,16 @@
|
|
|
if(resultVal) {
|
|
|
const searchVal = this.getSearchVal(resultVal)
|
|
|
if(searchVal) {
|
|
|
+ this.showSearchList = true
|
|
|
this.searchIndex = index
|
|
|
this.searchFiled = 'FeatureStand'
|
|
|
this.diagBaseSearch(2,searchVal,itemType)
|
|
|
} else {
|
|
|
+ this.showSearchList = false
|
|
|
this.searchResultList = []
|
|
|
}
|
|
|
} else {
|
|
|
+ this.showSearchList = false
|
|
|
this.searchResultList = []
|
|
|
}
|
|
|
|
|
@@ -935,14 +939,17 @@
|
|
|
if(resultVal) {
|
|
|
const searchVal = this.getSearchVal(resultVal)
|
|
|
if(searchVal) {
|
|
|
+ this.showSearchList = true
|
|
|
this.searchIndex = index
|
|
|
this.searchFiled = 'FeatureRelate'
|
|
|
this.diagBaseSearch(3,searchVal,itemType)
|
|
|
- } else [
|
|
|
+ } else {
|
|
|
+ this.showSearchList = false
|
|
|
this.searchResultList = []
|
|
|
- ]
|
|
|
+ }
|
|
|
|
|
|
} else {
|
|
|
+ this.showSearchList = false
|
|
|
this.searchResultList = []
|
|
|
}
|
|
|
|