feat: 可视化大屏展示

This commit is contained in:
2025-12-26 19:50:46 +08:00
parent 9fd7e0c656
commit 02f9b46b22
453 changed files with 70777 additions and 130 deletions
+47
View File
@@ -0,0 +1,47 @@
/**
* 鹰眼管控平台 - Umi配置
*/
import routes from './routes';
import proxy from './proxy';
const { REACT_APP_ENV } = process.env as any;
const isDev = process.env.NODE_ENV === 'development';
const API_PREFIX = isDev ? '' : (process.env.API_PREFIX || '');
const APP_BASE = isDev ? '/' : (process.env.APP_BASE || '/');
export default {
hash: true,
publicPath: isDev ? '/' : (APP_BASE.endsWith('/') ? APP_BASE : APP_BASE + '/'),
// 禁用 umi 的 antd 插件,Ant Design 5.x 由 app.tsx 中的 ConfigProvider 管理
antd: false,
title: '鹰眼管控平台',
metas: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
],
// Ant Design 5.x 使用 ConfigProvider 配置主题,不再使用 Less 变量
// 主题配置移至 app.tsx 中的 ConfigProvider
locale: { antd: false, default: 'zh-CN', baseNavigator: true },
dynamicImport: { loading: '@/components/PageLoading' },
routes,
history: { type: 'browser' },
base: APP_BASE,
proxy: (proxy as any)[REACT_APP_ENV || 'dev'],
define: {
'process.env.API_PREFIX': API_PREFIX,
'process.env.APP_BASE': APP_BASE,
},
nodeModulesTransform: { type: 'none' },
mfsu: false,
fastRefresh: {},
// Cesium 资源配置
chainWebpack: (config: any) => {
config.plugin('define').tap((definitions: any) => {
Object.assign(definitions[0], {
'process.env.CESIUM_BASE_URL': JSON.stringify(isDev ? '/' : (APP_BASE.endsWith('/') ? APP_BASE : APP_BASE + '/')),
});
return definitions;
});
return config;
},
} as any;
+57
View File
@@ -0,0 +1,57 @@
/**
* 鹰眼管控平台 - 开发代理配置
*/
const GATEWAY = process.env.GATEWAY_ORIGIN || 'http://localhost:9900';
const SRS_SERVER = process.env.SRS_SERVER || 'http://220.205.16.27:8024';
export default {
dev: {
// API 请求代理
'/api-': {
target: GATEWAY,
changeOrigin: true,
},
// 3D模型CDN代理
'/goflymodel': {
target: 'https://minicdn.goflytec.com',
changeOrigin: true,
secure: false,
},
// SRS WebRTC WHEP 视频流代理
'/rtc': {
target: SRS_SERVER,
changeOrigin: true,
secure: false,
},
// SRS 登录认证接口代理
'/terraform': {
target: SRS_SERVER,
changeOrigin: true,
secure: false,
},
},
test: {
'/api-': {
target: GATEWAY,
changeOrigin: true,
ws: true,
},
'/goflymodel': {
target: 'https://minicdn.goflytec.com',
changeOrigin: true,
secure: false,
},
},
pre: {
'/api-': {
target: GATEWAY,
changeOrigin: true,
ws: true,
},
'/goflymodel': {
target: 'https://minicdn.goflytec.com',
changeOrigin: true,
secure: false,
},
},
} as const;
+41
View File
@@ -0,0 +1,41 @@
/**
* 鹰眼管控平台 - 路由配置
* 精简版路由:登录 → 大屏 → 3D地图
*/
export default [
// 登录页 - 无布局
{
path: '/user/login',
component: '@/pages/user/Login',
layout: false,
},
// 主应用 - 无菜单布局
{
path: '/',
component: '@/layouts/BlankLayout',
routes: [
// 默认跳转大屏
{
path: '/',
redirect: '/dashboard',
},
// 大屏首页
{
path: '/dashboard',
component: '@/pages/dashboard',
name: '监控大屏',
},
// 3D地图
{
path: '/map3d',
component: '@/pages/map3d',
name: '3D地图',
},
// 404
{
path: '*',
component: '@/pages/404',
},
],
},
];