diff --git a/src/api/jmap/lessondraft.js b/src/api/jmap/lessondraft.js index 23b7c3322..a199cbb53 100644 --- a/src/api/jmap/lessondraft.js +++ b/src/api/jmap/lessondraft.js @@ -2,111 +2,103 @@ import request from '@/utils/request'; /** 获取课程树*/ export function getLessonTree(skinCode) { - return request({ - url: `/api/lessonDraft/${skinCode}/tree`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/${skinCode}/tree`, + method: 'get' + }); } /** 获取课程详细内容*/ export function getLessonDetail(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'get' + }); } /** 创建课程*/ export function createLesson(data) { - return request({ - url: '/api/lessonDraft', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft', + method: 'post', + data: data + }); } /** 从发布课程创建*/ export function createLessonFromPublish(data) { - return request({ - url: '/api/lessonDraft/createForm', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft/createForm', + method: 'post', + data: data + }); } /** 更新课程*/ export function updateLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'put', + data: data + }); } /** 删除课程*/ export function delLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'delete', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'delete', + data: data + }); } /** 创建课程章节*/ export function createLessonChapter(data) { - return request({ - url: `/api/lessonDraft/${data.lessonId}/chapter`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.lessonId}/chapter`, + method: 'post', + data: data + }); } /** 更新课程章节*/ export function updateLessonChapter(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'put', + data: data + }); } /** 创建课程章节详细内容*/ export function getLessonChapterDetail(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'get' + }); } /** 发布课程*/ export function publishLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}/publish`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}/publish`, + method: 'post', + data: data + }); } /** 课程章节拖拽排序*/ export function dragSortLessonChapter(data) { - return request({ - url: '/api/lessonDraft/dragSort', - method: 'put', - data: data - }); -} - -/** 根据lessonId获取课程名称*/ -export function getLessonNameByMapIdAndLessonId(model) { - return request({ - url: `/api/lessonDraft/${model.mapId}/${model.lessonId}`, - method: 'get' - }); + return request({ + url: '/api/lessonDraft/dragSort', + method: 'put', + data: data + }); } export function getLessonDrftList(params) { - return request({ - url: `/api/lessonDraft`, - method: 'get', - params: params - }); + return request({ + url: `/api/lessonDraft`, + method: 'get', + params: params + }); } diff --git a/src/api/runplan.js b/src/api/runplan.js index b2235dfb0..8ef1d184b 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -4,317 +4,307 @@ import request from '@/utils/request'; * 获取运行图列表 */ export function getRunPlanList() { - return request({ - url: '/api/runPlan/draft/tree', - method: 'get' - }); + return request({ + url: '/api/runPlan/draft/tree', + method: 'get' + }); } /** * 获取地图速度等级列表 */ export function getSpeedLevels(skinCode) { - return request({ - url: `/api/runPlan/draft/${skinCode}/speed`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${skinCode}/speed`, + method: 'get' + }); } /** * 新建地图速度等级列表 */ export function newSpeedLevels(data) { - return request({ - url: '/api/runPlan/draft/speed', - method: 'post', - data: data - }); + return request({ + url: '/api/runPlan/draft/speed', + method: 'post', + data: data + }); } /** * 获取运行图的车站列表 */ export function getStationList(mapId) { - return request({ - url: `/api/runPlan/draft/station/${mapId}`, - method: 'get' - }); -} - -/** - * 通过皮肤获取运行图车站列表 - */ -export function getStationListBySkinCode(skinCode) { - return request({ - url: `/api/runPlan/draft/station/${skinCode}/bySkin`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/station/${mapId}`, + method: 'get' + }); } /** * 创建运行图 */ export function newRunPlan(data) { - return request({ - url: '/api/runPlan/draft', - method: 'post', - data: data - }); + return request({ + url: '/api/runPlan/draft', + method: 'post', + data: data + }); } /** * 查询运行图获取数据 */ export function queryRunPlan(planId) { - return request({ - url: `/api/runPlan/draft/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}`, + method: 'get' + }); } // 根据skinCode查询发布运行图列表 export function queryRunPlanList(skinCode) { - return request({ - url: `/api/runPlan/template/skin/${skinCode}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/template/skin/${skinCode}`, + method: 'get' + }); } // 从发布运行图创建新运行图 export function postCreatePlan(data) { - return request({ - url: `/api/runPlan/draft/createFrom/${data.templateId}`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/createFrom/${data.templateId}`, + method: 'post', + data: data + }); } // 删除运行图 export function deleteRunPlan(planId) { - return request({ - url: `/api/runPlan/draft/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/draft/${planId}`, + method: 'delete' + }); } // 修改运行图内容 export function putRunPlanDetail(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}`, - method: 'put', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}`, + method: 'put', + data: data + }); } /** * 发布运行图 */ export function publishRunPlan(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/publish`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/publish`, + method: 'post', + data: data + }); } /** * 导入真实运行图 */ export function importRunPlan(data) { - return request({ - url: `/api/runPlan/draft/${data.skinCode}/prdPlan`, - method: 'post', - data: data.runPlanList - }); + return request({ + url: `/api/runPlan/draft/${data.skinCode}/prdPlan`, + method: 'post', + data: data.runPlanList + }); } /** 获取运行图停车点列表*/ export function getRunPlanStopPointList(skinCode) { - return request({ - url: `/api/runPlan/draft/stopPoint/${skinCode}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/stopPoint/${skinCode}`, + method: 'get' + }); } /** 运行图*/ export function getRpListByMapId(mapId) { - return request({ - url: `/api/runPlan/draft/${mapId}/list`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${mapId}/list`, + method: 'get' + }); } /** 获取站间运行时间*/ export function getStationRunning(skinCode) { - return request({ - url: `/api/runPlan/draft/${skinCode}/stationRunning`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${skinCode}/stationRunning`, + method: 'get' + }); } /** 设置站间运行时间*/ export function setStationRunning(skinCode, data) { - return request({ - url: `/api/runPlan/draft/${skinCode}/stationRunning`, - method: 'put', - data: data - }); + return request({ + url: `/api/runPlan/draft/${skinCode}/stationRunning`, + method: 'put', + data: data + }); } /** 创建运行图*/ export function createEmptyPlan(data) { - return request({ - url: `/api/runPlan/draft`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft`, + method: 'post', + data: data + }); } /** 查询运行图服务号是否存在*/ export function checkServiceNumberExist({ planId, serviceNumber }) { - return request({ - url: `/api/runPlan/draft/${planId}/${serviceNumber}/service`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/${serviceNumber}/service`, + method: 'get' + }); } /** 查询交路列表*/ export function getRoutingList(planId) { - return request({ - url: `/api/runPlan/draft/${planId}/routingList`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/routingList`, + method: 'get' + }); } /** 根据交路查询交路区段列表*/ export function querySectionListByRouting({ planId, routingCode }) { - return request({ - url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`, + method: 'get' + }); } /** 有效性检查*/ export function planEffectiveCheck(planId) { - return request({ - url: `/api/runPlan/draft/${planId}/check`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/check`, + method: 'get' + }); } /** 增加计划*/ export function addPlanService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service`, + method: 'post', + data: data + }); } /** 删除计划*/ export function deletePlanService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, + method: 'delete' + }); } /** 复制计划*/ export function duplicateService(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}`, + method: 'post', + data: data + }); } /** 增加任务*/ export function addPlanTrip(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/${data.serviceNumber}/trip`, - method: 'post', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/${data.serviceNumber}/trip`, + method: 'post', + data: data + }); } /** 删除任务*/ export function deletePlanTrip(params) { - return request({ - url: `/api/runPlan/draft/${params.planId}/trip/${params.SDTNumber}`, - method: 'delete', - params: { deleteBefore: params.deleteBefore } - }); + return request({ + url: `/api/runPlan/draft/${params.planId}/trip/${params.SDTNumber}`, + method: 'delete', + params: { deleteBefore: params.deleteBefore } + }); } /** 修改任务*/ export function updatePlanTrip(data) { - return request({ - url: `/api/runPlan/draft/${data.planId}/trip/${data.SDTNumber}`, - method: 'put', - data: data - }); + return request({ + url: `/api/runPlan/draft/${data.planId}/trip/${data.SDTNumber}`, + method: 'put', + data: 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`, + method: 'get', + params: { + SDTNumber: params.SDTNumber + } + }); } /** 运行图仿真测试*/ export function runPlanNotify({ planId }) { - return request({ - url: `/api/runPlan/draft/${planId}/simulation`, - method: 'get' - }); + return request({ + url: `/api/runPlan/draft/${planId}/simulation`, + method: 'get' + }); } /** 获取运行计划模板列表*/ export function runPlanTemplateList(params) { - return request({ - url: '/api/runPlan/template', - method: 'get', - params: params - }); + return request({ + url: '/api/runPlan/template', + method: 'get', + params: params + }); } /** 删除运行图模板*/ export function deleteRunPlanTemplate(planId) { - return request({ - url: `/api/runPlan/template/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/template/${planId}`, + method: 'delete' + }); } /** 生成通用每日运行图*/ export function generateCommonRunPlanEveryDay(planId, params) { - return request({ - url: `/api/runPlan/template/generate/${planId}`, - method: 'post', - params - }); + return request({ + url: `/api/runPlan/template/generate/${planId}`, + method: 'post', + params + }); } /** 获取运行计划每日列表*/ export function runPlanEveryDayList(params) { - return request({ - url: '/api/runPlan/daily', - method: 'get', - params: params - }); + return request({ + url: '/api/runPlan/daily', + method: 'get', + params: params + }); } /** 删除运行图每日计划*/ export function deleteRunPlanEveryDay(planId) { - return request({ - url: `/api/runPlan/daily/${planId}`, - method: 'delete' - }); + return request({ + url: `/api/runPlan/daily/${planId}`, + method: 'delete' + }); } /** 获取地图运行图的车次号*/ @@ -327,91 +317,91 @@ export function deleteRunPlanEveryDay(planId) { /** 分页查询加载计划*/ export function getRunPlanLoadList(params) { - return request({ - url: `/api/runPlan/daily/runPlanLoad`, - method: 'get', - params: 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 - }); + 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 - }); + 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' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${planId}`, + method: 'delete' + }); } /** 查询模板运行图数据*/ export function queryRunPlanTemplate(planId) { - return request({ - url: `/api/runPlan/template/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/template/${planId}`, + method: 'get' + }); } /** 查询当日运行图数据*/ export function queryRunPlanDaily(planId) { - return request({ - url: `/api/runPlan/daily/${planId}`, - method: 'get' - }); + return request({ + url: `/api/runPlan/daily/${planId}`, + method: 'get' + }); } /** 获取模板运行图列表*/ export function listAllTempLateRunPlan() { - return request({ - url: `/api/runPlan/template/all`, - method: 'get' - }); + return request({ + url: `/api/runPlan/template/all`, + method: 'get' + }); } // 删除加载计划 export function deleteDailyRunPlanLoad(id) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/${id}`, - method: 'DELETE' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${id}`, + method: 'DELETE' + }); } // 从加载计划创建每日计划 export function postDailyRunPlanLoadGenerate(id) { - return request({ - url: `/api/runPlan/daily/runPlanLoad/${id}/generate`, - method: 'post' - }); + return request({ + url: `/api/runPlan/daily/runPlanLoad/${id}/generate`, + method: 'post' + }); } // 加载通用排班计划 export function postSchedulingCommonGenerate(mapId) { - return request({ - url: `/api/scheduling/common/generate?mapId=${mapId}`, - method: 'post' - }); + return request({ + url: `/api/scheduling/common/generate?mapId=${mapId}`, + method: 'post' + }); } // 从加载计划创建每日计划 export function postRunPlanTemplate(data) { - return request({ - url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`, - method: 'post' - }); -} \ No newline at end of file + return request({ + url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`, + method: 'post' + }); +} diff --git a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue index f9b4ff067..f43d889ec 100644 --- a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue @@ -19,127 +19,128 @@