From 663024ac7fe2c1a60d151e4e645e5e0f553366a4 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 20 九月 2022 10:46:43 +0800
Subject: [PATCH] update 优化 pr235 解决小问题与优化写法
---
ruoyi-ui/src/api/system/role.js | 194 +++++++++++++++++++++++++++++------------------
1 files changed, 119 insertions(+), 75 deletions(-)
diff --git a/ruoyi-ui/src/api/system/role.js b/ruoyi-ui/src/api/system/role.js
index 736708c..f13e6f4 100644
--- a/ruoyi-ui/src/api/system/role.js
+++ b/ruoyi-ui/src/api/system/role.js
@@ -1,75 +1,119 @@
-import request from '@/utils/request'
-
-// 鏌ヨ瑙掕壊鍒楄〃
-export function listRole(query) {
- return request({
- url: '/system/role/list',
- method: 'get',
- params: query
- })
-}
-
-// 鏌ヨ瑙掕壊璇︾粏
-export function getRole(roleId) {
- return request({
- url: '/system/role/' + roleId,
- method: 'get'
- })
-}
-
-// 鏂板瑙掕壊
-export function addRole(data) {
- return request({
- url: '/system/role',
- method: 'post',
- data: data
- })
-}
-
-// 淇敼瑙掕壊
-export function updateRole(data) {
- return request({
- url: '/system/role',
- method: 'put',
- data: data
- })
-}
-
-// 瑙掕壊鏁版嵁鏉冮檺
-export function dataScope(data) {
- return request({
- url: '/system/role/dataScope',
- method: 'put',
- data: data
- })
-}
-
-// 瑙掕壊鐘舵�佷慨鏀�
-export function changeRoleStatus(roleId, status) {
- const data = {
- roleId,
- status
- }
- return request({
- url: '/system/role/changeStatus',
- method: 'put',
- data: data
- })
-}
-
-// 鍒犻櫎瑙掕壊
-export function delRole(roleId) {
- return request({
- url: '/system/role/' + roleId,
- method: 'delete'
- })
-}
-
-// 瀵煎嚭瑙掕壊
-export function exportRole(query) {
- return request({
- url: '/system/role/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
+import request from '@/utils/request'
+
+// 鏌ヨ瑙掕壊鍒楄〃
+export function listRole(query) {
+ return request({
+ url: '/system/role/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨ瑙掕壊璇︾粏
+export function getRole(roleId) {
+ return request({
+ url: '/system/role/' + roleId,
+ method: 'get'
+ })
+}
+
+// 鏂板瑙掕壊
+export function addRole(data) {
+ return request({
+ url: '/system/role',
+ method: 'post',
+ data: data
+ })
+}
+
+// 淇敼瑙掕壊
+export function updateRole(data) {
+ return request({
+ url: '/system/role',
+ method: 'put',
+ data: data
+ })
+}
+
+// 瑙掕壊鏁版嵁鏉冮檺
+export function dataScope(data) {
+ return request({
+ url: '/system/role/dataScope',
+ method: 'put',
+ data: data
+ })
+}
+
+// 瑙掕壊鐘舵�佷慨鏀�
+export function changeRoleStatus(roleId, status) {
+ const data = {
+ roleId,
+ status
+ }
+ return request({
+ url: '/system/role/changeStatus',
+ method: 'put',
+ data: data
+ })
+}
+
+// 鍒犻櫎瑙掕壊
+export function delRole(roleId) {
+ return request({
+ url: '/system/role/' + roleId,
+ method: 'delete'
+ })
+}
+
+// 鏌ヨ瑙掕壊宸叉巿鏉冪敤鎴峰垪琛�
+export function allocatedUserList(query) {
+ return request({
+ url: '/system/role/authUser/allocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨ瑙掕壊鏈巿鏉冪敤鎴峰垪琛�
+export function unallocatedUserList(query) {
+ return request({
+ url: '/system/role/authUser/unallocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鍙栨秷鐢ㄦ埛鎺堟潈瑙掕壊
+export function authUserCancel(data) {
+ return request({
+ url: '/system/role/authUser/cancel',
+ method: 'put',
+ data: data
+ })
+}
+
+// 鎵归噺鍙栨秷鐢ㄦ埛鎺堟潈瑙掕壊
+export function authUserCancelAll(data) {
+ return request({
+ url: '/system/role/authUser/cancelAll',
+ method: 'put',
+ params: data
+ })
+}
+
+// 鎺堟潈鐢ㄦ埛閫夋嫨
+export function authUserSelectAll(data) {
+ return request({
+ url: '/system/role/authUser/selectAll',
+ method: 'put',
+ params: data
+ })
+}
+
+// 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戠粨鏋�
+export function deptTreeSelect(roleId) {
+ return request({
+ url: '/system/role/deptTree/' + roleId,
+ method: 'get'
+ })
+}
--
Gitblit v1.9.3