diff --git a/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue b/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue index 4e7af86..82fc747 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue @@ -733,9 +733,11 @@ AllData.chartData2.yAxis2_Name = "总长度"; AllData.chartData2.y1_Unit = "km"; AllData.refresh2++; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "two") { @@ -748,9 +750,11 @@ AllData.chartData2.yAxis2_Name = "总长度"; AllData.chartData2.y1_Unit = "km"; AllData.refresh2++; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "four") { @@ -771,9 +775,11 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = res.data.pipelineProblemLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + res.data.pipelineProblemLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(0); AllData.TjData3Unit = "km"; // // 二级Ecahrts 名称 // AllData.chartData2.yAxis_Name = "问题管网"; @@ -826,9 +832,9 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = data2 - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + data2.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "万方"; } if (AllData.regionGrade == "two") { @@ -849,9 +855,9 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = data2 - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + data2.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "万方"; } } @@ -885,9 +891,9 @@ AllData.chartData1.yAxis3_line_Name = ""; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = res.data.drainageNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.drainageNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "个"; } if (AllData.regionGrade == "four") { @@ -908,9 +914,9 @@ AllData.chartData1.yAxis3_line_Name = ""; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = res.data.drainageVolume - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.drainageVolume.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "万方"; } } @@ -929,9 +935,9 @@ AllData.chartData2.yAxis2_Name = "数量"; AllData.chartData2.y1_Unit = "个"; AllData.refresh2++; - AllData.TjData1 = res.data.typeNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.typeNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "个"; } // 数据赋值 diff --git a/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue b/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue index 4e7af86..82fc747 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/WSIndex.vue @@ -733,9 +733,11 @@ AllData.chartData2.yAxis2_Name = "总长度"; AllData.chartData2.y1_Unit = "km"; AllData.refresh2++; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "two") { @@ -748,9 +750,11 @@ AllData.chartData2.yAxis2_Name = "总长度"; AllData.chartData2.y1_Unit = "km"; AllData.refresh2++; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "four") { @@ -771,9 +775,11 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = res.data.pipelineProblemLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + res.data.pipelineProblemLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(0); AllData.TjData3Unit = "km"; // // 二级Ecahrts 名称 // AllData.chartData2.yAxis_Name = "问题管网"; @@ -826,9 +832,9 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = data2 - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + data2.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "万方"; } if (AllData.regionGrade == "two") { @@ -849,9 +855,9 @@ AllData.chartData3.yAxis3_line_Name = ""; AllData.chartData3.yAxis3_line_Index = 1; AllData.refresh3++; - AllData.TjData3 = data2 - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + data2.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "万方"; } } @@ -885,9 +891,9 @@ AllData.chartData1.yAxis3_line_Name = ""; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = res.data.drainageNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.drainageNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "个"; } if (AllData.regionGrade == "four") { @@ -908,9 +914,9 @@ AllData.chartData1.yAxis3_line_Name = ""; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = res.data.drainageVolume - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.drainageVolume.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "万方"; } } @@ -929,9 +935,9 @@ AllData.chartData2.yAxis2_Name = "数量"; AllData.chartData2.y1_Unit = "个"; AllData.refresh2++; - AllData.TjData1 = res.data.typeNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.typeNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData1Unit = "个"; } // 数据赋值 diff --git a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue index 3407bf5..ee70b19 100644 --- a/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue +++ b/src/views/pictureOnMap/page/DrainageSystem/YSIndex.vue @@ -792,25 +792,32 @@ if (AllData.regionGrade == "one") { // 一级Ecahrts 名称 AllData.chartData2.yAxis_Name = "摸排管网"; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "two") { // 二级Ecahrts 名称 + debugger; AllData.chartData2.yAxis_Name = "问题管网"; - AllData.TjData2 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData2 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData2Unit = "km"; } if (AllData.regionGrade == "three") { // 三级Ecahrts 名称 AllData.chartData2.yAxis_Name = "摸排管网"; - AllData.TjData1 = res.data.pipelineLengthList - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(2); + AllData.TjData1 = Number( + res.data.pipelineLengthList.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(2); AllData.TjData1Unit = "km"; } // 数据赋值 @@ -852,9 +859,11 @@ AllData.chartData1.yAxis3_line_Name = ""; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = res.data.pipelinePointCount - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData1 = Number( + res.data.pipelinePointCount.reduce( + (accu, curren) => Number(accu) + Number(curren) + ) + ).toFixed(0); AllData.TjData1Unit = "个"; } if (AllData.regionGrade == "four") { @@ -906,9 +915,9 @@ AllData.chartData3.y2_Unit = "万方"; //Y轴单位 AllData.chartData3.y2_show = true; AllData.refresh3++; - AllData.TjData3 = res.data.outletsNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + res.data.outletsNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "个"; } if (AllData.regionGrade == "two") { @@ -928,9 +937,9 @@ AllData.refresh3++; // }, 1000); - AllData.TjData3 = res.data.outletsNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + res.data.outletsNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "个"; } } @@ -958,9 +967,9 @@ AllData.chartData3.y2_show = false; AllData.refresh3++; - AllData.TjData3 = res.data.pointNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData3 = Number( + res.data.pointNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData3Unit = "个"; } if (AllData.regionGrade == "four") { @@ -973,9 +982,9 @@ AllData.chartData2.y1_Unit = "个"; AllData.refresh2++; - AllData.TjData2 = res.data.pointNumber - .reduce((accu, curren) => Number(accu) + Number(curren)) - .toFixed(0); + AllData.TjData2 = Number( + res.data.pointNumber.reduce((accu, curren) => Number(accu) + Number(curren)) + ).toFixed(0); AllData.TjData2Unit = "个"; } } @@ -1054,8 +1063,8 @@ AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData2 = YData1.reduce( - (accu, curren) => Number(accu) + Number(curren) + AllData.TjData2 = Number( + YData1.reduce((accu, curren) => Number(accu) + Number(curren)) ).toFixed(0); AllData.TjData2Unit = "个"; } @@ -1077,8 +1086,8 @@ AllData.chartData1.yAxis3_line_Name = "出水"; AllData.chartData1.yAxis3_line_Index = 1; AllData.refresh1++; - AllData.TjData1 = YData1.reduce( - (accu, curren) => Number(accu) + Number(curren) + AllData.TjData1 = Number( + YData1.reduce((accu, curren) => Number(accu) + Number(curren)) ).toFixed(0); AllData.TjData1Unit = "个"; }