feat: 添加系统管理-菜单管理 (#929)

* feat: 添加系统管理-菜单管理

* chore: update

* chore: add Copyright in login page

* chore: 将页脚放在一屏可视区

* chore: 依赖更新

* chore: update

* chore: update

* chore: 更新依赖

* chore: update `husky v9`

* style: 适配`el-dialog`样式的更新

* style: update `src/layout/components/search/components/SearchResult.vue`

* chore: update

* style: update

* fix: 修复`ReDialog`中点击取消和确定按钮会触发两次关闭回调

* chore: update

* chore: update src/views/system/menu/README.md

* chore: update

* chore: update

* chore: done

* chore: update
This commit is contained in:
xiaoming
2024-02-26 22:17:40 +08:00
committed by GitHub
parent f762587fa7
commit c314b0cd1c
45 changed files with 2743 additions and 1118 deletions

View File

@@ -140,6 +140,620 @@ export default defineFakeRoute([
};
}
},
// 菜单管理
{
url: "/menu",
method: "post",
response: () => {
return {
success: true,
data: [
// 外部页面
{
parentId: 0,
id: 100,
menuType: 0, // 菜单类型0代表菜单、1代表iframe、2代表外链、3代表按钮
title: "menus.hsExternalPage",
name: "PureIframe",
path: "/iframe",
component: "",
rank: 7,
redirect: "",
icon: "ep:monitor",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 100,
id: 101,
menuType: 0,
title: "menus.hsExternalDoc",
name: "PureIframeExternal",
path: "/iframe/external",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 101,
id: 102,
menuType: 2,
title: "menus.externalLink",
name: "https://yiming_chang.gitee.io/pure-admin-doc",
path: "/external",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 101,
id: 103,
menuType: 2,
title: "menus.pureutilsLink",
name: "https://pure-admin-utils.netlify.app/",
path: "/pureutilsLink",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 100,
id: 104,
menuType: 1,
title: "menus.hsEmbeddedDoc",
name: "PureIframeEmbedded",
path: "/iframe/embedded",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 105,
menuType: 1,
title: "menus.hsEpDocument",
name: "FrameEp",
path: "/iframe/ep",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://element-plus.org/zh-CN/",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 106,
menuType: 1,
title: "menus.hsTailwindcssDocument",
name: "FrameTailwindcss",
path: "/iframe/tailwindcss",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://tailwindcss.com/docs/installation",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 107,
menuType: 1,
title: "menus.hsVueDocument",
name: "FrameVue",
path: "/iframe/vue3",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://cn.vuejs.org/",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 108,
menuType: 1,
title: "menus.hsViteDocument",
name: "FrameVite",
path: "/iframe/vite",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://cn.vitejs.dev/",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 109,
menuType: 1,
title: "menus.hsPiniaDocument",
name: "FramePinia",
path: "/iframe/pinia",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://pinia.vuejs.org/zh/index.html",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 104,
id: 110,
menuType: 1,
title: "menus.hsRouterDocument",
name: "FrameRouter",
path: "/iframe/vue-router",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "https://router.vuejs.org/zh/",
frameLoading: true,
keepAlive: true,
hiddenTag: false,
showLink: true,
showParent: false
},
// 权限管理
{
parentId: 0,
id: 200,
menuType: 0,
title: "menus.permission",
name: "PurePermission",
path: "/permission",
component: "",
rank: 9,
redirect: "",
icon: "ep:lollipop",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 200,
id: 201,
menuType: 0,
title: "menus.permissionPage",
name: "PermissionPage",
path: "/permission/page/index",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 200,
id: 202,
menuType: 0,
title: "menus.permissionButton",
name: "PermissionButton",
path: "/permission/button/index",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 202,
id: 203,
menuType: 3,
title: "添加",
name: "",
path: "",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "permission:btn:add",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 202,
id: 204,
menuType: 3,
title: "修改",
name: "",
path: "",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "permission:btn:edit",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 202,
id: 205,
menuType: 3,
title: "删除",
name: "",
path: "",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "permission:btn:delete",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
// 系统管理
{
parentId: 0,
id: 300,
menuType: 0,
title: "menus.hssysManagement",
name: "PureSystem",
path: "/system",
component: "",
rank: 10,
redirect: "",
icon: "ri:settings-3-line",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 300,
id: 301,
menuType: 0,
title: "menus.hsUser",
name: "SystemUser",
path: "/system/user/index",
component: "",
rank: null,
redirect: "",
icon: "ri:admin-line",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 300,
id: 302,
menuType: 0,
title: "menus.hsRole",
name: "SystemRole",
path: "/system/role/index",
component: "",
rank: null,
redirect: "",
icon: "ri:admin-fill",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 300,
id: 303,
menuType: 0,
title: "menus.hsSystemMenu",
name: "SystemMenu",
path: "/system/menu/index",
component: "",
rank: null,
redirect: "",
icon: "ep:menu",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 300,
id: 304,
menuType: 0,
title: "menus.hsDept",
name: "SystemDept",
path: "/system/dept/index",
component: "",
rank: null,
redirect: "",
icon: "ri:git-branch-line",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
// 标签页操作
{
parentId: 0,
id: 400,
menuType: 0,
title: "menus.hstabs",
name: "PureTabs",
path: "/tabs",
component: "",
rank: 11,
redirect: "",
icon: "ri:bookmark-2-line",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 400,
id: 401,
menuType: 0,
title: "menus.hstabs",
name: "Tabs",
path: "/tabs/index",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: true,
showParent: false
},
{
parentId: 400,
id: 402,
menuType: 0,
title: "query传参模式",
name: "TabQueryDetail",
path: "/tabs/query-detail",
component: "",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "/tabs/index",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: false,
showParent: false
},
{
parentId: 400,
id: 403,
menuType: 0,
title: "params传参模式",
name: "TabParamsDetail",
path: "/tabs/params-detail/:id",
component: "params-detail",
rank: null,
redirect: "",
icon: "",
extraIcon: "",
enterTransition: "",
leaveTransition: "",
activePath: "/tabs/index",
auths: "",
frameSrc: "",
frameLoading: true,
keepAlive: false,
hiddenTag: false,
showLink: false,
showParent: false
}
]
};
}
},
// 部门管理
{
url: "/dept",