Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
1aa75df6
提交
1aa75df6
authored
7月 15, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:权限·提示
上级
01280aac
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
51 行增加
和
13 行删除
+51
-13
index.ts
src/router/index.ts
+0
-1
privateRouter.tsx
src/router/privateRouter.tsx
+1
-1
router.tsx
src/router/router.tsx
+50
-11
没有找到文件。
src/router/index.ts
浏览文件 @
1aa75df6
...
...
@@ -25,7 +25,6 @@ export const authRouterList = async () => {
return
pre
;
},
[]);
};
console
.
log
(
'路由数据-->'
,
getRouteList
(
routerList
));
return
Promise
.
resolve
([...
getRouteList
(
routerList
)]);
}
return
Promise
.
resolve
([]);
...
...
src/router/privateRouter.tsx
浏览文件 @
1aa75df6
...
...
@@ -26,7 +26,7 @@ function PrivateRouter() {
if
(
value
.
length
)
{
const
routes
=
[...
value
,
...
whiteRouterList
];
setRouter
(
routes
);
//不同账号登录时,重新更新路由(有瑕疵)
}
else
{
}
else
if
(
localStorage
.
getItem
(
'roleId'
))
{
message
.
warning
(
'该账号暂无权限'
);
navigate
(
'/login'
,
{
replace
:
true
});
}
...
...
src/router/router.tsx
浏览文件 @
1aa75df6
import
React
from
'react'
;
import
{
Navigate
,
RouteObject
}
from
'react-router-dom'
;
import
{
RouteObject
}
from
'react-router-dom'
;
import
ErrorPage
from
'~/pages/common/error'
;
import
LayoutView
from
'~/components/layout'
;
import
{
...
...
@@ -164,16 +164,6 @@ const withLoadingComponent = (comp: JSX.Element) => (
// 路由白名单
export
const
whiteRouterList
:
Array
<
RouteObject
&
RouteObjectType
>
=
[
{
path
:
'/'
,
element
:
<
Navigate
to=
'/orderManage/productOrder'
/>,
meta
:
{
id
:
0
,
title
:
'销售订单'
,
icon
:
MacCommandOutlined
,
},
errorElement
:
<
ErrorPage
/>,
},
{
path
:
'/login'
,
element
:
withLoadingComponent
(<
LoginView
/>),
meta
:
{
...
...
@@ -200,6 +190,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/customManage/customList'
,
element
:
withLoadingComponent
(<
CustomListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
220
,
title
:
'客户列表'
,
...
...
@@ -209,6 +200,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/customManage/customMoney'
,
element
:
withLoadingComponent
(<
CustomMoneyView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
26200
,
title
:
'现金管理'
,
...
...
@@ -219,6 +211,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/customManage/customMoney/detail'
,
element
:
withLoadingComponent
(<
CustomMoneyDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
26200
,
title
:
'现金变更'
,
...
...
@@ -229,6 +222,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/customManage/customIdentity'
,
element
:
withLoadingComponent
(<
CustomIdentityView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
240
,
title
:
'加盟入驻'
,
...
...
@@ -250,6 +244,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/requirementsGathering'
,
element
:
withLoadingComponent
(<
RequirementsGatheringView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
410
,
title
:
'需求收集'
,
...
...
@@ -259,6 +254,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/materielManage'
,
element
:
withLoadingComponent
(<
MaterielManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
420
,
title
:
'宣传管理'
,
...
...
@@ -268,6 +264,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/materielManage/detail'
,
element
:
withLoadingComponent
(<
MaterielManageDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
30100
,
title
:
'宣传管理详情'
,
...
...
@@ -278,6 +275,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/tagManage'
,
element
:
withLoadingComponent
(<
TagManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
430
,
title
:
'标签管理'
,
...
...
@@ -287,6 +285,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/industryNews'
,
element
:
withLoadingComponent
(<
IndustryNewsView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
440
,
title
:
'行业新闻'
,
...
...
@@ -296,6 +295,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/tenderManage'
,
element
:
withLoadingComponent
(<
TenderManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
450
,
title
:
'招标快讯'
,
...
...
@@ -305,6 +305,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/tenderManage/detail'
,
element
:
withLoadingComponent
(<
TenderManageDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
30500
,
title
:
'招标快讯详情'
,
...
...
@@ -315,6 +316,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/tenderManage/feedback'
,
element
:
withLoadingComponent
(<
TenderManageFeedback
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
30500
,
title
:
'用户反馈'
,
...
...
@@ -325,6 +327,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/resourceManage/businessCaseManage'
,
element
:
withLoadingComponent
(<
BusinessCaseManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
460
,
title
:
'业务案例'
,
...
...
@@ -346,6 +349,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/forumManage/dynamicList'
,
element
:
withLoadingComponent
(<
DynamicListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
610
,
title
:
'动态列表'
,
...
...
@@ -367,6 +371,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/productOrder'
,
element
:
withLoadingComponent
(<
ProductOrderView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
810
,
title
:
'商城订单'
,
...
...
@@ -376,6 +381,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/productOrder/detail'
,
element
:
withLoadingComponent
(<
ProductOrderDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10010
,
title
:
'商城订单 / 详情'
,
...
...
@@ -386,6 +392,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/equipmentOrder'
,
element
:
withLoadingComponent
(<
EquipmentOrderView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
820
,
title
:
'租赁订单'
,
...
...
@@ -395,6 +402,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/equipmentOrder/detail'
,
element
:
withLoadingComponent
(<
EquipmentOrderDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10020
,
title
:
'租赁订单 / 详情'
,
...
...
@@ -405,6 +413,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/serviceOrder'
,
element
:
withLoadingComponent
(<
ServiceOrderView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
830
,
title
:
'服务订单'
,
...
...
@@ -414,6 +423,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/serviceOrder/detail'
,
element
:
withLoadingComponent
(<
ServiceOrderDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10010
,
title
:
'服务订单 / 详情'
,
...
...
@@ -424,6 +434,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/orderManage/pilotTrainingOrder'
,
element
:
withLoadingComponent
(<
PilotTrainingOrderView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10040
,
title
:
'培训订单'
,
...
...
@@ -445,6 +456,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/courseManage'
,
element
:
withLoadingComponent
(<
CourseManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1010
,
icon
:
<
BookOutlined
/>,
...
...
@@ -454,6 +466,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/serviceList'
,
element
:
withLoadingComponent
(<
ServiceListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1020
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -463,6 +476,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/serviceDetail'
,
element
:
withLoadingComponent
(<
ServiceDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10120
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -473,6 +487,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/serviceIntroduce'
,
element
:
withLoadingComponent
(<
ServiceIntroduceView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10120
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -483,6 +498,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/rentGoods'
,
element
:
withLoadingComponent
(<
RentListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1030
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -492,6 +508,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/rentGoods/add'
,
element
:
withLoadingComponent
(<
RentAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10135
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -502,6 +519,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/rentGoods/edit'
,
element
:
withLoadingComponent
(<
RentAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10136
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -512,6 +530,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/rentGoods/detail'
,
element
:
withLoadingComponent
(<
RentAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10136
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -522,6 +541,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/mallGoods'
,
element
:
withLoadingComponent
(<
MallGoodsView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1040
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -531,6 +551,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/mallGoods/add'
,
element
:
withLoadingComponent
(<
MallAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10145
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -541,6 +562,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/mallGoods/edit'
,
element
:
withLoadingComponent
(<
MallAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10146
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -551,6 +573,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/mallGoods/detail'
,
element
:
withLoadingComponent
(<
MallAddOrEditOrDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10146
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -561,6 +584,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/produceList'
,
element
:
withLoadingComponent
(<
ProduceListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1050
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -570,6 +594,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/produceDetail'
,
element
:
withLoadingComponent
(<
ProduceDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
10160
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -580,6 +605,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/mallManage/makeList'
,
element
:
withLoadingComponent
(<
MakeListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1060
,
icon
:
<
SmileOutlined
/>,
...
...
@@ -620,6 +646,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/jobServicesCategory/1'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1210
,
title
:
'作业服务分类'
,
...
...
@@ -629,6 +656,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/jobServicesCategory/2'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1220
,
title
:
'设备租赁分类'
,
...
...
@@ -638,6 +666,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/jobServicesCategory/3'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1230
,
title
:
'飞手培训分类'
,
...
...
@@ -647,6 +676,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/jobServicesCategory/4'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1240
,
title
:
'产品商城分类'
,
...
...
@@ -656,6 +686,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/jobServicesCategory/0'
,
element
:
withLoadingComponent
(<
CategoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1250
,
title
:
'通用分类'
,
...
...
@@ -665,6 +696,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/detail/:id'
,
element
:
withLoadingComponent
(<
CategoryDetail
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
18600
,
title
:
'分类详情'
,
...
...
@@ -675,6 +707,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/categoryManage/DirectoryManage'
,
element
:
withLoadingComponent
(<
DirectoryManage
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1260
,
title
:
'目录管理'
,
...
...
@@ -863,6 +896,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/pilotTraining/institutionsList'
,
element
:
withLoadingComponent
(<
InstitutionsListView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1510
,
title
:
'执照考试'
,
...
...
@@ -872,6 +906,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/pilotTraining/institutionsList/add'
,
element
:
withLoadingComponent
(<
AddInstitutionsView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1520
,
title
:
'机构上传'
,
...
...
@@ -894,6 +929,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/systemManage/accountManage'
,
element
:
withLoadingComponent
(<
AccountManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1410
,
title
:
'账号管理'
,
...
...
@@ -903,6 +939,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/systemManage/accountLimit'
,
element
:
withLoadingComponent
(<
AccountLimit
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1420
,
title
:
'权限角色'
,
...
...
@@ -912,6 +949,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/systemManage/limitInfo'
,
element
:
withLoadingComponent
(<
LimitInfo
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
28300
,
title
:
'权限信息'
,
...
...
@@ -922,6 +960,7 @@ export const routerList: Array<RouteObjectType> = [
{
path
:
'/systemManage/companyManage'
,
element
:
withLoadingComponent
(<
CompanyManageView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
1430
,
title
:
'单位管理'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论