Эх сурвалжийг харах

[1015] 菜单名称调整;气象资源曲线改为 预测、观测

taosj 1 долоо хоног өмнө
parent
commit
38f0c273ef

+ 7 - 7
forecast-backend-vue/src/views/ufo/electricity/weather/HumidityCurve.vue

@@ -28,7 +28,7 @@
       </a-form>
     </a-card>
 
-    <a-card :bordered="false" class="chart-card" title="湿度曲线图">
+    <a-card :bordered="false" class="chart-card" title="湿度曲线">
       <div ref="chartRef" class="curve-chart" />
     </a-card>
 
@@ -36,8 +36,8 @@
       <a-descriptions v-if="summary" size="small" :column="4" bordered class="summary">
         <a-descriptions-item label="总记录数(预测)">{{ summary.totalRecords }}</a-descriptions-item>
         <a-descriptions-item label="有效记录数(预测)">{{ summary.validRecords }}</a-descriptions-item>
-        <a-descriptions-item label="总记录数(本地)">{{ summary.localTotalRecords }}</a-descriptions-item>
-        <a-descriptions-item label="有效记录数(本地)">{{ summary.localValidRecords }}</a-descriptions-item>
+        <a-descriptions-item label="总记录数(观测)">{{ summary.localTotalRecords }}</a-descriptions-item>
+        <a-descriptions-item label="有效记录数(观测)">{{ summary.localValidRecords }}</a-descriptions-item>
       </a-descriptions>
       <a-table
         :columns="columns"
@@ -119,14 +119,14 @@ const loadStations = async () => {
 };
 
 const buildOption = (forecastStats, localStats) => {
-  // 预测/本地采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
+  // 预测/观测采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
   // 按时间戳排序,保证数组顺序与时间一致,避免后端返回无序导致线条自我交叉
   const toPairs = (stats, key) => (stats || [])
     .map((item) => [dayjs(item.time).valueOf(), toNumber(item[key], 0)])
     .sort((a, b) => a[0] - b[0]);
   return {
     tooltip: {trigger: 'axis'},
-    legend: {top: 0, left: 'center', data: ['预测', '本地']},
+    legend: {top: 0, left: 'center', data: ['预测', '观测']},
     grid: {left: 60, right: 24, top: 46, bottom: 60},
     xAxis: {
       type: 'time',
@@ -145,7 +145,7 @@ const buildOption = (forecastStats, localStats) => {
     ],
     series: [
       {name: '预测', type: 'line', smooth: true, showSymbol: false, data: toPairs(forecastStats, 'rhsfc')},
-      {name: '本地', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'rhsfc')}
+      {name: '观测', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'rhsfc')}
     ]
   };
 };
@@ -201,7 +201,7 @@ const handleQuery = async () => {
       ...(local.stats || []).map((item, index) => ({
         key: `local-${index}`,
         time: item.time,
-        source: item.source || '本地',
+        source: item.source || '观测',
         rhsfc: toNumber(item.rhsfc, 0)
       }))
     ];

+ 7 - 7
forecast-backend-vue/src/views/ufo/electricity/weather/IrradianceCurve.vue

@@ -28,7 +28,7 @@
       </a-form>
     </a-card>
 
-    <a-card :bordered="false" class="chart-card" title="辐照曲线图">
+    <a-card :bordered="false" class="chart-card" title="辐照曲线">
       <div ref="chartRef" class="curve-chart" />
     </a-card>
 
@@ -36,8 +36,8 @@
       <a-descriptions v-if="summary" size="small" :column="4" bordered class="summary">
         <a-descriptions-item label="总记录数(预测)">{{ summary.totalRecords }}</a-descriptions-item>
         <a-descriptions-item label="有效记录数(预测)">{{ summary.validRecords }}</a-descriptions-item>
-        <a-descriptions-item label="总记录数(本地)">{{ summary.localTotalRecords }}</a-descriptions-item>
-        <a-descriptions-item label="有效记录数(本地)">{{ summary.localValidRecords }}</a-descriptions-item>
+        <a-descriptions-item label="总记录数(观测)">{{ summary.localTotalRecords }}</a-descriptions-item>
+        <a-descriptions-item label="有效记录数(观测)">{{ summary.localValidRecords }}</a-descriptions-item>
       </a-descriptions>
       <a-table
         :columns="columns"
