feat:【bpm】oa 请假:10% 初始化
This commit is contained in:
35
src/api/bpm/oa/leave/index.ts
Normal file
35
src/api/bpm/oa/leave/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 请假申请 */
|
||||
export interface Leave {
|
||||
id: number
|
||||
status: number
|
||||
type: number
|
||||
reason: string
|
||||
processInstanceId: string
|
||||
startTime: number
|
||||
endTime: number
|
||||
createTime: number
|
||||
startUserSelectAssignees?: Record<string, string[]>
|
||||
}
|
||||
|
||||
/** 创建请假申请 */
|
||||
export function createLeave(data: Partial<Leave>) {
|
||||
return http.post<number>('/bpm/oa/leave/create', data)
|
||||
}
|
||||
|
||||
/** 更新请假申请 */
|
||||
export function updateLeave(data: Partial<Leave>) {
|
||||
return http.put<boolean>('/bpm/oa/leave/update', data)
|
||||
}
|
||||
|
||||
/** 获得请假申请 */
|
||||
export function getLeave(id: number) {
|
||||
return http.get<Leave>(`/bpm/oa/leave/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获得请假申请分页 */
|
||||
export function getLeavePage(params: PageParam) {
|
||||
return http.get<PageResult<Leave>>('/bpm/oa/leave/page', params)
|
||||
}
|
||||
Reference in New Issue
Block a user