From 5fae563d0d7f17b5073cbc5e974493d9e40f35bf Mon Sep 17 00:00:00 2001
From: zzl <961867786@qq.com>
Date: Tue, 2 Sep 2025 14:37:06 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=8E=88=E6=9D=83=E6=89=8B?=
=?UTF-8?q?=E6=9C=BA=E8=8F=9C=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/role.js | 63 +++++++++++
src/router/index.js | 14 +++
src/views/system/role/authApp.vue | 163 ++++++++++++++++++++++++++++
src/views/system/role/index.vue | 62 +++++------
src/views/system/role/selectApp.vue | 129 ++++++++++++++++++++++
5 files changed, 400 insertions(+), 31 deletions(-)
create mode 100644 src/views/system/role/authApp.vue
create mode 100644 src/views/system/role/selectApp.vue
diff --git a/src/api/system/role.js b/src/api/system/role.js
index f13e6f4..369d82a 100644
--- a/src/api/system/role.js
+++ b/src/api/system/role.js
@@ -117,3 +117,66 @@ export function deptTreeSelect(roleId) {
method: 'get'
})
}
+
+// 获取手机菜单
+export function getRoleMobiles(roleId) {
+ return request({
+ url: '/system/role/getMobiles/' + roleId,
+ method: 'get'
+ })
+}
+
+// 编辑手机菜单
+export function setupRoleMobiles(id, data) {
+ return request({
+ url: '/system/role/setupMobiles/' + id,
+ method: 'post',
+ data: data
+ })
+}
+
+
+// 查询角色已授权手机菜单
+export function allocatedAppList(query) {
+ return request({
+ url: '/system/role/authApp/allocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询角色未授权手机菜单
+export function unallocatedAppList(query) {
+ return request({
+ url: '/system/role/authApp/unallocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 取消手机菜单授权角色
+export function authAppCancel(data) {
+ return request({
+ url: '/system/role/authApp/cancel',
+ method: 'put',
+ data: data
+ })
+}
+
+// 批量取消手机菜单授权角色
+export function authAppCancelAll(data) {
+ return request({
+ url: '/system/role/authApp/cancelAll',
+ method: 'put',
+ params: data
+ })
+}
+
+// 授权手机菜单选择
+export function authAppSelectAll(data) {
+ return request({
+ url: '/system/role/authApp/selectAll',
+ method: 'put',
+ params: data
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index bbfd237..97dbaae 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -120,6 +120,20 @@ export const dynamicRoutes = [
}
]
},
+ {
+ path: '/system/role-auth',
+ component: Layout,
+ hidden: true,
+ permissions: ['system:role:edit'],
+ children: [
+ {
+ path: 'app/:roleId(\\d+)',
+ component: () => import('@/views/system/role/authApp'),
+ name: 'AuthApp',
+ meta: { title: '手机菜单', activeMenu: '/system/role' }
+ }
+ ]
+ },
{
path: '/system/dict-data',
component: Layout,
diff --git a/src/views/system/role/authApp.vue b/src/views/system/role/authApp.vue
new file mode 100644
index 0000000..504904f
--- /dev/null
+++ b/src/views/system/role/authApp.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 添加授权
+
+
+ 批量取消授权
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消授权
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index ab01a4a..af48a25 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -105,12 +105,7 @@
-
+
@@ -119,28 +114,15 @@
-
- 修改
- 删除
+
+ 修改
+ 删除
handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
更多
- 数据权限
- 分配用户
+ 数据权限
+ 分配用户
+ 手机菜单
@@ -248,13 +230,15 @@
取 消
+
+
\ No newline at end of file
+
diff --git a/src/views/system/role/selectApp.vue b/src/views/system/role/selectApp.vue
new file mode 100644
index 0000000..55f01dc
--- /dev/null
+++ b/src/views/system/role/selectApp.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+