diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index afe247e..137f198 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -13,6 +13,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { waterCompPage } from '@/api/longoPeration/RiverSection'; import bus from '@/bus'; + let YSBZ, WSBZ, HLBZ, @@ -33,24 +34,17 @@ export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([ - oneMapFacilityPumpList(), - haiMianfacilitySewagePage(), - realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }), - getStationList(), - waterCompPage(), - ]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList(), waterCompPage()]); let resRainwater = results[0]; let resWSCLC = results[1]; - let rainStation = results[2]; - let stationDataList = results[3]; - let waterFactoryDatalist = results[4]; + let stationDataList = results[2]; + let waterFactoryDatalist = results[3]; // console.log('waterFactoryDatalist--', waterFactoryDatalist); //雨水泵站 let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 - let rainDataList = rainStation.data; //雨量站 + let riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 YSBZ = this.getGeojsonData(YSBZDataList); @@ -61,11 +55,12 @@ ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + + // 雨量站实时数据 + let resRain = await realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }); //雨量站实时数据 + let rainDataList = resRain.data; //雨量站 rainStationData = this.getGeojsonData(rainDataList); rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 - rainStationArea.features.forEach(feature => { - feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; - }); let WSCLCDataList = resWSCLC.data; WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index afe247e..137f198 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -13,6 +13,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { waterCompPage } from '@/api/longoPeration/RiverSection'; import bus from '@/bus'; + let YSBZ, WSBZ, HLBZ, @@ -33,24 +34,17 @@ export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([ - oneMapFacilityPumpList(), - haiMianfacilitySewagePage(), - realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }), - getStationList(), - waterCompPage(), - ]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList(), waterCompPage()]); let resRainwater = results[0]; let resWSCLC = results[1]; - let rainStation = results[2]; - let stationDataList = results[3]; - let waterFactoryDatalist = results[4]; + let stationDataList = results[2]; + let waterFactoryDatalist = results[3]; // console.log('waterFactoryDatalist--', waterFactoryDatalist); //雨水泵站 let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 - let rainDataList = rainStation.data; //雨量站 + let riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 YSBZ = this.getGeojsonData(YSBZDataList); @@ -61,11 +55,12 @@ ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + + // 雨量站实时数据 + let resRain = await realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }); //雨量站实时数据 + let rainDataList = resRain.data; //雨量站 rainStationData = this.getGeojsonData(rainDataList); rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 - rainStationArea.features.forEach(feature => { - feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; - }); let WSCLCDataList = resWSCLC.data; WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 617cc26..7d1d8ec 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -46,6 +46,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { nextTick } from 'vue'; import rainStation_icon from '@/assets/cesiumMap/legendIcon/rainStation_icon.png'; +import { rainRainlist } from '@/api/newPageline/riverCapacity.js'; const { proxy } = getCurrentInstance(); const legendList = ref([]); @@ -229,23 +230,65 @@ newfiberMapBoxVectorLayer.removeByIds([item.layername, item.layername + '_label']); } } + // 雨量站实时数据,5分钟刷新一次 if (item.layername == 'rainStation') { if (item.isCheck) { - newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); - item.rainData.features.forEach(feature => { - feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; - }); - newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + if (localStorage.getItem('showHistoryMonitor') == '1') { + // 取历史降雨量数据 + let res = await rainRainlist({ + fromTime: localStorage.getItem('setRainDateKF'), + toTime: localStorage.getItem('setRainDateKF'), + timeType: 'month', + }); + let datas = res.data || []; + datas.forEach(item => { + item.name = item.stCode + '/' + item.rainCumulative + 'mm'; + }); + // newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, datas, rainStation_icon); + + // res.data.forEach(feature => { + // // 实时降雨量范围不同颜色 小-中-大 + // if (feature.properties.pn05 <= 0.3) { + // feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + // } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + // feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + // } else if (feature.properties.pn05 > 0.8) { + // feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + // } + // }); + // newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + + console.log('雨量站历史数据---', res, localStorage.getItem('setRainDateKF')); + } else { + // 实时降雨数据 + // 渲染文字和降雨量 + item.rainData.features.forEach(feature => { + feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; + }); + newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + + item.dataArea.features.forEach(feature => { + // 实时降雨量范围不同颜色 小-中-大 + if (feature.properties.pn05 <= 0.3) { + feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + } else if (feature.properties.pn05 > 0.8) { + feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + } + }); + newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + } + setTimeout(() => { newfiberMapbox.map.moveLayer(item.layername + '_area', item.layername); }, 1000); - rainDataTimer.value = setInterval(() => { item.rainData.features.forEach(feature => { feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; }); newfiberMapbox.map.getSource(item.layername).setData(item.rainData); - }, 300000); + }, 5 * 60 * 1000); } else { newfiberMapBoxVectorLayer.removeByIds([item.layername + '_area']); clearInterval(rainDataTimer.value); diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index afe247e..137f198 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -13,6 +13,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { waterCompPage } from '@/api/longoPeration/RiverSection'; import bus from '@/bus'; + let YSBZ, WSBZ, HLBZ, @@ -33,24 +34,17 @@ export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([ - oneMapFacilityPumpList(), - haiMianfacilitySewagePage(), - realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }), - getStationList(), - waterCompPage(), - ]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList(), waterCompPage()]); let resRainwater = results[0]; let resWSCLC = results[1]; - let rainStation = results[2]; - let stationDataList = results[3]; - let waterFactoryDatalist = results[4]; + let stationDataList = results[2]; + let waterFactoryDatalist = results[3]; // console.log('waterFactoryDatalist--', waterFactoryDatalist); //雨水泵站 let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 - let rainDataList = rainStation.data; //雨量站 + let riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 YSBZ = this.getGeojsonData(YSBZDataList); @@ -61,11 +55,12 @@ ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + + // 雨量站实时数据 + let resRain = await realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }); //雨量站实时数据 + let rainDataList = resRain.data; //雨量站 rainStationData = this.getGeojsonData(rainDataList); rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 - rainStationArea.features.forEach(feature => { - feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; - }); let WSCLCDataList = resWSCLC.data; WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 617cc26..7d1d8ec 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -46,6 +46,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { nextTick } from 'vue'; import rainStation_icon from '@/assets/cesiumMap/legendIcon/rainStation_icon.png'; +import { rainRainlist } from '@/api/newPageline/riverCapacity.js'; const { proxy } = getCurrentInstance(); const legendList = ref([]); @@ -229,23 +230,65 @@ newfiberMapBoxVectorLayer.removeByIds([item.layername, item.layername + '_label']); } } + // 雨量站实时数据,5分钟刷新一次 if (item.layername == 'rainStation') { if (item.isCheck) { - newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); - item.rainData.features.forEach(feature => { - feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; - }); - newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + if (localStorage.getItem('showHistoryMonitor') == '1') { + // 取历史降雨量数据 + let res = await rainRainlist({ + fromTime: localStorage.getItem('setRainDateKF'), + toTime: localStorage.getItem('setRainDateKF'), + timeType: 'month', + }); + let datas = res.data || []; + datas.forEach(item => { + item.name = item.stCode + '/' + item.rainCumulative + 'mm'; + }); + // newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, datas, rainStation_icon); + + // res.data.forEach(feature => { + // // 实时降雨量范围不同颜色 小-中-大 + // if (feature.properties.pn05 <= 0.3) { + // feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + // } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + // feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + // } else if (feature.properties.pn05 > 0.8) { + // feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + // } + // }); + // newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + + console.log('雨量站历史数据---', res, localStorage.getItem('setRainDateKF')); + } else { + // 实时降雨数据 + // 渲染文字和降雨量 + item.rainData.features.forEach(feature => { + feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; + }); + newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + + item.dataArea.features.forEach(feature => { + // 实时降雨量范围不同颜色 小-中-大 + if (feature.properties.pn05 <= 0.3) { + feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + } else if (feature.properties.pn05 > 0.8) { + feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + } + }); + newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + } + setTimeout(() => { newfiberMapbox.map.moveLayer(item.layername + '_area', item.layername); }, 1000); - rainDataTimer.value = setInterval(() => { item.rainData.features.forEach(feature => { feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; }); newfiberMapbox.map.getSource(item.layername).setData(item.rainData); - }, 300000); + }, 5 * 60 * 1000); } else { newfiberMapBoxVectorLayer.removeByIds([item.layername + '_area']); clearInterval(rainDataTimer.value); diff --git a/src/views/sponeScreen/projectHM/index.vue b/src/views/sponeScreen/projectHM/index.vue index 8bb761e..ba2f5e9 100644 --- a/src/views/sponeScreen/projectHM/index.vue +++ b/src/views/sponeScreen/projectHM/index.vue @@ -32,6 +32,7 @@ import qipao from '@/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue'; import bus from '@/bus/index'; import PipeDetail from '@/views/sponeScreen/waterFlood/pipeDetail.vue'; //管网监测点详情 +import { rtuWarnConfigList } from '@/api/dataAnalysis/historyGj.js'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -70,12 +71,29 @@ pitch: 30, }); } + +// 历史某一天报警 +function historyDataWarn() { + rtuWarnConfigList({ startTime: localStorage.getItem('setRainDateKF'), endTime: localStorage.getItem('setRainDateKF') }).then(res => { + console.log('历史告警数据---', res); + let datas = res.data || []; + if (datas.length > 0) { + // 渲染报警图层 + } + }); +} + onMounted(() => { // 管网监测点 bus.on('pipeMonitorBus', params => { pipeParams.value = params; showPipe.value = true; }); + + // 实时报警 + nextTick(() => { + historyDataWarn(); + }); }); onBeforeUnmount(() => { bus.off('pipeMonitorBus'); diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index afe247e..137f198 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -13,6 +13,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { waterCompPage } from '@/api/longoPeration/RiverSection'; import bus from '@/bus'; + let YSBZ, WSBZ, HLBZ, @@ -33,24 +34,17 @@ export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([ - oneMapFacilityPumpList(), - haiMianfacilitySewagePage(), - realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }), - getStationList(), - waterCompPage(), - ]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList(), waterCompPage()]); let resRainwater = results[0]; let resWSCLC = results[1]; - let rainStation = results[2]; - let stationDataList = results[3]; - let waterFactoryDatalist = results[4]; + let stationDataList = results[2]; + let waterFactoryDatalist = results[3]; // console.log('waterFactoryDatalist--', waterFactoryDatalist); //雨水泵站 let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 - let rainDataList = rainStation.data; //雨量站 + let riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 YSBZ = this.getGeojsonData(YSBZDataList); @@ -61,11 +55,12 @@ ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + + // 雨量站实时数据 + let resRain = await realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }); //雨量站实时数据 + let rainDataList = resRain.data; //雨量站 rainStationData = this.getGeojsonData(rainDataList); rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 - rainStationArea.features.forEach(feature => { - feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; - }); let WSCLCDataList = resWSCLC.data; WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 617cc26..7d1d8ec 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -46,6 +46,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { nextTick } from 'vue'; import rainStation_icon from '@/assets/cesiumMap/legendIcon/rainStation_icon.png'; +import { rainRainlist } from '@/api/newPageline/riverCapacity.js'; const { proxy } = getCurrentInstance(); const legendList = ref([]); @@ -229,23 +230,65 @@ newfiberMapBoxVectorLayer.removeByIds([item.layername, item.layername + '_label']); } } + // 雨量站实时数据,5分钟刷新一次 if (item.layername == 'rainStation') { if (item.isCheck) { - newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); - item.rainData.features.forEach(feature => { - feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; - }); - newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + if (localStorage.getItem('showHistoryMonitor') == '1') { + // 取历史降雨量数据 + let res = await rainRainlist({ + fromTime: localStorage.getItem('setRainDateKF'), + toTime: localStorage.getItem('setRainDateKF'), + timeType: 'month', + }); + let datas = res.data || []; + datas.forEach(item => { + item.name = item.stCode + '/' + item.rainCumulative + 'mm'; + }); + // newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, datas, rainStation_icon); + + // res.data.forEach(feature => { + // // 实时降雨量范围不同颜色 小-中-大 + // if (feature.properties.pn05 <= 0.3) { + // feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + // } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + // feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + // } else if (feature.properties.pn05 > 0.8) { + // feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + // } + // }); + // newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + + console.log('雨量站历史数据---', res, localStorage.getItem('setRainDateKF')); + } else { + // 实时降雨数据 + // 渲染文字和降雨量 + item.rainData.features.forEach(feature => { + feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; + }); + newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + + item.dataArea.features.forEach(feature => { + // 实时降雨量范围不同颜色 小-中-大 + if (feature.properties.pn05 <= 0.3) { + feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + } else if (feature.properties.pn05 > 0.8) { + feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + } + }); + newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + } + setTimeout(() => { newfiberMapbox.map.moveLayer(item.layername + '_area', item.layername); }, 1000); - rainDataTimer.value = setInterval(() => { item.rainData.features.forEach(feature => { feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; }); newfiberMapbox.map.getSource(item.layername).setData(item.rainData); - }, 300000); + }, 5 * 60 * 1000); } else { newfiberMapBoxVectorLayer.removeByIds([item.layername + '_area']); clearInterval(rainDataTimer.value); diff --git a/src/views/sponeScreen/projectHM/index.vue b/src/views/sponeScreen/projectHM/index.vue index 8bb761e..ba2f5e9 100644 --- a/src/views/sponeScreen/projectHM/index.vue +++ b/src/views/sponeScreen/projectHM/index.vue @@ -32,6 +32,7 @@ import qipao from '@/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue'; import bus from '@/bus/index'; import PipeDetail from '@/views/sponeScreen/waterFlood/pipeDetail.vue'; //管网监测点详情 +import { rtuWarnConfigList } from '@/api/dataAnalysis/historyGj.js'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -70,12 +71,29 @@ pitch: 30, }); } + +// 历史某一天报警 +function historyDataWarn() { + rtuWarnConfigList({ startTime: localStorage.getItem('setRainDateKF'), endTime: localStorage.getItem('setRainDateKF') }).then(res => { + console.log('历史告警数据---', res); + let datas = res.data || []; + if (datas.length > 0) { + // 渲染报警图层 + } + }); +} + onMounted(() => { // 管网监测点 bus.on('pipeMonitorBus', params => { pipeParams.value = params; showPipe.value = true; }); + + // 实时报警 + nextTick(() => { + historyDataWarn(); + }); }); onBeforeUnmount(() => { bus.off('pipeMonitorBus'); diff --git a/src/views/sponeScreen/waterFlood/index.vue b/src/views/sponeScreen/waterFlood/index.vue index 8f0f791..c957867 100644 --- a/src/views/sponeScreen/waterFlood/index.vue +++ b/src/views/sponeScreen/waterFlood/index.vue @@ -61,6 +61,8 @@ import bus from '@/bus/index'; import riverFlow from '@/assets/geojson/kaifeng/riverFlow.json'; import newfiberMapBoxVectorLayer from '@/views/sponeScreen/gisMF/mapboxVectorLayer.js'; +import { rtuWarnRecordRealtimeDetail } from '@/api/floodSys/oneMap'; +import { nextTick } from 'vue'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -86,6 +88,17 @@ { immediate: true } ); +// 实时报警 +function realDataWarn() { + rtuWarnRecordRealtimeDetail().then(res => { + console.log('实时告警数据---', res); + let datas = res.data || []; + if (datas.length > 0) { + // 渲染报警图层 + } + }); +} + onMounted(() => { // 泵站工况图 bus.on('checkBZGYT', params => { @@ -179,6 +192,11 @@ }, ]); }, 1200); + + // 实时报警 + nextTick(() => { + realDataWarn(); + }); }); onBeforeUnmount(() => { bus.off('checkBZGYT'); diff --git a/src/api/dataAnalysis/historyGj.js b/src/api/dataAnalysis/historyGj.js index b328fdc..f9eee06 100644 --- a/src/api/dataAnalysis/historyGj.js +++ b/src/api/dataAnalysis/historyGj.js @@ -25,6 +25,14 @@ }); } +export function rtuWarnConfigList(params) { + return request({ + url: `/business/rtuWarnRecordHistory/list`, + method: 'get', + params, + }); +} + // 获取用户详细信息 export function rtuWarnConfigInfo(params) { return request({ diff --git a/src/views/floodSys/assetManage/floodYL.vue b/src/views/floodSys/assetManage/floodYL.vue index c7733db..11fa6fc 100644 --- a/src/views/floodSys/assetManage/floodYL.vue +++ b/src/views/floodSys/assetManage/floodYL.vue @@ -24,14 +24,31 @@ - + - + + + + @@ -52,7 +69,7 @@ /> - + @@ -66,8 +83,8 @@ - - + + @@ -79,31 +96,31 @@ - + - + - + @@ -141,10 +158,10 @@ latitude: '', originType: '', solution: '', - pipeCode: [], - beforeSolutionPhoto: [], - sgSolutionPhoto: [], - afterSolutionPhoto: [], + stCodes: [], + beforeSolutionPhotos: [], + constructionPhotos: [], + afterSolutionPhotos: [], }, queryParams: { pageNum: 1, @@ -196,6 +213,7 @@ dialogTitle.value = '修改易涝点'; nextTick(() => { formData.value = response.data; + formData.value.stCodes = formData.value.stCodes ? formData.value.stCodes.split(',') : []; }); }); } @@ -204,6 +222,7 @@ proxy.$refs['formRef'].validate(valid => { if (valid) { if (dialogTitle.value == '修改易涝点') { + formData.value.stCodes = formData.value.stCodes.join(','); floodYLEdit(formData.value).then(response => { proxy.$modal.msgSuccess('修改成功'); dialogShow.value = false; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index c2a4bd6..8ab6176 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -118,11 +118,11 @@ nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#1BFFF7', + color: '#FFF21C', }, axisLabel: { show: true, - color: '#1BFFF7', + color: '#FFF21C', }, splitLine: { lineStyle: { @@ -168,7 +168,7 @@ type: 'line', data: props.data.yAxis3, yAxisIndex: 2, - color: '#1BFFF7', + color: '#FFF21C', }, ], }; diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index 1707a00..a562224 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -224,6 +224,12 @@ function menuClick(id) { menuIndex.value = id; showPanel.value = false; + // 设置监测站点是否取历史数据 + if (id == 2) { + localStorage.setItem('showHistoryMonitor', '1'); + } else { + localStorage.setItem('showHistoryMonitor', '2'); + } newfiberMapBoxVectorLayer.removeByIds(['bengzhan_Area']); //清除泵站范围 bus.emit('closeCesiumPopup'); //取消弹窗 } @@ -346,7 +352,9 @@ zoom: 15, }); }; + onMounted(() => { + localStorage.setItem('showHistoryMonitor', '2'); getWeather(); getAllStationInfo(); let initeMapTimer = setInterval(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index afe247e..137f198 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -13,6 +13,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { waterCompPage } from '@/api/longoPeration/RiverSection'; import bus from '@/bus'; + let YSBZ, WSBZ, HLBZ, @@ -33,24 +34,17 @@ export default class cesiumMapCommonLegend { //获取站点数据 static async getStationData() { - let results = await Promise.all([ - oneMapFacilityPumpList(), - haiMianfacilitySewagePage(), - realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }), - getStationList(), - waterCompPage(), - ]); + let results = await Promise.all([oneMapFacilityPumpList(), haiMianfacilitySewagePage(), getStationList(), waterCompPage()]); let resRainwater = results[0]; let resWSCLC = results[1]; - let rainStation = results[2]; - let stationDataList = results[3]; - let waterFactoryDatalist = results[4]; + let stationDataList = results[2]; + let waterFactoryDatalist = results[3]; // console.log('waterFactoryDatalist--', waterFactoryDatalist); //雨水泵站 let YSBZDataList = resRainwater.data.filter(data => data.pumpType == 'rain_water'); //雨水泵站 let WSBZDataList = resRainwater.data.filter(data => data.pumpType == 'sewage_water'); //污水泵站 let HLBZDataList = resRainwater.data.filter(data => data.pumpType == 'confluence'); //合流泵站 - let rainDataList = rainStation.data; //雨量站 + let riverDataList = stationDataList.data.filter(data => data.monitorTargetType == 'river'); //河道监测 YSBZ = this.getGeojsonData(YSBZDataList); @@ -61,11 +55,12 @@ ysArea = this.getPolygonGeojson(YSBZDataList); //雨水泵站范围 wsArea = this.getPolygonGeojson(WSBZDataList); //污水泵站范围 hsArea = this.getPolygonGeojson(HLBZDataList); //合流泵站范围 + + // 雨量站实时数据 + let resRain = await realtimeRainfallStatistics({ monitorTargetType: 'rainfall', orderBy: 'tt desc' }); //雨量站实时数据 + let rainDataList = resRain.data; //雨量站 rainStationData = this.getGeojsonData(rainDataList); rainStationArea = this.getPolygonGeojson(rainDataList); //雨量站范围 - rainStationArea.features.forEach(feature => { - feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; - }); let WSCLCDataList = resWSCLC.data; WSCLC = this.getGeojsonData(WSCLCDataList); //污水处理厂 diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 617cc26..7d1d8ec 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -46,6 +46,7 @@ import { realtimeRainfallStatistics } from '@/api/floodSys/oneMap.js'; import { nextTick } from 'vue'; import rainStation_icon from '@/assets/cesiumMap/legendIcon/rainStation_icon.png'; +import { rainRainlist } from '@/api/newPageline/riverCapacity.js'; const { proxy } = getCurrentInstance(); const legendList = ref([]); @@ -229,23 +230,65 @@ newfiberMapBoxVectorLayer.removeByIds([item.layername, item.layername + '_label']); } } + // 雨量站实时数据,5分钟刷新一次 if (item.layername == 'rainStation') { if (item.isCheck) { - newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); - item.rainData.features.forEach(feature => { - feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; - }); - newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + if (localStorage.getItem('showHistoryMonitor') == '1') { + // 取历史降雨量数据 + let res = await rainRainlist({ + fromTime: localStorage.getItem('setRainDateKF'), + toTime: localStorage.getItem('setRainDateKF'), + timeType: 'month', + }); + let datas = res.data || []; + datas.forEach(item => { + item.name = item.stCode + '/' + item.rainCumulative + 'mm'; + }); + // newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, datas, rainStation_icon); + + // res.data.forEach(feature => { + // // 实时降雨量范围不同颜色 小-中-大 + // if (feature.properties.pn05 <= 0.3) { + // feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + // } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + // feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + // } else if (feature.properties.pn05 > 0.8) { + // feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + // } + // }); + // newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + + console.log('雨量站历史数据---', res, localStorage.getItem('setRainDateKF')); + } else { + // 实时降雨数据 + // 渲染文字和降雨量 + item.rainData.features.forEach(feature => { + feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; + }); + newfiberMapBoxVectorLayer.addGeojsonSymbol(item.layername, item.rainData, rainStation_icon); + + item.dataArea.features.forEach(feature => { + // 实时降雨量范围不同颜色 小-中-大 + if (feature.properties.pn05 <= 0.3) { + feature.properties.fillcolor = 'rgba(41, 184, 219,0.7)'; + } else if (feature.properties.pn05 > 0.3 && feature.properties.pn05 <= 0.8) { + feature.properties.fillcolor = 'rgba(255, 237, 82,0.7)'; + } else if (feature.properties.pn05 > 0.8) { + feature.properties.fillcolor = 'rgba(255, 69, 69,0.7)'; + } + }); + newfiberMapBoxVectorLayer.addGeojsonPolygon(item.layername + '_area', item.dataArea); + } + setTimeout(() => { newfiberMapbox.map.moveLayer(item.layername + '_area', item.layername); }, 1000); - rainDataTimer.value = setInterval(() => { item.rainData.features.forEach(feature => { feature.properties.name = feature.properties.stName + '/' + feature.properties.pn05 + 'mm'; }); newfiberMapbox.map.getSource(item.layername).setData(item.rainData); - }, 300000); + }, 5 * 60 * 1000); } else { newfiberMapBoxVectorLayer.removeByIds([item.layername + '_area']); clearInterval(rainDataTimer.value); diff --git a/src/views/sponeScreen/projectHM/index.vue b/src/views/sponeScreen/projectHM/index.vue index 8bb761e..ba2f5e9 100644 --- a/src/views/sponeScreen/projectHM/index.vue +++ b/src/views/sponeScreen/projectHM/index.vue @@ -32,6 +32,7 @@ import qipao from '@/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue'; import bus from '@/bus/index'; import PipeDetail from '@/views/sponeScreen/waterFlood/pipeDetail.vue'; //管网监测点详情 +import { rtuWarnConfigList } from '@/api/dataAnalysis/historyGj.js'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -70,12 +71,29 @@ pitch: 30, }); } + +// 历史某一天报警 +function historyDataWarn() { + rtuWarnConfigList({ startTime: localStorage.getItem('setRainDateKF'), endTime: localStorage.getItem('setRainDateKF') }).then(res => { + console.log('历史告警数据---', res); + let datas = res.data || []; + if (datas.length > 0) { + // 渲染报警图层 + } + }); +} + onMounted(() => { // 管网监测点 bus.on('pipeMonitorBus', params => { pipeParams.value = params; showPipe.value = true; }); + + // 实时报警 + nextTick(() => { + historyDataWarn(); + }); }); onBeforeUnmount(() => { bus.off('pipeMonitorBus'); diff --git a/src/views/sponeScreen/waterFlood/index.vue b/src/views/sponeScreen/waterFlood/index.vue index 8f0f791..c957867 100644 --- a/src/views/sponeScreen/waterFlood/index.vue +++ b/src/views/sponeScreen/waterFlood/index.vue @@ -61,6 +61,8 @@ import bus from '@/bus/index'; import riverFlow from '@/assets/geojson/kaifeng/riverFlow.json'; import newfiberMapBoxVectorLayer from '@/views/sponeScreen/gisMF/mapboxVectorLayer.js'; +import { rtuWarnRecordRealtimeDetail } from '@/api/floodSys/oneMap'; +import { nextTick } from 'vue'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -86,6 +88,17 @@ { immediate: true } ); +// 实时报警 +function realDataWarn() { + rtuWarnRecordRealtimeDetail().then(res => { + console.log('实时告警数据---', res); + let datas = res.data || []; + if (datas.length > 0) { + // 渲染报警图层 + } + }); +} + onMounted(() => { // 泵站工况图 bus.on('checkBZGYT', params => { @@ -179,6 +192,11 @@ }, ]); }, 1200); + + // 实时报警 + nextTick(() => { + realDataWarn(); + }); }); onBeforeUnmount(() => { bus.off('checkBZGYT'); diff --git a/src/views/sponeScreen/waterFlood/rainCaldar.vue b/src/views/sponeScreen/waterFlood/rainCaldar.vue index 3c58a23..64da9a6 100644 --- a/src/views/sponeScreen/waterFlood/rainCaldar.vue +++ b/src/views/sponeScreen/waterFlood/rainCaldar.vue @@ -19,9 +19,9 @@