diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index c0d477f54..63c48f6de 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -152,6 +152,23 @@ export function deleteRoutingData(routingId) { }); } +/** 保存用户配置 (新版)*/ +export function addRunplanConfig(mapId, data) { + return request({ + url: `/api/runPlan/userData/${mapId}/config`, + method: 'post', + data: data + }); +} + +/** 获取用户配置(新版)*/ +export function getRunplanConfig(mapId) { + return request({ + url: `/api/runPlan/userData/${mapId}/config`, + method: 'get' + }); +} + /** 获取交路详情(新版)*/ export function getRoutingData(routingId) { return request({ diff --git a/src/api/runplan.js b/src/api/runplan.js index dc09e67d0..c2d502c88 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -147,10 +147,19 @@ export function checkServiceNumberExist({ planId, serviceNumber }) { }); } -/** 查询交路列表*/ -export function getRoutingList(planId) { +// /** 查询交路列表*/ +// export function getRoutingList(planId) { +// return request({ +// url: `/api/runPlan/draft/${planId}/routingList`, +// method: 'get' +// }); +// } + +/** 查询用户交路数据 (新版)*/ +export function listUserRoutingData(mapId) { return request({ - url: `/api/runPlan/draft/${planId}/routingList`, + // url: `/api/mapBuild/${mapId}/routingData`, + url: `/api/runPlan/userData/${mapId}/routing`, method: 'get' }); } @@ -233,10 +242,19 @@ export function updatePlanTrip(data) { }); } -/** 根据车次号查询交路*/ +/** 根据车次号查询交路 */ export function getRoutingBySDTNumber(params) { + // 旧版 + // return request({ + // url: `/api/runPlan/draft/${params.planId}/routing`, + // method: 'get', + // params: { + // SDTNumber: params.SDTNumber + // } + // }); + // 新版 return request({ - url: `/api/runPlan/draft/${params.planId}/routing`, + url: `/api/runPlan/draft/${params.planId}/userRouting`, method: 'get', params: { SDTNumber: params.SDTNumber @@ -252,6 +270,15 @@ export function updateServiceNumber(planId, serviceNumber, newServiceNumber) { }); } +/** 生成计划(新版)*/ +export function generatePlanTrain(planId, data) { + return request({ + url: `/api/runPlan/draft/${planId}/service/generate`, + method: 'post', + data + }); +} + /** 修改任务车次号*/ export function updateTripNumber(planId, SDTNumber, tripNumber) { return request({ diff --git a/src/components/QueryListPage/DataForm.vue b/src/components/QueryListPage/DataForm.vue index f843a0365..e78e3c752 100644 --- a/src/components/QueryListPage/DataForm.vue +++ b/src/components/QueryListPage/DataForm.vue @@ -1,5 +1,5 @@