xieqy 1 year ago
parent
commit
5aa1a616e8
1 changed files with 12 additions and 10 deletions
  1. 12 10
      src/views/groupPage/districtPageModules/commonModules/SearchBox.vue

+ 12 - 10
src/views/groupPage/districtPageModules/commonModules/SearchBox.vue

@@ -167,12 +167,14 @@ export default class SearchBox extends Vue {
       }
     })
   }
-  // @Watch('selectType')
-  // changeSelectTypeMethod(val) {
-  //   if (val !== '4') {
-  //     this.isShowInfoPanel = false
-  //   }
-  // }
+  @Watch('selectType')
+  changeSelectTypeMethod(val) {
+    if (val == '1') {
+      this.isShowInfoPanel = false
+    } else {
+      this.isShowInfoPanel = true
+    }
+  }
 
   /**页面全局键盘事件监听 */
   // created() {
@@ -468,11 +470,11 @@ export default class SearchBox extends Vue {
   inputBlur() {
     // setTimeout(() => {
     if (this.searchInput !== '' || this.isEnterPanel) return
-    else this.isShowInfoPanel = false
+    // else this.isShowInfoPanel = false
     // }, 300)
   }
   clearInput() {
-    this.isShowInfoPanel = false
+    // this.isShowInfoPanel = false
     this.removeLabels()
     //
     this.searchDeviceList = []
@@ -483,7 +485,7 @@ export default class SearchBox extends Vue {
   PanelLeave() {
     this.isEnterPanel = false
     if (document.activeElement.className == 'el-input__inner') return
-    if (this.searchInput === '') this.isShowInfoPanel = false
+    // if (this.searchInput === '') this.isShowInfoPanel = false
   }
   //选择搜索
   pbsTreeSelectChange(data) {
@@ -493,12 +495,12 @@ export default class SearchBox extends Vue {
         break
       case '3':
         this.searchInput = data.code ? data.code : ''
-        this.isShowInfoPanel = false
         break
       case '2':
         this.searchInput = data.pipeId ? data.pipeId : ''
         break
     }
+    this.isShowInfoPanel = false
   }
   filterPbsTree(input) {
     ;(this.$refs['pbsTree'] as any).searchLocal(input, true)