lanan-system-vue/src/api/company/staff/index.js
2024-08-08 20:19:21 +08:00

70 lines
1.3 KiB
JavaScript

import request from '@/utils/request'
// 创建企业管理-员工信息
export function createStaff(data) {
return request({
url: '/company/staff/create',
method: 'post',
data: data
})
}
// 更新企业管理-员工信息
export function updateStaff(data) {
return request({
url: '/company/staff/update',
method: 'put',
data: data
})
}
// 删除企业管理-员工信息
export function deleteStaff(id) {
return request({
url: '/company/staff/delete?id=' + id,
method: 'delete'
})
}
// 获得企业管理-员工信息
export function getStaff(id) {
return request({
url: '/company/staff/get?id=' + id,
method: 'get'
})
}
// 获得企业管理-员工信息分页
export function getStaffPage(params) {
return request({
url: '/company/staff/page',
method: 'get',
params
})
}
// 导出企业管理-员工信息 Excel
export function exportStaffExcel(params) {
return request({
url: '/company/staff/export-excel',
method: 'get',
params,
responseType: 'blob'
})
}
// 获取当前登录用户所属标签
export function getLabels(){
return request({
url: '/company/staff/labels',
method: 'get',
})
}
// 获取当前登录用户部门下的员工信息
export function getStaffList(){
return request({
url: '/company/staff/list',
method: 'get'
})
}