diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue index dd95bcf..2610c42 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue @@ -127,7 +127,7 @@
- {{ item.grade != "one" ? "/" : "" }} {{ item.abbreviation ? item.abbreviation : "" }} - + --> + {{ AllData.ClicksiteName }}
@@ -386,20 +386,22 @@ xAxis: [], }, refreshRight: 0, + ClicksiteName: "", }); // 面包屑点击事件 const MBClick = (item) => { console.log(item); + AllData.RightShow = false; // 赋值需要进行echarts数据请求的数据 AllData.regionGrade = item.grade; AllData.regionName = item.Name; AllData.waterRegionCode = item.id; -debugger; + // debugger; // 视角切换 if (item.sort == 0) { // 回到默认图层 newfiberMap.map.easeTo(newfiberMap.config_.params.init); - bus.emit(mapInitBusName) + bus.emit(mapInitBusName); AllData.regionGrade = "one"; AllData.regionName = ""; AllData.waterRegionCode = ""; @@ -431,6 +433,12 @@ grade: "five", sort: 4, }; + + // 切换时进行数据请求,默认视角请求 + clearEchartsData(); + getData1(); + getData3(); + getData7(); } if (item.sort == 1) { bus.emit("panelDataToMap", { @@ -458,11 +466,12 @@ grade: "five", sort: 4, }; + // 切换时进行数据请求,默认视角请求 clearEchartsData(); getData1(); + getData2(); getData3(); - getData7(); } if (item.sort == 2) { bus.emit("panelDataToMap", { @@ -483,11 +492,12 @@ grade: "five", sort: 4, }; + // 切换时进行数据请求,默认视角请求 clearEchartsData(); getData1(); - getData2(); - getData3(); + getData4(); + getData5(); } if (item.sort == 3) { bus.emit("panelDataToMap", { @@ -501,9 +511,9 @@ grade: "five", sort: 4, }; - // 切换时进行数据请求,默认视角请求 + clearEchartsData(); - getData1(); + getData2(); getData4(); getData5(); } @@ -512,10 +522,6 @@ name: item.Name, id: item.id, }); - clearEchartsData(); - getData2(); - getData4(); - getData5(); } }; // 分区点击切换 @@ -631,6 +637,7 @@ } else if (Row.layerId == "point") { // 点位 if (Row.properties.pointType == "rainwater_pipeline_quality") { + AllData.ClicksiteName = Row.properties.name; AllData.RightShow = true; // Row.properties.wellCode // 获取管网信息 @@ -652,7 +659,19 @@ // 上下游水量分析 getDataSXY(Row.properties); // 获取echarts数据 - GetRightCharts(Row.properties); + setTimeout(() => { + AllData.chartDataRight = { + yAxis: [], + yAxis_Name: "降雨量", + yAxis2: [], + yAxis2_Name: "流速", + yAxis3: [], + yAxis3_Name: "水深", + xAxis: [], + }; + AllData.refreshRight++; + GetRightCharts(Row.properties); + }, 500); } } }; @@ -963,7 +982,6 @@ end: moment().format("YYYY-MM-DD") + " 23:59:59", }).then((res) => { if (res && res.code == 200) { - AllData.chartDataRight.xAxis = res.data.times; res.data.datas.forEach((element) => { switch (element.dataKey) { case "z": @@ -977,6 +995,7 @@ break; } }); + AllData.chartDataRight.xAxis = res.data.times; AllData.refreshRight++; } }); @@ -1023,6 +1042,14 @@ yAxis3_line_Index: 0, }; AllData.refresh3++; + AllData.chartData2 = { + xAxis: [], + yAxis: [], + yAxis2: [], + yAxis_Name: "", + yAxis2_Name: "", + }; + AllData.refresh2++; }; onMounted(() => { let initeGLTimer = setInterval(() => { @@ -1113,7 +1140,7 @@ .SlListNum { font-family: DINPro; font-weight: bold; - font-size: 30px; + font-size: 22px; color: #00fcff; } .SlListUnit { diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue index dd95bcf..2610c42 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue @@ -127,7 +127,7 @@
- {{ item.grade != "one" ? "/" : "" }} {{ item.abbreviation ? item.abbreviation : "" }} - + --> + {{ AllData.ClicksiteName }}
@@ -386,20 +386,22 @@ xAxis: [], }, refreshRight: 0, + ClicksiteName: "", }); // 面包屑点击事件 const MBClick = (item) => { console.log(item); + AllData.RightShow = false; // 赋值需要进行echarts数据请求的数据 AllData.regionGrade = item.grade; AllData.regionName = item.Name; AllData.waterRegionCode = item.id; -debugger; + // debugger; // 视角切换 if (item.sort == 0) { // 回到默认图层 newfiberMap.map.easeTo(newfiberMap.config_.params.init); - bus.emit(mapInitBusName) + bus.emit(mapInitBusName); AllData.regionGrade = "one"; AllData.regionName = ""; AllData.waterRegionCode = ""; @@ -431,6 +433,12 @@ grade: "five", sort: 4, }; + + // 切换时进行数据请求,默认视角请求 + clearEchartsData(); + getData1(); + getData3(); + getData7(); } if (item.sort == 1) { bus.emit("panelDataToMap", { @@ -458,11 +466,12 @@ grade: "five", sort: 4, }; + // 切换时进行数据请求,默认视角请求 clearEchartsData(); getData1(); + getData2(); getData3(); - getData7(); } if (item.sort == 2) { bus.emit("panelDataToMap", { @@ -483,11 +492,12 @@ grade: "five", sort: 4, }; + // 切换时进行数据请求,默认视角请求 clearEchartsData(); getData1(); - getData2(); - getData3(); + getData4(); + getData5(); } if (item.sort == 3) { bus.emit("panelDataToMap", { @@ -501,9 +511,9 @@ grade: "five", sort: 4, }; - // 切换时进行数据请求,默认视角请求 + clearEchartsData(); - getData1(); + getData2(); getData4(); getData5(); } @@ -512,10 +522,6 @@ name: item.Name, id: item.id, }); - clearEchartsData(); - getData2(); - getData4(); - getData5(); } }; // 分区点击切换 @@ -631,6 +637,7 @@ } else if (Row.layerId == "point") { // 点位 if (Row.properties.pointType == "rainwater_pipeline_quality") { + AllData.ClicksiteName = Row.properties.name; AllData.RightShow = true; // Row.properties.wellCode // 获取管网信息 @@ -652,7 +659,19 @@ // 上下游水量分析 getDataSXY(Row.properties); // 获取echarts数据 - GetRightCharts(Row.properties); + setTimeout(() => { + AllData.chartDataRight = { + yAxis: [], + yAxis_Name: "降雨量", + yAxis2: [], + yAxis2_Name: "流速", + yAxis3: [], + yAxis3_Name: "水深", + xAxis: [], + }; + AllData.refreshRight++; + GetRightCharts(Row.properties); + }, 500); } } }; @@ -963,7 +982,6 @@ end: moment().format("YYYY-MM-DD") + " 23:59:59", }).then((res) => { if (res && res.code == 200) { - AllData.chartDataRight.xAxis = res.data.times; res.data.datas.forEach((element) => { switch (element.dataKey) { case "z": @@ -977,6 +995,7 @@ break; } }); + AllData.chartDataRight.xAxis = res.data.times; AllData.refreshRight++; } }); @@ -1023,6 +1042,14 @@ yAxis3_line_Index: 0, }; AllData.refresh3++; + AllData.chartData2 = { + xAxis: [], + yAxis: [], + yAxis2: [], + yAxis_Name: "", + yAxis2_Name: "", + }; + AllData.refresh2++; }; onMounted(() => { let initeGLTimer = setInterval(() => { @@ -1113,7 +1140,7 @@ .SlListNum { font-family: DINPro; font-weight: bold; - font-size: 30px; + font-size: 22px; color: #00fcff; } .SlListUnit { diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/RightCharts.vue b/src/views/pictureOnMap/page/DrainageSystem/components/RightCharts.vue index e903693..14b25d7 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/components/RightCharts.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/components/RightCharts.vue @@ -257,10 +257,9 @@ if (allData.chartDom) { allData.chartDom.dispose(); allData.chartDom = null; - // clearInterval(allData.timer); } - // allData.chart.off("click"); setTimeout(() => { + console.log("重绘了"); init(); }, 10); }