新增readme

This commit is contained in:
2026-06-26 10:25:52 +08:00
parent ccc9cb717a
commit 37e2e8df74
4 changed files with 433 additions and 64 deletions

View File

@@ -1,4 +1,5 @@
import request from './request'
import { DEPARTMENT_LIST } from '../constants/departments'
// 获取员工列表
export const getEmployeeList = (params, config) => {
@@ -29,3 +30,15 @@ export const updateEmployee = (id, data) => {
export const deleteEmployeeAPI = (id) => {
return request.delete(`/employees/${id}`)
}
/**
* 获取部门列表
*
* 当前返回本地常量(与后端数据库一致)。
* 当后端部署了 GET /api/departments 接口后,将下方注释替换为:
*
* export const getDepartmentList = () => request.get('/departments')
*/
export const getDepartmentList = () => {
return Promise.resolve({ code: 0, message: 'ok', data: DEPARTMENT_LIST })
}