商享通oms管理后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
3.4 KiB

1 year ago
import request from '@/utils/request'
import qs from 'qs'
// 用户列表
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
let tokens = window.sessionStorage.getItem('token');
export function userList(data){
return request({
url: '/wms/apiadmin/sysuser/listPage',
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 新增
export function userAdd(data){
return request({
url: '/wms/apiadmin/sysuser/save',
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 更新
export function userUpdata(data){
return request({
url: '/wms/apiadmin/sysuser/update/' +data.sid,
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 删除
export function delUser(data){
return request({
url: '/wms/apiadmin/sysuser/delBySid/' +data.sid,
method: 'get',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 初始化密码
export function initPwd(data){
return request({
url: '/wms/apiadmin/sysuser/initPwd/' +data.sid,
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 根据sid查询一条信息
export function userSingle(data){
return request({
url: '/wms/apiadmin/sysuser/fetchBySid/' +data.sid,
method: 'get',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 单条用户的角色列表
export function setRole(data){
return request({
url: '/wms/apiadmin/sysrole/listAllByUserSid/' +data.sid,
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 角色列表
export function saveOrgRole(data){
return request({
url: '/wms/apiadmin/sysuserrole/update',
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 查询角色列表
export function roleList(data){
return request({
url: '/wms/apiadmin/sysrole/listAll',
method: 'post',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 查询部门列表
export function orgList(data){
return request({
url: '/wms/apiadmin/sysorganization/list',
method: 'get',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 查询岗位列表
export function postList(data){
return request({
url: '/wms/apiadmin/syspost/fetchByOrgSid/'+data.sid,
method: 'get',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 获取验证码
export function getCode(data){
return request({
url: '/wms/apiadmin/sysuser/sendMessageCode/'+data.phone,
method: 'get',
data: data,
headers: {'Content-Type': 'application/json',
'token':tokens
}
})
}
// 设置是否可用:isEnable:1可用,0不可用
export function setRoleEnable(data) {
return request({
url: '/wms/apiadmin/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}