diff --git a/config/routes.ts b/config/routes.ts index 934eb70..b14a729 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -52,10 +52,21 @@ export default [ routes: [ { name: '字典数据', - path: '/area/updata-router/index', + path: '/area/updata-router/index/:id', component: './Area/Subway/UpLine', }, - ] + ], + }, + { + name: 'management', + path: '/management', + routes: [ + { + name: '字典数据', + path: '/management/see-matching/index/:id', + component: './Management/List/SeeMatching', + }, + ], }, { name: 'system', @@ -76,7 +87,7 @@ export default [ path: '/system/role-auth/user/:id', component: './System/Role/authUser', }, - ] + ], }, { name: 'monitor', @@ -87,7 +98,7 @@ export default [ path: '/monitor/job-log/index/:id', component: './Monitor/JobLog', }, - ] + ], }, { name: 'tool', @@ -103,6 +114,6 @@ export default [ path: '/tool/gen/edit.tsx', component: './Tool/Gen/edit.tsx', }, - ] + ], }, ]; diff --git a/package.json b/package.json index 4763d98..d6e21ad 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "not ie <= 10" ], "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "@ant-design/icons": "^5.5.0", "@ant-design/plots": "^2.3.2", "@ant-design/pro-components": "^2.7.19", @@ -64,6 +65,7 @@ "antd-style": "^3.6.2", "classnames": "^2.5.1", "dayjs": "^1.11.13", + "echarts": "^5.6.0", "fabric": "^6.4.0", "highlight.js": "^11.10.0", "lodash": "^4.17.21", diff --git a/src/app.tsx b/src/app.tsx index 9e5d8aa..900d7e9 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,18 +1,21 @@ -import { Footer, Question, SelectLang, AvatarDropdown, AvatarName } from '@/components'; -import { LinkOutlined } from '@ant-design/icons'; +import { AvatarDropdown, AvatarName, Footer, SelectLang } from '@/components'; import type { Settings as LayoutSettings } from '@ant-design/pro-components'; import { SettingDrawer } from '@ant-design/pro-components'; import type { RunTimeLayoutConfig } from '@umijs/max'; -import { history, Link } from '@umijs/max'; +import { history } from '@umijs/max'; import defaultSettings from '../config/defaultSettings'; import { errorConfig } from './requestErrorConfig'; import { clearSessionToken, getAccessToken, getRefreshToken, getTokenExpireTime } from './access'; -import { getRemoteMenu, getRoutersInfo, getUserInfo, patchRouteWithRemoteMenus, setRemoteMenu } from './services/session'; +import { + getRemoteMenu, + getRoutersInfo, + getUserInfo, + patchRouteWithRemoteMenus, + setRemoteMenu, +} from './services/session'; import { PageEnum } from './enums/pagesEnums'; -import {logout} from "@/services/system/auth"; import { stringify } from 'querystring'; -import { message } from 'antd' -import { createRef } from 'react'; +import { message } from 'antd'; const isDev = process.env.NODE_ENV === 'development'; const loginOut = async () => { @@ -23,7 +26,7 @@ const loginOut = async () => { /** 此方法会跳转到 redirect 参数所在的位置 */ const redirect = urlParams.get('redirect'); // Note: There may be security issues, please note - console.log('redirect', window.location.pathname, redirect) + console.log('redirect', window.location.pathname, redirect); if (window.location.pathname !== '/qingdao/user/login' && !redirect) { history.replace({ pathname: '/user/login', @@ -34,7 +37,6 @@ const loginOut = async () => { } }; - /** * @see https://umijs.org/zh-CN/plugins/plugin-initial-state * */ @@ -79,12 +81,12 @@ export async function getInitialState(): Promise<{ settings: defaultSettings as Partial, }; } + // ProLayout 支持的api https://procomponents.ant.design/components/layout export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => { - return { // actionsRender: () => [, ], - actionsRender: () => [ ], + actionsRender: () => [], avatarProps: { src: initialState?.currentUser?.avatar, title: , @@ -106,7 +108,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = if (!initialState?.currentUser?.userId) { return []; } - return getRemoteMenu() + return getRemoteMenu(); }, }, footerRender: () =>