@@ -119,14 +119,14 @@ const loadStations = async () => {
 };
 
 const buildOption = (forecastStats, localStats) => {
-  // 预测/本地采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
+  // 预测/观测采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
   // 按时间戳排序,保证数组顺序与时间一致,避免后端返回无序导致线条自我交叉
   const toPairs = (stats, key) => (stats || [])
     .map((item) => [dayjs(item.time).valueOf(), toNumber(item[key], 0)])
     .sort((a, b) => a[0] - b[0]);
   return {
     tooltip: {trigger: 'axis'},
-    legend: {top: 0, left: 'center', data: ['预测', '本地']},
+    legend: {top: 0, left: 'center', data: ['预测', '观测']},
     grid: {left: 60, right: 24, top: 46, bottom: 60},
     xAxis: {
       type: 'time',
@@ -145,7 +145,7 @@ const buildOption = (forecastStats, localStats) => {
     ],
     series: [
       {name: '预测', type: 'line', smooth: true, showSymbol: false, data: toPairs(forecastStats, 'tirr')},
-      {name: '本地', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'tirr')}
+      {name: '观测', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'tirr')}
     ]
   };
 };
@@ -201,7 +201,7 @@ const handleQuery = async () => {
       ...(local.stats || []).map((item, index) => ({
         key: `local-${index}`,
         time: item.time,
-        source: item.source || '本地',
+        source: item.source || '观测',
         tirr: toNumber(item.tirr, 0)
       }))
     ];

+ 7 - 7
forecast-backend-vue/src/views/ufo/electricity/weather/PressureCurve.vue

@@ -28,7 +28,7 @@
       </a-form>
     </a-card>
 
-    <a-card :bordered="false" class="chart-card" title="气压曲线图">
+    <a-card :bordered="false" class="chart-card" title="气压曲线">
       <div ref="chartRef" class="curve-chart" />
     </a-card>
 
@@ -36,8 +36,8 @@
       <a-descriptions v-if="summary" size="small" :column="4" bordered class="summary">
         <a-descriptions-item label="总记录数(预测)">{{ summary.totalRecords }}</a-descriptions-item>
         <a-descriptions-item label="有效记录数(预测)">{{ summary.validRecords }}</a-descriptions-item>
-        <a-descriptions-item label="总记录数(本地)">{{ summary.localTotalRecords }}</a-descriptions-item>
-        <a-descriptions-item label="有效记录数(本地)">{{ summary.localValidRecords }}</a-descriptions-item>
+        <a-descriptions-item label="总记录数(观测)">{{ summary.localTotalRecords }}</a-descriptions-item>
+        <a-descriptions-item label="有效记录数(观测)">{{ summary.localValidRecords }}</a-descriptions-item>
       </a-descriptions>
       <a-table
         :columns="columns"
@@ -119,14 +119,14 @@ const loadStations = async () => {
 };
 
 const buildOption = (forecastStats, localStats) => {
-  // 预测/本地采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
+  // 预测/观测采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
   // 按时间戳排序,保证数组顺序与时间一致,避免后端返回无序导致线条自我交叉
   const toPairs = (stats, key) => (stats || [])
     .map((item) => [dayjs(item.time).valueOf(), toNumber(item[key], 0)])
     .sort((a, b) => a[0] - b[0]);
   return {
     tooltip: {trigger: 'axis'},
-    legend: {top: 0, left: 'center', data: ['预测', '本地']},
+    legend: {top: 0, left: 'center', data: ['预测', '观测']},
     grid: {left: 60, right: 24, top: 46, bottom: 60},
     xAxis: {
       type: 'time',
@@ -145,7 +145,7 @@ const buildOption = (forecastStats, localStats) => {
     ],
     series: [
       {name: '预测', type: 'line', smooth: true, showSymbol: false, data: toPairs(forecastStats, 'psfc')},
-      {name: '本地', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'psfc')}
+      {name: '观测', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'psfc')}
     ]
   };
 };
