Browse Source

[0924] 修复前端route导致菜单名称不一致bug;修复copyright;修复重置按钮refreshing;通道管理状态改为tag;菜单名称调整、隐藏

taosj 5 ngày trước cách đây
mục cha
commit
ee767319c3

+ 0 - 174
forecast-backend-vue/src/router/electricity.js

@@ -36,102 +36,12 @@ const electricityRoutes = [
         component: () => import('@/views/ufo/electricity/weather/DisasterWarningMap.vue'),
         meta: {title: '灾害预警地图', icon: 'AlertOutlined'}
       },
-      {
-        path: 'weather/rose',
-        name: 'ElectricityRoseChart',
-        component: () => import('@/views/ufo/electricity/weather/RoseChart.vue'),
-        meta: {title: '风向预测玫瑰图', icon: 'AlertOutlined'}
-      },
-      {
-        path: 'weather/wind-speed-curve',
-        name: 'ElectricityWindSpeedCurve',
-        component: () => import('@/views/ufo/electricity/weather/WindSpeedCurve.vue'),
-        meta: {title: '风速曲线图', icon: 'LineChartOutlined'}
-      },
-      {
-        path: 'weather/temperature-curve',
-        name: 'ElectricityTemperatureCurve',
-        component: () => import('@/views/ufo/electricity/weather/TemperatureCurve.vue'),
-        meta: {title: '温度曲线图', icon: 'LineChartOutlined'}
-      },
-      {
-        path: 'weather/humidity-curve',
-        name: 'ElectricityHumidityCurve',
-        component: () => import('@/views/ufo/electricity/weather/HumidityCurve.vue'),
-        meta: {title: '湿度曲线图', icon: 'LineChartOutlined'}
-      },
-      {
-        path: 'weather/pressure-curve',
-        name: 'ElectricityPressureCurve',
-        component: () => import('@/views/ufo/electricity/weather/PressureCurve.vue'),
-        meta: {title: '气压曲线图', icon: 'LineChartOutlined'}
-      },
-      {
-        path: 'weather/irradiance-curve',
-        name: 'ElectricityIrradianceCurve',
-        component: () => import('@/views/ufo/electricity/weather/IrradianceCurve.vue'),
-        meta: {title: '辐照曲线图', icon: 'LineChartOutlined'}
-      },
       {
         path: 'forecast/multi-model',
         name: 'ElectricityMultiModelForecast',
         component: () => import('@/views/ufo/electricity/forecast/MultiModelForecast.vue'),
         meta: {title: '多源多模型预测', icon: 'BranchesOutlined'}
       },
