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.
 
 
 
 
 

60 lines
993 B

import request from '@/utils/request'
export function getDepts(params) {
return request({
url: 'api/dept',
method: 'get',
params
})
}
export function getDeptTree(params) {
return request({
url: '/api/dept/allTree',
method: 'get',
params
})
}
export function getDeptSuperior(ids) {
const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
return request({
url: 'api/dept/superior',
method: 'post',
data
})
}
export function getDeptvo(params) {
return request({
url: 'api/dept/vo',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/dept',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/dept',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/dept',
method: 'put',
data
})
}
export default { add, edit, del, getDepts, getDeptSuperior, getDeptvo, getDeptTree }