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.
138 lines
2.9 KiB
138 lines
2.9 KiB
import request from '@/utils/request'
|
|
import qs from 'qs'
|
|
// 用户列表
|
|
let tokens = window.sessionStorage.getItem('token');
|
|
export function userList(data){
|
|
return request({
|
|
url: '/base/v1/basefinbank/listPage',
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 根据sid查询一条信息
|
|
export function userSingle(data){
|
|
return request({
|
|
url: '/base/v1/basefinbank/fetchSid/' +data.sid,
|
|
method: 'get',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 新增
|
|
export function userAdd(data){
|
|
return request({
|
|
url: '/portal/v1/sysuser/save',
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 更新
|
|
export function userUpdata(data){
|
|
return request({
|
|
url: '/portal/v1/sysuser/update/' +data.sid,
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
|
|
// 删除
|
|
export function delUser(data){
|
|
return request({
|
|
url: '/portal/v1/sysuser/delBySid/' +data.sid,
|
|
method: 'get',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 初始化密码
|
|
export function initPwd(data){
|
|
return request({
|
|
url: '/portal/v1/sysuser/initPwd/' +data.sid,
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
|
|
// 单条用户的角色列表
|
|
export function setRole(data){
|
|
return request({
|
|
url: '/portal/v1/sysrole/listAllByUserSid/' +data.sid,
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 角色列表
|
|
export function saveOrgRole(data){
|
|
return request({
|
|
url: '/portal/v1/sysuserrole/update',
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询角色列表
|
|
export function roleList(data){
|
|
return request({
|
|
url: '/base/v1/basefinpolicy/listAll',
|
|
method: 'post',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询部门列表
|
|
export function orgList(data){
|
|
return request({
|
|
url: '/portal/v1/sysorganization/list',
|
|
method: 'get',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询岗位列表
|
|
export function postList(data){
|
|
return request({
|
|
url: '/portal/v1/syspost/fetchByOrgSid/'+data.sid,
|
|
method: 'get',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
|
|
// 获取验证码
|
|
export function getCode(data){
|
|
return request({
|
|
url: '/portal/v1/sysuser/sendMessageCode/'+data.phone,
|
|
method: 'get',
|
|
data: data,
|
|
headers: {'Content-Type': 'application/json',
|
|
'token':tokens
|
|
}
|
|
})
|
|
}
|
|
|