-      {
-        path: 'forecast/theoretical-power',
-        name: 'ElectricityTheoreticalPower',
-        component: () => import('@/views/ufo/electricity/forecast/TheoreticalPower.vue'),
-        meta: {title: '理论功率预测', icon: 'ThunderboltOutlined'}
-      },
-      {
-        path: 'forecast/generation',
-        name: 'ElectricityGenerationForecast',
-        component: () => import('@/views/ufo/electricity/forecast/GenerationForecast.vue'),
-        meta: {title: '发电量预测', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/short-term-power',
-        name: 'ShortTermPowerForecasting',
-        component: () => import('@/views/ufo/electricity/forecast/ShortTermPowerForecasting.vue'),
-        meta: {title: '短期功率预测', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/medium-term-power',
-        name: 'MediumTermPowerForecasting',
-        component: () => import('@/views/ufo/electricity/forecast/MediumTermPowerForecasting.vue'),
-        meta: {title: '中期功率预测', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/irradiance-power-comparison',
-        name: 'IrradiancePowerComparison',
-        component: () => import('@/views/ufo/electricity/forecast/IrradiancePowerComparison.vue'),
-        meta: {title: '辐照度功率对比', icon: 'BarChartOutlined'}
-      },
-      {
-        path: 'forecast/ultra-short-term-power',
-        name: 'UltraShortTermPowerForecasting',
-        component: () => import('@/views/ufo/electricity/forecast/UltraShortTermPowerForecasting.vue'),
-        meta: {title: '超短期功率预测', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/super-short-term-forecast-issued',
-        name: 'DataSuperShortTermForecastIssued',
-        component: () => import('@/views/ufo/electricity/forecast/DataSuperShortTermForecastIssued.vue'),
-        meta: {title: '超短期预测功率下发', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/short-term-power-forecast-correct',
-        name: 'DataShortTermPowerForecastCorrect',
-        component: () => import('@/views/ufo/electricity/forecast/DataShortTermPowerForecastCorrect.vue'),
-        meta: {title: '短期预测功率修正', icon: 'AreaChartOutlined'}
-      },
-      {
-        path: 'forecast/super-short-term-forecast-correct',
-        name: 'DataSuperShortTermForecastCorrect',
-        component: () => import('@/views/ufo/electricity/forecast/DataSuperShortTermForecastCorrect.vue'),
-        meta: {title: '超短期预测功率修正', icon: 'AreaChartOutlined'}
-      },
       {
         path: 'analysis/power-stats',
         name: 'ElectricityPowerStats',
@@ -174,12 +84,6 @@ const electricityRoutes = [
         component: () => import('@/views/ufo/electricity/device/DeviceStatus.vue'),
         meta: {title: '设备状态监控', icon: 'MonitorOutlined'}
       },
-      {
-        path: 'device/turbine-info',
-        name: 'ElectricityTurbineInfo',
-        component: () => import('@/views/ufo/electricity/device/TurbineInfo.vue'),
-        meta: {title: '风机设备信息', icon: 'InfoCircleOutlined'}
-      },
       {
         path: 'fault/process',
         name: 'ElectricityFaultProcess',
@@ -191,84 +95,6 @@ const electricityRoutes = [
         name: 'ElectricityFaultProcessLog',
         component: () => import('@/views/ufo/electricity/fault/FaultProcessLog.vue'),
         meta: {title: '故障处理日志', icon: 'ProfileOutlined'}
-      },
-      {
-        path: 'electricity/shor-term-forecast-daily',
-        name: 'ShorTermForecastDailyReport',
-        component: () => import('@/views/ufo/electricity/datareport/shorTermForecastDailyReport.vue'),
-        meta: {title: '短期预测日报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/shor-term-forecast-monthly',
-        name: 'ShorTermForecastMonthlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/shorTermForecastMonthlyReport.vue'),
-        meta: {title: '短期预测月报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/shor-term-forecast-yearly',
-        name: 'ShorTermForecastYearlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/shorTermForecastYearlyReport.vue'),
-        meta: {title: '短期预测年报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/medium-term-forecast-daily',
-        name: 'MediumTermForecastDailyReport',
-        component: () => import('@/views/ufo/electricity/datareport/mediumTermForecastDailyReport.vue'),
-        meta: {title: '中期预测日报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/medium-term-forecast-monthly',
-        name: 'MediumTermForecastMonthlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/mediumTermForecastMonthlyReport.vue'),
-        meta: {title: '中期预测月报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/medium-term-forecast-yearly',
-        name: 'MediumTermForecastYearlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/mediumTermForecastYearlyReport.vue'),
-        meta: {title: '中期预测年报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/ultra-shor-term-forecast-daily',
-        name: 'UltraShorTermForecastDailyReport',
-        component: () => import('@/views/ufo/electricity/datareport/ultraShortTermForecastDailyReport.vue'),
-        meta: {title: '超短期预测日报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/ultra-shor-term-forecast-monthly',
-        name: 'UltraShorTermForecastMonthlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/ultraShortTermForecastMonthlyReport.vue'),
-        meta: {title: '超短期预测月报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/ultra-shor-term-forecast-yearly',
-        name: 'UltraShorTermForecastYearlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/ultraShortTermForecastYearlyReport.vue'),
-        meta: {title: '超短期预测年报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/pv-plant-cumulative-daily',
-        name: 'PvPlantCumulativeDailyReport',
-        component: () => import('@/views/ufo/electricity/datareport/pvPlantCumulativeDailyReport.vue'),
-        meta: {title: '光伏电场累计日报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/pv-plant-cumulative-monthly',
-        name: 'PvPlantCumulativeMonthlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/pvPlantCumulativeMonthlyReport.vue'),
-        meta: {title: '光伏电场累计月报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/pv-plant-cumulative-yearly',
-        name: 'PvPlantCumulativeYearlyReport',
-        component: () => import('@/views/ufo/electricity/datareport/pvPlantCumulativeYearlyReport.vue'),
-        meta: {title: '光伏电场累计年报', icon: 'FileTextOutlined'}
-      },
-      {
-        path: 'electricity/pv-meteorological-resource-data',
-        name: 'PvMeteorologicalResourceDataReport',
-        component: () => import('@/views/ufo/electricity/datareport/pvMeteorologicalResourceDataReport.vue'),
-        meta: {title: '光伏气象资源数据报表', icon: 'FileTextOutlined'}
       }
     ]
   }

+ 2 - 2
forecast-backend-vue/src/stores/app.js

@@ -44,10 +44,10 @@ export const useAppStore = defineStore('app', {
     systemConfig: {
       title: safeGetItem('systemTitle', '光伏功率预测系统'),
       logo: safeGetItem('systemLogo', '/src/assets/images/logo.png'),
-      copyright: safeGetItem('systemCopyright', 'Copyright © 2024 BearJia'),
+      copyright: safeGetItem('systemCopyright', 'Copyright © 2026'),
       version: safeGetItem('systemVersion', '1.0.0'),
       description: safeGetItem('systemDescription', '光伏功率预测系统'),
-      keywords: safeGetItem('systemKeywords', 'Admin,Vue3,Ant Design Vue')
+      keywords: safeGetItem('systemKeywords', '光伏功率预测系统')
     }
   }),
 

+ 5 - 2
forecast-backend-vue/src/views/ufo/config/station/StationConfigCrud.vue

@@ -12,7 +12,7 @@
         <a-form-item>
           <a-space>
             <a-button type="primary" :loading="loading" @click="handleQuery"><BearJiaIcon icon="SearchOutlined"/>查询</a-button>
-            <a-button @click="resetQuery"><BearJiaIcon icon="LoadingOutlined"/>重置</a-button>
+            <a-button @click="resetQuery">重置</a-button>
           </a-space>
         </a-form-item>
       </a-form>
@@ -39,7 +39,9 @@
       <a-table :columns="displayColumns" :data-source="rows" :loading="loading" :pagination="pagination" row-key="id" :row-selection="rowSelection" :size="tableConfigStore.size" :scroll="tableScroll" @change="handleTableChange">
         <template #bodyCell="{ column, record }">
           <a-switch v-if="isSwitchColumn(column)" :checked="record[column.dataIndex] === switchCheckedValue(column)" disabled size="small" />
-          <template v-else-if="column.key === 'stateColumn'">{{ stateText(record.state) }}</template>
+          <template v-else-if="column.key === 'stateColumn'">
+            <a-tag :color="stateColor(record.state)">{{ stateText(record.state) }}</a-tag>
+          </template>
           <template v-else-if="column.key === 'operation'">
             <TableActionBar :record="record" :has-view="false" :has-edit="true" :has-delete="true">
               <template #edit>
@@ -221,6 +223,7 @@ const handleQuery = async () => {
   }
 };
 const stateText = (state) => props.moduleConfig.stateColumn?.textMap?.[String(state)] ?? '';
+const stateColor = (state) => props.moduleConfig.stateColumn?.colorMap?.[String(state)] ?? (Number(state) === 1 ? 'success' : 'default');
 const stateActionOf = (record) => {
   const actions = props.moduleConfig.stateColumn?.actions;
   return (actions && actions[String(record.state)]) || null;

+ 1 - 1
forecast-backend-vue/src/views/ufo/config/station/index.vue

@@ -17,7 +17,7 @@
         <a-form-item>
           <a-space>
             <a-button type="primary" :loading="loading" @click="handleQuery"><BearJiaIcon icon="SearchOutlined"/>查询</a-button>
-            <a-button @click="resetQuery"><BearJiaIcon icon="LoadingOutlined"/>重置</a-button>
+            <a-button @click="resetQuery">重置</a-button>
           </a-space>
         </a-form-item>
       </a-form>

+ 6 - 0
forecast-backend-vue/src/views/ufo/config/station/moduleConfig.js

@@ -235,6 +235,12 @@ export const stationConfigModules = [
         "0": "未启动",
         "1": "运行中"
       },
+      "colorMap": {
+        "-2": "processing",
+        "-1": "error",
+        "0": "default",
+        "1": "success"
+      },
       "actions": {
         "0": { "text": "启动", "command": 1, "icon": "play-circle-outlined" },
         "1": { "text": "停止", "command": 0, "icon": "pause-circle-outlined" }

+ 4 - 1
release_note/20260924/20260924_dp.sql

@@ -40,4 +40,7 @@ WHERE NOT EXISTS (SELECT 1 FROM sys_role_menu t WHERE t.role_id = 1 AND t.menu_i
 -- 优化菜单名称
 update public.sys_menu set menu_name = '短期功率预测修正' where menu_name = '短期预测功率修正';
 update public.sys_menu set menu_name = '超短期功率预测修正' where menu_name = '超短期预测功率修正';
-update public.sys_menu set menu_name = '气象资源' where menu_name = '气象与灾害预警地图';
+update public.sys_menu set menu_name = '气象资源' where menu_name = '气象与灾害预警地图';
+-- 20260922
+UPDATE public.sys_menu set menu_name = '设备管理' where menu_name = '风机设备信息';
+update public.sys_menu set status = 1 where menu_name = '设备状态监控';