From d899b06e661b59765ec3171a6e6049d2d37a0ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E4=BC=9F=E6=B4=8B?= Date: Thu, 13 Mar 2025 19:12:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=8E=A7=E5=88=B6=E5=8C=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Drawer/index.vue | 1 + src/views/LeftPanel/index.vue | 1 + src/views/Main/MapSearch/index.vue | 117 ++++++++++++++++------------- src/views/Main/index.vue | 5 ++ src/views/RegionSelect/index.vue | 1 + src/views/RightPanel/index.vue | 1 + 6 files changed, 73 insertions(+), 53 deletions(-) diff --git a/src/views/Drawer/index.vue b/src/views/Drawer/index.vue index 42351de..2337604 100644 --- a/src/views/Drawer/index.vue +++ b/src/views/Drawer/index.vue @@ -21,5 +21,6 @@ defineOptions({ align-items: center; padding: 24px; gap: 16px; + pointer-events: all; } diff --git a/src/views/LeftPanel/index.vue b/src/views/LeftPanel/index.vue index 52c4c15..c1a5699 100644 --- a/src/views/LeftPanel/index.vue +++ b/src/views/LeftPanel/index.vue @@ -21,5 +21,6 @@ defineOptions({ display: flex; flex-direction: row; gap: 12px; + pointer-events: none; } diff --git a/src/views/Main/MapSearch/index.vue b/src/views/Main/MapSearch/index.vue index 22211e0..010026c 100644 --- a/src/views/Main/MapSearch/index.vue +++ b/src/views/Main/MapSearch/index.vue @@ -3,60 +3,59 @@ -
- - - +
@@ -64,7 +63,6 @@ import { ref, computed } from "vue"; import { getReservoirList } from "@/api/map"; import { useProjectStore } from "@/store/modules/project"; -import { ClickOutside as vClickOutside } from "element-plus"; import * as SyCim from "sy-cesium-sdk"; defineOptions({ name: "MapSearch", @@ -72,12 +70,24 @@ defineOptions({ const Cesium = SyCim.Cesium; const projectStore = useProjectStore(); const popoverVisible = ref(false); +const hidePopover = (e: any) => { + if (e?.target?.className?.includes("map-search-result-title")) { + return; + } + popoverVisible.value = false; +}; +const addEventListener = () => { + removeEventListener(); + document.addEventListener("click", hidePopover, false); +}; +const removeEventListener = () => { + document.removeEventListener("click", hidePopover); +}; const showPopover = () => { popoverVisible.value = true; + addEventListener(); }; -const onClickOutside = () => { - popoverVisible.value = false; -}; + const searchValue = ref(""); const searchResultList = ref([]); const layerData = computed(() => @@ -97,6 +107,7 @@ const changeInputValue = async (value: string) => { const flyTo = (item: any) => { const coordinates = item?.geometry?.coordinates; if (!coordinates) return; + popoverVisible.value = false; const center = SyCim.Parse.parsePosition( `${coordinates[0]},${coordinates[1]},10` ).toCartesian3(); diff --git a/src/views/Main/index.vue b/src/views/Main/index.vue index eab1d1c..42e8614 100644 --- a/src/views/Main/index.vue +++ b/src/views/Main/index.vue @@ -100,12 +100,17 @@ onBeforeUnmount(() => { flex-direction: column; justify-content: space-between; align-items: flex-end; + pointer-events: none; .top { + pointer-events: all; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; } + .bottom { + pointer-events: all; + } } diff --git a/src/views/RegionSelect/index.vue b/src/views/RegionSelect/index.vue index e70322e..58524bd 100644 --- a/src/views/RegionSelect/index.vue +++ b/src/views/RegionSelect/index.vue @@ -48,6 +48,7 @@ onMounted(() => { height: 32px; border-radius: 4px; overflow: hidden; + pointer-events: all; .title { background: #36b29e; height: 100%; diff --git a/src/views/RightPanel/index.vue b/src/views/RightPanel/index.vue index bd4e5d1..f86c0d4 100644 --- a/src/views/RightPanel/index.vue +++ b/src/views/RightPanel/index.vue @@ -21,5 +21,6 @@ defineOptions({ display: flex; flex-direction: row; gap: 12px; + pointer-events: none; } From 089e40eb1b821b814915ad6e6f3470abf61f2901 Mon Sep 17 00:00:00 2001 From: ruancuihong <2806986110@qq.com> Date: Thu, 13 Mar 2025 19:20:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Main/DailyPatrolCard/index.vue | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/views/Main/DailyPatrolCard/index.vue b/src/views/Main/DailyPatrolCard/index.vue index a02d311..85ace85 100644 --- a/src/views/Main/DailyPatrolCard/index.vue +++ b/src/views/Main/DailyPatrolCard/index.vue @@ -4,10 +4,10 @@
-
问题处理进度:23%
+
问题处理进度:{{progressCount}}%
-
+
@@ -40,6 +40,7 @@ const handleResize = () => { }; const dailyData: any = ref([]); const dailyCount = ref(0); +const progressCount = ref(0) const getChartData = async (time: any) => { dailyCount.value = 0; dailyData.value = []; @@ -220,10 +221,29 @@ const initChart = () => { // Set options and render chart chart.setOption(option); }; +const getProgressData = async (time: any) => { + progressCount.value = 0; + const pramas = { + // endTime: '', + // startTime: '', + ...time, + group: 'K6_1' + }; + const data: any = await chartStore.initStatisticChart(pramas); + if (data?.yaxis?.length) { + let newArr = data.yaxis.flatMap((v: any) => v.series); + newArr?.forEach((item: any) => { + if (item.name == '比例') { + progressCount.value = Number(item.sum) || 0; + } + }); + } +}; watch( () => props.timeRange, (newVal) => { getChartData(newVal); + getProgressData(newVal) } ); onMounted(() => {