diff --git a/src/utils/eventBus.ts b/src/utils/eventBus.ts index e01415d..49789ae 100644 --- a/src/utils/eventBus.ts +++ b/src/utils/eventBus.ts @@ -25,7 +25,7 @@ class EventBus { // 移除监听 $off(eventName: string) { if (this.event[eventName]) { - this.event[eventName] = {}; + this.event[eventName] = []; } } diff --git a/src/views/Main/Dike/components/PestAnimalAnalysis.vue b/src/views/Main/Dike/components/PestAnimalAnalysis.vue index ba06147..f8dc08f 100644 --- a/src/views/Main/Dike/components/PestAnimalAnalysis.vue +++ b/src/views/Main/Dike/components/PestAnimalAnalysis.vue @@ -9,9 +9,14 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - value-format="yyyy-MM-dd" + value-format="YYYY-MM-DD" > - 查询 + 查询 重置 @@ -46,8 +51,14 @@
问题等级分析
-
-
+
+
@@ -55,7 +66,10 @@
问题处置对比分析
-
+
@@ -65,7 +79,11 @@ import { ref, onMounted, nextTick, onBeforeUnmount } from "vue"; import * as echarts from "echarts"; import { getV2PatrolStatisticChart } from "@/api/dike"; -import { initCommonBarLineOptions, initCommonPieRingOptions, initCommonAngleAxisOptions } from "@/utils/echartsUtils"; +import { + initCommonBarLineOptions, + initCommonPieRingOptions, + initCommonAngleAxisOptions, +} from "@/utils/echartsUtils"; const props = defineProps({ resCode: { @@ -96,8 +114,12 @@ function requestFunc(data: any) { const { group } = data; return getV2PatrolStatisticChart({ group, - startTime: paramsData.value.timeRange[0] ? paramsData.value.timeRange[0] + " 00:00:00" : null, - endTime: paramsData.value.timeRange[1] ? paramsData.value.timeRange[1] + " 23:59:59" : null, + startTime: paramsData.value.timeRange[0] + ? paramsData.value.timeRange[0] + " 00:00:00" + : null, + endTime: paramsData.value.timeRange[1] + ? paramsData.value.timeRange[1] + " 23:59:59" + : null, adcd: paramsData.value.adcd, code: props.resCode, }); @@ -126,7 +148,7 @@ function getTableData() { seriesOptions: { barWidth: 20, }, - }), + }) ); // 饼状图 flawProblemPie.value?.dispose(); @@ -209,7 +231,7 @@ function getTableData() { }, ], seriesOptions: {}, - }), + }) ); }); } @@ -219,7 +241,9 @@ function getTableData() { if (res) { if (res.yaxis?.length) { yhSum.value = Number( - res.yaxis.flatMap((v: any) => v.series)?.find((v: any) => v.code === "DF_BD_YH_SUM")?.sum ?? null, + res.yaxis + .flatMap((v: any) => v.series) + ?.find((v: any) => v.code === "DF_BD_YH_SUM")?.sum ?? null ); } nextTick(() => { @@ -234,7 +258,7 @@ function getTableData() { seriesOptions: { barWidth: 20, }, - }), + }) ); // 饼状图 yhComparePie.value?.dispose(); @@ -347,12 +371,18 @@ onBeforeUnmount(() => { border-radius: 10px; position: relative; padding: 16px 24px; - background: linear-gradient(180deg, #eafffc 0%, rgba(222, 255, 250, 0) 100%), #ffffff; + background: linear-gradient( + 180deg, + #eafffc 0%, + rgba(222, 255, 250, 0) 100% + ), + #ffffff; overflow: hidden; &::after { position: absolute; content: ""; - background: url("@/assets/img/icon-attr-bg.png") no-repeat center center; + background: url("@/assets/img/icon-attr-bg.png") no-repeat center + center; width: 64px; height: 64px; right: -12px; diff --git a/src/views/Main/Dike/components/StatisticsAnalysis.vue b/src/views/Main/Dike/components/StatisticsAnalysis.vue index 077aefd..439003e 100644 --- a/src/views/Main/Dike/components/StatisticsAnalysis.vue +++ b/src/views/Main/Dike/components/StatisticsAnalysis.vue @@ -9,9 +9,14 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - value-format="yyyy-MM-dd" + value-format="YYYY-MM-DD" > - 查询 + 查询 重置 @@ -46,8 +51,14 @@
缺陷问题等级分析
-
-
+
+
@@ -55,7 +66,10 @@
缺陷养护对比分析
-
+
@@ -65,7 +79,11 @@ import { ref, onMounted, nextTick, onBeforeUnmount } from "vue"; import * as echarts from "echarts"; import { getV2PatrolStatisticChart } from "@/api/dike"; -import { initCommonBarLineOptions, initCommonPieRingOptions, initCommonAngleAxisOptions } from "@/utils/echartsUtils"; +import { + initCommonBarLineOptions, + initCommonPieRingOptions, + initCommonAngleAxisOptions, +} from "@/utils/echartsUtils"; const props = defineProps({ resCode: { @@ -96,8 +114,12 @@ function requestFunc(data: any) { const { group } = data; return getV2PatrolStatisticChart({ group, - startTime: paramsData.value.timeRange[0] ? paramsData.value.timeRange[0] + " 00:00:00" : null, - endTime: paramsData.value.timeRange[1] ? paramsData.value.timeRange[1] + " 23:59:59" : null, + startTime: paramsData.value.timeRange[0] + ? paramsData.value.timeRange[0] + " 00:00:00" + : null, + endTime: paramsData.value.timeRange[1] + ? paramsData.value.timeRange[1] + " 23:59:59" + : null, adcd: paramsData.value.adcd, code: props.resCode, }); @@ -126,7 +148,7 @@ function getTableData() { seriesOptions: { barWidth: 20, }, - }), + }) ); // 饼状图 flawProblemPie.value?.dispose(); @@ -209,7 +231,7 @@ function getTableData() { }, ], seriesOptions: {}, - }), + }) ); }); } @@ -219,7 +241,9 @@ function getTableData() { if (res) { if (res.yaxis?.length) { yhSum.value = Number( - res.yaxis.flatMap((v: any) => v.series)?.find((v: any) => v.code === "DF_BD_YH_SUM")?.sum ?? null, + res.yaxis + .flatMap((v: any) => v.series) + ?.find((v: any) => v.code === "DF_BD_YH_SUM")?.sum ?? null ); } nextTick(() => { @@ -234,7 +258,7 @@ function getTableData() { seriesOptions: { barWidth: 20, }, - }), + }) ); // 饼状图 yhComparePie.value?.dispose(); @@ -347,12 +371,18 @@ onBeforeUnmount(() => { border-radius: 10px; position: relative; padding: 16px 24px; - background: linear-gradient(180deg, #eafffc 0%, rgba(222, 255, 250, 0) 100%), #ffffff; + background: linear-gradient( + 180deg, + #eafffc 0%, + rgba(222, 255, 250, 0) 100% + ), + #ffffff; overflow: hidden; &::after { position: absolute; content: ""; - background: url("@/assets/img/icon-attr-bg.png") no-repeat center center; + background: url("@/assets/img/icon-attr-bg.png") no-repeat center + center; width: 64px; height: 64px; right: -12px; diff --git a/src/views/Main/Map/components/LayerTree.vue b/src/views/Main/Map/components/LayerTree.vue index 585b564..55a949b 100644 --- a/src/views/Main/Map/components/LayerTree.vue +++ b/src/views/Main/Map/components/LayerTree.vue @@ -1,5 +1,9 @@