pc_vue_admin/src/api/base/employee/employeeApi.js

33 lines
742 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => baseRequest(`/base/employee/` + url, ...arg)
/**
* 员工Api接口管理器
*
* @author Luck
* @date 2024/07/23 17:31
**/
export default {
// 获取员工分页
employeePage(data) {
return request('page', data, 'get')
},
// 提交员工表单 edit为true时为编辑默认为新增
employeeSubmitForm(data, edit = false) {
return request(edit ? 'edit' : 'add', data)
},
// 删除员工
employeeDelete(data) {
return request('delete', data)
},
// 获取员工详情
employeeDetail(data) {
return request('detail', data, 'get')
},
// 添加员工基本信息
employeeAddShort(data) {
return request('addShort', data, 'post')
}
}