198 lines
3.7 KiB
JavaScript
198 lines
3.7 KiB
JavaScript
import request from '@/utils/request';
|
|
|
|
/**
|
|
* 查询线路列表
|
|
*/
|
|
export function listLines() {
|
|
return request({
|
|
url: `/api/rpTools/map`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 查询线路列表
|
|
*/
|
|
export function listStations(lineId) {
|
|
return request({
|
|
url: `/api/rpTools/${lineId}/station`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 更新线路车站
|
|
*/
|
|
export function updateStation(stationId, data) {
|
|
return request({
|
|
url: `/api/rpTools/station/${stationId}`,
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 查询运行图列表
|
|
*/
|
|
export function listRps() {
|
|
return request({
|
|
url: `/api/rpTools`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 创建运行图*/
|
|
export function createRp(data) {
|
|
return request({
|
|
url: `/api/rpTools`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 删除运行图组
|
|
*/
|
|
export function deleteRp(groupId) {
|
|
return request({
|
|
url: `/api/rpTools/${groupId}`,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
/** 获取运行图配置*/
|
|
export function getRpConfig(planId) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/config`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 修改运行图配置*/
|
|
export function modifyRpConfig(planId, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/config`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 获取运行图数据*/
|
|
export function getRpTools(planId) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 添加车次*/
|
|
export function addRpTrip(planId, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/trip`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 删除车次*/
|
|
export function delRpTrip(planId, tripNo) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${tripNo}/trip`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 平移服务*/
|
|
export function translateRpService(planId, serviceNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${serviceNo}/service`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 删除服务*/
|
|
export function delRpService(planId, serviceNo) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${serviceNo}/service`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 添加区域*/
|
|
export function createRpArea(planId, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/area`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 修改区域*/
|
|
export function modifyRpArea(planId, areaNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${areaNo}/area`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 修改区域文字*/
|
|
export function modifyAreaNote(planId, areaNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${areaNo}/text`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
/** 删除区域*/
|
|
export function delRpArea(planId, areaNo) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${areaNo}/area`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 修改运行时间*/
|
|
export function justTripNoRunning(planId, tripNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${tripNo}/running`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 修改停站时间*/
|
|
export function justTripNoStop(planId, tripNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${tripNo}/stop`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 修改折返时间*/
|
|
export function justTripTurnBack(planId, tripNo, data) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/${tripNo}/turnBack`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 开始编辑*/
|
|
export function startRpEdit(planId) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/edit`,
|
|
method: 'put'
|
|
})
|
|
}
|
|
|
|
/** 开始编辑*/
|
|
export function endRpEdit(planId) {
|
|
return request({
|
|
url: `/api/rpTools/${planId}/endEdit`,
|
|
method: 'put'
|
|
})
|
|
}
|