2019-07-26 13:32:43 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取运行图列表
|
|
|
|
*/
|
|
|
|
export function getRunPlanList() {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: '/api/runPlan/draft/tree',
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取地图速度等级列表
|
|
|
|
*/
|
|
|
|
export function getSpeedLevels(skinStyle) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${skinStyle}/speed`,
|
2019-08-02 14:31:29 +08:00
|
|
|
method: 'get'
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 新建地图速度等级列表
|
|
|
|
*/
|
|
|
|
export function newSpeedLevels(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: '/api/runPlan/draft/speed',
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取运行图的车站列表
|
|
|
|
*/
|
|
|
|
export function getStationList(mapId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/station/${mapId}`,
|
2019-08-02 14:31:29 +08:00
|
|
|
method: 'get'
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 通过皮肤获取运行图车站列表
|
|
|
|
*/
|
|
|
|
export function getStationListBySkinStyle(skinStyle) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/station/${skinStyle}/bySkin`,
|
2019-08-02 14:31:29 +08:00
|
|
|
method: 'get'
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 创建运行图
|
|
|
|
*/
|
|
|
|
export function newRunPlan(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: '/api/runPlan/draft',
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询运行图获取数据
|
|
|
|
*/
|
|
|
|
export function queryRunPlan(planId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除运行图
|
|
|
|
*/
|
|
|
|
export function deleteRunPlan(planId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 发布运行图
|
|
|
|
*/
|
|
|
|
export function publishRunPlan(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/publish`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 导入真实运行图
|
|
|
|
*/
|
|
|
|
export function importRunPlan(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.skinStyle}/prdPlan`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data.runPlanList
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取运行图停车点列表*/
|
|
|
|
export function getRunPlanStopPointList(skinStyle) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/stopPoint/${skinStyle}`,
|
2019-08-02 14:31:29 +08:00
|
|
|
method: 'get'
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 运行图*/
|
|
|
|
export function getRpListByMapId(mapId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${mapId}/list`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取站间运行时间*/
|
|
|
|
export function getStationRunning(skinStyle) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${skinStyle}/stationRunning`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 设置站间运行时间*/
|
|
|
|
export function setStationRunning(skinStyle, data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${skinStyle}/stationRunning`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'put',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 创建运行图*/
|
|
|
|
export function createEmptyPlan(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 查询运行图服务号是否存在*/
|
|
|
|
export function checkServiceNumberExist({ planId, serviceNumber }) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}/${serviceNumber}/service`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 查询交路列表*/
|
|
|
|
export function getRoutingList(planId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}/routingList`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 根据交路查询交路区段列表*/
|
|
|
|
export function querySectionListByRouting({ planId, routingCode }) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 有效性检查*/
|
|
|
|
export function planEffectiveCheck(planId) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}/check`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 增加计划*/
|
|
|
|
export function addPlanService(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/service`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
2019-08-02 14:31:29 +08:00
|
|
|
data: data
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 删除计划*/
|
|
|
|
export function deletePlanService(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 复制计划*/
|
|
|
|
export function duplicateService(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 修改计划*/
|
|
|
|
// export function updatePlanService(data) {
|
|
|
|
// return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
// url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
// method: 'put',
|
|
|
|
// data: data
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
|
|
|
|
/** 增加任务*/
|
|
|
|
export function addPlanTrip(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/${data.serviceNumber}/trip`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'post',
|
2019-08-02 14:31:29 +08:00
|
|
|
data: data
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 删除任务*/
|
|
|
|
export function deletePlanTrip(params) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${params.planId}/trip/${params.SDTNumber}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'delete',
|
|
|
|
params: { deleteBefore: params.deleteBefore }
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 修改任务*/
|
|
|
|
export function updatePlanTrip(data) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${data.planId}/trip/${data.SDTNumber}`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'put',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 根据车次号查询交路*/
|
|
|
|
export function getRoutingBySDTNumber(params) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${params.planId}/routing`,
|
2019-07-26 13:32:43 +08:00
|
|
|
method: 'get',
|
|
|
|
params: {
|
|
|
|
SDTNumber: params.SDTNumber
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 运行图仿真测试*/
|
|
|
|
export function runPlanNotify({ planId }) {
|
|
|
|
return request({
|
2019-08-13 17:46:59 +08:00
|
|
|
url: `/api/runPlan/draft/${planId}/simulation`,
|
2019-08-02 14:31:29 +08:00
|
|
|
method: 'get'
|
2019-07-26 13:32:43 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取运行计划模板列表*/
|
|
|
|
export function runPlanTemplateList(params) {
|
|
|
|
return request({
|
|
|
|
url: '/api/runPlan/template',
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 删除运行图模板*/
|
|
|
|
export function deleteRunPlanTemplate(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/template/${planId}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 生成通用每日运行图*/
|
|
|
|
export function generateCommonRunPlanEveryDay(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/template/generate/${planId}`,
|
|
|
|
method: 'post'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 生成用户每日运行图*/
|
|
|
|
export function generateUserRunPlanEveryDay(planId, group) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/privilege/${planId}?group=${group}`,
|
|
|
|
method: 'post'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
/** 获取运行计划每日列表*/
|
|
|
|
export function runPlanEveryDayList(params) {
|
|
|
|
return request({
|
|
|
|
url: '/api/runPlan/daily',
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 删除运行图每日计划*/
|
|
|
|
export function deleteRunPlanEveryDay(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/${planId}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取地图运行图的车次号*/
|
|
|
|
export function getPublishMapTrainNos(skinStyle) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/${skinStyle}/trainNos`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 获取服务号、车组号*/
|
|
|
|
export function getPublishMapTrainServerNos(skinStyle) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/${skinStyle}/serverNos`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 分页查询加载计划*/
|
|
|
|
export function getRunPlanLoadList(params) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/runPlanLoad`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 创建加载计划*/
|
|
|
|
export function createRunPlanLoad(data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/runPlanLoad`,
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 管理创建通用加载计划*/
|
|
|
|
export function createRunPlanCommon(data) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/runPlanLoad/common`,
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 删除加载计划*/
|
|
|
|
export function deleteRunPlanLoad(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/runPlanLoad/${planId}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 查询模板运行图数据*/
|
|
|
|
export function queryRunPlanTemplate(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/template/${planId}`,
|
|
|
|
method: 'get'
|
2019-08-02 14:31:29 +08:00
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** 查询当日运行图数据*/
|
|
|
|
export function queryRunPlanDaily(planId) {
|
|
|
|
return request({
|
|
|
|
url: `/api/runPlan/daily/${planId}`,
|
|
|
|
method: 'get'
|
2019-08-02 14:31:29 +08:00
|
|
|
});
|
|
|
|
}
|