From af6a08398e2bc22f3c8a3a615cbd9e23190be906 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 12 五月 2022 10:55:44 +0800 Subject: [PATCH] update 优化 文件与图片上传组件 使用id存储回显 --- ruoyi-ui/src/api/system/role.js | 186 +++++++++++++++++++++++++++------------------ 1 files changed, 111 insertions(+), 75 deletions(-) diff --git a/ruoyi-ui/src/api/system/role.js b/ruoyi-ui/src/api/system/role.js index 736708c..888538e 100644 --- a/ruoyi-ui/src/api/system/role.js +++ b/ruoyi-ui/src/api/system/role.js @@ -1,75 +1,111 @@ -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 + }) +} -- Gitblit v1.9.3