批量修复,增加组织架构
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取租户下的所有部门
|
||||
export function getTenantDepartments(tenantId) {
|
||||
return request({
|
||||
url: `/api/departments/tenant/${tenantId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取部门详情
|
||||
export function getDepartmentInfo(departmentId) {
|
||||
return request({
|
||||
url: `/api/departments/${departmentId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 添加部门
|
||||
export function addDepartment(data) {
|
||||
return request({
|
||||
url: '/api/departments',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新部门信息
|
||||
export function editDepartment(departmentId, data) {
|
||||
return request({
|
||||
url: `/api/departments/${departmentId}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export function deleteDepartment(departmentId) {
|
||||
return request({
|
||||
url: `/api/departments/${departmentId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取所有员工信息
|
||||
export function getAllEmployees() {
|
||||
return request({
|
||||
url: '/api/employees',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取员工信息
|
||||
export function getEmployeeInfo(employeeId) {
|
||||
return request({
|
||||
url: `/api/employees/${employeeId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取租户员工信息
|
||||
export function getTenantEmployees(tenantId) {
|
||||
return request({
|
||||
url: `/api/employees/tenant/${tenantId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 添加员工
|
||||
export function addEmployee(data) {
|
||||
return request({
|
||||
url: '/api/employees',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新员工信息
|
||||
export function editEmployee(employeeId, data) {
|
||||
return request({
|
||||
url: `/api/employees/${employeeId}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除员工
|
||||
export function deleteEmployee(employeeId) {
|
||||
return request({
|
||||
url: `/api/employees/${employeeId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
// 重置员工密码
|
||||
export function resetEmployeePassword(employeeId) {
|
||||
return request({
|
||||
url: `/api/employees/${employeeId}/reset-password`,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
// 修改员工密码
|
||||
export function changeEmployeePassword(employeeId, data) {
|
||||
return request({
|
||||
url: `/api/employees/${employeeId}/change-password`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取租户下的所有职位
|
||||
export function getTenantPositions(tenantId) {
|
||||
return request({
|
||||
url: `/api/positions/tenant/${tenantId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 根据部门ID获取职位列表
|
||||
export function getPositionsByDepartment(departmentId) {
|
||||
return request({
|
||||
url: `/api/positions/department/${departmentId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取职位详情
|
||||
export function getPositionInfo(positionId) {
|
||||
return request({
|
||||
url: `/api/positions/${positionId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 添加职位
|
||||
export function addPosition(data) {
|
||||
return request({
|
||||
url: '/api/positions',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新职位信息
|
||||
export function editPosition(positionId, data) {
|
||||
return request({
|
||||
url: `/api/positions/${positionId}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除职位
|
||||
export function deletePosition(positionId) {
|
||||
return request({
|
||||
url: `/api/positions/${positionId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user