ranger.js 2.18 KB
Newer Older
1
import { getReq, postReq, putReq } from '@/utils/requestUtil';
水落(YangLei)'s avatar
水落(YangLei) committed
2 3 4 5 6 7 8 9

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

export function addXunJianTaskApi(data) {
    return postReq('/ranger/inspection/api/v1/jobs/temporary', data);
}
10 11 12 13 14 15 16 17 18 19 20 21

export function getRegionInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/region/${id}`);
}

export function addRegionApi(data) {
    return postReq('/ranger/inspection/api/v1/region', data);
}

export function editRegionApi(data) {
    return putReq(`ranger/inspection/api/v1/region`, data);
}
陈浩玮's avatar
地点  
陈浩玮 committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

export function getPlaceInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/place/${id}`);
}

export function addPlaceApi(data) {
    return postReq('/ranger/inspection/api/v1/place', data);
}

export function editPlaceApi(data) {
    return putReq('/ranger/inspection/api/v1/place', data);
}

export function getExemptionsListApi(data) {
    return getReq(`/ranger/inspection/api/v1/exemptions/valid`, data);
}
陈浩玮's avatar
陈浩玮 committed
38

水落(YangLei)'s avatar
水落(YangLei) committed
39 40 41 42 43 44 45 46 47 48 49
export function addUnitApi(data) {
    return postReq('/ranger/inspection/api/v1/units', data);
}

export function editUnitApi(data) {
    return putReq('/ranger/inspection/api/v1/units', data);
}

export function getUnitInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/units/${id}`);
}
水落(YangLei)'s avatar
水落(YangLei) committed
50 51 52 53 54 55 56 57 58 59 60 61

export function addExemptionApi(data) {
    return postReq('/ranger/inspection/api/v1/exemptions', data);
}

export function getExemptionApi(id) {
    return getReq(`ranger/inspection/api/v1/exemptions/${id}`);
}

export function updateExemptionApi(data) {
    return putReq(`/ranger/inspection/api/v1/exemptions`, data);
}
62 63 64 65 66 67 68 69 70 71 72

export function addMajorApi(data) {
    return postReq(`/ranger/inspection/api/v1/specialities`, data);
}
export function updateMajorApi(data) {
    return putReq('/ranger/inspection/api/v1/specialities', data);
}

export function getMajorInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/specialities/${id}`);
}
水落(YangLei)'s avatar
水落(YangLei) committed
73 74 75 76 77 78 79 80

export function getOrganizationUserApi(id) {
    return getReq(`/api/v1/users/organizations/${id}`);
}

export function addSpecialitiesStaffsApi(data) {
    return postReq(`/ranger/inspection/api/v1/specialities/staffs`, data);
}