马宇豪
2023-03-22 3a9ca6d56fbad4c67b858185d9e9b157e3d60b82
src/api/specialWorkSystem/specialIndex/index.ts
@@ -2,11 +2,32 @@
export function specialIndexApi() {
    return {
        analyseType: (startTime: string | null,endTime: string | null,depId: number | null) => {
        analyseType: (data: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + `specialWork/analyse/everyType/dep?startTime=${startTime == null ? null : startTime}&endTime=${endTime == null ? null : endTime}&depId=${depId == null ? null : depId}`,
                url: import.meta.env.VITE_API_URL + `/specialWork/analyse/everyType/dep`,
                method: 'post',
                data: data
            });
        },
        analyseAllWork: (data: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/specialWork/analyse/allWork/dep`,
                method: 'post',
                data: data
            });
        },
        analyseDepMonth: (data: number) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/specialWork/analyse/12month/dep?depId=${data}`,
                method: 'get'
            });
        },
        getMydepList: (data: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/work/page/my-dep/list`,
                method: 'post',
                data: data
            });
        }
    };
}