From 2bf8cf55ac8f2c48ffd3be4063203fd9a0e60998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E5=85=B8=E5=8D=93?= Date: Mon, 20 Jan 2025 17:42:05 +0800 Subject: [PATCH] =?UTF-8?q?flat:=20=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- config/config.ts | 5 +- config/routes.ts | 2 +- src/app.tsx | 30 ++- {public => src/assets}/logo.svg | 0 src/components/Footer/index.tsx | 15 +- .../RightContent/AvatarDropdown.tsx | 5 +- src/locales/en-US/settings.ts | 2 +- src/pages/Area/Business/edit.tsx | 2 +- src/pages/Area/Business/index.tsx | 71 ++++-- src/pages/Area/Subway/UpLine/edit.tsx | 77 ++++-- src/pages/Area/Subway/UpLine/index.tsx | 77 ++++-- src/pages/Area/Subway/edit.tsx | 24 +- src/pages/Area/Subway/index.tsx | 37 ++- src/pages/Company/List/edit.tsx | 105 ++++++++ src/pages/Company/List/index.tsx | 226 ++++++++++++++++++ src/pages/Jobfair/List/edit.tsx | 121 ++++++++++ src/pages/Jobfair/List/index.tsx | 226 ++++++++++++++++++ src/pages/Logs/Operlog/index.tsx | 1 + src/pages/Management/List/edit.tsx | 92 +++---- src/pages/Management/List/index.tsx | 173 +++++++++++++- src/pages/Monitor/Job/edit.tsx | 4 +- src/pages/Monitor/Job/index.tsx | 4 +- src/pages/System/Config/index.tsx | 1 + src/pages/System/Menu/edit.tsx | 56 +++-- .../System/Role/components/DataScope.tsx | 12 +- src/pages/System/User/index.tsx | 4 +- src/pages/User/Login/index.tsx | 5 +- src/service-worker.js | 2 +- src/services/Management/list.ts | 11 +- src/services/area/business.ts | 6 + src/services/area/subway.ts | 13 + src/services/area/upline.ts | 7 + src/services/company/list.ts | 35 +++ src/services/jobfair/list.ts | 33 +++ src/services/swagger/user.ts | 4 +- src/types/Management/list.d.ts | 6 +- src/types/area/upline.d.ts | 6 +- src/types/company/list.d.ts | 27 +++ src/types/jobfair/list.d.ts | 33 +++ src/utils/tools.ts | 10 + 41 files changed, 1390 insertions(+), 183 deletions(-) rename {public => src/assets}/logo.svg (100%) create mode 100644 src/pages/Company/List/edit.tsx create mode 100644 src/pages/Company/List/index.tsx create mode 100644 src/pages/Jobfair/List/edit.tsx create mode 100644 src/pages/Jobfair/List/index.tsx create mode 100644 src/services/company/list.ts create mode 100644 src/services/jobfair/list.ts create mode 100644 src/types/company/list.d.ts create mode 100644 src/types/jobfair/list.d.ts create mode 100644 src/utils/tools.ts diff --git a/.gitignore b/.gitignore index 82cadd2..c352f48 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ _roadhog-api-doc # production /dist +/qingdao # misc .DS_Store @@ -40,4 +41,4 @@ screenshot build -pnpm-lock.yaml \ No newline at end of file +pnpm-lock.yaml diff --git a/config/config.ts b/config/config.ts index eeed263..7c27b33 100644 --- a/config/config.ts +++ b/config/config.ts @@ -125,7 +125,7 @@ export default defineConfig({ */ headScripts: [ // 解决首次加载时白屏的问题 - { src: '/scripts/loading.js', async: true }, + { src: '/qingdao/scripts/loading.js', async: true }, ], //================ pro 插件配置 ================= presets: ['umi-presets-pro'], @@ -151,6 +151,9 @@ export default defineConfig({ mfsu: { strategy: 'normal', }, + outputPath: 'qingdao', + base: '/qingdao/', + publicPath: '/qingdao/', esbuildMinifyIIFE: true, requestRecord: {}, }); diff --git a/config/routes.ts b/config/routes.ts index dae11c1..934eb70 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -52,7 +52,7 @@ export default [ routes: [ { name: '字典数据', - path: '/area/updata-router/index/:id', + path: '/area/updata-router/index', component: './Area/Subway/UpLine', }, ] diff --git a/src/app.tsx b/src/app.tsx index 46d38ff..9e5d8aa 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -12,11 +12,10 @@ import { PageEnum } from './enums/pagesEnums'; import {logout} from "@/services/system/auth"; import { stringify } from 'querystring'; import { message } from 'antd' +import { createRef } from 'react'; const isDev = process.env.NODE_ENV === 'development'; - const loginOut = async () => { - await logout(); clearSessionToken(); setRemoteMenu(null); const { search, pathname } = window.location; @@ -24,11 +23,12 @@ const loginOut = async () => { /** 此方法会跳转到 redirect 参数所在的位置 */ const redirect = urlParams.get('redirect'); // Note: There may be security issues, please note - if (window.location.pathname !== '/user/login' && !redirect) { + console.log('redirect', window.location.pathname, redirect) + if (window.location.pathname !== '/qingdao/user/login' && !redirect) { history.replace({ pathname: '/user/login', search: stringify({ - redirect: pathname + search, + redirect: pathname.replace('/qingdao', '') + search, }), }); } @@ -79,9 +79,9 @@ 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: () => [ ], @@ -95,9 +95,10 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = waterMarkProps: { // content: initialState?.currentUser?.nickName, }, + // actionRef: layoutActionRef, menu: { locale: false, - // 每当 initialState?.currentUser?.userid 发生修改时重新执行 request + // // 每当 initialState?.currentUser?.userid 发生修改时重新执行 request params: { userId: initialState?.currentUser?.userId, }, @@ -105,7 +106,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = if (!initialState?.currentUser?.userId) { return []; } - return getRemoteMenu(); + return getRemoteMenu() }, }, footerRender: () =>