diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index 6d2b132..ebb6c62 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -41,7 +41,7 @@ right: 80, }, legend: { - data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], + data: ['降雨量(mm)', '流速(m/s)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -155,7 +155,7 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '流量(m³/h)', + name: '流速(m/s)', 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 6d2b132..ebb6c62 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -41,7 +41,7 @@ right: 80, }, legend: { - data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], + data: ['降雨量(mm)', '流速(m/s)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -155,7 +155,7 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '流量(m³/h)', + name: '流速(m/s)', 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 aa9e1af..c8eb408 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -179,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(2); +const menuIndex = ref(1); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index 6d2b132..ebb6c62 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -41,7 +41,7 @@ right: 80, }, legend: { - data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], + data: ['降雨量(mm)', '流速(m/s)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -155,7 +155,7 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '流量(m³/h)', + name: '流速(m/s)', 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 aa9e1af..c8eb408 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -179,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(2); +const menuIndex = ref(1); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index f4a0ef3..0b6a3ba 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -145,7 +145,7 @@ if (res && res.code == 200) { let datas = res.data; chartDataSS.value.xAxis = datas.propertyMonitorXList; - chartDataSS.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataSS.value.yAxis = nameToData(datas.propertyMonitorList, '5分钟时段降水量'); } // 获取监测值 @@ -157,8 +157,8 @@ let res2 = await graphicReport(params2); if (res2 && res2.code == 200) { let datas = res2.data; - chartDataSS.value.yAxis2 = datas.propertyMonitorList[3] ? datas.propertyMonitorList[3].ylist : []; //小时流量 - chartDataSS.value.yAxis3 = datas.propertyMonitorList[2] ? datas.propertyMonitorList[2].ylist : []; //ss + chartDataSS.value.yAxis2 = nameToData(datas.propertyMonitorList, '流速'); //流速 + chartDataSS.value.yAxis3 = nameToData(datas.propertyMonitorList, 'SS'); //ss } chartDataSS.value.refresh = Math.random(); loadingSS.value = false; @@ -194,7 +194,7 @@ if (res && res.code == 200) { let datas = res.data; chartDataJSD.value.xAxis = datas.propertyMonitorXList; - chartDataJSD.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataJSD.value.yAxis = nameToData(datas.propertyMonitorList, '5分钟时段降水量'); } // 获取监测值 @@ -206,9 +206,8 @@ 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.yAxis2 = nameToData(datas.propertyMonitorList, '水位'); } - chartDataJSD.value.refresh = Math.random(); loadingJSD.value = false; } @@ -221,6 +220,12 @@ }); } +// 公共方法,根据监测名称来匹配对应的数值 +function nameToData(data, name) { + let arr = data.filter(item => item.monitorPropertyName == name); + return arr[0] ? arr[0].ylist : []; +} + // 片区分析点击 function changeArea(val) { // bus.emit('checkProjectArea', areaList.value[val]); @@ -233,7 +238,7 @@ // 典型项目点击 function changeProject(val) { - bus.emit('checkProjectFX', { project: XmList.value[val], date: dateRain.value }); + bus.emit('checkProjectFX', { project: XmList.value[val] }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.5, @@ -245,7 +250,7 @@ // 项目设施分析点击 function changeSSFX(val) { - bus.emit('checkSSFX', { project: XmList.value[val], date: dateRain.value }); + bus.emit('checkSSFX', { project: XmList.value[val] }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, @@ -254,18 +259,16 @@ } onMounted(() => { - getJSDList(); //获取积水点数据 hmssVal.value = hmssList.value[0].value; //默认第一个监测点 - // 获取降雨日历的日期来加载对应数据 - bus.on('setRainDate', date => { - console.log('降雨日历的日期----', date); - dateRain.value = date; + getJSDList(); //获取积水点数据 + bus.on('changeRainDate', val => { + dateRain.value = val; changeHmss(); //海绵设施数据加载 changeJSD(); //积水点数据加载 }); }); onBeforeUnmount(() => { - bus.off('setRainDate'); + bus.off('changeRainDate'); }); diff --git a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue index 6d2b132..ebb6c62 100644 --- a/src/views/sponeScreen/Echarts/AssessmentEcharts.vue +++ b/src/views/sponeScreen/Echarts/AssessmentEcharts.vue @@ -41,7 +41,7 @@ right: 80, }, legend: { - data: ['降雨量(mm)', '流量(m³/h)', 'ss(mg/L)'], + data: ['降雨量(mm)', '流速(m/s)', 'ss(mg/L)'], textStyle: { color: '#fff', }, @@ -155,7 +155,7 @@ }, { // smooth: true, //变为曲线 默认false折线 - name: '流量(m³/h)', + name: '流速(m/s)', 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 aa9e1af..c8eb408 100644 --- a/src/views/sponeScreen/HaiMianScreen/index.vue +++ b/src/views/sponeScreen/HaiMianScreen/index.vue @@ -121,12 +121,12 @@ - + - + @@ -179,7 +179,7 @@ { name: '排水防涝', id: 4 }, { name: '长效运维', id: 5 }, ]); -const menuIndex = ref(2); +const menuIndex = ref(1); const showPanel = ref(false); const showLegend = ref(false); const showPipe = ref(false); diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index f4a0ef3..0b6a3ba 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -145,7 +145,7 @@ if (res && res.code == 200) { let datas = res.data; chartDataSS.value.xAxis = datas.propertyMonitorXList; - chartDataSS.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataSS.value.yAxis = nameToData(datas.propertyMonitorList, '5分钟时段降水量'); } // 获取监测值 @@ -157,8 +157,8 @@ let res2 = await graphicReport(params2); if (res2 && res2.code == 200) { let datas = res2.data; - chartDataSS.value.yAxis2 = datas.propertyMonitorList[3] ? datas.propertyMonitorList[3].ylist : []; //小时流量 - chartDataSS.value.yAxis3 = datas.propertyMonitorList[2] ? datas.propertyMonitorList[2].ylist : []; //ss + chartDataSS.value.yAxis2 = nameToData(datas.propertyMonitorList, '流速'); //流速 + chartDataSS.value.yAxis3 = nameToData(datas.propertyMonitorList, 'SS'); //ss } chartDataSS.value.refresh = Math.random(); loadingSS.value = false; @@ -194,7 +194,7 @@ if (res && res.code == 200) { let datas = res.data; chartDataJSD.value.xAxis = datas.propertyMonitorXList; - chartDataJSD.value.yAxis = datas.propertyMonitorList[0] ? datas.propertyMonitorList[0].ylist : []; + chartDataJSD.value.yAxis = nameToData(datas.propertyMonitorList, '5分钟时段降水量'); } // 获取监测值 @@ -206,9 +206,8 @@ 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.yAxis2 = nameToData(datas.propertyMonitorList, '水位'); } - chartDataJSD.value.refresh = Math.random(); loadingJSD.value = false; } @@ -221,6 +220,12 @@ }); } +// 公共方法,根据监测名称来匹配对应的数值 +function nameToData(data, name) { + let arr = data.filter(item => item.monitorPropertyName == name); + return arr[0] ? arr[0].ylist : []; +} + // 片区分析点击 function changeArea(val) { // bus.emit('checkProjectArea', areaList.value[val]); @@ -233,7 +238,7 @@ // 典型项目点击 function changeProject(val) { - bus.emit('checkProjectFX', { project: XmList.value[val], date: dateRain.value }); + bus.emit('checkProjectFX', { project: XmList.value[val] }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.5, @@ -245,7 +250,7 @@ // 项目设施分析点击 function changeSSFX(val) { - bus.emit('checkSSFX', { project: XmList.value[val], date: dateRain.value }); + bus.emit('checkSSFX', { project: XmList.value[val] }); newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, @@ -254,18 +259,16 @@ } onMounted(() => { - getJSDList(); //获取积水点数据 hmssVal.value = hmssList.value[0].value; //默认第一个监测点 - // 获取降雨日历的日期来加载对应数据 - bus.on('setRainDate', date => { - console.log('降雨日历的日期----', date); - dateRain.value = date; + getJSDList(); //获取积水点数据 + bus.on('changeRainDate', val => { + dateRain.value = val; changeHmss(); //海绵设施数据加载 changeJSD(); //积水点数据加载 }); }); onBeforeUnmount(() => { - bus.off('setRainDate'); + bus.off('changeRainDate'); }); diff --git a/src/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue b/src/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue index a7f76a0..452c89f 100644 --- a/src/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue +++ b/src/views/sponeScreen/projectHM/gongchenkanbani_comp/qipao.vue @@ -23,7 +23,9 @@
- 其他详情 + 其他详情 + + 查看效果
@@ -70,6 +72,7 @@ const emnits = defineEmits(); const allDate = ref({}); +const dateRain = ref(''); const BoxList = ref([]); const daLigoShow = ref(false); const editableTabsValue = ref('xxxx'); @@ -99,6 +102,9 @@ daLigoShow.value = true; projectInfoNew(allDate.value.id); } +function checkDX() { + bus.emit('checkProjectFX', { project: BoxList.value }); +} // 获取项目详情 async function projectInfoNew(p) { @@ -152,6 +158,9 @@ }, 200); }); }); +onBeforeUnmount(() => { + bus.off('mapClick'); +});