From f93ccd68e914c8d9c83478bfa3f5ccf7bc48a44f Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 30 一月 2023 18:08:53 +0800 Subject: [PATCH] update 优化 框架代码书写格式 --- ruoyi-ui/src/api/system/user.js | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index 3b9a776..f2f76ef 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -1,5 +1,5 @@ import request from '@/utils/request' -import { praseStrEmpty } from "@/utils/ruoyi"; +import { parseStrEmpty } from "@/utils/ruoyi"; // 鏌ヨ鐢ㄦ埛鍒楄〃 export function listUser(query) { @@ -13,7 +13,7 @@ // 鏌ヨ鐢ㄦ埛璇︾粏 export function getUser(userId) { return request({ - url: '/system/user/' + praseStrEmpty(userId), + url: '/system/user/' + parseStrEmpty(userId), method: 'get' }) } @@ -41,15 +41,6 @@ return request({ url: '/system/user/' + userId, method: 'delete' - }) -} - -// 瀵煎嚭鐢ㄦ埛 -export function exportUser(query) { - return request({ - url: '/system/user/export', - method: 'get', - params: query }) } @@ -118,10 +109,27 @@ }) } -// 涓嬭浇鐢ㄦ埛瀵煎叆妯℃澘 -export function importTemplate() { +// 鏌ヨ鎺堟潈瑙掕壊 +export function getAuthRole(userId) { return request({ - url: '/system/user/importTemplate', + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 淇濆瓨鎺堟潈瑙掕壊 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + +// 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� +export function deptTreeSelect() { + return request({ + url: '/system/user/deptTree', method: 'get' }) } -- Gitblit v1.9.3