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.
125 lines
2.9 KiB
125 lines
2.9 KiB
import request from '@/utils/request'
|
|
import qs from 'qs'
|
|
|
|
// let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
let tokens = window.sessionStorage.getItem('token')
|
|
// 获取菜单 分页列表
|
|
export function pageList(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/listPage',
|
|
method: 'POST',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询左侧部门列表
|
|
export function orgList(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/list',
|
|
method: 'get',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 编辑部门信息
|
|
export function postOrgtree(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/update/' + data.sid,
|
|
method: 'POST',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 获取 机构分页列表(编辑部门信息)
|
|
export function putOrgtree(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/update/' + data.sid,
|
|
method: 'POST',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
|
|
// 新增部门信息
|
|
export function addOrgTree(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/save',
|
|
method: 'POST',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 回显
|
|
export function selectBySid(data) {
|
|
return request({
|
|
url: 'portal/v1/sysorganization/fetchBySid/' + data,
|
|
method: 'get',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 树 节点名称 删除
|
|
export function delOrgtree(data) {
|
|
return request({
|
|
url: `/oms/apiadmin/sysorganization/delBySid/` + data.sid,
|
|
method: 'get',
|
|
data: qs.stringify(data),
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询主管人员 旧的:/oms/apiadmin/sysstafforg/staffinfoList
|
|
export function getStaff(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysstaffinfo/getStaffNameByDeptSid',
|
|
method: 'get',
|
|
params: data,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 查询分管人员
|
|
export function getStaffName(params) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysstaffinfo/getStaffName',
|
|
method: 'get',
|
|
params: params,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
'token': tokens
|
|
}
|
|
})
|
|
}
|
|
// 查看二维码
|
|
export function getQrCode(data) {
|
|
return request({
|
|
url: '/oms/apiadmin/sysorganization/getQrCode/' + data.sid,
|
|
method: 'post',
|
|
data: data,
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
})
|
|
}
|
|
|