perf: 优化管理端生产加载体验

- 图标与重型组件按需加载,优化菜单预取和页面请求链路

- 开启 gzip 与静态缓存并修复子路由 KeepAlive 冲突
This commit is contained in:
2026-07-22 20:35:55 +08:00
parent 9f06c238d3
commit 19059fde96
27 changed files with 750 additions and 233 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@easyflow/plugins/echarts';
import type { EchartsUIType } from '@easyflow/plugins/echarts/workspace';
import type {
DashboardAssistantTrendSeries,
@@ -24,7 +24,7 @@ import {
} from 'vue';
import { AnalysisChartCard } from '@easyflow/common-ui';
import { EchartsUI, useEcharts } from '@easyflow/plugins/echarts';
import { EchartsUI, useEcharts } from '@easyflow/plugins/echarts/workspace';
import { useUserStore } from '@easyflow/stores';
import { convertToRgb, downloadFileFromBlob } from '@easyflow/utils';
@@ -307,17 +307,15 @@ async function loadOverview() {
errorMessage.value = '';
try {
const [data] = await Promise.all([
getDashboardOverview(buildOverviewQuery()),
loadAssistantOptions().catch(() => undefined),
]);
void loadAssistantOptions().catch(() => undefined);
const data = await getDashboardOverview(buildOverviewQuery());
overview.value = data;
resetAssistantTrendSelection();
await renderCharts();
if (data.chatStatus?.available === false) {
resetUserRanks();
} else {
await loadUserRanks();
void loadUserRanks();
}
} catch (error) {
overview.value = null;