Skip to content

Commit

Permalink
feat: 添加系统管理-菜单管理
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Oct 7, 2023
1 parent 7e7b6fe commit 7aaa174
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ menus:
hssysManagement: System Manage
hsUser: User Manage
hsRole: Role Manage
hsSystemMenu: Menu Manage
hsDept: Dept Manage
hseditor: Editor
hsabnormal: Abnormal Page
Expand Down
1 change: 1 addition & 0 deletions locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ menus:
hssysManagement: 系统管理
hsUser: 用户管理
hsRole: 角色管理
hsSystemMenu: 菜单管理
hsDept: 部门管理
hseditor: 编辑器
hsabnormal: 异常页面
Expand Down
15 changes: 12 additions & 3 deletions mock/asyncRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const systemRouter = {
children: [
{
path: "/system/user/index",
name: "User",
name: "SystemUser",
meta: {
icon: "flUser",
title: "menus.hsUser",
Expand All @@ -27,16 +27,25 @@ const systemRouter = {
},
{
path: "/system/role/index",
name: "Role",
name: "SystemRole",
meta: {
icon: "role",
title: "menus.hsRole",
roles: ["admin"]
}
},
{
path: "/system/menu/index",
name: "SystemMenu",
meta: {
icon: "menu",
title: "menus.hsSystemMenu",
roles: ["admin"]
}
},
{
path: "/system/dept/index",
name: "Dept",
name: "SystemDept",
meta: {
icon: "dept",
title: "menus.hsDept",
Expand Down
5 changes: 3 additions & 2 deletions src/views/components/dialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,10 @@ function onBeforeSureClick() {
,采用函数式调用弹框组件(更多操作实例请参考
<span
class="cursor-pointer text-primary"
@click="router.push({ name: 'Dept' })"
>系统管理页面</span
@click="router.push({ name: 'SystemDept' })"
>
系统管理页面
</span>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/system/dept/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Refresh from "@iconify-icons/ep/refresh";
import AddFill from "@iconify-icons/ri/add-circle-line";
defineOptions({
name: "Dept"
name: "SystemDept"
});
const formRef = ref();
Expand Down
9 changes: 9 additions & 0 deletions src/views/system/menu/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "SystemMenu"
});
</script>

<template>
<div class="main">菜单管理</div>
</template>
2 changes: 1 addition & 1 deletion src/views/system/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Menu from "@iconify-icons/ep/menu";
import AddFill from "@iconify-icons/ri/add-circle-line";
defineOptions({
name: "Role"
name: "SystemRole"
});
const formRef = ref();
Expand Down
2 changes: 1 addition & 1 deletion src/views/system/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Refresh from "@iconify-icons/ep/refresh";
import AddFill from "@iconify-icons/ri/add-circle-line";
defineOptions({
name: "User"
name: "SystemUser"
});
const treeRef = ref();
Expand Down

0 comments on commit 7aaa174

Please sign in to comment.