4 changed files with 63 additions and 63 deletions
@ -1,136 +1,136 @@ |
|||||
import request from '@/utils/request' |
import request from "@/utils/request"; |
||||
import { parseStrEmpty } from "@/utils/ruoyi"; |
import { parseStrEmpty } from "@/utils/ruoyi"; |
||||
|
|
||||
// 查询用户列表
|
// 查询用户列表
|
||||
export function listUser(query) { |
export function listUser(query) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/list', |
url: "/system/user/list", |
||||
method: 'get', |
method: "get", |
||||
params: query |
params: query, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 查询用户详细
|
// 查询用户详细
|
||||
export function getUser(userId) { |
export function getUser(userId) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/' + parseStrEmpty(userId), |
url: "/system/user/" + parseStrEmpty(userId), |
||||
method: 'get' |
method: "get", |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 新增用户
|
// 新增用户
|
||||
export function addUser(data) { |
export function addUser(data) { |
||||
return request({ |
return request({ |
||||
url: '/system/user', |
url: "/system/user", |
||||
method: 'post', |
method: "post", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 修改用户
|
// 修改用户
|
||||
export function updateUser(data) { |
export function updateUser(data) { |
||||
return request({ |
return request({ |
||||
url: '/system/user', |
url: "/system/user", |
||||
method: 'put', |
method: "put", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 删除用户
|
// 删除用户
|
||||
export function delUser(userId) { |
export function delUser(userId) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/' + userId, |
url: "/system/user/" + userId, |
||||
method: 'delete' |
method: "delete", |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 用户密码重置
|
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) { |
export function resetUserPwd(userId, password) { |
||||
const data = { |
const data = { |
||||
userId, |
userId, |
||||
password |
password, |
||||
} |
}; |
||||
return request({ |
return request({ |
||||
url: '/system/user/resetPwd', |
url: "/system/user/resetPwd", |
||||
method: 'put', |
method: "put", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 用户状态修改
|
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) { |
export function changeUserStatus(userId, status) { |
||||
const data = { |
const data = { |
||||
userId, |
userId, |
||||
status |
status, |
||||
} |
}; |
||||
return request({ |
return request({ |
||||
url: '/system/user/changeStatus', |
url: "/system/user/changeStatus", |
||||
method: 'put', |
method: "put", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 查询用户个人信息
|
// 查询用户个人信息
|
||||
export function getUserProfile() { |
export function getUserProfile() { |
||||
return request({ |
return request({ |
||||
url: '/system/user/profile', |
url: "/system/user/profile", |
||||
method: 'get' |
method: "get", |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 修改用户个人信息
|
// 修改用户个人信息
|
||||
export function updateUserProfile(data) { |
export function updateUserProfile(data) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/profile', |
url: "/system/user/profile", |
||||
method: 'put', |
method: "put", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 用户密码重置
|
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) { |
export function updateUserPwd(oldPassword, newPassword) { |
||||
const data = { |
const data = { |
||||
oldPassword, |
oldPassword, |
||||
newPassword |
newPassword, |
||||
} |
}; |
||||
return request({ |
return request({ |
||||
url: '/system/user/profile/updatePwd', |
url: "/web/updatePwd", |
||||
method: 'put', |
method: "put", |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 用户头像上传
|
// 用户头像上传
|
||||
export function uploadAvatar(data) { |
export function uploadAvatar(data) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/profile/avatar', |
url: "/system/user/profile/avatar", |
||||
method: 'post', |
method: "post", |
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
||||
data: data |
data: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 查询授权角色
|
// 查询授权角色
|
||||
export function getAuthRole(userId) { |
export function getAuthRole(userId) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/authRole/' + userId, |
url: "/system/user/authRole/" + userId, |
||||
method: 'get' |
method: "get", |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 保存授权角色
|
// 保存授权角色
|
||||
export function updateAuthRole(data) { |
export function updateAuthRole(data) { |
||||
return request({ |
return request({ |
||||
url: '/system/user/authRole', |
url: "/system/user/authRole", |
||||
method: 'put', |
method: "put", |
||||
params: data |
params: data, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
// 查询部门下拉树结构
|
// 查询部门下拉树结构
|
||||
export function deptTreeSelect() { |
export function deptTreeSelect() { |
||||
return request({ |
return request({ |
||||
url: '/system/user/deptTree', |
url: "/system/user/deptTree", |
||||
method: 'get' |
method: "get", |
||||
}) |
}); |
||||
} |
} |
||||
|
Loading…
Reference in new issue