You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 节假日设置 VO
|
|
export interface CalHolidayVO {
|
|
holidayId: number // 流水号
|
|
theDay: Date // 日期
|
|
holidayType: string // 日期类型
|
|
startTime: Date // 开始时间
|
|
endTime: Date // 结束时间
|
|
remark: string // 备注
|
|
attr1: string // 预留字段1
|
|
attr2: string // 预留字段2
|
|
attr3: number // 预留字段3
|
|
attr4: number // 预留字段4
|
|
createBy: string // 创建者
|
|
updateBy: string // 更新者
|
|
}
|
|
|
|
// 节假日设置 API
|
|
export const CalHolidayApi = {
|
|
// 查询节假日设置分页
|
|
getCalHolidayPage: async (params: any) => {
|
|
return await request.get({ url: `/mes/cal-holiday/page`, params })
|
|
},
|
|
|
|
// 查询节假日设置详情
|
|
getCalHoliday: async (id: number) => {
|
|
return await request.get({ url: `/mes/cal-holiday/get?id=` + id })
|
|
},
|
|
|
|
// 新增节假日设置
|
|
createCalHoliday: async (data: CalHolidayVO) => {
|
|
return await request.post({ url: `/mes/cal-holiday/create`, data })
|
|
},
|
|
|
|
// 修改节假日设置
|
|
updateCalHoliday: async (data: CalHolidayVO) => {
|
|
return await request.put({ url: `/mes/cal-holiday/update`, data })
|
|
},
|
|
|
|
// 删除节假日设置
|
|
deleteCalHoliday: async (id: number) => {
|
|
return await request.delete({ url: `/mes/cal-holiday/delete?id=` + id })
|
|
},
|
|
|
|
// 导出节假日设置 Excel
|
|
exportCalHoliday: async (params) => {
|
|
return await request.download({ url: `/mes/cal-holiday/export-excel`, params })
|
|
},
|
|
|
|
// 删除节假日设置
|
|
deleteCalHolidayByDay: async (theDay: String) => {
|
|
return await request.delete({ url: `/mes/cal-holiday/deleteByDay?theDay=` + theDay })
|
|
},
|
|
}
|