You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
361 lines
9.2 KiB
361 lines
9.2 KiB
import { basicAction } from '@peace/utils'
|
|
import { ApiTable } from '$utils'
|
|
|
|
export function getDepMessage () {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_DEPARTMENT_MESSAGE',
|
|
url: ApiTable.getDepMessage,
|
|
msg: { error: '获取部门信息失败' },
|
|
reducer: { name: 'depMessage' }
|
|
});
|
|
}
|
|
// export function getReportStatistic(query) {
|
|
// return dispatch => basicAction({
|
|
// type: 'get',
|
|
// dispatch: dispatch,
|
|
// query: query,
|
|
// actionType: 'GET_DEPARTMENT_STATIS',
|
|
// url: ApiTable.getReportStatistic,
|
|
// msg: { error: '获取填报信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
// });
|
|
|
|
// }
|
|
export function getOperaTional (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_OPERA_TIONAL',
|
|
url: ApiTable.getOperaTional,
|
|
msg: { error: '获取客运信息失败' },
|
|
|
|
});
|
|
}
|
|
|
|
export function getSpecificVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_SPECIFIC_VEHICLE',
|
|
url: ApiTable.getSpecificVehicle,
|
|
msg: { error: '获取车辆信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putSpecificVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'put_SPECIFIC_VEHICLE',
|
|
url: ApiTable.putSpecificVehicle,
|
|
msg: { option: '编辑车辆信息' },
|
|
|
|
});
|
|
}
|
|
export function putHouseholds (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'put_HOUSEHOLDS',
|
|
url: ApiTable.putHouseholds,
|
|
msg: { option: '编辑业户信息' },
|
|
|
|
});
|
|
}
|
|
export function getHouseholds (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_HOUSEHOLDS',
|
|
url: ApiTable.getHouseholds,
|
|
msg: { error: '获取业户信息失败' },
|
|
|
|
});
|
|
}
|
|
export function getRoadway (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_ROADWAY',
|
|
url: ApiTable.getRoadway,
|
|
msg: { error: '获取道路信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putRoadway (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_ROADWAY',
|
|
url: ApiTable.putRoadway,
|
|
msg: { option: '编辑道路信息' },
|
|
|
|
});
|
|
}
|
|
export function getBridge (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_BRIDGE',
|
|
url: ApiTable.getBridge,
|
|
msg: { error: '获取桥梁信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putBridge (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_BRIDGE',
|
|
url: ApiTable.putBridge,
|
|
msg: { option: '编辑桥梁信息' },
|
|
|
|
});
|
|
}
|
|
export function getProject (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_PROJECT',
|
|
url: ApiTable.getProject,
|
|
msg: { error: '获取工程信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putProject (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'GET_PROJECT',
|
|
url: ApiTable.putProject,
|
|
msg: { option: '编辑工程信息' },
|
|
|
|
});
|
|
}
|
|
export function getHighways (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_HIGHWAYS',
|
|
url: ApiTable.getHighways,
|
|
msg: { error: '获取路政信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putHighways (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'GET_HIGHWAYS',
|
|
url: ApiTable.putHighways,
|
|
msg: { option: '编辑路政信息' },
|
|
|
|
});
|
|
}
|
|
export function getCircuit (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_CIRCUIT',
|
|
url: ApiTable.getCircuit,
|
|
msg: { error: '获取线路信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putCircuit (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_CIRCUIT',
|
|
url: ApiTable.putCircuit,
|
|
msg: { option: '编辑线路信息' },
|
|
|
|
});
|
|
}
|
|
export function getVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_VEHICLE',
|
|
url: ApiTable.getVehicle,
|
|
msg: { error: '获取车辆信息失败' },
|
|
|
|
});
|
|
}
|
|
export function putVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_VEHICLE',
|
|
url: ApiTable.putVehicle,
|
|
msg: { option: '编辑车辆信息' },
|
|
|
|
});
|
|
}
|
|
export function delRoadway (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_ROADWAY',
|
|
url: ApiTable.delRoadway.replace("{roadId}", query?.roadId),
|
|
msg: { option: '删除车辆信息' },
|
|
|
|
});
|
|
}
|
|
export function delProject (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_PROJECT',
|
|
url: ApiTable.delProject.replace("{projectId}", query?.projectId),
|
|
msg: { option: '删除工程信息' },
|
|
|
|
});
|
|
}
|
|
export function delBridge (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_BRIDGE',
|
|
url: ApiTable.delBridge.replace("{bridgeId}", query?.bridgeId),
|
|
msg: { option: '删除桥梁信息' },
|
|
|
|
});
|
|
}
|
|
export function delSpecificVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_SPECIFICVENICLE',
|
|
url: ApiTable.delSpecificVehicle.replace("{vehicleId}", query?.vehicleId),
|
|
msg: { option: '删除车辆信息' },
|
|
|
|
});
|
|
}
|
|
export function delHouseholds (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_HOUSEHOLDS',
|
|
url: ApiTable.delHouseholds.replace("{businessId}", query?.businessId),
|
|
msg: { option: '删除业户信息' },
|
|
|
|
});
|
|
}
|
|
export function delCircuit (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_CIRCUIT',
|
|
url: ApiTable.delCircuit.replace("{lineId}", query?.lineId),
|
|
msg: { option: '删除运营线路信息' },
|
|
|
|
});
|
|
}
|
|
export function delVehicle (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_VEHICLE',
|
|
url: ApiTable.delVehicle.replace("{carId}", query?.carId),
|
|
msg: { option: '删除车辆信息' },
|
|
|
|
});
|
|
}
|
|
|
|
export function putOperaTional (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_OPERA_TIONAL',
|
|
url: ApiTable.putOperaTional,
|
|
msg: { error: '获取车辆信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
export function putPurchase (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_PURCHASE',
|
|
url: ApiTable.putPurchase,
|
|
msg: { option: '编辑治超信息' },
|
|
|
|
});
|
|
}
|
|
export function delPurchase (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_PURCHASE',
|
|
url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId),
|
|
msg: { option: '删除车辆信息' },
|
|
|
|
});
|
|
}
|
|
|
|
|
|
export function getPropagata (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_PROPAGATA',
|
|
url: ApiTable.getpropagata,
|
|
msg: { error: '获取宣传视频信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
export function putAddPropagata (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_PROPAGATA',
|
|
url: ApiTable.putpropagata,
|
|
msg: { error: '新增宣传视频信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
export function putEditPropagata (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_PROPAGATA',
|
|
url: ApiTable.putpropagata,
|
|
msg: { error: '编辑宣传视频信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
export function delPropagata (query) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_PROPAGATA',
|
|
url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId),
|
|
msg: { error: '删除宣传视频信息失败' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|