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