xunjian.js 1.02 KB
Newer Older
水落(YangLei)'s avatar
水落(YangLei) committed
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
import { getReq, postReq } from '@/utils/requestUtil';
import langUtils from '@/utils/langUtils';

export function getXunJianDownloadUrlApi(idList) {
    return getReq('/ranger/inspection/api/v1/jobs/export', { jobIdList: idList.join(',') });
}

export function getAreaListDataApi() {
    return getReq(`/ranger/inspection/api/v1/region/list`);
}

export function getBusinessListApi() {
    return getReq(
        `/api/v1/parameters/business/list?paramModule=rpis_route_schedule&paramCode=inspection_state&paramLocale=${langUtils.get()}`,
    );
}

export function getBanZuListApi() {
    return getReq(
        `/api/v1/parameters/business/list?paramModule=rpis_route_schedule&paramCode=shift_type&paramLocale=${langUtils.get()}`,
    );
}

export function getTaskTypeApi() {
    return getReq(
        `/api/v1/parameters/business/list?paramModule=rpis_route_schedule&paramCode=job_type&paramLocale=${langUtils.get()}`,
    );
}

export function addXunJianTaskApi(data) {
    return postReq('/ranger/inspection/api/v1/jobs/temporary', data);
}