diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index bc4be4f..6d2b132 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -38,9 +38,10 @@ grid: { top: 40, bottom: 30, + right: 80, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -72,8 +73,9 @@ ], yAxis: [ { - name: props.data.yAxisName1 || '', + name: '', inverse: props.data.inverse || false, //翻转 + nameLocation: 'start', // 坐标轴名称显示位置 type: 'value', axisLabel: { color: '#fff', @@ -90,22 +92,41 @@ }, }, { - name: props.data.yAxisName2 || '', + name: '', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 + nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#fff', + color: '#FFB049', }, axisLabel: { show: true, - color: '#fff', + color: '#FFB049', }, splitLine: { lineStyle: { - color: '#D1DEEE', + color: '#1D5D81', type: 'dashed', - color: '#53D8FB', + }, + }, + }, + { + name: '', + inverse: false, + offset: 40, + nameLocation: 'end', // 坐标轴名称显示位置 + type: 'value', + nameTextStyle: { + color: '#1BFFF7', + }, + axisLabel: { + show: true, + color: '#1BFFF7', + }, + splitLine: { + lineStyle: { + color: '#1D5D81', + type: 'dashed', }, }, }, @@ -134,11 +155,19 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '流量(m³/h)', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, - color: '#FFF21C', + color: '#FFB049', + }, + { + // smooth: true, //变为曲线 默认false折线 + name: 'ss(mg/L)', + type: 'line', + data: props.data.yAxis3, + yAxisIndex: 2, + color: '#1BFFF7', }, ], }; diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index bc4be4f..6d2b132 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -38,9 +38,10 @@ grid: { top: 40, bottom: 30, + right: 80, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -72,8 +73,9 @@ ], yAxis: [ { - name: props.data.yAxisName1 || '', + name: '', inverse: props.data.inverse || false, //翻转 + nameLocation: 'start', // 坐标轴名称显示位置 type: 'value', axisLabel: { color: '#fff', @@ -90,22 +92,41 @@ }, }, { - name: props.data.yAxisName2 || '', + name: '', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 + nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#fff', + color: '#FFB049', }, axisLabel: { show: true, - color: '#fff', + color: '#FFB049', }, splitLine: { lineStyle: { - color: '#D1DEEE', + color: '#1D5D81', type: 'dashed', - color: '#53D8FB', + }, + }, + }, + { + name: '', + inverse: false, + offset: 40, + nameLocation: 'end', // 坐标轴名称显示位置 + type: 'value', + nameTextStyle: { + color: '#1BFFF7', + }, + axisLabel: { + show: true, + color: '#1BFFF7', + }, + splitLine: { + lineStyle: { + color: '#1D5D81', + type: 'dashed', }, }, }, @@ -134,11 +155,19 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '流量(m³/h)', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, - color: '#FFF21C', + color: '#FFB049', + }, + { + // smooth: true, //变为曲线 默认false折线 + name: 'ss(mg/L)', + type: 'line', + data: props.data.yAxis3, + yAxisIndex: 2, + color: '#1BFFF7', }, ], }; diff --git a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue index 8cd4ac5..e974568 100644 --- a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue @@ -28,7 +28,6 @@ const init = () => { let chartDom = echarts.init(document.getElementById(allData.id)); - var barWidth = 12; var option; option = { color: ['#3FFFC2', '#FFF21C', 'orange'], @@ -40,11 +39,12 @@ bottom: 30, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + // data: ['降雨量(mm)', '水深(m)'], textStyle: { color: '#fff', }, }, + dataZoom: [{ type: 'inside', startValue: props.data.xAxis[props.data.xAxis - 48] }], xAxis: [ { type: 'category', @@ -71,7 +71,7 @@ ], yAxis: [ { - name: '雨量(mm)', + name: '降雨量(mm)', type: 'value', inverse: true, nameLocation: 'start', // 坐标轴名称显示位置 @@ -93,9 +93,9 @@ name: '水深(m)', type: 'value', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 - nameTextStyle: { color: '#fff' }, - axisLabel: { show: true, color: '#fff' }, + nameLocation: 'end', // 坐标轴名称显示位置 + nameTextStyle: { color: '#FFF21C' }, + axisLabel: { show: true, color: '#FFF21C' }, splitLine: { lineStyle: { color: '#D1DEEE', @@ -107,9 +107,8 @@ ], series: [ { - name: '降雨量(mm)', + name: '', type: 'bar', - barWidth: barWidth, barGap: '10%', // Make series be overlap barCateGoryGap: '10%', itemStyle: { @@ -123,7 +122,7 @@ }, { smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index bc4be4f..6d2b132 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -38,9 +38,10 @@ grid: { top: 40, bottom: 30, + right: 80, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -72,8 +73,9 @@ ], yAxis: [ { - name: props.data.yAxisName1 || '', + name: '', inverse: props.data.inverse || false, //翻转 + nameLocation: 'start', // 坐标轴名称显示位置 type: 'value', axisLabel: { color: '#fff', @@ -90,22 +92,41 @@ }, }, { - name: props.data.yAxisName2 || '', + name: '', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 + nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#fff', + color: '#FFB049', }, axisLabel: { show: true, - color: '#fff', + color: '#FFB049', }, splitLine: { lineStyle: { - color: '#D1DEEE', + color: '#1D5D81', type: 'dashed', - color: '#53D8FB', + }, + }, + }, + { + name: '', + inverse: false, + offset: 40, + nameLocation: 'end', // 坐标轴名称显示位置 + type: 'value', + nameTextStyle: { + color: '#1BFFF7', + }, + axisLabel: { + show: true, + color: '#1BFFF7', + }, + splitLine: { + lineStyle: { + color: '#1D5D81', + type: 'dashed', }, }, }, @@ -134,11 +155,19 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '流量(m³/h)', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, - color: '#FFF21C', + color: '#FFB049', + }, + { + // smooth: true, //变为曲线 默认false折线 + name: 'ss(mg/L)', + type: 'line', + data: props.data.yAxis3, + yAxisIndex: 2, + color: '#1BFFF7', }, ], }; diff --git a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue index 8cd4ac5..e974568 100644 --- a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue @@ -28,7 +28,6 @@ const init = () => { let chartDom = echarts.init(document.getElementById(allData.id)); - var barWidth = 12; var option; option = { color: ['#3FFFC2', '#FFF21C', 'orange'], @@ -40,11 +39,12 @@ bottom: 30, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + // data: ['降雨量(mm)', '水深(m)'], textStyle: { color: '#fff', }, }, + dataZoom: [{ type: 'inside', startValue: props.data.xAxis[props.data.xAxis - 48] }], xAxis: [ { type: 'category', @@ -71,7 +71,7 @@ ], yAxis: [ { - name: '雨量(mm)', + name: '降雨量(mm)', type: 'value', inverse: true, nameLocation: 'start', // 坐标轴名称显示位置 @@ -93,9 +93,9 @@ name: '水深(m)', type: 'value', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 - nameTextStyle: { color: '#fff' }, - axisLabel: { show: true, color: '#fff' }, + nameLocation: 'end', // 坐标轴名称显示位置 + nameTextStyle: { color: '#FFF21C' }, + axisLabel: { show: true, color: '#FFF21C' }, splitLine: { lineStyle: { color: '#D1DEEE', @@ -107,9 +107,8 @@ ], series: [ { - name: '降雨量(mm)', + name: '', type: 'bar', - barWidth: barWidth, barGap: '10%', // Make series be overlap barCateGoryGap: '10%', itemStyle: { @@ -123,7 +122,7 @@ }, { smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index a0ce88f..aa9e1af 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -163,6 +163,8 @@ const permissionStore = usePermissionStore(); const { proxy } = getCurrentInstance(); +const projectParams = ref({}); +const projectParamsSS = ref({}); const router = useRouter(); const weatherInfo = ref({}); const stationList = ref([]); @@ -177,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(1); +const menuIndex = ref(2); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); @@ -385,10 +387,12 @@ }); // 典型项目分析 bus.on('checkProjectFX', params => { + projectParams.value = params; showProjectDX.value = true; }); // 典型项目设施分析 bus.on('checkSSFX', params => { + projectParamsSS.value = params; showProjectSSDX.value = true; }); }); diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index bc4be4f..6d2b132 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -38,9 +38,10 @@ grid: { top: 40, bottom: 30, + right: 80, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -72,8 +73,9 @@ ], yAxis: [ { - name: props.data.yAxisName1 || '', + name: '', inverse: props.data.inverse || false, //翻转 + nameLocation: 'start', // 坐标轴名称显示位置 type: 'value', axisLabel: { color: '#fff', @@ -90,22 +92,41 @@ }, }, { - name: props.data.yAxisName2 || '', + name: '', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 + nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#fff', + color: '#FFB049', }, axisLabel: { show: true, - color: '#fff', + color: '#FFB049', }, splitLine: { lineStyle: { - color: '#D1DEEE', + color: '#1D5D81', type: 'dashed', - color: '#53D8FB', + }, + }, + }, + { + name: '', + inverse: false, + offset: 40, + nameLocation: 'end', // 坐标轴名称显示位置 + type: 'value', + nameTextStyle: { + color: '#1BFFF7', + }, + axisLabel: { + show: true, + color: '#1BFFF7', + }, + splitLine: { + lineStyle: { + color: '#1D5D81', + type: 'dashed', }, }, }, @@ -134,11 +155,19 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '流量(m³/h)', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, - color: '#FFF21C', + color: '#FFB049', + }, + { + // smooth: true, //变为曲线 默认false折线 + name: 'ss(mg/L)', + type: 'line', + data: props.data.yAxis3, + yAxisIndex: 2, + color: '#1BFFF7', }, ], }; diff --git a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue index 8cd4ac5..e974568 100644 --- a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue @@ -28,7 +28,6 @@ const init = () => { let chartDom = echarts.init(document.getElementById(allData.id)); - var barWidth = 12; var option; option = { color: ['#3FFFC2', '#FFF21C', 'orange'], @@ -40,11 +39,12 @@ bottom: 30, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + // data: ['降雨量(mm)', '水深(m)'], textStyle: { color: '#fff', }, }, + dataZoom: [{ type: 'inside', startValue: props.data.xAxis[props.data.xAxis - 48] }], xAxis: [ { type: 'category', @@ -71,7 +71,7 @@ ], yAxis: [ { - name: '雨量(mm)', + name: '降雨量(mm)', type: 'value', inverse: true, nameLocation: 'start', // 坐标轴名称显示位置 @@ -93,9 +93,9 @@ name: '水深(m)', type: 'value', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 - nameTextStyle: { color: '#fff' }, - axisLabel: { show: true, color: '#fff' }, + nameLocation: 'end', // 坐标轴名称显示位置 + nameTextStyle: { color: '#FFF21C' }, + axisLabel: { show: true, color: '#FFF21C' }, splitLine: { lineStyle: { color: '#D1DEEE', @@ -107,9 +107,8 @@ ], series: [ { - name: '降雨量(mm)', + name: '', type: 'bar', - barWidth: barWidth, barGap: '10%', // Make series be overlap barCateGoryGap: '10%', itemStyle: { @@ -123,7 +122,7 @@ }, { smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index a0ce88f..aa9e1af 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -163,6 +163,8 @@ const permissionStore = usePermissionStore(); const { proxy } = getCurrentInstance(); +const projectParams = ref({}); +const projectParamsSS = ref({}); const router = useRouter(); const weatherInfo = ref({}); const stationList = ref([]); @@ -177,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(1); +const menuIndex = ref(2); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); @@ -385,10 +387,12 @@ }); // 典型项目分析 bus.on('checkProjectFX', params => { + projectParams.value = params; showProjectDX.value = true; }); // 典型项目设施分析 bus.on('checkSSFX', params => { + projectParamsSS.value = params; showProjectSSDX.value = true; }); }); diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index 91e058e..f4a0ef3 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -63,18 +63,18 @@ -
+
@@ -90,28 +90,9 @@ import xmfx from '@/assets/newImgs/HMScreen/xmfx.png'; import bus from '@/bus'; import WaterAnalysis_icon from '@/assets/newImgs/HMScreen/WaterAnalysis_icon.png'; -import { graphicReport, realtimeDataLatest } from '@/api/dataAnalysis/syntherticData'; +import { graphicReport } from '@/api/dataAnalysis/syntherticData'; +import { listrtuSiteInfo } from '@/api/dataAnalysis/rtuSiteInfo'; -const chartDataJSD = ref({ - xAxis: [ - '2024-06-12 08:00', - '2024-06-13 08:00', - '2024-06-14 08:00', - '2024-06-15 08:00', - '2024-06-16 08:00', - '2024-06-17 08:00', - '2024-06-18 08:00', - '2024-06-19 08:00', - '2024-06-20 08:00', - ], - yAxis: [1.1, 1.3, 2, 1.25, 1.1, 3, 3.5, 1.3, 3.8, 1.2, 2, 1], //降雨量 - yAxis2: [0.1, 0.2, 0.3, 0.2, 0.1, 0.4, 0.5, 0.23, 0.6, 0.1, 0.2, 0.1], //水深 - refresh: 1, -}); -const ListBod = ref([ - { name: '明伦桥俩侧积水点', value: '1' }, - { name: '复兴大道四季城积水点', value: '2' }, -]); const areaList = ref([ { name: '古城片区', value: '0', lonlat: [114.35, 34.802] }, { name: '城东南片区', value: '1', lonlat: [114.37, 34.792] }, @@ -124,11 +105,6 @@ { name: '市民综合体', value: '3' }, ]); -const XmListA = ref([ - { name: '出口监测点', value: '1' }, - { name: '进口监测点', value: '2' }, -]); - const AllData = reactive({ queryParams: { BODName: '1', area: '', Xm: '1', XmP: '', XmA: '', XmQ: '1' }, }); @@ -181,18 +157,73 @@ let res2 = await graphicReport(params2); if (res2 && res2.code == 200) { let datas = res2.data; - chartDataSS.value.yAxis2 = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataSS.value.yAxis2 = datas.propertyMonitorList[3] ? datas.propertyMonitorList[3].ylist : []; //小时流量 + chartDataSS.value.yAxis3 = datas.propertyMonitorList[2] ? datas.propertyMonitorList[2].ylist : []; //ss } chartDataSS.value.refresh = Math.random(); loadingSS.value = false; } -function jishuiClick() {} -const jishuichange = () => {}; +// 积水分析 +const loadingJSD = ref(true); +const rainCode = ref(''); +const jsdVal = ref(''); +const jsdList = ref([]); +const chartDataJSD = ref({ + xAxis: [], + yAxis: [], //降雨量 + yAxis2: [], //水深 + refresh: 1, +}); +// 积水点点击切换 +const changeJSD = () => { + // 筛选查出对应的关联雨量站 + rainCode.value = jsdList.value.filter(item => item.stCode == jsdVal.value)[0].referRainStCode; + getDataJSD(); +}; +// 获取积水点数据 +async function getDataJSD() { + loadingJSD.value = true; + // 关联雨量站 + let params = { + startTime: dateRain.value, + endTime: dateRain.value, + stCode: rainCode.value, + }; + let res = await graphicReport(params); + if (res && res.code == 200) { + let datas = res.data; + chartDataJSD.value.xAxis = datas.propertyMonitorXList; + chartDataJSD.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + } + + // 获取监测值 + let params2 = { + startTime: dateRain.value, + endTime: dateRain.value, + stCode: jsdVal.value, + }; + let res2 = await graphicReport(params2); + if (res2 && res2.code == 200) { + let datas = res2.data; + chartDataJSD.value.yAxis2 = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + } + + chartDataJSD.value.refresh = Math.random(); + loadingJSD.value = false; +} +// 获取积水点列表 +function getJSDList() { + listrtuSiteInfo({ monitorTargetType: 'waterlogging' }).then(res => { + jsdList.value = res.data || []; + jsdVal.value = res.data[0].stCode; //站点编号 + rainCode.value = res.data[0].referRainStCode; //关联雨量站站点编号 + }); +} // 片区分析点击 function changeArea(val) { - bus.emit('checkProjectArea', areaList.value[val]); + // bus.emit('checkProjectArea', areaList.value[val]); newfiberMapbox.map.easeTo({ center: areaList.value[val].lonlat, zoom: 13.7, @@ -202,17 +233,19 @@ // 典型项目点击 function changeProject(val) { - bus.emit('checkProjectFX', XmList.value[val]); - // newfiberMapbox.map.easeTo({ - // center: [114.381601, 34.793947], - // zoom: 15.9, - // pitch: 30, - // }); + bus.emit('checkProjectFX', { project: XmList.value[val], date: dateRain.value }); + newfiberMapbox.map.easeTo({ + center: [114.381601, 34.793947], + zoom: 15.5, + pitch: 30, + }); + // 渲染点位上图 + console.log('渲染4个管网监测点位和1个海绵设施点位'); } // 项目设施分析点击 function changeSSFX(val) { - bus.emit('checkSSFX', XmList.value[val]); + bus.emit('checkSSFX', { project: XmList.value[val], date: dateRain.value }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, @@ -221,12 +254,14 @@ } onMounted(() => { + getJSDList(); //获取积水点数据 hmssVal.value = hmssList.value[0].value; //默认第一个监测点 // 获取降雨日历的日期来加载对应数据 bus.on('setRainDate', date => { console.log('降雨日历的日期----', date); dateRain.value = date; changeHmss(); //海绵设施数据加载 + changeJSD(); //积水点数据加载 }); }); onBeforeUnmount(() => { diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index bc4be4f..6d2b132 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -38,9 +38,10 @@ grid: { top: 40, bottom: 30, + right: 80, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -72,8 +73,9 @@ ], yAxis: [ { - name: props.data.yAxisName1 || '', + name: '', inverse: props.data.inverse || false, //翻转 + nameLocation: 'start', // 坐标轴名称显示位置 type: 'value', axisLabel: { color: '#fff', @@ -90,22 +92,41 @@ }, }, { - name: props.data.yAxisName2 || '', + name: '', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 + nameLocation: 'end', // 坐标轴名称显示位置 type: 'value', nameTextStyle: { - color: '#fff', + color: '#FFB049', }, axisLabel: { show: true, - color: '#fff', + color: '#FFB049', }, splitLine: { lineStyle: { - color: '#D1DEEE', + color: '#1D5D81', type: 'dashed', - color: '#53D8FB', + }, + }, + }, + { + name: '', + inverse: false, + offset: 40, + nameLocation: 'end', // 坐标轴名称显示位置 + type: 'value', + nameTextStyle: { + color: '#1BFFF7', + }, + axisLabel: { + show: true, + color: '#1BFFF7', + }, + splitLine: { + lineStyle: { + color: '#1D5D81', + type: 'dashed', }, }, }, @@ -134,11 +155,19 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '流量(m³/h)', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, - color: '#FFF21C', + color: '#FFB049', + }, + { + // smooth: true, //变为曲线 默认false折线 + name: 'ss(mg/L)', + type: 'line', + data: props.data.yAxis3, + yAxisIndex: 2, + color: '#1BFFF7', }, ], }; diff --git a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue index 8cd4ac5..e974568 100644 --- a/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentjsEcharts.vue @@ -28,7 +28,6 @@ const init = () => { let chartDom = echarts.init(document.getElementById(allData.id)); - var barWidth = 12; var option; option = { color: ['#3FFFC2', '#FFF21C', 'orange'], @@ -40,11 +39,12 @@ bottom: 30, }, legend: { - data: ['降雨量(mm)', '水深(m)'], + // data: ['降雨量(mm)', '水深(m)'], textStyle: { color: '#fff', }, }, + dataZoom: [{ type: 'inside', startValue: props.data.xAxis[props.data.xAxis - 48] }], xAxis: [ { type: 'category', @@ -71,7 +71,7 @@ ], yAxis: [ { - name: '雨量(mm)', + name: '降雨量(mm)', type: 'value', inverse: true, nameLocation: 'start', // 坐标轴名称显示位置 @@ -93,9 +93,9 @@ name: '水深(m)', type: 'value', inverse: false, - nameLocation: 'start', // 坐标轴名称显示位置 - nameTextStyle: { color: '#fff' }, - axisLabel: { show: true, color: '#fff' }, + nameLocation: 'end', // 坐标轴名称显示位置 + nameTextStyle: { color: '#FFF21C' }, + axisLabel: { show: true, color: '#FFF21C' }, splitLine: { lineStyle: { color: '#D1DEEE', @@ -107,9 +107,8 @@ ], series: [ { - name: '降雨量(mm)', + name: '', type: 'bar', - barWidth: barWidth, barGap: '10%', // Make series be overlap barCateGoryGap: '10%', itemStyle: { @@ -123,7 +122,7 @@ }, { smooth: true, //变为曲线 默认false折线 - name: '水深(m)', + name: '', type: 'line', data: props.data.yAxis2, yAxisIndex: 1, diff --git a/src/views/sponeScreen/HaiMianScreen/index.vue b/src/views/sponeScreen/HaiMianScreen/index.vue index a0ce88f..aa9e1af 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -163,6 +163,8 @@ const permissionStore = usePermissionStore(); const { proxy } = getCurrentInstance(); +const projectParams = ref({}); +const projectParamsSS = ref({}); const router = useRouter(); const weatherInfo = ref({}); const stationList = ref([]); @@ -177,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(1); +const menuIndex = ref(2); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); @@ -385,10 +387,12 @@ }); // 典型项目分析 bus.on('checkProjectFX', params => { + projectParams.value = params; showProjectDX.value = true; }); // 典型项目设施分析 bus.on('checkSSFX', params => { + projectParamsSS.value = params; showProjectSSDX.value = true; }); }); diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index 91e058e..f4a0ef3 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -63,18 +63,18 @@ -
+
@@ -90,28 +90,9 @@ import xmfx from '@/assets/newImgs/HMScreen/xmfx.png'; import bus from '@/bus'; import WaterAnalysis_icon from '@/assets/newImgs/HMScreen/WaterAnalysis_icon.png'; -import { graphicReport, realtimeDataLatest } from '@/api/dataAnalysis/syntherticData'; +import { graphicReport } from '@/api/dataAnalysis/syntherticData'; +import { listrtuSiteInfo } from '@/api/dataAnalysis/rtuSiteInfo'; -const chartDataJSD = ref({ - xAxis: [ - '2024-06-12 08:00', - '2024-06-13 08:00', - '2024-06-14 08:00', - '2024-06-15 08:00', - '2024-06-16 08:00', - '2024-06-17 08:00', - '2024-06-18 08:00', - '2024-06-19 08:00', - '2024-06-20 08:00', - ], - yAxis: [1.1, 1.3, 2, 1.25, 1.1, 3, 3.5, 1.3, 3.8, 1.2, 2, 1], //降雨量 - yAxis2: [0.1, 0.2, 0.3, 0.2, 0.1, 0.4, 0.5, 0.23, 0.6, 0.1, 0.2, 0.1], //水深 - refresh: 1, -}); -const ListBod = ref([ - { name: '明伦桥俩侧积水点', value: '1' }, - { name: '复兴大道四季城积水点', value: '2' }, -]); const areaList = ref([ { name: '古城片区', value: '0', lonlat: [114.35, 34.802] }, { name: '城东南片区', value: '1', lonlat: [114.37, 34.792] }, @@ -124,11 +105,6 @@ { name: '市民综合体', value: '3' }, ]); -const XmListA = ref([ - { name: '出口监测点', value: '1' }, - { name: '进口监测点', value: '2' }, -]); - const AllData = reactive({ queryParams: { BODName: '1', area: '', Xm: '1', XmP: '', XmA: '', XmQ: '1' }, }); @@ -181,18 +157,73 @@ let res2 = await graphicReport(params2); if (res2 && res2.code == 200) { let datas = res2.data; - chartDataSS.value.yAxis2 = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataSS.value.yAxis2 = datas.propertyMonitorList[3] ? datas.propertyMonitorList[3].ylist : []; //小时流量 + chartDataSS.value.yAxis3 = datas.propertyMonitorList[2] ? datas.propertyMonitorList[2].ylist : []; //ss } chartDataSS.value.refresh = Math.random(); loadingSS.value = false; } -function jishuiClick() {} -const jishuichange = () => {}; +// 积水分析 +const loadingJSD = ref(true); +const rainCode = ref(''); +const jsdVal = ref(''); +const jsdList = ref([]); +const chartDataJSD = ref({ + xAxis: [], + yAxis: [], //降雨量 + yAxis2: [], //水深 + refresh: 1, +}); +// 积水点点击切换 +const changeJSD = () => { + // 筛选查出对应的关联雨量站 + rainCode.value = jsdList.value.filter(item => item.stCode == jsdVal.value)[0].referRainStCode; + getDataJSD(); +}; +// 获取积水点数据 +async function getDataJSD() { + loadingJSD.value = true; + // 关联雨量站 + let params = { + startTime: dateRain.value, + endTime: dateRain.value, + stCode: rainCode.value, + }; + let res = await graphicReport(params); + if (res && res.code == 200) { + let datas = res.data; + chartDataJSD.value.xAxis = datas.propertyMonitorXList; + chartDataJSD.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + } + + // 获取监测值 + let params2 = { + startTime: dateRain.value, + endTime: dateRain.value, + stCode: jsdVal.value, + }; + let res2 = await graphicReport(params2); + if (res2 && res2.code == 200) { + let datas = res2.data; + chartDataJSD.value.yAxis2 = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + } + + chartDataJSD.value.refresh = Math.random(); + loadingJSD.value = false; +} +// 获取积水点列表 +function getJSDList() { + listrtuSiteInfo({ monitorTargetType: 'waterlogging' }).then(res => { + jsdList.value = res.data || []; + jsdVal.value = res.data[0].stCode; //站点编号 + rainCode.value = res.data[0].referRainStCode; //关联雨量站站点编号 + }); +} // 片区分析点击 function changeArea(val) { - bus.emit('checkProjectArea', areaList.value[val]); + // bus.emit('checkProjectArea', areaList.value[val]); newfiberMapbox.map.easeTo({ center: areaList.value[val].lonlat, zoom: 13.7, @@ -202,17 +233,19 @@ // 典型项目点击 function changeProject(val) { - bus.emit('checkProjectFX', XmList.value[val]); - // newfiberMapbox.map.easeTo({ - // center: [114.381601, 34.793947], - // zoom: 15.9, - // pitch: 30, - // }); + bus.emit('checkProjectFX', { project: XmList.value[val], date: dateRain.value }); + newfiberMapbox.map.easeTo({ + center: [114.381601, 34.793947], + zoom: 15.5, + pitch: 30, + }); + // 渲染点位上图 + console.log('渲染4个管网监测点位和1个海绵设施点位'); } // 项目设施分析点击 function changeSSFX(val) { - bus.emit('checkSSFX', XmList.value[val]); + bus.emit('checkSSFX', { project: XmList.value[val], date: dateRain.value }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, @@ -221,12 +254,14 @@ } onMounted(() => { + getJSDList(); //获取积水点数据 hmssVal.value = hmssList.value[0].value; //默认第一个监测点 // 获取降雨日历的日期来加载对应数据 bus.on('setRainDate', date => { console.log('降雨日历的日期----', date); dateRain.value = date; changeHmss(); //海绵设施数据加载 + changeJSD(); //积水点数据加载 }); }); onBeforeUnmount(() => { diff --git a/src/views/sponeScreen/projectHM/projectFX.vue b/src/views/sponeScreen/projectHM/projectFX.vue index d4bba89..d018791 100644 --- a/src/views/sponeScreen/projectHM/projectFX.vue +++ b/src/views/sponeScreen/projectHM/projectFX.vue @@ -3,7 +3,9 @@
-
2024-08-26 降雨起止时间1:15-3:45,24小时累计降雨量20.4mm,降雨等级 中雨
+
+ {{ props.projectParams.date }} 降雨起止时间1:15-3:45,24小时累计降雨量20.4mm,降雨等级 中雨 +
1 项目设计最大控制容积 3796.52m³ @@ -22,46 +24,56 @@ - + 左 右
-

实时水深:0.3米

-

实时水深:0.35米

+

实时水深:{{ station1.z }}米

+

实时水深:{{ station5.z }}米

-
- 流量:0.36 m/s - SS:67 mg/L +
+ 水深:{{ station1.z }} m + 流速:{{ station1.va }} m/s + SS:{{ station1.turb }} mg/L + 管径:2.4*1.1m
-
- 流量:0.33 m/s - SS:69 mg/L +
+ 水深:{{ station2.z }} m + 流速:{{ station2.va }} m/s + SS:{{ station2.turb }} mg/L + 管径:2.4*1.1m
-
- 流量:0.31 m/s - SS:75 mg/L +
+ 水深:{{ station3.z }} m + 流速:{{ station3.va }} m/s + SS:{{ station3.turb }} mg/L + 管径:DN500
-
- 流量:0.32 m/s - SS:67 mg/L +
+ 水深:{{ station4.z || '--' }} m + 流速:{{ station4.va || '--' }} m/s + SS:{{ station4.turb || '--' }} mg/L + 管径:3*1.8m
-
- 流量:0.38 m/s - SS:73 mg/L +
+ 水深:{{ station5.z }} m + 流速:{{ station5.va }} m/s + SS:{{ station5.turb }} mg/L + 管径:3*1.8m
@@ -76,6 +88,7 @@ 设备左1 设备左1 + 设备左1 设备右1 import CanvasRainP from '@/views/sponeScreen/projectHM/canvasRainP.vue'; import bus from '@/bus'; +import { realtimeDataLatest } from '@/api/dataAnalysis/syntherticData'; + +const props = defineProps({ + projectParams: { + type: Object, + }, +}); const { proxy } = getCurrentInstance(); +const timer = ref(null); +const station1 = ref({}); +const station2 = ref({}); +const station3 = ref({}); +const station4 = ref({}); +const station5 = ref({}); + +// 获取实时数据 +function getRealData() { + // 从左到右,共5个 + realtimeDataLatest('0371000037').then(res => { + station1.value = res.data; + }); + realtimeDataLatest('0371000038').then(res => { + station2.value = res.data; + }); + realtimeDataLatest('0371000039').then(res => { + station3.value = res.data; + }); + station4.value = {}; //暂未安装,无数据 + realtimeDataLatest('0371000044').then(res => { + station5.value = res.data; + }); +} // 海绵设施点击 function checkHmSS() { bus.emit('checkSSFX', {}); } -onMounted(() => {}); +onMounted(() => { + console.log('典型项目接收参数--', props.projectParams); + getRealData(); + // 5分钟刷新一次数据 + timer.value = setInterval(() => { + getRealData(); + }, 5 * 60 * 1000); +}); +onBeforeUnmount(() => { + if (timer.value) clearInterval(timer.value); +});