diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue new file mode 100644 index 0000000..ee4ce2c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue @@ -0,0 +1,395 @@ + + diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue new file mode 100644 index 0000000..ee4ce2c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue @@ -0,0 +1,395 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue new file mode 100644 index 0000000..9c5906c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue @@ -0,0 +1,211 @@ + + diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue new file mode 100644 index 0000000..ee4ce2c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue @@ -0,0 +1,395 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue new file mode 100644 index 0000000..9c5906c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue @@ -0,0 +1,211 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue new file mode 100644 index 0000000..a721a90 --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue @@ -0,0 +1,230 @@ + + diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue new file mode 100644 index 0000000..ee4ce2c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue @@ -0,0 +1,395 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue new file mode 100644 index 0000000..9c5906c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue @@ -0,0 +1,211 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue new file mode 100644 index 0000000..a721a90 --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue @@ -0,0 +1,230 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/index.vue b/src/views/pictureOnMap/page/DrainageSystem/index.vue index a6ace1f..b32e737 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/index.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/index.vue @@ -30,35 +30,98 @@
-
河湖水情
+
+ {{ + AllData.regionGrade == "one" + ? "河湖水情" + : AllData.regionGrade == "two" + ? "管网监测" + : AllData.regionGrade == "three" + ? "管网统计" + : AllData.regionGrade == "four" + ? "当日水量分析" + : "" + }} +
- + > +
-
流域管网
+
+ {{ + AllData.regionGrade == "one" + ? "流域管网" + : AllData.regionGrade == "two" + ? "管网统计" + : AllData.regionGrade == "three" + ? "当日水量分析" + : AllData.regionGrade == "four" + ? "渍水风险点" + : "" + }} +
- + + +
+
+
+
+ {{ + AllData.regionGrade == "one" + ? "河湖排口" + : AllData.regionGrade == "two" + ? "湖泊排口" + : AllData.regionGrade == "three" + ? "渍水风险点" + : AllData.regionGrade == "four" + ? "历史风险" + : "" + }} +
+
+ -
-
-
-
河湖排口
-
- + { @@ -353,78 +512,7 @@ AllData.TitleName[0].Name = ""; //全称 } // 设置1 2 3 4 级分区 - clearMianBaoData(); - // if (res.data.length == 1) { - // // 只有总分区/一级分区 - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 2) { - // // 只有总分区/一级分区/二级分区 - - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // if (element.grade == "two") { - // AllData.TitleName[2] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "three", - // sort: 2, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 3) { - // // 只有总分区/一级分区/二级分区/三级分区 - - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // if (element.grade == "two") { - // AllData.TitleName[2] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "three", - // sort: 2, - // Name: element.name, - // }; - // } - // if (element.grade == "three") { - // AllData.TitleName[3] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "four", - // sort: 3, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 4) { - // // 只有总分区/一级分区/二级分区/三级分区/四级分区 res.data.forEach((element) => { if (element.grade == "one") { AllData.TitleName[1] = { @@ -474,19 +562,26 @@ ? "four" : "five"; //分区级别(one:一级 || two:二级 || three:三级 || four:四级) AllData.regionName = AllData.TitleName[res.data.length].Name; + AllData.waterRegionCode = AllData.TitleName[res.data.length].id; + // clearEchartsData(); if (AllData.regionGrade == "two") { // 二级 console.log("二级"); getData1(); getData2(); + getData3(); } else if (AllData.regionGrade == "three") { // 三级 console.log("三级"); getData1(); + getData4(); + getData5(); } else if (AllData.regionGrade == "four") { // 四级 console.log("四级"); getData2(); + getData4(); + getData5(); } else { // 五级 五级为排水单元,由上可知,因为没有pid 所以此方法无效 console.log("五级"); @@ -503,6 +598,7 @@ item.value.split(",").forEach((o) => operationLayer(o, true)); AllData.regionGrade = "one"; AllData.regionName = ""; + AllData.waterRegionCode = ""; newfiberMap.map.easeTo(newfiberMap.config_.params.init); // 切换时回到默认一级分区 AllData.TypeID = type; @@ -547,7 +643,7 @@ sort: 4, }; }; -// 获取数据 一级界面的流域管网/二级界面的管网统计/三级界面的管网统计 +// 获取数据 徐云欣 一级界面的流域管网/二级界面的管网统计/三级界面的管网统计 const getData1 = () => { MonitorAPI.pipelineProblemStatistic({ regionGrade: AllData.regionGrade, //分区级别(one:一级 || two:二级 || three:三级 || four:四级 || five:五级) @@ -577,7 +673,7 @@ }); }; -// 获取数据 二级界面的管网监测/四级界面的历史风险 +// 获取数据 徐云欣 二级界面的管网监测/四级界面的历史风险 const getData2 = () => { MonitorAPI.pipelineRunRiskStatistic({ regionGrade: AllData.regionGrade, //分区级别(one:一级 || two:二级 || three:三级 || four:四级 || five:五级) @@ -592,7 +688,9 @@ AllData.chartData1.yAxis = res.data.pipelinePointCount; //运行风险点位数 AllData.chartData1.yAxis2 = res.data.pipelineRunRiskPointCount; //管网监测点位数 AllData.chartData1.yAxis_Name = "运行风险数"; + AllData.chartData1.yAxis_Unit = "个"; AllData.chartData1.yAxis2_Name = "点位数"; + AllData.chartData1.yAxis_Unit = "个"; AllData.refresh1++; } if (AllData.regionGrade == "four") { @@ -606,6 +704,102 @@ } }); }; + +// 获取数据 谢杨 一级界面的河湖排口/ 二级界面的河湖排口 +const getData3 = () => { + MonitorAPI.outletList({ + waterRegionCode: AllData.waterRegionCode, //分区编号 + // regionType: AllData.TypeID, //分区类型(sewage:污水 || rain:雨水) + }).then((res) => { + if (res && res.code == 200) { + if (AllData.regionGrade == "one") { + AllData.chartData3.xAxis = res.data.partitionName; + AllData.chartData3.yAxis1_bar = res.data.outletsNumber; + AllData.chartData3.yAxis1_bar_Name = "排口"; + AllData.chartData3.yAxis2_bar = null; + AllData.chartData3.yAxis2_bar_Name = "风险排口"; + AllData.chartData3.yAxis3_line = res.data.inflowWater; + AllData.chartData3.yAxis3_line_Name = "进水量"; + AllData.chartData3.yAxis3_line_Index = 1; + AllData.chartData3.y1_Unit = "个"; //Y轴单位 + AllData.chartData3.y2_Unit = "万方"; //Y轴单位 + AllData.chartData3.y2_show = true; + AllData.refresh3++; + } + if (AllData.regionGrade == "two") { + // AllData.chartData3 + } + } + }); +}; +// 获取数据 谢杨 三级界面的渍水风险点/ 四级界面的渍水风险点 +const getData4 = () => { + // + MonitorAPI.pointList({ + waterRegionCode: AllData.waterRegionCode, //分区编号 + // regionType: AllData.TypeID, //分区类型(sewage:污水 || rain:雨水) + }).then((res) => { + if (res && res.code == 200) { + if (AllData.regionGrade == "three") { + // AllData.chartData3 + } + if (AllData.regionGrade == "four") { + // AllData.chartData2 + } + } + }); +}; +// 获取数据 刘芳阳 / 三级 当日水量分析 /四级当日水量分析 +const getData5 = () => { + MonitorAPI.waterRegionWaterYieldAnalysis({ + waterRegionId: AllData.waterRegionCode, + }).then((res) => []); +}; +// 获取数据 刘芳阳 +const getData6 = () => {}; + +// 一级界面的河湖水情 +// 清除本底分析echarts的数据 +const clearEchartsData = () => { + AllData.chartData1 = { + xAxis: [], //X轴数据 + y1_Unit: "", //Y轴单位 + y2_Unit: "", //2号Y轴单位 + y2_show: false, //是否展示右侧的2号轴 + yAxis1_bar: null, //数据1 + yAxis1_bar_Name: "", //数据1的名称 + yAxis1_bar_index: 0, + yAxis2_bar: null, //数据2 + yAxis2_bar_Name: "", //数据1的名称 + yAxis2_bar_index: 0, + yAxis2_line: null, + yAxis2_line_Name: "", + yAxis2_line_Index: 0, + yAxis3_line: null, + yAxis3_line_Name: "", + yAxis3_line_Index: 0, + }; + AllData.refresh1++; + AllData.chartData3 = { + xAxis: [], //X轴数据 + y1_Unit: "", //Y轴单位 + y2_Unit: "", //2号Y轴单位 + y2_show: false, //是否展示右侧的2号轴 + yAxis1_bar: null, //数据1 + yAxis1_bar_Name: "", //数据1的名称 + yAxis1_bar_index: 0, + yAxis2_bar: null, //数据2 + yAxis2_bar_Name: "", //数据1的名称 + yAxis2_bar_index: 0, + yAxis2_line: null, + yAxis2_line_Name: "", + yAxis2_line_Index: 0, + yAxis3_line: null, + yAxis3_line_Name: "", + yAxis3_line_Index: 0, + }; + AllData.refresh3++; +}; onMounted(() => { let initeGLTimer = setInterval(() => { if (!newfiberMap) return; diff --git a/src/api/MonitoringAnalysis.js b/src/api/MonitoringAnalysis.js index f8ebcec..4f07c98 100644 --- a/src/api/MonitoringAnalysis.js +++ b/src/api/MonitoringAnalysis.js @@ -59,14 +59,42 @@ // 获取列表数据 export function pipelineProblemStatistic(params) { return request({ - url: `business/drainageSystem/pipelineProblemStatistic`, + url: `business/drainageSystemv1/pipelineProblemStatistic`, method: 'get', params, }); } export function pipelineRunRiskStatistic(params) { return request({ - url: `business/drainageSystem/pipelineRunRiskStatistic`, + url: `business/drainageSystemv1/pipelineRunRiskStatistic`, + method: 'get', + params, + }); +} +export function outletList(params) { + return request({ + url: `business/drainageSystem/outletList`, + method: 'get', + params, + }); +} +export function pointList(params) { + return request({ + url: `business/drainageSystem/pointList`, + method: 'get', + params, + }); +} +export function siteWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/siteWaterYieldAnalysis`, + method: 'get', + params, + }); +} +export function waterRegionWaterYieldAnalysis(params) { + return request({ + url: `business/monitorData/waterRegionWaterYieldAnalysis`, method: 'get', params, }); diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue new file mode 100644 index 0000000..ee4ce2c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarCharts2Y.vue @@ -0,0 +1,395 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue new file mode 100644 index 0000000..9c5906c --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraBarChartsLeft.vue @@ -0,0 +1,211 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue new file mode 100644 index 0000000..a721a90 --- /dev/null +++ b/src/views/pictureOnMap/page/DrainageSystem/components/DraLineChartsLeft.vue @@ -0,0 +1,230 @@ + + diff --git a/src/views/pictureOnMap/page/DrainageSystem/index.vue b/src/views/pictureOnMap/page/DrainageSystem/index.vue index a6ace1f..b32e737 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/index.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/index.vue @@ -30,35 +30,98 @@
-
河湖水情
+
+ {{ + AllData.regionGrade == "one" + ? "河湖水情" + : AllData.regionGrade == "two" + ? "管网监测" + : AllData.regionGrade == "three" + ? "管网统计" + : AllData.regionGrade == "four" + ? "当日水量分析" + : "" + }} +
- + > +
-
流域管网
+
+ {{ + AllData.regionGrade == "one" + ? "流域管网" + : AllData.regionGrade == "two" + ? "管网统计" + : AllData.regionGrade == "three" + ? "当日水量分析" + : AllData.regionGrade == "four" + ? "渍水风险点" + : "" + }} +
- + + +
+
+
+
+ {{ + AllData.regionGrade == "one" + ? "河湖排口" + : AllData.regionGrade == "two" + ? "湖泊排口" + : AllData.regionGrade == "three" + ? "渍水风险点" + : AllData.regionGrade == "four" + ? "历史风险" + : "" + }} +
+
+ -
-
-
-
河湖排口
-
- + { @@ -353,78 +512,7 @@ AllData.TitleName[0].Name = ""; //全称 } // 设置1 2 3 4 级分区 - clearMianBaoData(); - // if (res.data.length == 1) { - // // 只有总分区/一级分区 - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 2) { - // // 只有总分区/一级分区/二级分区 - - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // if (element.grade == "two") { - // AllData.TitleName[2] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "three", - // sort: 2, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 3) { - // // 只有总分区/一级分区/二级分区/三级分区 - - // res.data.forEach((element) => { - // if (element.grade == "one") { - // AllData.TitleName[1] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "two", - // sort: 1, - // Name: element.name, - // }; - // } - // if (element.grade == "two") { - // AllData.TitleName[2] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "three", - // sort: 2, - // Name: element.name, - // }; - // } - // if (element.grade == "three") { - // AllData.TitleName[3] = { - // abbreviation: element.shortName, - // id: element.id, - // grade: "four", - // sort: 3, - // Name: element.name, - // }; - // } - // }); - // } else if (res.data.length == 4) { - // // 只有总分区/一级分区/二级分区/三级分区/四级分区 res.data.forEach((element) => { if (element.grade == "one") { AllData.TitleName[1] = { @@ -474,19 +562,26 @@ ? "four" : "five"; //分区级别(one:一级 || two:二级 || three:三级 || four:四级) AllData.regionName = AllData.TitleName[res.data.length].Name; + AllData.waterRegionCode = AllData.TitleName[res.data.length].id; + // clearEchartsData(); if (AllData.regionGrade == "two") { // 二级 console.log("二级"); getData1(); getData2(); + getData3(); } else if (AllData.regionGrade == "three") { // 三级 console.log("三级"); getData1(); + getData4(); + getData5(); } else if (AllData.regionGrade == "four") { // 四级 console.log("四级"); getData2(); + getData4(); + getData5(); } else { // 五级 五级为排水单元,由上可知,因为没有pid 所以此方法无效 console.log("五级"); @@ -503,6 +598,7 @@ item.value.split(",").forEach((o) => operationLayer(o, true)); AllData.regionGrade = "one"; AllData.regionName = ""; + AllData.waterRegionCode = ""; newfiberMap.map.easeTo(newfiberMap.config_.params.init); // 切换时回到默认一级分区 AllData.TypeID = type; @@ -547,7 +643,7 @@ sort: 4, }; }; -// 获取数据 一级界面的流域管网/二级界面的管网统计/三级界面的管网统计 +// 获取数据 徐云欣 一级界面的流域管网/二级界面的管网统计/三级界面的管网统计 const getData1 = () => { MonitorAPI.pipelineProblemStatistic({ regionGrade: AllData.regionGrade, //分区级别(one:一级 || two:二级 || three:三级 || four:四级 || five:五级) @@ -577,7 +673,7 @@ }); }; -// 获取数据 二级界面的管网监测/四级界面的历史风险 +// 获取数据 徐云欣 二级界面的管网监测/四级界面的历史风险 const getData2 = () => { MonitorAPI.pipelineRunRiskStatistic({ regionGrade: AllData.regionGrade, //分区级别(one:一级 || two:二级 || three:三级 || four:四级 || five:五级) @@ -592,7 +688,9 @@ AllData.chartData1.yAxis = res.data.pipelinePointCount; //运行风险点位数 AllData.chartData1.yAxis2 = res.data.pipelineRunRiskPointCount; //管网监测点位数 AllData.chartData1.yAxis_Name = "运行风险数"; + AllData.chartData1.yAxis_Unit = "个"; AllData.chartData1.yAxis2_Name = "点位数"; + AllData.chartData1.yAxis_Unit = "个"; AllData.refresh1++; } if (AllData.regionGrade == "four") { @@ -606,6 +704,102 @@ } }); }; + +// 获取数据 谢杨 一级界面的河湖排口/ 二级界面的河湖排口 +const getData3 = () => { + MonitorAPI.outletList({ + waterRegionCode: AllData.waterRegionCode, //分区编号 + // regionType: AllData.TypeID, //分区类型(sewage:污水 || rain:雨水) + }).then((res) => { + if (res && res.code == 200) { + if (AllData.regionGrade == "one") { + AllData.chartData3.xAxis = res.data.partitionName; + AllData.chartData3.yAxis1_bar = res.data.outletsNumber; + AllData.chartData3.yAxis1_bar_Name = "排口"; + AllData.chartData3.yAxis2_bar = null; + AllData.chartData3.yAxis2_bar_Name = "风险排口"; + AllData.chartData3.yAxis3_line = res.data.inflowWater; + AllData.chartData3.yAxis3_line_Name = "进水量"; + AllData.chartData3.yAxis3_line_Index = 1; + AllData.chartData3.y1_Unit = "个"; //Y轴单位 + AllData.chartData3.y2_Unit = "万方"; //Y轴单位 + AllData.chartData3.y2_show = true; + AllData.refresh3++; + } + if (AllData.regionGrade == "two") { + // AllData.chartData3 + } + } + }); +}; +// 获取数据 谢杨 三级界面的渍水风险点/ 四级界面的渍水风险点 +const getData4 = () => { + // + MonitorAPI.pointList({ + waterRegionCode: AllData.waterRegionCode, //分区编号 + // regionType: AllData.TypeID, //分区类型(sewage:污水 || rain:雨水) + }).then((res) => { + if (res && res.code == 200) { + if (AllData.regionGrade == "three") { + // AllData.chartData3 + } + if (AllData.regionGrade == "four") { + // AllData.chartData2 + } + } + }); +}; +// 获取数据 刘芳阳 / 三级 当日水量分析 /四级当日水量分析 +const getData5 = () => { + MonitorAPI.waterRegionWaterYieldAnalysis({ + waterRegionId: AllData.waterRegionCode, + }).then((res) => []); +}; +// 获取数据 刘芳阳 +const getData6 = () => {}; + +// 一级界面的河湖水情 +// 清除本底分析echarts的数据 +const clearEchartsData = () => { + AllData.chartData1 = { + xAxis: [], //X轴数据 + y1_Unit: "", //Y轴单位 + y2_Unit: "", //2号Y轴单位 + y2_show: false, //是否展示右侧的2号轴 + yAxis1_bar: null, //数据1 + yAxis1_bar_Name: "", //数据1的名称 + yAxis1_bar_index: 0, + yAxis2_bar: null, //数据2 + yAxis2_bar_Name: "", //数据1的名称 + yAxis2_bar_index: 0, + yAxis2_line: null, + yAxis2_line_Name: "", + yAxis2_line_Index: 0, + yAxis3_line: null, + yAxis3_line_Name: "", + yAxis3_line_Index: 0, + }; + AllData.refresh1++; + AllData.chartData3 = { + xAxis: [], //X轴数据 + y1_Unit: "", //Y轴单位 + y2_Unit: "", //2号Y轴单位 + y2_show: false, //是否展示右侧的2号轴 + yAxis1_bar: null, //数据1 + yAxis1_bar_Name: "", //数据1的名称 + yAxis1_bar_index: 0, + yAxis2_bar: null, //数据2 + yAxis2_bar_Name: "", //数据1的名称 + yAxis2_bar_index: 0, + yAxis2_line: null, + yAxis2_line_Name: "", + yAxis2_line_Index: 0, + yAxis3_line: null, + yAxis3_line_Name: "", + yAxis3_line_Index: 0, + }; + AllData.refresh3++; +}; onMounted(() => { let initeGLTimer = setInterval(() => { if (!newfiberMap) return; diff --git a/vite.config.js b/vite.config.js index 93ab8a4..e24d112 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,10 +5,10 @@ import autoprefixer from 'autoprefixer'; const Timestamp = new Date().getTime(); //随机时间戳 -// let ipLink = 'https://server1.wh-nf.cn:8201/prod-api'; -let ipLink = 'http://192.168.16.135:9100'; +let ipLink = 'https://server1.wh-nf.cn:8201/prod-api'; +// let ipLink = 'http://192.168.16.135:9100';//徐云欣 // let ipLink = 'http://192.168.16.124:9100'; -// let ipLink = 'http://192.168.20.43:9100'; +// let ipLink = 'http://192.168.16.43:9100'; // 谢杨 /* */ // https://vitejs.dev/config/ export default defineConfig(({ mode, command }) => {