import request from '/@/utils/request';

export function getApi() {
    return {
        gettype: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/type/sys_report_type',
                method: 'get',
                params,
            });
        },
        getbus: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/type/sys_business_state',
                method: 'get',
                params,
            });
        },
        listApi: (params?: object) => {
            return request({
                url: '/escalation/county/v1/',
                method: 'get',
                params,
            });
        },
        // 新增日报
        dayAdd: (data?: object) => {
            return request({
                url: '/forms/daily/escalation',
                method: 'post',
                data,
            });
        },
        // 修改日报
        dayput: (data?: object) => {
            return request({
                url: '/forms/daily/editEscalation',
                method: 'puts',
                data,
            });
        },
        // 月报详情
        dayget: (params?: string) => {
            return request({
                url: 'forms/daily/escalation/' + params,
                method: 'get'
            });
        },
        // 新增月报
        monthAdd: (data?: object) => {
            return request({
                url: '/forms/monthly/escalation',
                method: 'post',
                data,
            });
        },
        // 修改月报
        monthput: (data?: object) => {
            return request({
                url: '/forms/monthly/editEscalation',
                method: 'puts',
                data,
            });
        },
        // 月报详情
        monthget: (params?: string) => {
            return request({
                url: 'forms/monthly/escalation/' + params,
                method: 'get'
            });
        },
        // 建设部报表详情
        jsget: (params?: string) => {
            return request({
                url: 'forms/build/escalation/' + params,
                method: 'get'
            });
        },
        // 新增月报
        jsAdd: (data?: object) => {
            return request({
                url: 'forms/build/escalation',
                method: 'posts',
                data,
            });
        },
        // 修改月报
        jsput: (data?: object) => {
            return request({
                url: '/forms/build/editEscalation',
                method: 'put',
                data,
            });
        },
        // 省厅详情
        stget: (params?: string) => {
            return request({
                url: 'forms/provincial/escalation/' + params,
                method: 'get'
            });
        },
        // 新增省厅
        stAdd: (data?: object) => {
            return request({
                url: 'forms/provincial/escalation',
                method: 'posts',
                data,
            });
        },
        // 修改省厅
        stput: (data?: object) => {
            return request({
                url: '/forms/provincial/editEscalation',
                method: 'put',
                data,
            });
        }
    };

}
