
import request from '/@/utils/request';
/**
 * 公共参数
 * @method getList 获取列表
 * @method getcaptcha 获取后端公共密钥
 */
export function getCons() {
    return {
        getList: (params?: object) => {
            return request({
                url: 'forms/build',
                method: 'get',
                params,
            });
        },
        // 退回
        examineup: (params?: object) => {
            return request({
                url: 'forms/build/examine',
                method: 'get',
                params,
            });
        },
        downloadstate: (urls: string) => {
            return request({
                url: urls,
                method: 'get',
            });
        },
        download: (urls: string) => {
            return request({
                url: urls,
                method: 'get',
                responseType: 'blob',
            });
        },
        downloadUrl: (id: string, type: string | number, areaCode: string) => {
            return import.meta.env.VITE_API_URL + 'forms/build/exportExcel/?id=' + id + '&reportType=' + type + '&areaCode=' + areaCode
        },
        getdetail: (params?: object) => {
            return request({
                url: 'forms/build/' + params,
                method: 'get',
            });
        },
    };
}
