123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- import requestAuth from '@/utils/requestAuth'
- // 获取用户列表
- export function fetchList(query) {
- return requestAuth({
- url: '/sysOrgUser/list',
- method: 'get',
- params: query
- })
- }
- // 创建用户
- export function createUser(data) {
- return requestAuth({
- url: '/sysOrgUser/save',
- method: 'post',
- data
- })
- }
- // 更新用户
- export function updateUser(data) {
- return requestAuth({
- url: '/sysOrgUser/update',
- method: 'post',
- data
- })
- }
- // 获取用户详情
- export function getUserById(id) {
- return requestAuth({
- url: '/sysOrgUser/info/' + id,
- method: 'get'
- })
- }
- // 删除用户信息
- export function deleteUser(data) {
- return requestAuth({
- url: '/sysOrgUser/delete',
- method: 'delete',
- data
- })
- }
- // 禁用用户
- export function closeUser(id) {
- return requestAuth({
- url: '/sysOrgUser/update',
- method: 'post',
- data: {
- userId: id,
- status: 0
- }
- })
- }
- // 启用用户
- export function openUser(id) {
- return requestAuth({
- url: '/sysOrgUser/update',
- method: 'post',
- data: {
- userId: id,
- status: 1
- }
- })
- }
- // 获取角色树以及用户和角色的关联关系
- export function getUserRoleTree(userId) {
- return requestAuth({
- url: '/sysOrgUserRole/list',
- method: 'get',
- params: { userId: userId }
- })
- }
- // 更新用户角色关联关系
- export function updateUserRole(data) {
- return requestAuth({
- url: '/sysOrgUserRole/save',
- method: 'post',
- data
- })
- }
- // 保存用户操作记录
- export function saveUserOpRecored(data) {
- return requestAuth({
- url: '/userOpRecord/save',
- method: 'post',
- data
- })
- }
- // 获取推荐用户菜单
- export function getUseMenu() {
- return requestAuth({
- url: '/userMenu/userlist',
- method: 'get'
- })
- }
- export function channgePass(data) {
- return requestAuth({
- url: '/changePassword',
- method: 'post',
- data
- })
- }
|