From 99b062eeca471bdcbfcacd88e308fab9972cd6ec Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 19 八月 2025 14:21:33 +0800
Subject: [PATCH] 展示优化
---
src/api/system/user.js | 141 +++++++++++++++++++++++++++-------------------
1 files changed, 82 insertions(+), 59 deletions(-)
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 6bb7965..a2f1756 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -1,135 +1,158 @@
-import request from '@/utils/request'
-import { parseStrEmpty } from "@/utils/ruoyi";//澶勭悊瀛楃涓�
+import request from "@/utils/request";
+import { parseStrEmpty } from "@/utils/ruoyi"; //澶勭悊瀛楃涓�
// 鏌ヨ鐢ㄦ埛鍒楄〃
export function listUser(query) {
return request({
- url: '/system/user/list',
- method: 'get',
- params: query
- })
+ url: "/system/user/list",
+ method: "get",
+ params: query,
+ });
}
// 鏌ヨ鐢ㄦ埛璇︾粏
export function getUser(userId) {
return request({
- url: '/system/user/getInfo/' + parseStrEmpty(userId),
- method: 'get'
- })
+ url: "/system/user/getInfo/" + parseStrEmpty(userId),
+ method: "get",
+ });
}
// 鏂板鐢ㄦ埛
export function addUser(data) {
return request({
- url: '/system/user/add',
- method: 'post',
- data: data
- })
+ url: "/system/user/add",
+ method: "post",
+ data: data,
+ });
}
// 淇敼鐢ㄦ埛
export function updateUser(data) {
return request({
- url: '/system/user/edit',
- method: 'post',
- data: data
- })
+ url: "/system/user/edit",
+ method: "post",
+ data: data,
+ });
}
// 鍒犻櫎鐢ㄦ埛
export function delUser(userId) {
return request({
- url: '/system/user/remove/' + userId,
- method: 'get'
- })
+ url: "/system/user/remove/" + userId,
+ method: "get",
+ });
}
// 鐢ㄦ埛瀵嗙爜閲嶇疆
export function resetUserPwd(userId, password) {
const data = {
userId,
- password
- }
+ password,
+ };
return request({
- url: '/system/user/resetPwd',
- method: 'post',
- data: data
- })
+ url: "/system/user/resetPwd",
+ method: "post",
+ data: data,
+ });
}
// 鐢ㄦ埛鐘舵�佷慨鏀�
export function changeUserStatus(userId, status) {
const data = {
userId,
- status
- }
+ status,
+ };
return request({
- url: '/system/user/changeStatus/edit',
- method: 'post',
- data: data
- })
+ url: "/system/user/changeStatus/edit",
+ method: "post",
+ data: data,
+ });
}
// 鏌ヨ鐢ㄦ埛涓汉淇℃伅
export function getUserProfile() {
return request({
- url: '/system/user/profile',
- method: 'get'
- })
+ url: "/system/user/profile",
+ method: "get",
+ });
}
// 淇敼鐢ㄦ埛涓汉淇℃伅
export function updateUserProfile(data) {
return request({
- url: '/system/user/profile/edit',
- method: 'post',
- data: data
- })
+ url: "/system/user/profile/edit",
+ method: "post",
+ data: data,
+ });
+}
+// 淇敼鐢ㄦ埛涓汉淇℃伅
+export function getSfStatistics(data) {
+ return request({
+ url: "/smartor/serviceSubtask/getSfStatistics",
+ method: "post",
+ data: data,
+ });
}
// 鐢ㄦ埛瀵嗙爜閲嶇疆
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
- newPassword
- }
+ newPassword,
+ };
return request({
- url: '/system/user/profile/updatePwd',
- method: 'post',
- params: data
- })
+ url: "/system/user/profile/updatePwd",
+ method: "post",
+ params: data,
+ });
}
// 鐢ㄦ埛澶村儚涓婁紶
export function uploadAvatar(data) {
return request({
- url: '/system/user/profile/avatar',
- method: 'post',
- data: data
- })
+ url: "/system/user/profile/avatar",
+ method: "post",
+ data: data,
+ });
}
// 鏌ヨ鎺堟潈瑙掕壊
export function getAuthRole(userId) {
return request({
- url: '/system/user/authRole/' + userId,
- method: 'get'
- })
+ url: "/system/user/authRole/" + userId,
+ method: "get",
+ });
}
// 淇濆瓨鎺堟潈瑙掕壊
export function updateAuthRole(data) {
return request({
- url: '/system/user/authRole/edit',
- method: 'post',
- params: data
- })
+ url: "/system/user/authRole/insertAuthRole",
+ method: "post",
+ data: data,
+ });
+}
+// 淇濆瓨鎺堟潈瑙掕壊
+export function removeusertd(userid,deptcode) {
+ return request({
+ url: "/smartor/userdept/removeByCode/" + userid + "/" + deptcode,
+ method: "get",
+ });
}
// 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋�
export function deptTreeSelect() {
return request({
- url: '/system/user/deptTree',
- method: 'get'
- })
+ url: "/system/user/deptTree",
+ method: "get",
+ });
+}
+// 鏂板绉戝/鐥呭尯
+export function adduserdept(data) {
+ return request({
+ url: "/smartor/userdept/add",
+ method: "post",
+ data: data,
+ });
}
--
Gitblit v1.9.3