/*定时任务Api*/
import request from '/@/utils/request';

/**
 * 公共参数
 */
export function fundsApi() {
    return {
        getList: (params?: object) => {
            return request({
                url: 'chart/supervise/v1',
                method: 'get',
                params,
            });
        },
        getbars: (params?: object) => {
            return request({
                url: 'chart/supervise/v1/histogram',
                method: 'get',
                params,
            });
        }
    };
}


export function monthApi() {
    return {
        getnum: (params?: object) => {
            return request({
                url: 'chart/sale/v1',
                method: 'get',
                params,
            });
        },
        getbars: (params?: object) => {
            return request({
                url: 'chart/sale/v1/totalMonth',
                method: 'get',
                params,
            });
        },
        getline: (params?: object) => {
            return request({
                url: 'chart/sale/v1/line',
                method: 'get',
                params,
            });
        }
    };
}

export function yearApi() {
    return {
        getline: (params?: object) => {
            return request({
                url: 'chart/sale/v1/totalYear',
                method: 'get',
                params,
            });
        },
        gethx: (params?: object) => {
            return request({
                url: 'chart/sale/v1/houseYear',
                method: 'get',
                params,
            });
        },
        getarea: (params?: object) => {
            return request({
                url: 'chart/sale/v1/areaYear',
                method: 'get',
                params,
            });
        }
    };
}


export function purchaseApi() {
    return {
        getnum: (params?: object) => {
            return request({
                url: 'chart/people/v1',
                method: 'get',
                params,
            });
        },
        // 查询柱状图总数
        getbarnum: (params?: object) => {
            return request({
                url: 'chart/people/v1/histogramNum',
                method: 'get',
                params,
            });
        },
        // 查询总面积
        getbararea: (params?: object) => {
            return request({
                url: 'chart/people/v1/histogramArea',
                method: 'get',
                params,
            });
        },
        // 查询年龄总数
        getbarnumage: (params?: object) => {
            return request({
                url: 'chart/people/v1/histogramAgeNum',
                method: 'get',
                params,
            });
        },
        // 查询总面积
        getbarareaage: (params?: object) => {
            return request({
                url: 'chart/people/v1/histogramAgeArea',
                method: 'get',
                params,
            });
        },
    };
}