@@ -201,7 +201,7 @@ const handleQuery = async () => {
       ...(local.stats || []).map((item, index) => ({
         key: `local-${index}`,
         time: item.time,
-        source: item.source || '本地',
+        source: item.source || '观测',
         psfc: toNumber(item.psfc, 0)
       }))
     ];

+ 7 - 7
forecast-backend-vue/src/views/ufo/electricity/weather/TemperatureCurve.vue

@@ -28,7 +28,7 @@
       </a-form>
     </a-card>
 
-    <a-card :bordered="false" class="chart-card" title="温度曲线图">
+    <a-card :bordered="false" class="chart-card" title="温度曲线">
       <div ref="chartRef" class="curve-chart" />
     </a-card>
 
@@ -36,8 +36,8 @@
       <a-descriptions v-if="summary" size="small" :column="4" bordered class="summary">
         <a-descriptions-item label="总记录数(预测)">{{ summary.totalRecords }}</a-descriptions-item>
         <a-descriptions-item label="有效记录数(预测)">{{ summary.validRecords }}</a-descriptions-item>
-        <a-descriptions-item label="总记录数(本地)">{{ summary.localTotalRecords }}</a-descriptions-item>
-        <a-descriptions-item label="有效记录数(本地)">{{ summary.localValidRecords }}</a-descriptions-item>
+        <a-descriptions-item label="总记录数(观测)">{{ summary.localTotalRecords }}</a-descriptions-item>
+        <a-descriptions-item label="有效记录数(观测)">{{ summary.localValidRecords }}</a-descriptions-item>
       </a-descriptions>
       <a-table
         :columns="columns"
@@ -119,14 +119,14 @@ const loadStations = async () => {
 };
 
 const buildOption = (forecastStats, localStats) => {
-  // 预测/本地采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
+  // 预测/观测采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
   // 按时间戳排序,保证数组顺序与时间一致,避免后端返回无序导致线条自我交叉
   const toPairs = (stats, key) => (stats || [])
     .map((item) => [dayjs(item.time).valueOf(), toNumber(item[key], 0)])
     .sort((a, b) => a[0] - b[0]);
   return {
     tooltip: {trigger: 'axis'},
-    legend: {top: 0, left: 'center', data: ['预测', '本地']},
+    legend: {top: 0, left: 'center', data: ['预测', '观测']},
     grid: {left: 60, right: 24, top: 46, bottom: 60},
     xAxis: {
       type: 'time',
@@ -145,7 +145,7 @@ const buildOption = (forecastStats, localStats) => {
     ],
     series: [
       {name: '预测', type: 'line', smooth: true, showSymbol: false, data: toPairs(forecastStats, 'tsfc')},
-      {name: '本地', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'tsfc')}
+      {name: '观测', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'tsfc')}
     ]
   };
 };
@@ -201,7 +201,7 @@ const handleQuery = async () => {
       ...(local.stats || []).map((item, index) => ({
         key: `local-${index}`,
         time: item.time,
-        source: item.source || '本地',
+        source: item.source || '观测',
         tsfc: toNumber(item.tsfc, 0)
       }))
     ];

+ 7 - 7
forecast-backend-vue/src/views/ufo/electricity/weather/WindSpeedCurve.vue

@@ -28,7 +28,7 @@
       </a-form>
     </a-card>
 
-    <a-card :bordered="false" class="chart-card" title="风速曲线图">
+    <a-card :bordered="false" class="chart-card" title="风速曲线">
       <div ref="chartRef" class="curve-chart" />
     </a-card>
 
@@ -36,8 +36,8 @@
       <a-descriptions v-if="summary" size="small" :column="4" bordered class="summary">
         <a-descriptions-item label="总记录数(预测)">{{ summary.totalRecords }}</a-descriptions-item>
         <a-descriptions-item label="有效记录数(预测)">{{ summary.validRecords }}</a-descriptions-item>
