admin-vue3/src/api/hrm/attendshift/index.ts

43 lines
1.3 KiB
TypeScript
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 request from '@/config/axios'
// 考勤班次 VO
export interface AttendShiftVO {
id: number // 主键
ruleId: number // 所属考勤规则
name: string // 班次名称
shiftType: number // 班次类型1固定班次 2轮班制三班倒
restIncluded: boolean // 是否包含休息时段
}
// 考勤班次 API
export const AttendShiftApi = {
// 查询考勤班次分页
getAttendShiftPage: async (params: any) => {
return await request.get({ url: `/hrm/attend-shift/page`, params })
},
// 查询考勤班次详情
getAttendShift: async (id: number) => {
return await request.get({ url: `/hrm/attend-shift/get?id=` + id })
},
// 新增考勤班次
createAttendShift: async (data: AttendShiftVO) => {
return await request.post({ url: `/hrm/attend-shift/create`, data })
},
// 修改考勤班次
updateAttendShift: async (data: AttendShiftVO) => {
return await request.put({ url: `/hrm/attend-shift/update`, data })
},
// 删除考勤班次
deleteAttendShift: async (id: number) => {
return await request.delete({ url: `/hrm/attend-shift/delete?id=` + id })
},
// 导出考勤班次 Excel
exportAttendShift: async (params) => {
return await request.download({ url: `/hrm/attend-shift/export-excel`, params })
}
}