diff --git a/new-ui/projects/admin/env.d.ts b/new-ui/projects/admin/env.d.ts
index b77bd43e..0f8e5fd5 100644
--- a/new-ui/projects/admin/env.d.ts
+++ b/new-ui/projects/admin/env.d.ts
@@ -5,5 +5,13 @@ declare module "*.vue" {
const component: DefineComponent<{}, {}, any>;
export default component;
}
+import 'vue-router'
+declare module 'vue-router' {
+ interface RouteMeta {
+ title?: string
+ icon?: any
+ permission?: boolean | string | string[]
+ }
+}
declare const __AUTH_KEY: string;
\ No newline at end of file
diff --git a/new-ui/projects/admin/src/components/SystemMenu.vue b/new-ui/projects/admin/src/components/SystemMenu.vue
index 0a81edbc..5caec323 100644
--- a/new-ui/projects/admin/src/components/SystemMenu.vue
+++ b/new-ui/projects/admin/src/components/SystemMenu.vue
@@ -1,9 +1,46 @@
+
+
+
-
-
-
-
-
- {{ item.meta.title }}
-
+
+
diff --git a/new-ui/projects/admin/src/router/index.ts b/new-ui/projects/admin/src/router/index.ts
index dabd58d1..990732df 100644
--- a/new-ui/projects/admin/src/router/index.ts
+++ b/new-ui/projects/admin/src/router/index.ts
@@ -4,13 +4,6 @@ import CustomLayout from '@/components/CustomLayout.vue'
import { hasPermission } from "@/directives/permission";
import menu from './menu'
-declare module 'vue-router' {
- interface RouteMeta {
- title?: string
- permission?: string
- }
-}
-
const whiteListRoutes = [
{
path: "/login",
diff --git a/new-ui/projects/admin/src/router/menu.ts b/new-ui/projects/admin/src/router/menu.ts
index 4f037cba..96234192 100644
--- a/new-ui/projects/admin/src/router/menu.ts
+++ b/new-ui/projects/admin/src/router/menu.ts
@@ -1,21 +1,22 @@
+import type { RouteRecordRaw } from "vue-router";
import {
IconUser,
IconDashboard,
IconOrderedList,
- IconCalendar,
IconHeartFill,
+ IconCodeSandbox,
IconCodeSquare,
IconMessage,
IconSettings,
- IconUserGroup,
IconLock,
IconCodepen,
IconWechatpay,
IconRobot,
- IconSafe,
} from "@arco-design/web-vue/es/icon";
-const menu = [
+import system from "./system";
+
+const menu: RouteRecordRaw[] = [
{
path: "/dashboard",
name: "Dashboard",
@@ -38,8 +39,8 @@ const menu = [
path: "/role",
name: "Role",
meta: {
- title: "角色管理",
- icon: IconUserGroup,
+ title: "角色模型",
+ icon: IconCodeSandbox,
},
component: () => import("@/views/Role/RoleContainer.vue"),
},
@@ -111,38 +112,22 @@ const menu = [
path: "/system",
name: "System",
meta: {
- title: "系统设置",
+ title: "网站设置",
icon: IconSettings,
},
component: () => import("@/views/System/SystemContainer.vue"),
},
{
- path: "/loginLog",
- name: "LoginLog",
+ path: "/sys",
+ name: "Sys",
meta: {
- title: "登录日志",
- icon: IconCalendar,
- },
- component: () => import("@/views/LoginLog.vue"),
- },
- {
- path: "/sysAdmin",
- name: "SysAdmin",
- meta: {
- title: "系统管理员",
+ title: "系统设置",
icon: IconRobot,
},
- component: () => import("@/views/SysAdmin/SysAdminContainer.vue"),
- },
- {
- path: "/sysPermission",
- name: "SysPermission",
- meta: {
- title: "权限配置",
- icon: IconSafe,
- },
- component: () => import("@/views/SysPermission/SysPermissionContainer.vue"),
+ redirect: () => system[0].path,
+ children: system
},
+
];
export default menu;
diff --git a/new-ui/projects/admin/src/router/system.ts b/new-ui/projects/admin/src/router/system.ts
new file mode 100644
index 00000000..d174c7c5
--- /dev/null
+++ b/new-ui/projects/admin/src/router/system.ts
@@ -0,0 +1,37 @@
+import type { RouteRecordRaw } from "vue-router";
+const system: RouteRecordRaw[] = [
+ {
+ path: "admin",
+ name: "SysAdmin",
+ meta: {
+ title: "系统管理员",
+ },
+ component: () => import("@/views/SysAdmin/SysAdminContainer.vue"),
+ },
+ {
+ path: "permission",
+ name: "SysPermission",
+ meta: {
+ title: "权限配置",
+ },
+ component: () => import("@/views/SysPermission/SysPermissionContainer.vue"),
+ },
+ {
+ path: "role",
+ name: "SysRole",
+ meta: {
+ title: "角色管理",
+ },
+ component: () => import("@/views/SysRole/SysRoleContainer.vue"),
+ },
+ {
+ path: "loginLog",
+ name: "LoginLog",
+ meta: {
+ title: "登录日志",
+ },
+ component: () => import("@/views/LoginLog.vue"),
+ },
+]
+
+export default system
\ No newline at end of file
diff --git a/new-ui/projects/admin/src/views/SysRole/SysRoleContainer.vue b/new-ui/projects/admin/src/views/SysRole/SysRoleContainer.vue
new file mode 100644
index 00000000..d6297643
--- /dev/null
+++ b/new-ui/projects/admin/src/views/SysRole/SysRoleContainer.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+./SysRoleForm.vue
diff --git a/new-ui/projects/admin/src/views/SysRole/SysRoleForm.vue b/new-ui/projects/admin/src/views/SysRole/SysRoleForm.vue
new file mode 100644
index 00000000..822ffb12
--- /dev/null
+++ b/new-ui/projects/admin/src/views/SysRole/SysRoleForm.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/new-ui/projects/admin/src/views/SysRole/api.ts b/new-ui/projects/admin/src/views/SysRole/api.ts
new file mode 100644
index 00000000..848b023b
--- /dev/null
+++ b/new-ui/projects/admin/src/views/SysRole/api.ts
@@ -0,0 +1,25 @@
+import http from "@/http/config";
+
+export const getList = (params) => {
+ return http({
+ url: "/api/admin/sysRole/list",
+ method: "get",
+ params
+ })
+}
+
+export const save = (data) => {
+ return http({
+ url: "/api/admin/sysRole/save",
+ method: "post",
+ data
+ })
+}
+
+export const remove = (data) => {
+ return http({
+ url: "/api/admin/sysRole/remove",
+ method: "post",
+ data
+ })
+}
\ No newline at end of file