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.
450 lines
12 KiB
450 lines
12 KiB
import { basicAction } from '@peace/utils'
|
|
import { ApiTable } from '$utils'
|
|
import { Request } from '@peace/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 putOperaTional (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_OPERA_TIONAL',
|
|
url: ApiTable.putOperaTional,
|
|
msg: { option: '编辑车辆信息' },
|
|
|
|
});
|
|
}
|
|
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: '获取道路信息失败' },
|
|
reducer: { name: 'road' }
|
|
});
|
|
}
|
|
export function putRoadway (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_ROADWAY',
|
|
url: ApiTable.putRoadway,
|
|
msg: { option: query?.roadId ? '编辑' : '新增' + '道路信息' },
|
|
});
|
|
}
|
|
|
|
export function getVillageList(query={}) { // fId, limit, offset, searchTxt
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_VILLAGE_LIST',
|
|
url: ApiTable.getVillageList,
|
|
query,
|
|
msg: { error: '获取村庄数据失败' },
|
|
reducer: { name: 'villageList' }
|
|
});
|
|
}
|
|
|
|
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: '获取工程信息失败' },
|
|
reducer: { name: 'projectList' }
|
|
});
|
|
}
|
|
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 getPurchase (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_PURCHASE',
|
|
url: ApiTable.getPurchase,
|
|
msg: { error: '获取治超信息失败' },
|
|
|
|
});
|
|
}
|
|
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: { option: '新增宣传视频' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
export function putEditPropagata (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_PROPAGATA',
|
|
url: ApiTable.putpropagata,
|
|
msg: { option: '编辑宣传视频' },
|
|
// 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: { option: '删除宣传视频信息' },
|
|
// reducer: { name: 'reportstatistic' }
|
|
});
|
|
}
|
|
|
|
export function getShippingList (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_SHIPPING_LIST',
|
|
url: ApiTable.getShippingList,
|
|
msg: { error: '获取货运信息失败' },
|
|
});
|
|
}
|
|
|
|
export function putShippingList (query) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
dispatch: dispatch,
|
|
data: query,
|
|
actionType: 'PUT_SHIPPING_LIST',
|
|
url: ApiTable.putShippingList,
|
|
msg: { option: '编辑货运信息' },
|
|
});
|
|
}
|
|
//获取管养单位概况
|
|
export function getCustodyunit () {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_CUSTODY_UNIT',
|
|
url: ApiTable.getCustodyunit,
|
|
msg: { error: '获取管养单位概况失败' },
|
|
reducer: { name: 'roadMaintenances_management' }
|
|
});
|
|
}
|
|
export function getCustodyunitOne (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
query: query,
|
|
dispatch: dispatch,
|
|
actionType: 'GET_CUSTODY_UNIT_ONE',
|
|
url: ApiTable.getCustodyunit,
|
|
msg: { error: '获取管养单位概况失败' },
|
|
// reducer: { name: 'roadMaintenances_management' }
|
|
});
|
|
}
|
|
export function postCustodyunit (query) {
|
|
return dispatch => basicAction({
|
|
type: 'post',
|
|
data: query,
|
|
dispatch: dispatch,
|
|
actionType: 'POST_CUSTODY_UNIT',
|
|
url: ApiTable.postCustodyunit,
|
|
msg: { option: '编辑管养单位概况' },
|
|
// reducer: { name: 'roadMaintenances' }
|
|
});
|
|
}
|
|
export function getxiuyangas (query) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
query,
|
|
dispatch: dispatch,
|
|
actionType: 'GET_XIUYANG',
|
|
url: ApiTable.getXiuyang,
|
|
msg: { error: '获取信息失败' },
|
|
reducer: { name: 'xiuyang' }
|
|
});
|
|
}
|
|
|
|
|