From 3ecf5c99d3a95ea4e4b0a27362aad0fa2241e042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=88=E5=85=86=E5=A2=9E?= <你的邮箱@example.com> Date: Mon, 8 Jun 2026 09:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=85=B1=E5=BC=B9=E6=A1=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=9F=E6=80=81=E6=B5=81=E9=87=8F=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=85=AC=E5=85=B1=E8=A1=A8=E6=A0=BC=E6=8F=92=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.production | 2 +- frontend/src/api/mapModal/index.ts | 16 + frontend/src/components/BasicTable/index.vue | 56 +- .../MapModal/components/EcologicalFlow.vue | 546 +++++++++++++++++- .../MapModal/components/MonitorInfo.vue | 32 +- .../components/WaterTemperatureRep.vue | 21 +- frontend/src/components/MapModal/index.vue | 14 + .../src/components/MapModal/setting.config.ts | 198 ++++--- frontend/src/utils/enumeration.ts | 32 + 9 files changed, 785 insertions(+), 132 deletions(-) diff --git a/frontend/.env.production b/frontend/.env.production index c130c425..6d0f5aaf 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -3,7 +3,7 @@ NODE_ENV='production' VITE_APP_TITLE = 'qgc-buji-web' VITE_APP_PORT = 3000 -VITE_APP_BASE_API = '/' +VITE_APP_BASE_API = '/prod-api' ## 生产环境API地址 VITE_APP_BASE_URL = 'http://localhost:8093' ## 生产环境导入预览地址 diff --git a/frontend/src/api/mapModal/index.ts b/frontend/src/api/mapModal/index.ts index 9ab4235c..7a092cdd 100644 --- a/frontend/src/api/mapModal/index.ts +++ b/frontend/src/api/mapModal/index.ts @@ -62,3 +62,19 @@ export function getMonitorData(data: any) { data }); } +// 生态流量 -限制范围查询 +export function getEngLimit(data: any) { + return request({ + url: '/eq/data/getEngLimit', + method: 'post', + data + }); +} +// 生态流量 - 限制范围查询 - 日 +export function getEngLimitDay(data: any) { + return request({ + url: '/eq/interval/qgc/day/GetKendoListCust', + method: 'post', + data + }); +} diff --git a/frontend/src/components/BasicTable/index.vue b/frontend/src/components/BasicTable/index.vue index bdbc74c1..5cccb4ed 100644 --- a/frontend/src/components/BasicTable/index.vue +++ b/frontend/src/components/BasicTable/index.vue @@ -11,16 +11,27 @@ :row-key="rowKey" @change="handleTableChange" > - - \ No newline at end of file +.ecological-flow { + .top-section { + padding: 16px; + background: #fff; + + .top-bar { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 12px; + + .info-row { + display: flex; + align-items: center; + gap: 24px; + flex-shrink: 0; + + .info-item { + font-size: 14px; + white-space: nowrap; + + .label { + color: #666; + } + + .value { + color: #333; + font-weight: 600; + } + } + } + + .filter-row { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px; + } + } + } + + .bottom-section { + height: 530px; + background: #fff; + position: relative; + :deep(.ant-spin-nested-loading) { + width: 100%; + height: 100%; + } + :deep(.ant-spin-container) { + width: 100%; + height: 100%; + } + + .chart-wrapper { + width: 100%; + height: 100%; + } + } +} + diff --git a/frontend/src/components/MapModal/components/MonitorInfo.vue b/frontend/src/components/MapModal/components/MonitorInfo.vue index ff0a0339..1b23e4af 100644 --- a/frontend/src/components/MapModal/components/MonitorInfo.vue +++ b/frontend/src/components/MapModal/components/MonitorInfo.vue @@ -10,6 +10,7 @@ :format="dateFormat" :show-time="showTime ? showTimeConfig : false" :allowClear="false" + :presets="DateSetting.RangeButton.month1" :disabled-date="disabledDate" > @@ -49,6 +50,7 @@ import dayjs, { Dayjs } from 'dayjs'; import { getMonitorData } from '@/api/mapModal'; import { useModelStore } from '@/store/modules/model'; import BasicTable from '@/components/BasicTable/index.vue'; +import { DateSetting } from '@/utils/enumeration'; const modelStore = useModelStore(); @@ -298,13 +300,33 @@ const updateChart = (data: any[]) => { const fullTime = sorted[dataIndex]?.tm ? dayjs(sorted[dataIndex].tm).format('YYYY-MM-DD HH:mm:ss') : ''; - let html = `
${fullTime}
`; + let html = `
${fullTime}
`; + // 系列名称对应的格式化规则(与表格保持一致) + const formatRules: Record< + string, + { format: (v: number) => string; unit: string } + > = { + 坝上水位: { format: v => v.toFixed(2), unit: '(m)' }, + 坝下水位: { format: v => v.toFixed(2), unit: '(m)' }, + 入库流量: { format: v => String(Math.round(v)), unit: '(m³/s)' }, + 出库流量: { format: v => String(Number(v)), unit: '(m³/s)' }, + 生态流量: { format: v => v.toFixed(1), unit: '(m³/s)' }, + 生态流量限值: { format: v => v.toFixed(1), unit: '(m³/s)' } + }; params.forEach((param: any) => { - const value = param.value != null ? param.value : '-'; + if (param.value == null) return; + const rule = Object.entries(formatRules).find(([key]) => + param.seriesName.includes(key) + ); + const displayValue = rule + ? rule[1].format(Number(param.value)) + : param.value; + const unit = rule ? rule[1].unit : ''; html += ` -
+
- ${param.seriesName}: ${value} + ${param.seriesName}: + ${displayValue} ${unit}
`; }); @@ -464,7 +486,7 @@ const updateChart = (data: any[]) => { smooth: true, symbol: 'circle', symbolSize: 4, - lineStyle: { color: '#F7A737', width: 2, type: 'dashed' }, + lineStyle: { color: '#F7A737', width: 2 }, itemStyle: { color: '#F7A737' }, markPoint: { data: [ diff --git a/frontend/src/components/MapModal/components/WaterTemperatureRep.vue b/frontend/src/components/MapModal/components/WaterTemperatureRep.vue index dc868b6e..e4d99557 100644 --- a/frontend/src/components/MapModal/components/WaterTemperatureRep.vue +++ b/frontend/src/components/MapModal/components/WaterTemperatureRep.vue @@ -19,24 +19,8 @@ :disabled-date="disabledDate" :allow-clear="false" @change="handleDateChange" - > - - + :presets="DateSetting.RangeButton.month1" + />
@@ -79,6 +63,7 @@ import dayjs, { Dayjs } from 'dayjs'; import { useModelStore } from '@/store/modules/model'; import { infoGetKendoListCust, fishGetKendoListCust } from '@/api/sw'; import BasicTable from '@/components/BasicTable/index.vue'; +import { DateSetting } from '@/utils/enumeration'; const modelStore = useModelStore(); const selectOption = ref([]); const selectValue = ref([]); diff --git a/frontend/src/components/MapModal/index.vue b/frontend/src/components/MapModal/index.vue index e3eb212b..25931267 100644 --- a/frontend/src/components/MapModal/index.vue +++ b/frontend/src/components/MapModal/index.vue @@ -9,6 +9,14 @@ :destroyOnClose="true" class="map-modal" > +
+ + = [ // } ].filter(Boolean); // // 水电站生态流量 √ -// const ENGEQTabs: Array = [ -// { -// name: '基础信息', -// key: 'basicInfo', -// type: 'basic', -// url: '/bbi/siteBipc/getSiteBasicInfo' -// }, -// { -// name: '实时视频', -// key: 'videoInfo', -// type: 'video', -// url: '/video/dataStcdFrame/getVideoMonitorList' -// }, -// { -// name: '全景影像', -// key: 'panoramaInfo', -// type: 'panorama' -// }, -// { -// name: '监测数据', -// key: 'monitorInfo', -// type: 'tabsWithTwo', -// code: 'dzxq.tabs.jcsj' -// }, -// { -// name: '预警提示', -// key: 'tableTabs', -// type: 'tableTabs', -// code: 'dzxq-yjts', -// tabs: [ -// { -// name: '设计参数变更提示', -// key: 'DesignParameterChangePrompt', -// type: 'table', -// hiddenChart: true, -// tableUrl: '/dec-lygk-base-server/base/engWarning/GetKendoList' -// }, -// { -// name: '施工期环保措施落实预警', -// key: 'ImplementEarlyWarning', -// type: 'table', -// hiddenChart: true, -// tableUrl: '/dec-lygk-base-server/base/engWarning/sgqhbss/GetKendoListCust' -// }, -// { -// name: '环保设施建设预警', -// key: 'ConstructionEarlyWarning', -// type: 'table', -// hiddenChart: true, -// tableUrl: '/dec-lygk-base-server/base/engWarning/hbssjs/GetKendoListCust' -// }, -// { -// name: '环保设施运行预警', -// key: 'RunEarlyWarning', -// type: 'table', -// hiddenChart: true, -// tableUrl: '/dec-lygk-base-server/base/engWarning/hbssyx/GetKendoListCust' -// }, -// { -// name: '鱼类放流预警', -// key: 'ReleaseEarlyWarning', -// type: 'table', -// hiddenChart: true, -// tableUrl: '/dec-lygk-base-server/base/engWarning/ylfl/GetKendoListCust' -// } -// ] -// }, -// { -// name: '生态流量', -// key: 'EcologicalFlow', -// type: 'EcologicalFlow' -// }, -// Session.getAppCode() === 'hbb' ? { -// name: '查看报告', -// key: 'attachment', -// type: 'attachment' -// } : null, -// { -// name: '批复文件', -// key: 'approval', -// type: 'approval' -// }, - -// ].filter(Boolean) +const ENGEQTabs: Array = [ + { + name: '基础信息', + key: 'basicInfo', + type: 'basic', + url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo', + default: true // 默认显示 + }, + { + name: '实时视频', + key: 'videoInfo', + type: 'video', + url: '/video/dataStcdFrame/getVideoMonitorList' + }, + { + name: '全景影像', + key: 'panoramaInfo', + type: 'panorama' + }, + { + name: '监测数据', + key: 'monitorInfo', + type: 'tabsWithTwo', + code: 'dzxq.tabs.jcsj' + }, + { + name: '预警提示', + key: 'tableTabs', + type: 'tableTabs', + code: 'dzxq-yjts', + tabs: [ + { + name: '设计参数变更提示', + key: 'DesignParameterChangePrompt', + type: 'table', + hiddenChart: true, + tableUrl: '/dec-lygk-base-server/base/engWarning/GetKendoList' + }, + { + name: '施工期环保措施落实预警', + key: 'ImplementEarlyWarning', + type: 'table', + hiddenChart: true, + tableUrl: + '/dec-lygk-base-server/base/engWarning/sgqhbss/GetKendoListCust' + }, + { + name: '环保设施建设预警', + key: 'ConstructionEarlyWarning', + type: 'table', + hiddenChart: true, + tableUrl: + '/dec-lygk-base-server/base/engWarning/hbssjs/GetKendoListCust' + }, + { + name: '环保设施运行预警', + key: 'RunEarlyWarning', + type: 'table', + hiddenChart: true, + tableUrl: + '/dec-lygk-base-server/base/engWarning/hbssyx/GetKendoListCust' + }, + { + name: '鱼类放流预警', + key: 'ReleaseEarlyWarning', + type: 'table', + hiddenChart: true, + tableUrl: '/dec-lygk-base-server/base/engWarning/ylfl/GetKendoListCust' + } + ] + }, + { + name: '生态流量', + key: 'EcologicalFlow', + type: 'EcologicalFlow' + }, + { + name: '查看报告', + key: 'attachment', + type: 'attachment', + url: '/eq/fid/GetKendoListCust' + }, + { + name: '批复文件', + key: 'approval', + type: 'approval', + url: '/eng/base/eiaapproval/GetKendoList' + } +].filter(Boolean); // // 水电站生态流量 - 江局单独看 √ // const ENGEQTabsJuangJu: Array = [ @@ -1199,7 +1204,11 @@ const handleTabs = (modaldata: any) => { console.log('sttp', sttp); switch (sttp) { case 'ENG': - return ENGTabs; + if (modaldata?.eqtp == 'QEC') { + return ENGEQTabs; + } else { + return ENGTabs; + } case 'WT_POINT': return WTTabs; case 'FH_WQ_POINT': @@ -1239,15 +1248,16 @@ const handleTabs = (modaldata: any) => { return DEVICETABS; case 'DW_1': return DEVICETABS; - // - // if (modaldata?.eqtp == 'QEC') { - // const { page } = Utility.parseQueryString() - // if (page == 'shengTaiLiuLiangManZuQingKuangJiangJu') { - // return ENGEQTabsJuangJu - // } else { - // return ENGEQTabs - // } - // } else { + // + if (modaldata?.eqtp == 'QEC') { + // const { page } = Utility.parseQueryString() + // if (page == 'shengTaiLiuLiangManZuQingKuangJiangJu') { + // return ENGEQTabsJuangJu + // } else { + return ENGEQTabs; + // } + } + // else { // return Session.getAppCode() === 'hbb' ? ENGTabs.filter((e) => e.name !== '阶段属性') : ENGTabs // } // case 'ENG_ALARM': diff --git a/frontend/src/utils/enumeration.ts b/frontend/src/utils/enumeration.ts index 05fa3fc4..1c50f87e 100644 --- a/frontend/src/utils/enumeration.ts +++ b/frontend/src/utils/enumeration.ts @@ -281,6 +281,38 @@ namespace DateSetting { value: [getStartTime().subtract(1, 'year'), getStartTime()] } ], + month1: [ + { + label: '最近7天', + value: [getStartTime().subtract(6, 'day'), getStartTime()] + }, + { + label: '最近1个月', + value: [getStartTime().subtract(1, 'month'), getStartTime()] + }, + { + label: '最近3个月', + value: [getStartTime().subtract(3, 'month'), getStartTime()] + }, + { + label: '最近6个月', + value: [getStartTime().subtract(6, 'month'), getStartTime()] + } + ], + hour: [ + { + label: '最近7小时', + value: [getStartTime().subtract(7, 'hour'), getStartTime()] + }, + { + label: '最近24小时', + value: [getStartTime().subtract(24, 'hour'), getStartTime()] + }, + { + label: '最近一周', + value: [getStartTime().subtract(7, 'day'), getStartTime()] + } + ], season: [ { label: '第一季度',