xiangpei
2025-05-06 5c929cfb5286a31a4e067cbc61e8774f4e7d42ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import request from '@/utils/request'
import commonUtil from "@/utils/common";
 
// 获取请假列表
 
export const getLeaveApplyList = data => {
    console.log("aaaaaaaaaaaaaaaaaaaaaaa1");
    const queryString = commonUtil.objectToQueryStr(data);
    console.log("aaaaaaaaaaaaaaaaaaaaaaa2", queryString);
    return request({
        url: '/leaveapply/list',
        method: 'post',
        data: queryString,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
    });
}
 
// 添加请假
// http://101.43.32.218:8020/leaveapply/add
export const addLeave = data => {
    const fd = commonUtil.objectToFormData(data)
    return request({
        url: '/leaveapply/add',
        method: 'post',
        data: fd
    });
}
// 导出
export const exportLeave = data => {
    const fd = commonUtil.objectToQueryStr(data)
    return request({
        url: '/leaveapply/export',
        method: 'post',
        data: fd,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
        },
    });
}
// 删除
export const deleteLeave = data => {
    const fd = commonUtil.objectToFormData(data)
    return request({
        url: '/leaveapply/remove',
        method: 'post',
        data: fd
    });
}