From a60d6b670c174f4bc85f98b0bba3f7582385ca50 Mon Sep 17 00:00:00 2001 From: awenes <1121353141@qq.com> Date: Thu, 4 Apr 2024 22:22:11 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=BA=94=E7=94=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/console-fe/config/routes.ts | 53 +++++++++++-------- .../src/pages/app/AppGroup/AppGroup.tsx | 11 ++-- .../src/pages/app/AppList/AppList.tsx | 17 ++---- 3 files changed, 38 insertions(+), 43 deletions(-) diff --git a/eiam-console/src/main/console-fe/config/routes.ts b/eiam-console/src/main/console-fe/config/routes.ts index 0f5d8035..501b87a1 100644 --- a/eiam-console/src/main/console-fe/config/routes.ts +++ b/eiam-console/src/main/console-fe/config/routes.ts @@ -145,28 +145,37 @@ export default [ name: 'app', icon: 'AppstoreOutlined', path: '/app', - component: './app/AppList', - }, - //创建应用 - { - name: 'app.create', - path: '/app/create', - hideInMenu: true, - component: './app/AppCreate', - }, - //应用详情 - { - name: 'app.detail', - path: '/app/detail', - hideInMenu: true, - component: './app/AppDetail', - }, - //应用分组 - { - name: 'app.group', - path: '/app/group', - hideInMenu: true, - component: './app/AppGroup', + routes: [ + { + path: '/app', + redirect: '/app/list', + }, + //创建应用 + { + name: 'create', + path: '/app/create', + component: './app/AppCreate', + }, + //应用列表 + { + name: 'list', + path: '/app/list', + component: './app/AppList', + }, + //应用详情 + { + name: 'detail', + path: '/app/list/detail', + hideInMenu: true, + component: './app/AppDetail', + }, + //应用分组 + { + name: 'group', + path: '/app/group', + component: './app/AppGroup', + }, + ], }, //行为审计 { diff --git a/eiam-console/src/main/console-fe/src/pages/app/AppGroup/AppGroup.tsx b/eiam-console/src/main/console-fe/src/pages/app/AppGroup/AppGroup.tsx index 8f812461..64172f11 100644 --- a/eiam-console/src/main/console-fe/src/pages/app/AppGroup/AppGroup.tsx +++ b/eiam-console/src/main/console-fe/src/pages/app/AppGroup/AppGroup.tsx @@ -23,7 +23,7 @@ import { useRef, useState } from 'react'; import CreateModal from './components/CreateModal'; import UpdateModal from './components/UpdateModal'; import { createAppGroup, removeAppGroup, updateAppGroup } from './service'; -import { history, useIntl } from '@@/exports'; +import { useIntl } from '@@/exports'; import { getAppGroupList } from '@/services/app'; export default () => { @@ -101,7 +101,7 @@ export default () => { key: 'option', width: 100, align: 'center', - render: (text, record) => [ + render: (_text, record) => [ { @@ -157,12 +157,7 @@ export default () => { ]; return ( - { - history.push('/app'); - }} - > + columns={columns} actionRef={actionRef} diff --git a/eiam-console/src/main/console-fe/src/pages/app/AppList/AppList.tsx b/eiam-console/src/main/console-fe/src/pages/app/AppList/AppList.tsx index 281e8bae..a2087b5e 100644 --- a/eiam-console/src/main/console-fe/src/pages/app/AppList/AppList.tsx +++ b/eiam-console/src/main/console-fe/src/pages/app/AppList/AppList.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ import { getAllAppGroupList, getAppList, removeApp } from '@/services/app'; -import { PlusOutlined, QuestionCircleOutlined, GroupOutlined } from '@ant-design/icons'; +import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import type { ActionType } from '@ant-design/pro-components'; import { PageContainer, ProList } from '@ant-design/pro-components'; import { App, Avatar, Button, Popconfirm, Space, Tag } from 'antd'; @@ -92,15 +92,6 @@ export default () => { {intl.formatMessage({ id: 'pages.app.list.tool_bar_render.add_app' })} , - , ]} metas={{ title: { @@ -122,17 +113,17 @@ export default () => { }, avatar: { search: false, - render: (text, row) => { + render: (_text, row) => { return ; }, }, description: { search: false, dataIndex: 'remark' }, content: { search: false, - render: (text, row) => [], + render: (_text, row) => [], }, actions: { - render: (text, row) => [ + render: (_text, row) => [ row.enabled ? (