From 1db16082bedcff89c31a4e7fe182db9106102c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Sun, 24 Sep 2023 16:50:57 +0800
Subject: [PATCH] =?UTF-8?q?:zap:=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/System/SysMenuController.cs | 16 +-
ZR.Vue/src/views/system/menu/index.vue | 278 +++++++++---------
2 files changed, 151 insertions(+), 143 deletions(-)
diff --git a/ZR.Admin.WebApi/Controllers/System/SysMenuController.cs b/ZR.Admin.WebApi/Controllers/System/SysMenuController.cs
index a6cff1f..13e9b84 100644
--- a/ZR.Admin.WebApi/Controllers/System/SysMenuController.cs
+++ b/ZR.Admin.WebApi/Controllers/System/SysMenuController.cs
@@ -28,16 +28,28 @@ namespace ZR.Admin.WebApi.Controllers.System
this.sysRoleMenuService = sysRoleMenuService;
}
+ ///
+ /// 获取菜单树列表
+ ///
+ ///
+ [ActionPermissionFilter(Permission = "system:menu:list")]
+ [HttpGet("treelist")]
+ public IActionResult TreeMenuList([FromQuery] MenuQueryDto menu)
+ {
+ long userId = HttpContext.GetUId();
+ return SUCCESS(sysMenuService.SelectTreeMenuList(menu, userId), "yyyy-MM-dd HH:mm:ss");
+ }
+
///
/// 获取菜单列表
///
///
[ActionPermissionFilter(Permission = "system:menu:list")]
[HttpGet("list")]
- public IActionResult TreeMenuList([FromQuery] MenuQueryDto menu)
+ public IActionResult MenuList([FromQuery] MenuQueryDto menu)
{
long userId = HttpContext.GetUId();
- return SUCCESS(sysMenuService.SelectTreeMenuList(menu, userId), "yyyy-MM-dd HH:mm:ss");
+ return SUCCESS(sysMenuService.SelectMenuList(menu, userId), "yyyy-MM-dd HH:mm:ss");
}
///
diff --git a/ZR.Vue/src/views/system/menu/index.vue b/ZR.Vue/src/views/system/menu/index.vue
index f4a18c7..b96c017 100644
--- a/ZR.Vue/src/views/system/menu/index.vue
+++ b/ZR.Vue/src/views/system/menu/index.vue
@@ -25,13 +25,15 @@
-
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+ >
@@ -48,9 +50,14 @@
- {{scope.row.orderNum}}
-
+ {{ scope.row.orderNum }}
+
@@ -70,7 +77,9 @@
修改
新增
- 删除
+ 删除
@@ -81,8 +90,14 @@
-
+
@@ -109,7 +124,7 @@
-
+
@@ -159,7 +174,7 @@
显示状态
- {{dict.dictLabel}}
+ {{ dict.dictLabel }}
@@ -186,7 +201,7 @@
菜单状态
- {{dict.dictLabel}}
+ {{ dict.dictLabel }}
@@ -215,21 +230,13 @@