mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-10-15 23:55:22 +00:00

Squashed commit of the following: commitf30a8c658a
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 11:35:16 2025 +0800 数据库缺少openapi微服务网关配置 commite84d7726d2
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 10:20:09 2025 +0800 后台接口地址修改 commit0f39802698
Author: JEECG <445654970@qq.com> Date: Thu Jul 31 09:56:24 2025 +0800 docker自动化部署命令 commita014a3ed0e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 21:55:16 2025 +0800 v3.8.2 优化一键docker启动前后端 commit5720d1a01e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 19:26:38 2025 +0800 升级版本号到3.8.2 commit5eed6ac6d2
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:49:29 2025 +0800 升级版本号到3.8.2 commit0cfa1e223a
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:28:10 2025 +0800 v3.8.2 系统通知改造支持分类 commit219869f4c0
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:25:58 2025 +0800 v3.8.2 版本前端代码 commite6edde963a
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:25:46 2025 +0800 v3.8.2 版本后端代码 commitc44b66128e
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 18:23:09 2025 +0800 XXL-JOB(2.4.0 及以上)已被移除,分片参数获取方式变更。 commit9356b04741
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 10:57:52 2025 +0800 升级online到3.8.2-beta commitd0a094f9a3
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 10:57:31 2025 +0800 升级mybatis-plus到3.5.12、升级jsqlparser到4.9 commit73eb625737
Author: JEECG <445654970@qq.com> Date: Wed Jul 30 09:51:34 2025 +0800 升级jimureport到v2.1.1 commit74880705b8
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[];
|