From 5125c5bf64b62e0370d516e830384fe820010ed8 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Fri, 27 Oct 2023 14:48:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DFilter=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=9C=A8=E9=A1=B5=E9=9D=A2=E9=94=80=E6=AF=81=E6=97=B6?= =?UTF-8?q?=E6=9C=AA=E9=87=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/components/MapPane.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/stationOperation/components/MapPane.vue b/src/views/stationOperation/components/MapPane.vue index 0774cc8..5dcf50f 100644 --- a/src/views/stationOperation/components/MapPane.vue +++ b/src/views/stationOperation/components/MapPane.vue @@ -257,6 +257,7 @@ import { Circle } from 'ol/geom' import { fromLonLat } from 'ol/proj' import Feature from 'ol/Feature' import { Fill, Stroke, Style } from 'ol/style' +import { cloneDeep } from 'lodash' // Filter中的筛选列表 const filterList = [ @@ -394,8 +395,8 @@ export default { checkedKeys: [], // 选中的树节点 - filterList, // 筛选类型列表 - dataQualityList, // 数据质量列表 + filterList: cloneDeep(filterList), // 筛选类型列表 + dataQualityList: cloneDeep(dataQualityList), // 数据质量列表 radius: 5000, // 距离 dataSource: [], // Infomation Radius 表格数据源 From c2e34c2af3a0f2e750689ce6c2ca38063a86deba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Fri, 27 Oct 2023 16:52:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7filter=E5=8A=9F=E8=83=BD=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/index.vue | 40 +++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 355f9d1..e70c785 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -205,7 +205,7 @@ export default { markerList: [], // 地图上标记点列表 markerList_clone: [], // 地图上标记点列表 upDateStationList: [], // 有效率列表(显示波纹) - orgStationList: [], // 地图上标记点列表 + orgStationList: [], // 地图上波纹列表 markerType: 1, // 是否绘制地图上的圆 circleRadius: 0, @@ -227,6 +227,7 @@ export default { treeData: [], // 台站树列表 timer: null, updataFilterType: [], + updataFilterDataQuality: [], } }, created() { @@ -290,12 +291,19 @@ export default { }) }) this.orgStationList = res.result + let arrA = [] + let arrB = [] + let arrC = [] if (this.updataFilterType.length > 0) { - this.upDateStationList = this.orgStationList.filter((item) => - this.updataFilterType.includes(item.stationType) - ) + arrA = this.orgStationList.filter((item) => this.updataFilterType.includes(item.stationType)) } else { - this.upDateStationList = res.result + arrA = res.result + } + if (this.updataFilterDataQuality.length > 0) { + arrB = this.orgStationList.filter((item) => this.updataFilterDataQuality.includes(item.quality)) + } else { + arrB = res.result + // this.upDateStationList = res.result } if (this.markerList.length > 0) { let curList = [] @@ -308,8 +316,13 @@ export default { }) } }) - this.upDateStationList = curList + arrC = curList } else { + arrC = [] + } + if (arrA.length > 0 && arrB.length > 0 && arrC.length > 0) { + this.upDateStationList = arrA.filter((val) => arrB.includes(val)).filter((item) => arrC.includes(item)) + } else if (arrA.length == 0 || arrB.length == 0 || arrC.length == 0) { this.upDateStationList = [] } setTimeout(() => { @@ -492,8 +505,23 @@ export default { filterType, filterDataQuality ) + this.updataFilterDataQuality = [] + filterDataQuality.forEach((item) => { + if (item === 'Excellent data quality') { + this.updataFilterDataQuality.push('excellent') + } else if (item === 'Good data quality') { + this.updataFilterDataQuality.push('good') + } else if (item === 'Poor data quality') { + this.updataFilterDataQuality.push('bad') + } else { + this.updataFilterDataQuality.push('signal') + } + }) this.markerList = this.originalDataList.filter((item) => filterType.includes(item.stationType)) this.upDateStationList = this.orgStationList.filter((item) => filterType.includes(item.stationType)) + this.upDateStationList = this.upDateStationList.filter((item) => + this.updataFilterDataQuality.includes(item.quality) + ) }, // 地图图标点击