mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-11 20:32:49 +00:00
Squashed commit of the following:
commit f30a8c658a90020ec020fc702c680b2ee8562b70
Author: JEECG <445654970@qq.com>
Date: Thu Jul 31 11:35:16 2025 +0800
数据库缺少openapi微服务网关配置
commit e84d7726d2bbe60bacf759375c15aa74888a816c
Author: JEECG <445654970@qq.com>
Date: Thu Jul 31 10:20:09 2025 +0800
后台接口地址修改
commit 0f398026982aefe55a0113be688fa1339a8161ac
Author: JEECG <445654970@qq.com>
Date: Thu Jul 31 09:56:24 2025 +0800
docker自动化部署命令
commit a014a3ed0e81900e879bcce7bae7afcf68e15227
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 21:55:16 2025 +0800
v3.8.2 优化一键docker启动前后端
commit 5720d1a01ecdf003cbc7a29aedba4ca1bd88a96c
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 19:26:38 2025 +0800
升级版本号到3.8.2
commit 5eed6ac6d2145a50f6e0ea650fc3a3c2de1aee0a
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 18:49:29 2025 +0800
升级版本号到3.8.2
commit 0cfa1e223ae0907d0d25849484390dcfadd717c9
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 18:28:10 2025 +0800
v3.8.2 系统通知改造支持分类
commit 219869f4c01b848d31ab1a1d41f9613ae8762f5b
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 18:25:58 2025 +0800
v3.8.2 版本前端代码
commit e6edde963a4c65762d3ffd0b6f3257e138e54964
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 18:25:46 2025 +0800
v3.8.2 版本后端代码
commit c44b66128e5e89636be67a484875eef393824504
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 18:23:09 2025 +0800
XXL-JOB(2.4.0 及以上)已被移除,分片参数获取方式变更。
commit 9356b0474191a8ee038b9653c4051db25fb20922
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 10:57:52 2025 +0800
升级online到3.8.2-beta
commit d0a094f9a311e6d58b873681d483849ed848fa0b
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 10:57:31 2025 +0800
升级mybatis-plus到3.5.12、升级jsqlparser到4.9
commit 73eb62573798907d775f499994764469bbbc4f45
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 09:51:34 2025 +0800
升级jimureport到v2.1.1
commit 74880705b8f0baf0478277604f15ae61e1b1a842
Author: JEECG <445654970@qq.com>
Date: Wed Jul 30 09:18:46 2025 +0800
升级online到3.8.2-beta
# Conflicts:
# jeecg-boot/jeecg-boot-base-core/pom.xml
# jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java
# jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/java/org/jeecg/JeecgSystemApplication.java
# jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/pom.xml
# jeecg-boot/pom.xml
272 lines
6.0 KiB
Vue
272 lines
6.0 KiB
Vue
import { resultSuccess, resultError, getRequestToken, requestParams,baseUrl} from '../_util';
|
|
import { MockMethod } from 'vite-plugin-mock';
|
|
import { createFakeUserList } from './user';
|
|
import { PageEnum } from '/@/enums/pageEnum';
|
|
|
|
// single
|
|
const dashboardRoute = {
|
|
path: '/dashboard',
|
|
name: 'Dashboard',
|
|
component: 'LAYOUT',
|
|
redirect: PageEnum.BASE_HOME,
|
|
meta: {
|
|
title: 'routes.dashboard.dashboard',
|
|
hideChildrenInMenu: true,
|
|
icon: 'bx:bx-home',
|
|
},
|
|
children: [
|
|
{
|
|
path: 'analysis',
|
|
name: 'Analysis',
|
|
component: '/dashboard/Analysis/index',
|
|
meta: {
|
|
hideMenu: true,
|
|
hideBreadcrumb: true,
|
|
title: 'routes.dashboard.analysis',
|
|
currentActiveMenu: '/dashboard',
|
|
icon: 'bx:bx-home',
|
|
},
|
|
},
|
|
{
|
|
path: 'workbench',
|
|
name: 'Workbench',
|
|
component: '/dashboard/workbench/index',
|
|
meta: {
|
|
hideMenu: true,
|
|
hideBreadcrumb: true,
|
|
title: 'routes.dashboard.workbench',
|
|
currentActiveMenu: '/dashboard',
|
|
icon: 'bx:bx-home',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const backRoute = {
|
|
path: 'back',
|
|
name: 'PermissionBackDemo',
|
|
meta: {
|
|
title: 'routes.demo.permission.back',
|
|
},
|
|
|
|
children: [
|
|
{
|
|
path: 'page',
|
|
name: 'BackAuthPage',
|
|
component: '/demo/permission/back/index',
|
|
meta: {
|
|
title: 'routes.demo.permission.backPage',
|
|
},
|
|
},
|
|
{
|
|
path: 'btn',
|
|
name: 'BackAuthBtn',
|
|
component: '/demo/permission/back/Btn',
|
|
meta: {
|
|
title: 'routes.demo.permission.backBtn',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const authRoute = {
|
|
path: '/permission',
|
|
name: 'Permission',
|
|
component: 'LAYOUT',
|
|
redirect: '/permission/front/page',
|
|
meta: {
|
|
icon: 'carbon:user-role',
|
|
title: 'routes.demo.permission.permission',
|
|
},
|
|
children: [backRoute],
|
|
};
|
|
|
|
const levelRoute = {
|
|
path: '/level',
|
|
name: 'Level',
|
|
component: 'LAYOUT',
|
|
redirect: '/level/menu1/menu1-1',
|
|
meta: {
|
|
icon: 'carbon:user-role',
|
|
title: 'routes.demo.level.level',
|
|
},
|
|
|
|
children: [
|
|
{
|
|
path: 'menu1',
|
|
name: 'Menu1Demo',
|
|
meta: {
|
|
title: 'Menu1',
|
|
},
|
|
children: [
|
|
{
|
|
path: 'menu1-1',
|
|
name: 'Menu11Demo',
|
|
meta: {
|
|
title: 'Menu1-1',
|
|
},
|
|
children: [
|
|
{
|
|
path: 'menu1-1-1',
|
|
name: 'Menu111Demo',
|
|
component: '/demo/level/Menu111',
|
|
meta: {
|
|
title: 'Menu111',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: 'menu1-2',
|
|
name: 'Menu12Demo',
|
|
component: '/demo/level/Menu12',
|
|
meta: {
|
|
title: 'Menu1-2',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: 'menu2',
|
|
name: 'Menu2Demo',
|
|
component: '/demo/level/Menu2',
|
|
meta: {
|
|
title: 'Menu2',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const sysRoute = {
|
|
path: '/system',
|
|
name: 'System',
|
|
component: 'LAYOUT',
|
|
redirect: '/system/account',
|
|
meta: {
|
|
icon: 'ion:settings-outline',
|
|
title: 'routes.demo.system.moduleName',
|
|
},
|
|
children: [
|
|
{
|
|
path: 'account',
|
|
name: 'AccountManagement',
|
|
meta: {
|
|
title: 'routes.demo.system.account',
|
|
ignoreKeepAlive: true,
|
|
},
|
|
component: '/demo/system/account/index',
|
|
},
|
|
{
|
|
path: 'account_detail/:id',
|
|
name: 'AccountDetail',
|
|
meta: {
|
|
hideMenu: true,
|
|
title: 'routes.demo.system.account_detail',
|
|
ignoreKeepAlive: true,
|
|
showMenu: false,
|
|
currentActiveMenu: '/system/account',
|
|
},
|
|
component: '/demo/system/account/AccountDetail',
|
|
},
|
|
{
|
|
path: 'role',
|
|
name: 'RoleManagement',
|
|
meta: {
|
|
title: 'routes.demo.system.role',
|
|
ignoreKeepAlive: true,
|
|
},
|
|
component: '/demo/system/role/index',
|
|
},
|
|
|
|
{
|
|
path: 'menu',
|
|
name: 'MenuManagement',
|
|
meta: {
|
|
title: 'routes.demo.system.menu',
|
|
ignoreKeepAlive: true,
|
|
},
|
|
component: '/demo/system/menu/index',
|
|
},
|
|
{
|
|
path: 'dept',
|
|
name: 'DeptManagement',
|
|
meta: {
|
|
title: 'routes.demo.system.dept',
|
|
ignoreKeepAlive: true,
|
|
},
|
|
component: '/demo/system/dept/index',
|
|
},
|
|
{
|
|
path: 'changePassword',
|
|
name: 'ChangePassword',
|
|
meta: {
|
|
title: 'routes.demo.system.password',
|
|
ignoreKeepAlive: true,
|
|
},
|
|
component: '/demo/system/password/index',
|
|
},
|
|
],
|
|
};
|
|
|
|
const linkRoute = {
|
|
path: '/link',
|
|
name: 'Link',
|
|
component: 'LAYOUT',
|
|
meta: {
|
|
icon: 'ion:tv-outline',
|
|
title: 'routes.demo.iframe.frame',
|
|
},
|
|
children: [
|
|
{
|
|
path: 'doc',
|
|
name: 'Doc',
|
|
meta: {
|
|
title: 'routes.demo.iframe.doc',
|
|
frameSrc: 'https://vvbin.cn/doc-next/',
|
|
},
|
|
},
|
|
{
|
|
path: 'https://vvbin.cn/doc-next/',
|
|
name: 'DocExternal',
|
|
component: 'LAYOUT',
|
|
meta: {
|
|
title: 'routes.demo.iframe.docExternal',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
export default [
|
|
{
|
|
url: `${baseUrl}/sys/permission/getUserPermissionByToken`,
|
|
timeout: 1000,
|
|
method: 'get',
|
|
response: (request: requestParams) => {
|
|
const token = getRequestToken(request);
|
|
if (!token) {
|
|
return resultError('Invalid token!');
|
|
}
|
|
const checkUser = createFakeUserList().find((item) => item.token === token);
|
|
if (!checkUser) {
|
|
return resultError('Invalid user token!');
|
|
}
|
|
const id = checkUser.userId;
|
|
let menu: Object[];
|
|
switch (id) {
|
|
case '1':
|
|
dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[0].path;
|
|
menu = [dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute];
|
|
break;
|
|
case '2':
|
|
dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[1].path;
|
|
menu = [dashboardRoute, authRoute, levelRoute, linkRoute];
|
|
break;
|
|
default:
|
|
menu = [];
|
|
}
|
|
|
|
return resultSuccess(menu);
|
|
},
|
|
},
|
|
] as MockMethod[];
|