From 3d34172c587fafd1c9cf2c11a899d1ecf6c9a5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E5=87=AF?= <2448379534@qq.com> Date: Thu, 2 Apr 2026 09:26:02 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=9A=E7=94=9F=E6=80=81=E6=B5=81=E9=87=8F=E6=B3=84=E6=94=BE?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=EF=BC=8C=E6=B3=84=E6=94=BE=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=88=86=E5=B8=83=E6=83=85=E5=86=B5=EF=BC=8C=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=94=9F=E6=80=81=E6=B5=81=E9=87=8F=E8=BE=BE=E6=A0=87=E6=83=85?= =?UTF-8?q?=E5=86=B5BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/ecoFlow/index.ts | 14 + frontend/src/api/ecoFlow/types.ts | 12 + .../xieFangFangShi/index.vue | 194 +++++++++ .../xieFangFenBu/index.vue | 386 ++++++++++++++++++ .../modules/shengtaidabiaoTwoMod/index.vue | 133 ++++-- .../shengTaiLiuLiangXieFangSheShi.vue | 38 +- 6 files changed, 743 insertions(+), 34 deletions(-) create mode 100644 frontend/src/api/ecoFlow/index.ts create mode 100644 frontend/src/api/ecoFlow/types.ts create mode 100644 frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue create mode 100644 frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue diff --git a/frontend/src/api/ecoFlow/index.ts b/frontend/src/api/ecoFlow/index.ts new file mode 100644 index 0000000..d7319b2 --- /dev/null +++ b/frontend/src/api/ecoFlow/index.ts @@ -0,0 +1,14 @@ +import request from '@/utils/request'; +import type { EcoFlowStandard, EcoFlowQueryParams } from './types'; + +/** + * 获取生态流量达标情况数据 + * @param params 查询参数 + */ +export function getEcoFlowStandardData(params?: EcoFlowQueryParams): Promise<{ data: EcoFlowStandard[] }> { + return request({ + url: '/api/eco-flow/standard', + method: 'get', + params + }); +} diff --git a/frontend/src/api/ecoFlow/types.ts b/frontend/src/api/ecoFlow/types.ts new file mode 100644 index 0000000..4f8adf2 --- /dev/null +++ b/frontend/src/api/ecoFlow/types.ts @@ -0,0 +1,12 @@ +export interface EcoFlowStandard { + id: number; + baseName: string; + category: string; + currentRate: number; + lastYearRate: number; +} + +export interface EcoFlowQueryParams { + mode?: 'top' | 'left'; + baseId?: number; +} diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue new file mode 100644 index 0000000..a2585f7 --- /dev/null +++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFangShi/index.vue @@ -0,0 +1,194 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue new file mode 100644 index 0000000..a404429 --- /dev/null +++ b/frontend/src/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index.vue @@ -0,0 +1,386 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/modules/shengtaidabiaoTwoMod/index.vue b/frontend/src/modules/shengtaidabiaoTwoMod/index.vue index e829b86..2816903 100644 --- a/frontend/src/modules/shengtaidabiaoTwoMod/index.vue +++ b/frontend/src/modules/shengtaidabiaoTwoMod/index.vue @@ -19,7 +19,6 @@ import { ref, onMounted, watch } from 'vue'; import SidePanelItem from '@/components/SidePanelItem/index.vue'; import * as echarts from 'echarts'; - // 定义组件名(便于调试和递归) defineOptions({ name: 'shengtaidabiaoMod' @@ -34,18 +33,45 @@ const spinning = ref(false) const chartRef = ref(null); let chartInstance: echarts.ECharts | null = null; -// 模拟数据 -const categoryData = [ - '其他', '闽浙赣', '澜沧江干流', '东北', '南盘江·红水河', - '黄河中游干流', '黄河上游干流', '湘西', '长江上游干流', - '乌江干流', '大渡河干流', '雅砻江干流', '金沙江干流' -]; -const currentData = Array(13).fill(0).map(() => Math.random() * 5 + 86); -const lastYearData = Array(13).fill(0).map(() => Math.random() * 5 + 86); +// 按基地的静态数据(横向柱形图) +const baseData = { + categories: ['金沙江干流', '雅砻江干流', '大渡河干流', '乌江干流', '长江上游干流', '湘西', '黄河上游干流', '黄河中游干流', '南盘江 - 红水河', '东北', '澜沧江干流', '闽浙赣', '其他'], + currentData: [98, 100, 99.5, 99.8, 100, 98.5, 100, 100, 100, 97, 100, 93, 98], + lastYearData: [92, 100, 99, 100, 100, 98, 100, 100, 100, 100, 100, 88, 93] +}; + +// 按调节性能的静态数据(竖向柱状图) +const performanceData = { + categories: ['多年调节', '年调节', '季调节', '周调节', '其他'], + currentData: [95, 92, 88, 85, 90], + lastYearData: [93, 90, 85, 82, 88] +}; + +// 加载数据 +const loadData = () => { + spinning.value = true; + + // 模拟数据加载延迟,并确保 DOM 已渲染 + setTimeout(() => { + initChart(); + spinning.value = false; + }, 50); +}; // 初始化图表 const initChart = () => { - if (!chartRef.value) return; + if (!chartRef.value) { + console.error('图表容器未渲染'); + return; + } + + // 检查容器尺寸 + const containerHeight = chartRef.value.offsetHeight; + if (!containerHeight || containerHeight === 0) { + console.warn('容器高度为 0,延迟重试'); + setTimeout(() => initChart(), 50); + return; + } // 如果实例存在,先销毁 if (chartInstance) { @@ -54,6 +80,10 @@ const initChart = () => { chartInstance = echarts.init(chartRef.value); + // 根据 mode 选择数据 + const data = mode.value === 'top' ? baseData : performanceData; + const isHorizontal = mode.value === 'top'; + const option = { tooltip: { trigger: 'axis', @@ -80,16 +110,16 @@ const initChart = () => { } }, grid: { - left: '3%', - right: '4%', - bottom: '3%', - top: '50', + left: isHorizontal ? '3%' : '10%', + right: isHorizontal ? '4%' : '4%', + bottom: isHorizontal ? '3%' : '10%', + top: isHorizontal ? '50' : '60', containLabel: true }, dataZoom: [ { type: 'inside', - xAxisIndex: 0, + [isHorizontal ? 'yAxisIndex' : 'xAxisIndex']: 0, filterMode: 'empty', zoomOnMouseWheel: true, moveOnMouseMove: false, @@ -97,10 +127,10 @@ const initChart = () => { start: 0, end: 100, minValueSpan: 0, - maxValueSpan: 20 + maxValueSpan: isHorizontal ? 20 : 5 } ], - xAxis: { + xAxis: isHorizontal ? { type: 'value', min: 80, max: 100, @@ -115,11 +145,9 @@ const initChart = () => { color: '#666', formatter: '{value}' } - }, - yAxis: { + } : { type: 'category', - data: categoryData, - inverse: true, + data: data.categories, axisLabel: { color: '#666', fontSize: 12, @@ -143,36 +171,83 @@ const initChart = () => { show: false } }, + yAxis: isHorizontal ? { + type: 'category', + data: data.categories, + inverse: true, + axisLabel: { + color: '#666', + fontSize: 12, + interval: 0, + rotate: 45, + margin: 10 + }, + axisLine: { + show: true, + lineStyle: { + color: '#666' + } + }, + axisTick: { + show: true, + lineStyle: { + color: '#666' + } + }, + splitLine: { + show: false + } + } : { + type: 'value', + min: 0, + max: 100, + splitLine: { + show: true, + lineStyle: { + color: '#E8E8E8', + type: 'solid' + } + }, + axisLabel: { + color: '#666', + formatter: '{value}' + } + }, series: [ { name: '当前', type: 'bar', - data: currentData, + data: data.currentData, itemStyle: { color: '#5470C6' }, - barWidth: 12, + barWidth: isHorizontal ? 6 : 10, barGap: '30%' }, { name: '去年同期', type: 'bar', - data: lastYearData, + data: data.lastYearData, itemStyle: { color: '#91CC75' }, - barWidth: 12, + barWidth: isHorizontal ? 6 : 10, barGap: '30%' } ] }; chartInstance.setOption(option); + + // 强制重绘,确保尺寸正确 + setTimeout(() => { + chartInstance?.resize(); + }, 0); }; // 页面加载时执行的逻辑 onMounted(() => { - initChart(); + loadData(); // 监听窗口大小变化 window.addEventListener('resize', () => { @@ -182,16 +257,12 @@ onMounted(() => { // 监听 mode 变化 watch(mode, () => { - // 这里可以根据 mode 的值重新加载数据 - initChart(); + loadData(); }); From fb76f427604f1dbf5db7052daa854bfc2de7885e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=88=E5=85=86=E5=A2=9E?= <你的邮箱@example.com> Date: Thu, 2 Apr 2026 09:27:56 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/mapController/index.vue | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/mapController/index.vue b/frontend/src/components/mapController/index.vue index b89c4d8..5545e90 100644 --- a/frontend/src/components/mapController/index.vue +++ b/frontend/src/components/mapController/index.vue @@ -1,11 +1,11 @@ @@ -18,9 +18,12 @@ const uiStore = useUiStore(); const drawerOpen = ref(uiStore.drawerOpen); // 监听 store 中的 drawerOpen 变化 -watch(() => uiStore.drawerOpen, (newVal) => { - drawerOpen.value = newVal; -}); +watch( + () => uiStore.drawerOpen, + (newVal) => { + drawerOpen.value = newVal; + } +); const isFullScreen = ref(false); const mapType = ref("2D"); @@ -28,24 +31,33 @@ const mapType = ref("2D"); // 响应式的控制器配置 const controllers = ref([ { - name: "全屏", - key: "fullScreen", - icon: isFullScreen.value ? "exitFullScreen" : "fullScreen", + children: [ + { + name: "全屏", + key: "fullScreen", + icon: isFullScreen.value ? "exitFullScreen" : "fullScreen", + }, + ], }, + { name: "定位", key: "positioning", icon: "iconGlobal", }, { - name: "放大", - key: "zoomIn", - icon: "zoomIn", - }, - { - name: "缩小", - key: "zoomOut", - icon: "zoomOut", + children: [ + { + name: "放大", + key: "zoomIn", + icon: "zoomIn", + }, + { + name: "缩小", + key: "zoomOut", + icon: "zoomOut", + }, + ], }, { name: "3D", @@ -78,7 +90,6 @@ const controllers = ref([ icon: "roaming", }, ]); - \ No newline at end of file + From 91d482a0f4be81e3c2d108ef1e96893558416a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=88=E5=85=86=E5=A2=9E?= <你的邮箱@example.com> Date: Thu, 2 Apr 2026 09:35:08 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/index.scss | 10 +++++ .../views/home/shuiDianKaiFaZhuangKuang.vue | 39 ++++++------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 5bb96e2..215b899 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -63,6 +63,15 @@ svg { height: 100%; background-color: #ffffff; } + + .moduleContent{ + display: flex; + flex-direction: row; + justify-content: space-between; + height: 100%; + position: relative; + } + .leftContent { width: 188px; } @@ -70,3 +79,4 @@ svg { height: 98%; position: relative; } + diff --git a/frontend/src/views/home/shuiDianKaiFaZhuangKuang.vue b/frontend/src/views/home/shuiDianKaiFaZhuangKuang.vue index 36e7863..ef6ceee 100644 --- a/frontend/src/views/home/shuiDianKaiFaZhuangKuang.vue +++ b/frontend/src/views/home/shuiDianKaiFaZhuangKuang.vue @@ -1,36 +1,21 @@ - + From bb33cbcdb9e404de173285890cada4958d73db60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E5=87=AF?= <2448379534@qq.com> Date: Thu, 2 Apr 2026 10:54:14 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=8Cbug=E6=94=B9?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/RightDrawer/index.vue | 4 +- .../components/developStatusChart/index.vue | 12 +++--- .../components/engEnvironmentData/index.vue | 4 +- .../shuidianhuangjingjieruMod/DataTable.vue | 43 +++++++++++++------ .../home/huanBaoSheShiYunXingZhuangKuang.vue | 17 +------- .../views/home/huanBaoZhiLiangZhuangKuang.vue | 17 +------- .../shengTaiLiuLiangManZuQingKuang.vue | 17 +------- .../shengTaiLiuLiangXieFangSheShi.vue | 17 +------- 8 files changed, 46 insertions(+), 85 deletions(-) diff --git a/frontend/src/components/RightDrawer/index.vue b/frontend/src/components/RightDrawer/index.vue index 523c545..a42f24d 100644 --- a/frontend/src/components/RightDrawer/index.vue +++ b/frontend/src/components/RightDrawer/index.vue @@ -47,6 +47,7 @@ const handleToggle = () => { \ No newline at end of file diff --git a/frontend/src/views/home/huanBaoSheShiYunXingZhuangKuang.vue b/frontend/src/views/home/huanBaoSheShiYunXingZhuangKuang.vue index 943a2c2..7fc2017 100644 --- a/frontend/src/views/home/huanBaoSheShiYunXingZhuangKuang.vue +++ b/frontend/src/views/home/huanBaoSheShiYunXingZhuangKuang.vue @@ -6,7 +6,6 @@ import Dianxingcuoshijieshao from "@/modules/dianxingcuoshijieshao/index.vue" // - + diff --git a/frontend/src/views/home/huanBaoZhiLiangZhuangKuang.vue b/frontend/src/views/home/huanBaoZhiLiangZhuangKuang.vue index 0bd061d..4515827 100644 --- a/frontend/src/views/home/huanBaoZhiLiangZhuangKuang.vue +++ b/frontend/src/views/home/huanBaoZhiLiangZhuangKuang.vue @@ -5,7 +5,6 @@ import HuanbaozdjcgzkzQK from "@/modules/huanbaozdjcgzkzQK/index.vue" - + diff --git a/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangManZuQingKuang.vue b/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangManZuQingKuang.vue index 2b5d2cf..e0b2b02 100644 --- a/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangManZuQingKuang.vue +++ b/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangManZuQingKuang.vue @@ -6,7 +6,6 @@ import ShengtaidabiaoTwoMod from '@/modules/shengtaidabiaoTwoMod/index.vue' - + diff --git a/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangXieFangSheShi.vue b/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangXieFangSheShi.vue index d32fb59..2293fac 100644 --- a/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangXieFangSheShi.vue +++ b/frontend/src/views/shengTaiLiuLiang/shengTaiLiuLiangXieFangSheShi.vue @@ -7,7 +7,6 @@ import XFFB from "@/modules/shengTaiLiuLiangXieFangSheShiMod/xieFangFenBu/index. - + From c69f3903846f539fd145c4249b0bea875bd70fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E5=87=AF?= <2448379534@qq.com> Date: Thu, 2 Apr 2026 11:46:57 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/dianxingcuoshijieshao/index.vue | 5 +- frontend/src/modules/huanbaoMod/index.vue | 35 ++++------ .../src/modules/huanbaozdjcgzkzQK/index.vue | 68 ++++++++++--------- 3 files changed, 49 insertions(+), 59 deletions(-) diff --git a/frontend/src/modules/dianxingcuoshijieshao/index.vue b/frontend/src/modules/dianxingcuoshijieshao/index.vue index e722964..1f83a83 100644 --- a/frontend/src/modules/dianxingcuoshijieshao/index.vue +++ b/frontend/src/modules/dianxingcuoshijieshao/index.vue @@ -67,10 +67,7 @@ onMounted(() => { \ No newline at end of file diff --git a/frontend/src/modules/huanbaozdjcgzkzQK/index.vue b/frontend/src/modules/huanbaozdjcgzkzQK/index.vue index 5a15bc2..c44ad83 100644 --- a/frontend/src/modules/huanbaozdjcgzkzQK/index.vue +++ b/frontend/src/modules/huanbaozdjcgzkzQK/index.vue @@ -5,7 +5,7 @@
- +
{{ facility.name }}
@@ -20,15 +20,7 @@ + diff --git a/frontend/src/components/mapController/LayerController.vue b/frontend/src/components/mapController/LayerController.vue new file mode 100644 index 0000000..b3a0cb8 --- /dev/null +++ b/frontend/src/components/mapController/LayerController.vue @@ -0,0 +1,128 @@ + + + diff --git a/frontend/src/components/mapController/index.vue b/frontend/src/components/mapController/index.vue index 5545e90..d457bc8 100644 --- a/frontend/src/components/mapController/index.vue +++ b/frontend/src/components/mapController/index.vue @@ -1,17 +1,25 @@ diff --git a/frontend/src/modules/jidiSelectorMod.vue b/frontend/src/modules/jidiSelectorMod.vue index a7c7c0f..e7b1e97 100644 --- a/frontend/src/modules/jidiSelectorMod.vue +++ b/frontend/src/modules/jidiSelectorMod.vue @@ -1,55 +1,15 @@