yudao-dev/src/api/base/coreDepartment.js
2024-04-22 15:19:35 +08:00

78 lines
1.4 KiB
JavaScript

/*
* @Author: Do not edit
* @Date: 2023-10-21 11:50:46
* @LastEditTime: 2024-04-19 17:13:24
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 创建部门
export function createCoreDepartment(data) {
return request({
url: '/base/core-department/create',
method: 'post',
data: data
})
}
// 更新部门
export function updateCoreDepartment(data) {
return request({
url: '/base/core-department/update',
method: 'put',
data: data
})
}
// 删除部门
export function deleteCoreDepartment(id) {
return request({
url: '/base/core-department/delete?id=' + id,
method: 'delete'
})
}
// 获得部门
export function getCoreDepartment(id) {
return request({
url: '/base/core-department/get?id=' + id,
method: 'get'
})
}
// 获得部门code
export function getCode() {
return request({
url: '/base/core-department/getCode',
method: 'get'
})
}
// 获得部门分页
export function getCoreDepartmentPage(query) {
return request({
url: '/base/core-department/page',
method: 'get',
params: query
})
}
// 获得所有列表
export function getCoreDepartmentList(query) {
return request({
url: '/base/core-department/listAll',
method: 'get',
params: query
})
}
// 设备获得所有列表
export function getDepartmentList(query) {
return request({
url: '/system/dept/list-all-simple',
method: 'get',
params: query
})
}