diff --git a/src/views/overview/overviewBdOffline.vue b/src/views/overview/overviewBdOffline.vue index 6b1be55..0380652 100644 --- a/src/views/overview/overviewBdOffline.vue +++ b/src/views/overview/overviewBdOffline.vue @@ -18,7 +18,7 @@ width="290" trigger="click"> 共找到 {{ searchWells.length }} 个符合条件的井 -
+
{{ index+1 }}
{{ well.wellCode }}
@@ -172,7 +172,7 @@
- 显示全部闸井 + 显示全部闸井
@@ -348,16 +348,7 @@ } }, watch: { - // 监控是否选择全部选项 - showAll(val) { - if (val) { // 显示全部 - this.listQuery.isAlarm = '0' - this.filterAlarm(false) - } else { // 仅显示报警 - this.listQuery.isAlarm = '1' - this.filterAlarm(true) - } - }, + // 监控关键字,如果置空认为清空查询 keywords(val) { if (val === '') { @@ -378,6 +369,16 @@ // this.refreshCenter() }, methods: { + // 点击显示全部闸井 + showAllWells(val) { + if (val) { // 显示全部 + this.listQuery.isAlarm = '0' + this.filterAlarm(false) + } else { // 仅显示报警 + this.listQuery.isAlarm = '1' + this.filterAlarm(true) + } + }, // 30s倒计时 countDown() { this.clock = window.setInterval(() => { @@ -505,8 +506,13 @@ // 清空筛选条件 this.listQuery.deptid = [] this.listQuery.wellType = '' + this.showAll = false // 查询全部井,是否匹配,匹配则显示marker this.searchWells = [] // 符合查询结果放入searchWells,查询前先置空 + this.showMarkers = [] // 清空所有marker + for (const alarmWell of this.alarmWells) { + alarmWell.visible = false + } // this.showMarkers = [] // 需要显示的结果放入showMarkers for (const marker of this.markers) { let show = true @@ -552,8 +558,10 @@ // 如果查询条件为空,直接全部返回 if (deptid && deptid.length === 0 && wellType && wellType === '') { this.showMarkers = this.markers + this.showAll = true } else { this.showMarkers = [] + this.showAll = false for (const marker of this.markers) { let show = true // 部门不为空, 且没有匹配成功 @@ -596,6 +604,8 @@ filterAlarm(isAlarm) { this.listQuery.wellType = '' this.listQuery.deptid = [] + this.keywords = '' + this.searchWells = [] const hideWellIds = [] const hideWellCodes = [] if (isAlarm) { @@ -864,7 +874,7 @@ this.center = well.position this.zoom = 18 }, - // 3分钟无操作定时器,无用 + // 3分钟无操作定时器 startTimer() { console.log('instartTimer') window.clearInterval(this.clock2) // 清除循环更换地图中心定时器 @@ -876,7 +886,7 @@ // that.countDownCenter() }, 1000 * 60 * 1) }, - // 判断超时,无用 + // 判断超时 isTimeOut() { console.log('isTimout') const that = this