| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import { defineConfig } from '@umijs/max';
- export default defineConfig({
- plugins: ['@plugin-web-update-notification/umijs'],
- antd: {},
- access: {},
- model: {},
- initialState: {},
- request: {},
- define: {
- 'process.env.NODE_ENV': process.env.NODE_ENV,
- 'process.env.API_HOST': process.env.API_HOST,
- },
- layout: {
- title: '采集设备',
- },
- base: '/',
- publicPath: '/',
- outputPath: 'collect_schedule_web',
- // 开发代理:将 /api 请求代理到后端服务
- proxy: {
- '/manager': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- },
- '/api': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- },
- },
- favicons: ['/assets/image/logo.ico'],
- hash: true,
- routes: [
- {
- path: '/',
- redirect: '/home',
- },
- {
- name: '首页',
- path: '/home',
- icon: 'home',
- component: './Home',
- },
- // 采集任务(仅查看,任务由调度引擎自动生成)
- {
- name: '采集任务',
- path: '/collect_task',
- icon: 'BookOutlined',
- component: './CollectionTask',
- },
- // 平台配置
- {
- name: '平台配置',
- path: '/platform_config',
- icon: 'FileTextOutlined',
- component: './PlatformConfig',
- },
- // 平台维护(平台注册表管理)
- {
- name: '平台维护',
- path: '/platform_manage',
- icon: 'AppstoreOutlined',
- component: './PlatformManage',
- },
- // 区域管理
- {
- name: '区域管理',
- path: '/region_manage',
- icon: 'EnvironmentOutlined',
- component: './RegionManage',
- },
- // 平台账号(仅查看和启用/禁用,账号由心跳上报自动维护)
- {
- name: '平台账号',
- path: '/platform_account',
- icon: 'UserOutlined',
- component: './PlatformAccount',
- },
- // 全局未匹配路由兜底到 404
- {
- path: '*',
- component: './404',
- },
- // 登录页
- {
- name: '登录',
- path: '/login',
- component: './Login',
- layout: false,
- },
- ],
- npmClient: 'yarn',
- // 网页更新提醒插件配置
- webUpdateNotification: {
- versionType: 'build_timestamp',
- logVersion: true,
- checkInterval: 0.5 * 60 * 1000,
- notificationConfig: {
- placement: 'topRight',
- },
- notificationProps: {
- title: '系统已更新',
- description: '检测到新版本,请刷新页面以获取最新功能',
- buttonText: '刷新',
- dismissButtonText: '忽略',
- },
- },
- });
|