-        <a-descriptions-item label="总记录数(本地)">{{ summary.localTotalRecords }}</a-descriptions-item>
-        <a-descriptions-item label="有效记录数(本地)">{{ summary.localValidRecords }}</a-descriptions-item>
+        <a-descriptions-item label="总记录数(观测)">{{ summary.localTotalRecords }}</a-descriptions-item>
+        <a-descriptions-item label="有效记录数(观测)">{{ summary.localValidRecords }}</a-descriptions-item>
       </a-descriptions>
       <a-table
         :columns="columns"
@@ -119,14 +119,14 @@ const loadStations = async () => {
 };
 
 const buildOption = (forecastStats, localStats) => {
-  // 预测/本地采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
+  // 预测/观测采样时间点不同,用连续时间轴各自按自身采样点绘制,避免线条因对方缺数而中断
   // 按时间戳排序,保证数组顺序与时间一致,避免后端返回无序导致线条自我交叉
   const toPairs = (stats, key) => (stats || [])
     .map((item) => [dayjs(item.time).valueOf(), toNumber(item[key], 0)])
     .sort((a, b) => a[0] - b[0]);
   return {
     tooltip: {trigger: 'axis'},
-    legend: {top: 0, left: 'center', data: ['预测', '本地']},
+    legend: {top: 0, left: 'center', data: ['预测', '观测']},
     grid: {left: 60, right: 24, top: 46, bottom: 60},
     xAxis: {
       type: 'time',
@@ -145,7 +145,7 @@ const buildOption = (forecastStats, localStats) => {
     ],
     series: [
       {name: '预测', type: 'line', smooth: true, showSymbol: false, data: toPairs(forecastStats, 'ws')},
-      {name: '本地', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'ws')}
+      {name: '观测', type: 'line', smooth: true, showSymbol: false, data: toPairs(localStats, 'ws')}
     ]
   };
 };
@@ -201,7 +201,7 @@ const handleQuery = async () => {
       ...(local.stats || []).map((item, index) => ({
         key: `local-${index}`,
         time: item.time,
-        source: item.source || '本地',
+        source: item.source || '观测',
         ws: toNumber(item.ws, 0)
       }))
     ];

+ 8 - 1
release_note/20261015/20261015_dp.sql

@@ -15,4 +15,11 @@ WHERE menu_name IN (
     '光伏风向',
     '光伏湿度',
     '光伏气压'
-);
+);
+
+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 = '光伏温度';
+update "public"."sys_menu" set menu_name = '湿度' where menu_name = '光伏湿度';
+update "public"."sys_menu" set menu_name = '气压' where menu_name = '光伏气压';

+ 1 - 10
release_note/20261015/20261015_power_error_stat_menu.sql

@@ -13,13 +13,4 @@ SELECT
 '功率误差统计',
 (select menu_id from sys_menu t where t.menu_name = '统计分析' and t.parent_id = 0),
 10, 'power-error-stat', 'ufo/electricity/statanalysis/powerErrorStat', '', 'PowerErrorStat', 1, 0, 'C', '0', '0', 'data:powerErrorStat:list', 'CalculatorOutlined', 'admin', now(), '', NULL, '功率误差统计页面'
-WHERE NOT EXISTS (SELECT 1 FROM sys_menu t WHERE t.menu_name = '功率误差统计');
-
--- 3. 授权给管理员角色(role_id = 1)
-INSERT INTO sys_role_menu (role_id, menu_id)
-SELECT 1, menu_id FROM sys_menu t WHERE t.menu_name = '统计分析' AND t.parent_id = 0
-AND NOT EXISTS (SELECT 1 FROM sys_role_menu r WHERE r.role_id = 1 AND r.menu_id = (SELECT menu_id FROM sys_menu t WHERE t.menu_name = '统计分析' AND t.parent_id = 0));
-
-INSERT INTO sys_role_menu (role_id, menu_id)
-SELECT 1, menu_id FROM sys_menu t WHERE t.menu_name = '功率误差统计'
-AND NOT EXISTS (SELECT 1 FROM sys_role_menu r WHERE r.role_id = 1 AND r.menu_id = (SELECT menu_id FROM sys_menu t WHERE t.menu_name = '功率误差统计'));
+WHERE NOT EXISTS (SELECT 1 FROM sys_menu t WHERE t.menu_name = '功率误差统计');