You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
4.9 KiB
161 lines
4.9 KiB
// https://umijs.org/config/
|
|
import { defineConfig } from 'umi';
|
|
import defaultSettings from './defaultSettings';
|
|
import proxy from './proxy';
|
|
const { REACT_APP_ENV } = process.env;
|
|
export default defineConfig({
|
|
hash: true,
|
|
history: { type: 'hash' },
|
|
antd: {},
|
|
dva: {
|
|
hmr: true,
|
|
},
|
|
locale: {
|
|
// default zh-CN
|
|
default: 'zh-CN',
|
|
// default true, when it is true, will use `navigator.language` overwrite default
|
|
antd: true,
|
|
baseNavigator: true,
|
|
},
|
|
dynamicImport: {
|
|
loading: '@/components/PageLoading/index',
|
|
},
|
|
targets: {
|
|
ie: 11,
|
|
},
|
|
// umi routes: https://umijs.org/docs/routing
|
|
routes: [
|
|
{
|
|
path: '/user',
|
|
component: '../layouts/UserLayout',
|
|
routes: [
|
|
{
|
|
name: 'login',
|
|
path: '/user/login',
|
|
component: './user/login',
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: '/',
|
|
Routes: ['src/pages/Authorized'],
|
|
component: '../layouts/SecurityLayout',
|
|
routes: [
|
|
{
|
|
path: '/dashboard',
|
|
name: 'dashboard',
|
|
icon: 'dashboard',
|
|
component: '../layouts/AnalysisLayout',
|
|
// authority: ['datams'],
|
|
routes: [
|
|
{
|
|
name: 'home',
|
|
path: '/dashboard/analysis',
|
|
component: './dashboard/analysis',
|
|
},
|
|
{
|
|
name: 'teachingStaff',
|
|
path: '/dashboard/teachingStaff',
|
|
component: './dashboard/teachingStaff',
|
|
},
|
|
{
|
|
name: 'studentSituation',
|
|
path: '/dashboard/studentSituation',
|
|
component: './dashboard/studentSituation',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/',
|
|
component: '../layouts/BasicLayout',
|
|
// authority: ['admin'],
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
redirect: './accessSystemManagement/accessSystemList',
|
|
},
|
|
{
|
|
path: '/accessSystemManagement',
|
|
name: 'accessSystem',
|
|
icon: 'ApiOutlined',
|
|
routes: [
|
|
{
|
|
name: 'accessSystemList',
|
|
icon: 'smile',
|
|
path: '/accessSystemManagement/accessSystemList',
|
|
// authority: ['admin'],
|
|
component: './accessSystemManagement/accessSystemList',
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: '/dataExchangeManagement',
|
|
name: 'dataExchange',
|
|
icon: 'BlockOutlined',
|
|
routes: [
|
|
{
|
|
name: 'dataSourceManagement',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataSourceManagement',
|
|
component: './dataExchangeManagement/dataSourceManagement',
|
|
},
|
|
{
|
|
name: 'dataSubscriptionPublishing',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataSubscriptionPublishing',
|
|
component: './dataExchangeManagement/dataSubscriptionPublishing',
|
|
},
|
|
{
|
|
name: 'dataQuery',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataQuery',
|
|
component: './dataExchangeManagement/dataQuery',
|
|
},
|
|
{
|
|
name: 'dataStatistics',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataStatistics',
|
|
component: './dataExchangeManagement/dataStatistics',
|
|
},
|
|
{
|
|
name: 'dataDictionaryManagement',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataDictionaryManagement',
|
|
component: './dataExchangeManagement/dataDictionaryManagement',
|
|
},
|
|
{
|
|
name: 'dictionaryItemManagement',
|
|
icon: 'smile',
|
|
path: '/dataExchangeManagement/dataDictionaryManagement/dictionaryItemManagement',
|
|
component:
|
|
'./dataExchangeManagement/dataDictionaryManagement/dictionaryItemManagement',
|
|
hideInMenu: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
component: './exception/404',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
|
|
theme: {
|
|
// ...darkTheme,
|
|
'primary-color': defaultSettings.primaryColor,
|
|
},
|
|
// @ts-ignore
|
|
title: false,
|
|
ignoreMomentLocale: true,
|
|
proxy: proxy[REACT_APP_ENV || 'dev'],
|
|
base: '/',
|
|
publicPath: './', // 发布路径采用相对地址
|
|
manifest: {
|
|
basePath: './',
|
|
},
|
|
});
|