diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 5c82903..7d0b611 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -212,7 +212,8 @@ export default { stationTypeList: [], treeData: [], // 台站树列表 - timer: null + timer: null, + updataFilterType: [] } }, created() { @@ -269,7 +270,26 @@ export default { }) }) this.orgStationList = res.result - this.upDateStationList = res.result + if (this.updataFilterType.length>0) { + this.upDateStationList = this.orgStationList.filter(item => this.updataFilterType.includes(item.stationType)) + } else { + this.upDateStationList = res.result + } + if (this.markerList.length > 0) { + let curList = [] + this.markerList.forEach(item => { + if (item.stationType!="Nuclear Facility" && item.stationType!="NRL") { + this.orgStationList.forEach(el => { + if (parseInt(el.id) == item.stationId) { + curList.push(el) + } + }) + } + }) + this.upDateStationList=curList + } else { + this.upDateStationList=[] + } } else { this.$message.warning("This operation fails. Contact your system administrator") } @@ -409,6 +429,23 @@ export default { // 修改地图上的marker列表 onChangeMarker(markerList) { this.markerList = markerList + let curList = [] + if (markerList.length>0) { + markerList.forEach(item => { + if (item.stationType!="Nuclear Facility" && item.stationType!="NRL") { + this.orgStationList.forEach(el => { + if (parseInt(el.id) == item.stationId) { + el.stationType = item.stationType + el.stationId = item.stationId + curList.push(el) + } + }) + } + }) + this.upDateStationList=curList + } else { + this.upDateStationList=[] + } }, // 是否绘制圆圈 @@ -421,6 +458,7 @@ export default { * 根据类型筛选地图上的marker列表 */ onFilterMarker({ filterType, filterDataQuality }) { + this.updataFilterType = filterType console.log( '%c [ filterType, filterDataQuality ]-343', 'font-size:13px; background:pink; color:#bf2c9f;',