diff --git a/src/api/company.js b/src/api/company.js index 1f7b00ea5..b39fcd373 100644 --- a/src/api/company.js +++ b/src/api/company.js @@ -22,13 +22,7 @@ export function deleteCompany(id) { method: 'delete' }); } -// /** 根据id查询公司信心 */ -// export function getCompanyById(id) { -// return request({ -// url: `/api/company/${id}`, -// method: 'get' -// }); -// } + /** 更新公司信息 */ export function updateCompany(id, data) { return request({ diff --git a/src/api/competition.js b/src/api/competition.js index 7f90c7908..248589fd9 100644 --- a/src/api/competition.js +++ b/src/api/competition.js @@ -7,20 +7,7 @@ export function refereeExitSimulation(group) { method: 'delete' }); } -// /** 裁判进入仿真 */ -// export function refereeEnterSimulation(group) { -// return request({ -// url: `/api/v1/competition/room/${group}/refree`, -// method: 'post' -// }); -// } -// /** 裁判查询竞赛人员的房间列表 */ -// export function refereeGetCompetitionList(id) { -// return request({ -// url: `/api/v1/competition/${id}/room`, -// method: 'get' -// }); -// } + /** 参赛者创建演练房间 */ export function participantCreatTrainingRoom(id, data) { return request({ @@ -30,23 +17,6 @@ export function participantCreatTrainingRoom(id, data) { }); } -// // 加载试卷 -// export function loadingPaper(competitionId, data) { -// return request({ -// url: `/api/v1/competition/${competitionId}/testPaper`, -// method: 'post', -// data -// }); -// } -// /** 竞赛报名 */ -// export function postSignUp(id, data) { -// return request({ -// url: `/api/race/${id}/signUp`, -// method: 'post', -// data -// }); -// } - /** 查询用户是否已经报名该竞赛 */ export function getIsSignUp(raceId, params = {}) { return request({ @@ -56,24 +26,6 @@ export function getIsSignUp(raceId, params = {}) { }); } -// /** 分页查询竞赛报名人员 */ -// export function getRaceUserList(params) { -// return request({ -// url: `/api/race/${params.raceId}/raceUser/page`, -// method: 'get', -// params -// }); -// } - -// /** 裁判打分 */ -// export function putRefereeScoring(data) { -// return request({ -// url: `/api/v1/competition/referee/scoring`, -// method: 'put', -// data -// }); -// } - /** 提交试卷 */ export function postCompetitionTheory(data) { return request({ @@ -83,14 +35,6 @@ export function postCompetitionTheory(data) { }); } -// /** 查询本竞赛用的实操列表 */ -// export function getCompetitionPractical(competitionId) { -// return request({ -// url: `/api/v1/competitionPractical/competition/${competitionId}`, -// method: 'get' -// }); -// } - /** 查询竞赛报名人员详情 */ export function getRaceUserById(raceId) { return request({ @@ -169,68 +113,6 @@ export function getPracticalCompetitionResult(competitionId) { }); } -// /** 回访准备 */ -// export function playBackReady(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/ready`, -// method: 'get', -// params -// }); -// } - -// /** 设置倍速 */ -// export function setPlaySpeed(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/setPlaySpeed`, -// method: 'get', -// params -// }); -// } - -// /** 开始播放 */ -// export function startPlaying(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/startPlaying`, -// method: 'get', -// params -// }); -// } - -// /** 暂停播放 */ -// export function playingPause(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/pausePlaying`, -// method: 'get', -// params -// }); -// } - -// /** 结束播放 */ -// export function endPlaying(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/endPlaying`, -// method: 'get', -// params -// }); -// } - -// /** 从暂停中播放 */ -// export function fromPauseToPlay(params) { -// return request({ -// url: `/api/v1/simulationRecord/playback/playing`, -// method: 'get', -// params -// }); -// } - -// /** 裁判查询理论考试结果 */ -// export function getTheroyCompetitionResult(competitionId, raceUserId) { -// return request({ -// url: `api/v1/competitionTheory/detail/competition/${competitionId}/raceUser/${raceUserId}`, -// method: 'get' -// }); -// } - // 以下drts项目使用 /** 项目获取试题列表 */ diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js index 69207233b..985d6a6e8 100644 --- a/src/api/designPlatform.js +++ b/src/api/designPlatform.js @@ -138,14 +138,6 @@ export function previewRunPlan(planId) { }); } -// /** 加载剧本 */ -// export function loadDraftScript(scriptId, memberId, group) { -// return request({ -// url: `/api/simulation/${group}/scriptDraft/${scriptId}?memberId=${memberId}`, -// method: 'post' -// }); -// } - /** 剧本预览选择角色 */ export function loadDraftScriptNew(memberId, group) { return request({ @@ -153,12 +145,3 @@ export function loadDraftScriptNew(memberId, group) { method: 'put' }); } - -// /** 剧本预览选择角色 */ -// export function loadDraftScriptNewMode(memberId, group, mode) { -// return request({ -// url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`, -// method: 'put' -// }); -// } - diff --git a/src/api/jmap/lessondraft.js b/src/api/jmap/lessondraft.js index 22703fccb..e1a1475ec 100644 --- a/src/api/jmap/lessondraft.js +++ b/src/api/jmap/lessondraft.js @@ -85,15 +85,6 @@ export function getLessonChapterDetail(data) { }); } -// /** 发布课程*/ -// export function publishLesson(data) { -// return request({ -// url: `/api/lessonDraft/${data.id}/publish`, -// method: 'post', -// data: data -// }); -// } - /** 课程章节拖拽排序*/ export function dragSortLessonChapter(data) { return request({ diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js index dfc52e5bc..9acfc87ba 100644 --- a/src/api/jmap/map.js +++ b/src/api/jmap/map.js @@ -16,14 +16,6 @@ export function getPublishMapListOnline() { }); } -// /** 根据皮肤获取发布地图列表*/ -// export function getPublishMapListByLineCode(lineCode) { -// return request({ -// url: `/api/map/${lineCode}/list`, -// method: 'get' -// }); -// } - /** 根据地图id获取地图版本信息*/ export function getPublishMapVersionById(id) { return request({ @@ -107,15 +99,6 @@ export function putMapOffLine(mapId) { }); } -// /** 修改发布地图名称*/ -// export function updatePublishMapName(data) { -// return request({ -// url: `/api/map/${data.mapId}/updateName`, -// method: 'put', -// data: data -// }); -// } - // 检测地图名称唯一性 export function checkMapName(name) { return request({ @@ -133,23 +116,6 @@ export function getPublishMapDetailList(params, code) { }); } -// /** 获取有屏蔽门的站台列表*/ -// export function hasDoorStationList(mapId) { -// return request({ -// url: `/api/map/${mapId}/stand/hasDoor`, -// method: 'get' -// }); -// } - -// /** 修改发布地图城市*/ -// export function updatePublishMapCity(data) { -// return request({ -// url: `/api/map/${data.mapId}/city`, -// method: 'put', -// data: data -// }); -// } - // 修改地图基本信息 export function updatePublishMapInfo(data) { return request({ @@ -263,14 +229,6 @@ export function publisMapCityList(data) { }); } -// // 获取所有需要值班员的车站(新版) -// export function getAvailableStaionList(mapId) { -// return request({ -// url: `/api/map/${mapId}/station/needSupervisor`, -// method: 'get' -// }); -// } - /** 新版地图根据仿真mapId获取仿真地图数据 */ export function getNewMapDataByMapId(mapId) { return request({ diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index 96e720eb1..0332b4ef4 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -60,15 +60,6 @@ export function saveMap(data) { }); } -// 保存新草稿地图 -// export function saveNewMap(data) { -// return request({ -// url: `/api/mapBuild/${data.mapId}/saveNewElements`, -// method: 'post', -// data: data -// }); -// } - /** 草稿地图另存为*/ export function saveAsMap(data) { return request({ @@ -124,78 +115,6 @@ export function getBuildMapExport(mapId) { }); } -// /** 查询进路列表*/ -// export function listRouteRoute(mapId, params) { -// return request({ -// url: `/api/mapBuild/${mapId}/route`, -// method: 'get', -// params: params -// }); -// } -// /** 查询进路地图列表*/ -// export function listRouteMapRoute(mapId) { -// return request({ -// url: `/api/mapBuild/${mapId}/route/all`, -// method: 'get' -// }); -// } -// /** 查询进路明细*/ -// export function queryRouteRouteDetail(data) { -// return request({ -// url: `/api/mapBuild/route/${data.id}`, -// method: 'get' -// }); -// } -// /** 创建进路*/ -// export function createRouteRoute(data) { -// return request({ -// url: `/api/mapBuild/route`, -// method: 'post', -// data: data -// }); -// } -// /** 删除进路*/ -// export function deleteRouteRoute(id) { -// return request({ -// url: `/api/mapBuild/route/${id}`, -// method: 'delete' -// }); -// } -// /** 更新进路*/ -// export function updateRouteRoute(data) { -// return request({ -// url: `/api/mapBuild/route/${data.id}`, -// method: 'put', -// data: data -// }); -// } - -// /** 创建联动道岔*/ -// export function createLinkageSwitch(data) { -// return request({ -// url: `/api/mapBuild/switchCoupled`, -// method: 'post', -// data: data -// }); -// } - -// /** 删除联动道岔*/ -// export function deleteLinkageSwitch(coupleId) { -// return request({ -// url: `/api/mapBuild/switchCoupled/${coupleId}`, -// method: 'delete' -// }); -// } - -// /** get联动道岔列表*/ -// export function listLinkageSwitch(mapId, params) { -// return request({ -// url: `/api/mapBuild/${mapId}/switchCoupled`, -// method: 'get', -// params: params -// }); -// } - /** 草稿地图数据校验*/ export function verifyMap(id) { return request({ @@ -204,49 +123,6 @@ export function verifyMap(id) { }); } -// /** 分页查询交路数据*/ -// export function listRouting(mapId, params) { -// return request({ -// url: `/api/mapBuild/${mapId}/routing`, -// method: 'get', -// params: params -// }); -// } - -// /** 创建交路*/ -// export function addRouting(data) { -// return request({ -// url: `/api/mapBuild/routing`, -// method: 'post', -// data: data -// }); -// } - -// /** 删除交路*/ -// export function deleteRouting(routingId) { -// return request({ -// url: `/api/mapBuild/routing/${routingId}`, -// method: 'delete' -// }); -// } - -// /** 获取交路详情*/ -// export function getRouting(routingId) { -// return request({ -// url: `/api/mapBuild/routing/${routingId}`, -// method: 'get' -// }); -// } - -// /** 更新交路*/ -// export function updateRouting(data) { -// return request({ -// url: `/api/mapBuild/routing/${data.id}`, -// method: 'put', -// data: data -// }); -// } - /** 分页查询交路数据(新版)*/ export function listRoutingData(mapId, params) { return request({ @@ -307,49 +183,6 @@ export function generateStationRunData(routingId) { }); } -// // 创建自动信号 old(旧数据) -// export function postAutoSignal(data) { -// return request({ -// url: `/api/mapBuild/autoSignal`, -// method: 'post', -// data: data -// }); -// } - -// // 删除自动信号 old(旧数据) -// export function delAutoSignal(autoSignalId) { -// return request({ -// url: `/api/mapBuild/autoSignal/${autoSignalId}`, -// method: 'delete' -// }); -// } - -// // 分页获取自动信号列表 old(旧数据) -// export function getAutoSignalList(mapId, params) { -// return request({ -// url: `/api/mapBuild/${mapId}/autoSignal`, -// method: 'get', -// params -// }); -// } - -// // 获取自动信号详情 old(旧数据) -// export function getAutoSignalDetail(autoSignalId) { -// return request({ -// url: `/api/mapBuild/autoSignal/${autoSignalId}`, -// method: 'get' -// }); -// } - -// // 更新自动信号 old(旧数据) -// export function putAutoSignal(data) { -// return request({ -// url: `/api/mapBuild/autoSignal/${data.autoSignalId}`, -// method: 'put', -// data: data -// }); -// } - // 分页获取自动信号列表 new(新数据) export function getAutoSignalListNew(mapId, params) { return request({ @@ -392,14 +225,6 @@ export function putAutoSignalNew(data) { data: data }); } - -// export function getListByCityCode(cityCode) { -// return request({ -// url: `/api/mapBuild/${cityCode}/list`, -// method: 'get' -// }); -// } - // 创建信号机接近区段 export function postApproachSection(data) { return request({ @@ -464,12 +289,6 @@ export function delContinueProtect(id) { method: 'delete' }); } -// export function getContinueProtectById(id) { -// return request({ -// url: `/api/mapBuild/overlap/${id}`, -// method: 'get' -// }); -// } export function getContinueProtectList(mapId, params) { return request({ url: `/api/mapBuild/${mapId}/overlap/paging`, @@ -545,15 +364,6 @@ export function getRouteNewList(mapId, params) { params }); } -// // 获取自动折返分组列表 -// export function getAutoReentryGroupList(mapId, params) { -// return request({ -// url: `/api/mapBuild/${mapId}/autoReentry/group/reentryTrack`, -// method: 'get', -// params -// }); -// } - // 新建进路侧防 export function postFlankProtection(data) { return request({ diff --git a/src/api/jmap/pathunit.js b/src/api/jmap/pathunit.js index 0fcad2fbc..c5bc487f2 100644 --- a/src/api/jmap/pathunit.js +++ b/src/api/jmap/pathunit.js @@ -1,44 +1,2 @@ // import request from '@/utils/request'; -// /** 获取路径单元列表*/ -// export function getRouteUnitList(id, data) { -// return request({ -// url: `/api/mapBuild/${id}/routeUnit`, -// method: 'get', -// params: data -// }); -// } - -// /** 创建路径单元*/ -// export function addRouteUnit(data) { -// return request({ -// url: `/api/mapBuild/routeUnit`, -// method: 'post', -// data: data -// }); -// } - -// /** 删除路径单元*/ -// export function delRouteUnit(id) { -// return request({ -// url: `/api/mapBuild/routeUnit/${id}`, -// method: 'DELETE' -// }); -// } - -// /** 获取路径单元*/ -// export function getRouteUnit(id) { -// return request({ -// url: `/api/mapBuild/routeUnit/${id}`, -// method: 'get' -// }); -// } - -// /** 更新路径单元*/ -// export function setRouteUnit(data) { -// return request({ -// url: `/api/mapBuild/routeUnit/${data.id}`, -// method: 'put', -// data: data -// }); -// } diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index ef1223a03..280a8c200 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -1,29 +1,5 @@ import request from '@/utils/request'; -// /** 开始实训 0*/ -// export function startTraining(args, group) { -// return request({ -// url: `/api/training/${args.id}/start`, -// method: 'get', -// params: { -// group -// } -// }); -// } - -// /** 实训结束*/ -// export function endTraining(args, group) { -// return request({ -// url: `/api/training/${args.lessonId}/${args.id}/end`, -// method: 'get', -// params: { -// mode: args.mode, -// usedTime: args.usedTime, -// group -// } -// }); -// } - /** 发送步骤数据*/ export function sendTrainingNextStep(data, group) { return request({ @@ -35,32 +11,6 @@ export function sendTrainingNextStep(data, group) { } }); } -// /** 获取章节基本信息 0*/ -// export function getTrainingDetail(trainingId) { -// return request({ -// url: `/api/training/${trainingId}`, -// method: 'get' -// }); -// } - -// /** 添加实训 0*/ -// export function addTraining(data) { -// return request({ -// url: '/api/training', -// method: 'post', -// data: data -// }); -// } - -// /** 获取实训步骤数据 0*/ -// export function getTrainingStepsDetail(trainingId, params) { -// return request({ -// url: `/api/training/${trainingId}/detail`, -// method: 'get', -// params: params -// }); -// } - /** 查询实训列表 0*/ export function pageQueryTraining(params) { return request({ @@ -69,41 +19,6 @@ export function pageQueryTraining(params) { params: params }); } -// /** 自动生成实训操作 0*/ -// export function addAutoTraining(data) { -// return request({ -// url: `/api/training/generate`, -// method: 'post', -// data: data -// }); -// } - -// /** 修改自动删除实训操作 0*/ -// export function updateAutoTraining(data) { -// return request({ -// url: `/api/training/batchUpdateGenerate`, -// method: 'put', -// data: data -// }); -// } -// /** 删除自动生成实训 0*/ -// export function deleteAutoTraining(params) { -// return request({ -// url: `/api/training/generate`, -// method: 'delete', -// params: params -// }); -// } - -// /** 获取用户实训列表 0*/ -// export function getTrainingList(data) { -// return request({ -// url: `/api/training/list`, -// method: 'get', -// params: data -// }); -// } - export function sendCommand(group, command) { return request({ url: `/api/training/deviceChange?group=${group}`, @@ -125,29 +40,6 @@ export function sendCommandNew(group, commandDefinitionId, command) { data: command }); } -// // 添加用户实训数据 0 -// export function addUserTraining(data) { -// return request({ -// url: `/api/training/userTraining`, -// method: 'post', -// data: data -// }); -// } -// // 更新用户实训数据 0 -// export function putUserTraining(data) { -// return request({ -// url: `/api/training/userTraining/${data.id}`, -// method: 'put', -// data: data -// }); -// } -// // 清除实训数据 0 -// export function deleteUserTraining(statsId) { -// return request({ -// url: `/api/training/userTraining/${statsId}`, -// method: 'delete' -// }); -// } /** 开始实训 (新版地图) */ export function startTrainingNew (args, group) { diff --git a/src/api/jointTraining.js b/src/api/jointTraining.js index 722c3acc0..ebd203cff 100644 --- a/src/api/jointTraining.js +++ b/src/api/jointTraining.js @@ -1,34 +1,5 @@ import request from '@/utils/request'; -// // 文字聊天 发送文字 -// export function chatWithTextNew(data, group) { -// return request({ -// url: `/api/v1/jointTraining/chatWithText?group=${group}`, -// method: 'post', -// data: { -// message: data -// } -// }); -// } - -// // 生成分发二维码 -// export function getJoinTrainCodeNew(data, group) { -// return request({ -// url: `/api/v1/jointTraining/qrCode?group=${group}`, -// method: 'post', -// data: data -// }); -// } - -// // 创建房间 -// export function postCreateRoomNew(data) { -// return request({ -// url: `/api/v1/jointTraining/room`, -// method: 'post', -// data: data -// }); -// } - // 检查房间存在 export function checkRoomExistNew(params) { return request({ @@ -38,45 +9,6 @@ export function checkRoomExistNew(params) { }); } -// // 获取房间详情 -// export function postRoomDetailNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}`, -// method: 'get' -// }); -// } - -// // 销毁房间 -// export function deljointTrainRoomNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room`, -// method: 'delete', -// params: { -// group: group -// } -// }); -// } - -// // 查询有权限房间列表 -// export function getjointTrainListNew(params) { -// return request({ -// url: `/api/v1/jointTraining/room/list`, -// method: 'get', -// params: params -// }); -// } - -// // 加入房间 -// export function getjointTrainingNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/join`, -// method: 'put', -// params: { -// group: group -// } -// }); -// } - // 设置人员角色 export function putUserRolesNew(data, group) { return request({ @@ -86,70 +18,6 @@ export function putUserRolesNew(data, group) { }); } -// // 获取房间里的用户列表 -// export function getJointTrainRoomUserListNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}/user/list`, -// method: 'get' -// }); -// } - -// // 离开房间接口 -// export function putJointTrainingExitNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/exit`, -// method: 'put', -// params: { -// group: group -// } -// }); -// } - -// // 开始联合演练 -// export function startJointTrainingNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/simulation`, -// method: 'post', -// params: { -// group: group -// } -// }); -// } - -// // 获取个人信息 -// export function getUserRolesNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/user/role`, -// method: 'get', -// params: { -// group: group -// } -// }); -// } - -// // 踢出用户 -// export function putJointTrainingUserkickedNew(userId, group) { -// return request({ -// url: `/api/v1/jointTraining/room/user`, -// method: 'put', -// params: { -// userId: userId, -// group: group -// } -// }); -// } - -// // 管理员结束所有人的仿真 -// export function putJointTrainingSimulationNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/simulation/all`, -// method: 'put', -// params: { -// group: group -// } -// }); -// } - // 结束仿真返回房间 export function putJointTrainingSimulationUserNew(group) { return request({ @@ -160,82 +28,3 @@ export function putJointTrainingSimulationUserNew(group) { } }); } - -// // 进入仿真 -// export function putJointTrainingSimulationEntranceNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/simulation/user/entrance`, -// method: 'put', -// params: { -// group: group -// } -// }); -// } - -// /** -// * 权限获取(房间权限) -// */ -// export function getPermissionJointNew(group) { -// return request({ -// url: '/api/v1/jointTraining/qrCode', -// method: 'get', -// params: { -// group: group -// } -// }); -// } - -// // 添加或更新真实设备和仿真对象连接 -// export function setRealDeviceNew(group, data) { -// return request({ -// url: `/api/v1/jointTraining/room/realDevice?group=${group}`, -// method: 'post', -// data: data -// }); -// } - -// // 删除真实设备和仿真对象连接 -// export function delRealDeviceNew(id, group) { -// return request({ -// url: `/api/v1/jointTraining/room/realDevice/${id}`, -// method: 'delete', -// params: { group: group } -// }); -// } - -// // 获取真实设备列表 -// export function getRealDevicesNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}/devices`, -// method: 'get' -// }); -// } - -// // 获取房间真实设备连接关系 -// export function getRealDevicesInRoomNew(group) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}/realDevice/connect`, -// method: 'get' -// }); -// } - -// // 更新真实设备的连接关系 -// export function updateRealDevicesNew(group, data) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}/realDevice`, -// method: 'put', -// data: data -// }); -// } - -// // 真实设备是否被其他仿真使用 -// export function realDeviceIsUsedNew(group, projectCode) { -// return request({ -// url: `/api/v1/jointTraining/room/${group}/realDeviceUsed`, -// method: 'get', -// params: { -// projectCode: projectCode -// } -// }); -// } - diff --git a/src/api/management/author.js b/src/api/management/author.js index b72d7bad4..e580cf508 100644 --- a/src/api/management/author.js +++ b/src/api/management/author.js @@ -10,15 +10,6 @@ export function getLessonPermissonPageList(params) { }); } -// /** 创建课程权限*/ -// export function createLessonPermisson(data) { -// return request({ -// url: '/api/permission', -// method: 'post', -// data: data -// }); -// } - /** 获取权限详情*/ export function getPermissonDetail(id) { return request({ @@ -44,14 +35,6 @@ export function postPermissonList(mapId) { }); } -// /** 获取用户某课程某段时间内可用的权限数量*/ -// export function getTotalRemains(params) { -// return request({ -// url: '/api/userPermission/totalRemains', -// method: 'get', -// params: params -// }); -// } /** 设置权限失效或有效*/ export function setLessonPermisson(data) { return request({ @@ -61,25 +44,7 @@ export function setLessonPermisson(data) { }); } -// /** 设置权限失效或有效*/ -// export function getPermissionList(id) { -// return request({ -// url: `/api/permission/${id}`, -// method: 'get' -// }); -// } - -// /** 获取大屏权限列表*/ -// export function queryPermissionScreen() { -// return request({ -// url: `/api/userPermission/bigScreen`, -// method: 'get' -// }); -// } - -/** - * 用户权限列表 - */ +/** 用户权限列表*/ export function listPermision(params) { return request({ url: `/api/userPermission`, @@ -88,9 +53,7 @@ export function listPermision(params) { }); } -/** - * 个人权限列表 - */ +/** 个人权限列表*/ export function listUserPermision(params) { return request({ url: `/api/userPermission/my`, @@ -99,14 +62,6 @@ export function listUserPermision(params) { }); } -// /** 用户权限列表 */ -// export function getDistribute(id) { -// return request({ -// url: `/api/distribute/${id}`, -// method: 'get' -// }); -// } - /** 设置权限所有者 */ export function putPermissionOwner(data) { return request({ diff --git a/src/api/management/dictionary.js b/src/api/management/dictionary.js index ea2446efd..f1d4b1d0c 100644 --- a/src/api/management/dictionary.js +++ b/src/api/management/dictionary.js @@ -48,10 +48,7 @@ export function update(data) { }); } -/** - * 根据字典code获取明细列表 - * @param {*} code - */ +/** 根据字典code获取明细列表*/ export function getDetailList(code) { return request({ url: '/api/dictionary/getDetailListByCode', diff --git a/src/api/management/distribute.js b/src/api/management/distribute.js index 1a5eb170f..97c19a813 100644 --- a/src/api/management/distribute.js +++ b/src/api/management/distribute.js @@ -1,32 +1,5 @@ import request from '@/utils/request'; -// /** 权限转增*/ -// export function getLessons(data) { -// return request({ -// url: '/api/distribute/getLessons', -// method: 'get', -// data: data -// }); -// } - -// /** 权限分发*/ -// export function giveLessons(data) { -// return request({ -// url: '/api/distribute/distribute', -// method: 'post', -// data: data -// }); -// } - -// /** 权限转增*/ -// export function permissionTurnAdd(data) { -// return request({ -// url: '/api/distribute/transfer', -// method: 'post', -// data: data -// }); -// } - /** 权限获取*/ export function getPermission(state) { return request({ @@ -35,24 +8,6 @@ export function getPermission(state) { }); } -// /** 接收课程权限*/ -// export function receiveLessons(data) { -// return request({ -// url: '/api/distribute/receiveLessons', -// method: 'get', -// data: data -// }); -// } - -// /** 考试权限分发*/ -// export function giveExams(data) { -// return request({ -// url: `/api/distribute/giveExams`, -// method: 'post', -// data: data -// }); -// } - /** 权限打包分页查询*/ export function listPackagePermission(params) { return request({ @@ -62,15 +17,6 @@ export function listPackagePermission(params) { }); } -// /** 打包权限*/ -// export function packagePermissionDistribute(data) { -// return request({ -// url: `/api/distribute/givePermission/package`, -// method: 'post', -// data: data -// }); -// } - /** 权限回收*/ export function restorePackagePermission(id) { return request({ @@ -97,32 +43,6 @@ export function getPermissionPackageDetail(id, params) { }); } -// /** 权限分发打包*/ -// export function permissionDistributePackage(data) { -// return request({ -// url: `/api/distribute/package`, -// method: 'post', -// data: data -// }); -// } - -// /** 权限分发解包*/ -// export function permissionDistributeUnPackage(permissionId) { -// return request({ -// url: `/api/distribute/${permissionId}/unPackage`, -// method: 'delete' -// }); -// } - -// /** 查询可打包的权限分发*/ -// export function listCanPackagePermission(params) { -// return request({ -// url: `/api/distribute/package`, -// method: 'get', -// params: params -// }); -// } - // 设置权限分发列表 权限失效 export function setCommodityStatus(id) { return request({ @@ -148,11 +68,3 @@ export function givePermission(data) { data: data }); } - -// /** 查询权限分发领取用户列表 */ -// export function distributeUsers(distributeId) { -// return request({ -// url: `/api/distribute/${distributeId}/distributeUsers`, -// method: 'get' -// }); -// } diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 9a46c9802..88e2b9b4f 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -93,11 +93,3 @@ export function updateExamRules(data) { data: data }); } - -// /** 根据课程ID获取试卷 */ -// export function getExamParperList(lessonId) { -// return request({ -// url: `/api/exam/${lessonId}/list`, -// method: 'get' -// }); -// } diff --git a/src/api/management/goods.js b/src/api/management/goods.js index 9aa33a1f1..aeb3d25a4 100644 --- a/src/api/management/goods.js +++ b/src/api/management/goods.js @@ -9,9 +9,7 @@ export function getCommodityDetailByParams(data) { }); } -/** - * 获取商品明细列表 - */ +/** 获取商品明细列表*/ export function getCommodityList(params) { return request({ url: '/api/goods', @@ -20,20 +18,7 @@ export function getCommodityList(params) { }); } -// /** -// * 保存商品明细列表 -// */ -// export function saveCommodityList(params) { -// return request({ -// url: '/api/goods', -// method: 'post', -// data: params -// }); -// } - -/** - * 删除商品明细 - */ +/** 删除商品明细*/ export function delCommodity(id) { return request({ url: `/api/goods/${id}`, @@ -41,29 +26,7 @@ export function delCommodity(id) { }); } -// /** -// * 获取商品地图,产品,课程列表 -// */ -// export function getMapLesson() { -// return request({ -// url: `/api/goods/tree`, -// method: 'get' -// }); -// } - -// /** -// * 获取商品地图,产品,课程列表 -// */ -// export function getCommodityDetailById(id) { -// return request({ -// url: `/api/goods/${id}`, -// method: 'get' -// }); -// } - -/** - * 获取商品地图,产品,课程列表 - */ +/** 获取商品地图,产品,课程列表*/ export function updataCommodityList(data) { return request({ url: `/api/goods/${data.id}`, @@ -72,9 +35,7 @@ export function updataCommodityList(data) { }); } -/** - * 设置失效或有效切换 - */ +/** 设置失效或有效切换*/ export function setCommodityStatus(id) { return request({ url: `/api/goods/${id}/status`, @@ -110,44 +71,6 @@ export function getGoodsList() { }); } -// // 根据权限id查询商品 -// export function getGoodsByPermissionId(id) { -// return request({ -// url: `/api/goods/permissionId`, -// method: 'get', -// params: { -// permissionId: id -// } -// }); -// } - -// // 创建商品 -// export function postsPermissionGoods(data) { -// return request({ -// // url: `/api/goods`, -// url: `/api/goods/create/list`, -// method: 'post', -// data: data -// }); -// } - -// // 创建万能权限商品 -// export function postPermissionIdsGoods(data) { -// return request({ -// url: `/api/goods/permissionIds`, -// method: 'post', -// data: data -// }); -// } - -// // 创建万能权限商品 -// export function postCreatePackage(data) { -// return request({ -// url: `/api/goods/create/package`, -// method: 'post', -// data: data -// }); -// } // 获取订单对应的商品列表 export function getGoodsListByOrderId(id) { return request({ diff --git a/src/api/management/mapline.js b/src/api/management/mapline.js index e29d8b4ba..f3b2acc6d 100644 --- a/src/api/management/mapline.js +++ b/src/api/management/mapline.js @@ -26,14 +26,6 @@ export function delSkinCode(id) { }); } -// /** 根据id查询真实线路 */ -// export function querySkinCode(id) { -// return request({ -// url: `/api/realLine/${id}`, -// method: 'get' -// }); -// } - /** 修改真实线路*/ export function updateSkinCode(data) { return request({ @@ -60,23 +52,6 @@ export function putRealLineConfig(id, data) { }); } -// /** 通过皮肤Code更新地图皮肤*/ -// export function updateSkinCodeByCode(data) { -// return request({ -// url: `/api/realLine/${data.code}/update`, -// method: 'put', -// data: data -// }); -// } - -// /** 检查code是否存在*/ -// export function querySkinCodeExistByCode(code) { -// return request({ -// url: `/api/realLine/${code}/exist`, -// method: 'get' -// }); -// } - /** 获取真实线路列表*/ export function getLineCodeList() { return request({ diff --git a/src/api/management/order.js b/src/api/management/order.js index 54fcb9e33..519a15197 100644 --- a/src/api/management/order.js +++ b/src/api/management/order.js @@ -10,15 +10,6 @@ export function getOrderPageList(params) { }); } -// /** 根据ID获取订单数据*/ -// export function getOrderDetail(id, params) { -// return request({ -// url: `/api/order/${id}`, -// method: 'get', -// params: params -// }); -// } - /** 创建一个订单*/ export function createOrder(data) { return request({ @@ -37,31 +28,6 @@ export function updateOrder(data) { }); } -// export function deleteOrder(id) { -// return request({ -// url: `/api/order/${id}`, -// method: 'delete' -// }); -// } - -// /** 订单权限领取*/ -// export function getOrder(params) { -// return request({ -// url: '/api/order/getOrder', -// method: 'get', -// params: params -// }); -// } - -// /** 订单权限分发*/ -// export function giveOrder(data) { -// return request({ -// url: '/api/order/giveOrder', -// method: 'post', -// data: data -// }); -// } - /** 订单续费*/ export function getOrderCharge(id) { return request({ @@ -104,14 +70,6 @@ export function cancalOrder(orderId) { }); } -// // 万能权限查询权限包商品 -// export function postFindPermission(ids) { -// return request({ -// url: `/api/goods/permissionIds?ids=${ids}`, -// method: 'get' -// }); -// } - // 获取订单的分发二维码 export function getDistributeFromOrder(orderCode) { return request({ diff --git a/src/api/management/user.js b/src/api/management/user.js index 1534adfd4..910e2113f 100644 --- a/src/api/management/user.js +++ b/src/api/management/user.js @@ -1,29 +1,4 @@ import request from '@/utils/request'; -// /** 注册用户*/ -// export function createUserInfo(data) { -// return request({ -// url: '/api/userinfo/create', -// method: 'put', -// data: data -// }); -// } -// /** 根据用户Id获取用户信息*/ -// export function getUserInfoByOpenId(params) { -// return request({ -// url: '/api/userinfo/getByOpenId', -// method: 'get', -// params: params -// }); -// } - -// /** 根据姓名或者手机号查询用户*/ -// export function getUserInfoByNameOrMobile(params) { -// return request({ -// url: '/api/userinfo/nameOrMobile', -// method: 'get', -// params: params -// }); -// } /** 查询用户参数*/ export function getUserConfigInfo() { @@ -33,15 +8,6 @@ export function getUserConfigInfo() { }); } -// /** 设置用户参数*/ -// export function setUserConfigInfo(data) { -// return request({ -// url: '/api/user/config', -// method: 'post', -// data: data -// }); -// } - /** 获取销售列表*/ export function getSellerList() { return request({ @@ -211,14 +177,6 @@ export function exportStudentResults(projectCode, data) { data: data }); } -// // 生成绑定微信二维码 -// export function getWxQrCode(params) { -// return request({ -// url: `/api/user/wmurl`, -// method: 'get', -// params: params -// }); -// } // 获取微信小程序绑定二维码 export function getBindWxQrCodeUrl() { diff --git a/src/api/management/userexam.js b/src/api/management/userexam.js index ebf216b2e..584a2745d 100644 --- a/src/api/management/userexam.js +++ b/src/api/management/userexam.js @@ -51,22 +51,6 @@ export function delPublishExam(id) { }); } -// /** 删除用户实训*/ -// export function delTrainingList() { -// return request({ -// url: `/api/userExam/list`, -// method: 'delet' -// }); -// } - -// /** 设置试卷失效 */ -// export function setExamGive(id) { -// return request({ -// url: `/api/userExam/${id}/abandon`, -// method: 'put' -// }); -// } - export function updateExam(data) { return request({ url: `/api/userExam/${data.id}`, diff --git a/src/api/project.js b/src/api/project.js index 2c262be64..480992756 100644 --- a/src/api/project.js +++ b/src/api/project.js @@ -85,6 +85,7 @@ export function setPscConfig(id, data) { data: data }); } + /** 添加/修改ibp设备配置 */ export function setVrIbpConfig(id, data) { return request({ diff --git a/src/api/questionsRule.js b/src/api/questionsRule.js index b1e8e435e..4bd9c236c 100644 --- a/src/api/questionsRule.js +++ b/src/api/questionsRule.js @@ -1,12 +1,5 @@ import request from '@/utils/request'; -// /** 获取出题规则列表 */ -// export function getQuestionRuleList() { -// return request({ -// url: `/api/questionsRule`, -// method: 'get' -// }); -// } /** 添加出题规则 */ export function addQuestionRule(data) { return request({ @@ -30,13 +23,7 @@ export function deleteQuestionRule(id) { method: 'delete' }); } -// /** 查询单个出题规则 */ -// export function selectedQuestionRule(id) { -// return request({ -// url: `/api/questionsRule/${id}`, -// method: 'get' -// }); -// } + /** 更改出题规则内容 */ export function updateQuestionRule(id, data) { return request({ diff --git a/src/api/race.js b/src/api/race.js index 1e876a18c..c5f6bc3ef 100644 --- a/src/api/race.js +++ b/src/api/race.js @@ -1,38 +1,5 @@ import request from '@/utils/request'; -// /** 分页查询竞赛 */ -// export function getRaceList(params) { -// return request({ -// url: `/api/race`, -// method: 'get', -// params: params -// }); -// } -// /** 创建竞赛 */ -// export function createRace(data) { -// return request({ -// url: `/api/race`, -// method: 'post', -// data -// }); -// } -// /** 修改竞赛信息 */ -// export function updateRace(id, data) { -// return request({ -// url: `/api/race/${id}`, -// method: 'put', -// data -// }); -// } - -// /** 获取实操试题列表(题库)*/ -// export function getPracticeList(params) { -// return request({ -// url: `/api/v1/competitionPractical`, -// method: 'get', -// params -// }); -// } /** 导入项目试题库 */ export function importQuestionBand(data, companyId) { return request({ diff --git a/src/api/rpTools.js b/src/api/rpTools.js index 20ca735d2..49e080d99 100644 --- a/src/api/rpTools.js +++ b/src/api/rpTools.js @@ -1,5 +1,36 @@ 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(lineId, data) { + return request({ + url: `/api/rpTools/station/${lineId}`, + method: 'put', + data + }) +} + /** * 查询运行图列表 */ @@ -10,9 +41,7 @@ export function listRps() { }); } -/** - * 创建运行图 - */ +/** 创建运行图*/ export function createRp(data) { return request({ url: `/api/rpTools`, @@ -22,18 +51,16 @@ export function createRp(data) { } /** - * 删除运行图 + * 删除运行图组 */ -export function deleteRp(planId) { - return request({ - url: `/api/rpTools/${planId}`, - method: 'delete' - }); +export function deleteRp(groupId) { + return request({ + url: `/api/rpTools/${groupId}`, + method: 'delete' + }) } -/** - * 获取运行图配置 - */ +/** 获取运行图配置*/ export function getRpConfig(planId) { return request({ url: `/api/rpTools/${planId}/config`, @@ -41,9 +68,7 @@ export function getRpConfig(planId) { }); } -/** - * 修改运行图配置 - */ +/** 修改运行图配置*/ export function modifyRpConfig(planId, data) { return request({ url: `/api/rpTools/${planId}/config`, @@ -52,9 +77,7 @@ export function modifyRpConfig(planId, data) { }); } -/** - * 获取运行图数据 - */ +/** 获取运行图数据*/ export function getRpTools(planId) { return request({ url: `/api/rpTools/${planId}`, @@ -62,19 +85,7 @@ export function getRpTools(planId) { }); } -// /** -// * 清除运行图 -// */ -// export function clearRpPlan(planId) { -// return request({ -// url: `/api/rpTools/${planId}/clear`, -// method: 'put' -// }); -// } - -/** - * 添加车次 - */ +/** 添加车次*/ export function addRpTrip(planId, data) { return request({ url: `/api/rpTools/${planId}/trip`, @@ -83,9 +94,7 @@ export function addRpTrip(planId, data) { }); } -/** - * 删除车次 - */ +/** 删除车次*/ export function delRpTrip(planId, tripNo) { return request({ url: `/api/rpTools/${planId}/${tripNo}/trip`, @@ -93,9 +102,7 @@ export function delRpTrip(planId, tripNo) { }); } -/** - * 平移服务 - */ +/** 平移服务*/ export function translateRpService(planId, serviceNo, data) { return request({ url: `/api/rpTools/${planId}/${serviceNo}/service`, @@ -104,9 +111,7 @@ export function translateRpService(planId, serviceNo, data) { }); } -/** - * 删除服务 - */ +/** 删除服务*/ export function delRpService(planId, serviceNo) { return request({ url: `/api/rpTools/${planId}/${serviceNo}/service`, @@ -114,9 +119,7 @@ export function delRpService(planId, serviceNo) { }); } -/** - * 添加区域 - */ +/** 添加区域*/ export function createRpArea(planId, data) { return request({ url: `/api/rpTools/${planId}/area`, @@ -125,9 +128,7 @@ export function createRpArea(planId, data) { }); } -/** - * 修改区域 - */ +/** 修改区域*/ export function modifyRpArea(planId, areaNo, data) { return request({ url: `/api/rpTools/${planId}/${areaNo}/area`, @@ -136,9 +137,7 @@ export function modifyRpArea(planId, areaNo, data) { }); } -/** - * 修改区域文字 - */ +/** 修改区域文字*/ export function modifyAreaNote(planId, areaNo, data) { return request({ url: `/api/rpTools/${planId}/${areaNo}/text`, @@ -146,9 +145,7 @@ export function modifyAreaNote(planId, areaNo, data) { data }); } -/** - * 删除区域 - */ +/** 删除区域*/ export function delRpArea(planId, areaNo) { return request({ url: `/api/rpTools/${planId}/${areaNo}/area`, @@ -156,9 +153,7 @@ export function delRpArea(planId, areaNo) { }); } -/** - * 修改运行时间 - */ +/** 修改运行时间*/ export function justTripNoRunning(planId, tripNo, data) { return request({ url: `/api/rpTools/${planId}/${tripNo}/running`, @@ -167,9 +162,7 @@ export function justTripNoRunning(planId, tripNo, data) { }); } -/** - * 修改停站时间 - */ +/** 修改停站时间*/ export function justTripNoStop(planId, tripNo, data) { return request({ url: `/api/rpTools/${planId}/${tripNo}/stop`, @@ -178,9 +171,7 @@ export function justTripNoStop(planId, tripNo, data) { }); } -/** - * 修改折返时间 - */ +/** 修改折返时间*/ export function justTripTurnBack(planId, tripNo, data) { return request({ url: `/api/rpTools/${planId}/${tripNo}/turnBack`, diff --git a/src/api/runplan.js b/src/api/runplan.js index 3dcf990ee..4d90b75de 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -1,19 +1,6 @@ import request from '@/utils/request'; -// /** -// * 新建地图速度等级列表 -// */ -// export function newSpeedLevels(data) { -// return request({ -// url: '/api/runPlan/draft/speed', -// method: 'post', -// data: data -// }); -// } - -/** - * 获取运行图的车站列表 - */ +/** 获取运行图的车站列表*/ export function getStationList(mapId) { return request({ url: `/api/runPlan/draft/station/${mapId}`, @@ -30,20 +17,7 @@ export function populatingGenericData(planId, data) { }); } -// /** -// * 创建运行图 -// */ -// export function newRunPlan(data) { -// return request({ -// url: '/api/runPlan/draft', -// method: 'post', -// data: data -// }); -// } - -/** - * 查询运行图获取数据 - */ +/** 查询运行图获取数据*/ export function queryRunPlan(planId) { return request({ url: `/api/runPlan/draft/${planId}`, @@ -96,9 +70,7 @@ export function publishRunPlan(data) { }); } -/** - * 导入真实运行图 - */ +/** 导入真实运行图*/ export function importRunPlan(data) { return request({ url: `/api/runPlan/draft/${data.mapId}/prdPlan`, @@ -115,13 +87,6 @@ export function getRpListByMapId(mapId) { }); } -// /** 获取站间运行时间*/ -// export function getStationRunning(mapId) { -// return request({ -// url: `/api/runPlan/draft/${mapId}/stationRunning`, -// method: 'get' -// }); -// } /** 获取地图原始站间运行等级 */ export function getMapStationRun(mapId) { return request({ diff --git a/src/api/scheduling.js b/src/api/scheduling.js index 3e8f0573b..1de48c2f5 100644 --- a/src/api/scheduling.js +++ b/src/api/scheduling.js @@ -1,58 +1,12 @@ import request from '@/utils/request'; -// export function querySecheduling(group, params) { -// return request({ -// url: `/api/scheduling/${group}/day`, -// method: 'get', -// params -// }); -// } - -// export function generateScheduling(group, params) { -// return request({ -// url: `/api/scheduling/${group}/generate`, -// method: 'post', -// params -// }); -// } - -// export function getSchedulingAllTrains(group) { -// return request({ -// url: `/api/scheduling/${group}/train/all`, -// method: 'get' -// }); -// } - -// export function checkScheduling(group, data) { -// return request({ -// url: `/api/scheduling/${group}/check`, -// method: 'post', -// data -// }); -// } - -// export function saveScheduling(group, data) { -// return request({ -// url: `/api/scheduling/${group}/save`, -// method: 'post', -// data -// }); -// } - export function generateSchedulingAgain(group) { return request({ url: `/api/scheduling/${group}/rebuild`, method: 'delete' }); } -// /** 生成地图通用派班计划 */ -// export function generateCommonScheduling (data) { -// return request({ -// url: `/api/v1/scheduling/generate/common`, -// method: 'post', -// data -// }); -// } + /** 查询某天的派班计划 */ export function querySechedulingNew (group, params) { return request({ diff --git a/src/api/script.js b/src/api/script.js index 593fd87f4..dfff747cf 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -1,14 +1,5 @@ import request from '@/utils/request'; -// /** 分页查找上线的剧本*/ -// export function getScriptPageListOnline(params) { -// return request({ -// url: `/api/script/paging/online`, -// method: 'get', -// params: params -// }); -// } - /** 分页查找上线的剧本(新版)*/ export function getScriptPageListOnlineNew(params) { return request({ @@ -18,14 +9,6 @@ export function getScriptPageListOnlineNew(params) { }); } -// /** 通过ID查询发布的剧本的详细信息 */ -// export function getScriptById(id) { -// return request({ -// url: `/api/script/${id}/detail`, -// method: 'get' -// }); -// } - /** 通过ID查询发布的剧本的详细信息(新版) */ export function getScriptByIdNew(id) { return request({ @@ -34,14 +17,6 @@ export function getScriptByIdNew(id) { }); } -// /** 通过group查询未发布剧本的详细信息 */ -// export function getDraftScriptByGroup(group) { -// return request({ -// url: `/api/simulation/${group}/script/loadedScript`, -// method: 'get' -// }); -// } - /** 通过group查询未发布剧本的详细信息(新版) */ export function getDraftScriptByGroupNew(group) { return request({ @@ -126,22 +101,6 @@ export function getAllSelectedScriptRole(group) { }); } -// /** 加载剧本接口(仿真使用 竞赛) */ -// export function loadScript(group, scriptId) { -// return request({ -// url: `/api/scriptSimulation/${group}/load/script/${scriptId}`, -// method: 'PUT' -// }); -// } - -// /** 剧本实训结束 接口(仿真使用 竞赛) */ -// export function endScriptTraining(group) { -// return request({ -// url: `/api/scriptSimulation/${group}/finish`, -// method: 'get' -// }); -// } - /** 草稿剧本数据导入*/ export function postScriptImport(mapId, name, data) { return request({ diff --git a/src/api/simulation.js b/src/api/simulation.js index 5ce0a98cb..df8606af0 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -1,23 +1,5 @@ import request from '@/utils/request'; -// /** 获取故障规则列表*/ -// export function getFailureGenerateRules(params) { -// return request({ -// url: `/api/simulation/failureGenerateRules`, -// method: 'get', -// params: params -// }); -// } - -// /** 设置自动故障*/ -// export function setFailureMode(data, group) { -// return request({ -// url: `/api/simulation/${group}/failureMode`, -// method: 'post', -// data: data -// }); -// } - /** 设置自动故障(新版)*/ export function setFailureModeNew(data, group) { return request({ @@ -41,15 +23,6 @@ export function getSimulationFaultRules(group) { }); } -// // 创建故障规则(新版) -// export function addFailureRule(data) { -// return request({ -// url: `/api/v1/faultRule`, -// method: 'post', -// data: data -// }); -// } - /** 根据id删除故障规则 */ export function deleteFailureRule(id) { return request({ @@ -58,56 +31,7 @@ export function deleteFailureRule(id) { }); } -// /** 获取故障规则列表(新版)*/ -// export function getFailureRulesNew(params) { -// return request({ -// url: `/api/v1/faultRule/page`, -// method: 'get', -// params: params -// }); -// } - -// // 修改故障规则(新版) -// export function modifyFailureRule(data) { -// return request({ -// url: `/api/v1/faultRule`, -// method: 'put', -// data: data -// }); -// } - -// /** 通过id获取故障规则(新版)*/ -// export function getFailureRulesByIdNew(id) { -// return request({ -// url: `/api/v1/faultRule/${id}`, -// method: 'get' -// }); -// } - -// /** -// * 仿真系统按计划行车 -// */ -// export function runDiagramStart(params, group) { -// return request({ -// url: `/api/simulation/${group}/start`, -// method: 'put', -// params: params -// }); -// } - -// /** -// * 仿真系统结束计划行车 -// */ -// export function runDiagramOver(group) { -// return request({ -// url: `/api/simulation/${group}/over`, -// method: 'put' -// }); -// } - -/** - * 退出仿真系统 - */ +/** 退出仿真系统*/ export function runDiagramQuit(group) { return request({ url: `/api/simulation/${group}/quit`, @@ -115,43 +39,6 @@ export function runDiagramQuit(group) { }); } -// /** 获取仿真系统时间*/ -// export function runDiagramGetTime(group) { -// return request({ -// url: `/api/simulation/${group}/systemTime`, -// method: 'get' -// }); -// } - -// // 查看是否开始按计划行车 -// export function runDiagramIsStart(group) { -// return request({ -// url: `/api/simulation/${group}/isRunPlanStart`, -// method: 'get' -// }); -// } - -// /** -// * 仿真系统CBTC -// * @param {*} mapId -// */ -// export function simulationNotify({ mapId, prdType }) { -// return request({ -// url: `/api/simulation/${mapId}/${prdType}`, -// method: 'get' -// }); -// } - -// /** -// * 实训系统CBTC -// * @param {*} data -// */ -// export function trainingNotify({ trainingId }) { -// return request({ -// url: `/api/simulation/training/${trainingId}`, -// method: 'get' -// }); -// } /** 实训系统(新版地图) */ export function trainingNotifyNew({ trainingId }) { return request({ @@ -159,16 +46,7 @@ export function trainingNotifyNew({ trainingId }) { method: 'get' }); } -// /** -// * 考试系统CBTC -// * @param {*} data -// */ -// export function examNotify({ examId }) { -// return request({ -// url: `/api/simulation/exam/${examId}`, -// method: 'get' -// }); -// } + /** 考试系统(新版地图)*/ export function examNotifyNew({ examId }) { return request({ @@ -211,30 +89,6 @@ export function deleteSimulationStats(statsId) { }); } -// /** 获取用户鼠标左键选中的设备信息*/ -// export function letfMouseSelectDevice(deviceCode, group) { -// return request({ -// url: `/api/simulation/${group}/device/${deviceCode}`, -// method: 'get' -// }); -// } - -// /** 获取每日运行图*/ -// export function getEveryDayRunPlanData(group) { -// return request({ -// url: `/api/simulation/${group}/runPlan`, -// method: 'get' -// }); -// } - -// /** 录制脚本仿真*/ -// export function scriptRecordNotify(scriptId) { -// return request({ -// url: `/api/simulation/scriptWrite/${scriptId}`, -// method: 'get' -// }); -// } - /** 录制脚本仿真(新版)*/ export function scriptRecordNotifyNew(scriptId) { return request({ @@ -243,14 +97,6 @@ export function scriptRecordNotifyNew(scriptId) { }); } -// /** 保存剧本背景*/ -// export function saveScriptScenes(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/scenes`, -// method: 'put' -// }); -// } - /** 保存剧本背景(新版)*/ export function saveScriptScenesNew(group) { return request({ @@ -267,14 +113,6 @@ export function scriptRePreview(group) { }); } -// /** 保存录制任务数据*/ -// export function saveScriptData(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/saveData`, -// method: 'put' -// }); -// } - /** 保存录制任务数据(新版)*/ export function saveScriptDataNew(group) { return request({ @@ -283,15 +121,6 @@ export function saveScriptDataNew(group) { }); } -// /** 更新任务地图定位信息*/ -// export function updateMapLocation(group, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/mapLocation`, -// method: 'put', -// data -// }); -// } - /** 更新任务地图定位信息(新版)*/ export function updateMapLocationNew(group, data) { return request({ @@ -301,82 +130,6 @@ export function updateMapLocationNew(group, data) { }); } -// /** 获取剧本编制的所有成员角色*/ -// export function getScriptMemberData(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/members`, -// method: 'get' -// }); -// } - -// /** 获取剧本出演成员角色 */ -// export function getScriptPlayMember(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/players`, -// method: 'get' -// }); -// } - -// /** 获取剧本出演成员角色(新版地图) */ -// export function getScriptPlayMemberNew(group) { -// return request({ -// url: `/api/scriptSimulation/${group}/allPlayer`, -// method: 'get' -// }); -// } - -// /** 取消剧本演出成员角色 */ -// export function cancleScriptMembers(group, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/removePlayers`, -// method: 'put', -// data -// }); -// } - -// /** 取消剧本演出成员角色 */ -// export function cancleScriptMembersNew(group, data) { -// return request({ -// url: `/api/scriptSimulation/${group}/removePlayers`, -// method: 'put', -// data -// }); -// } - -// /** 选择剧本演出成员角色 */ -// export function selectScriptMembers(group, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/choosePlayers`, -// method: 'put', -// data -// }); -// } - -// /** 选择剧本演出成员角色 (新版地图)*/ -// export function selectScriptMembersNew(group, data) { -// return request({ -// url: `/api/scriptSimulation/${group}/choosePlayers`, -// method: 'put', -// data -// }); -// } - -// /** 修改剧本演出成员性别 */ -// export function modifyScriptMemberSex(group, playerId, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`, -// method: 'put' -// }); -// } - -// /** 清除仿真剧本数据*/ -// export function dumpScriptData(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/saveData`, -// method: 'delete' -// }); -// } - /** 清除仿真剧本数据(新版)*/ export function dumpScriptDataNew(group) { return request({ @@ -385,57 +138,6 @@ export function dumpScriptDataNew(group) { }); } -// /** 查询录制剧本步骤*/ -// export function queryScriptStep(group) { -// return request({ -// url: `/api/simulation/${group}/scriptRecordStage`, -// method: 'get' -// }); -// } - -// /** 获取指定时间里可加载列车的个数*/ -// export function getDesignatedTimeTrainNum(params, group) { -// return request({ -// url: `/api/simulation/${group}/plan/trainNum`, -// method: 'get', -// params -// }); -// } -// /** 添加剧本动作 */ -// export function addScriptAction(group, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/action`, -// method: 'post', -// data -// }); -// } - -// /** 添加剧本动作(新版) */ -// export function addScriptActionNew(group, data) { -// return request({ -// url: `/api/scriptSimulation/${group}/addAction`, -// method: 'PUT', -// data -// }); -// } - -// /** 删除剧本动作 */ -// export function deleteScriptAction(group, actionId) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, -// method: 'delete' -// }); -// } - -// /** 修改剧本动作 */ -// export function modifyScriptAction(group, actionId, data) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/action/${actionId}`, -// method: 'put', -// data -// }); -// } - /** 修改剧本动作(新版) */ export function modifyScriptActionNew(group, data) { return request({ @@ -461,22 +163,6 @@ export function deleteExistingSimulation(group) { method: 'delete' }); } -// /** 根据设备类型获取设备列表 */ -// export function getDeviceCodeByDeviceType(group, params) { -// return request({ -// url: `/api/simulation/${group}/deviceType/devices`, -// method: 'get', -// params -// }); -// } - -// /** 获取任务录制的数据 */ -// export function getScriptRecord(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite`, -// method: 'get' -// }); -// } /** 获取任务录制的所有动作(新版)*/ export function getScriptAllAction(group) { @@ -486,22 +172,6 @@ export function getScriptAllAction(group) { }); } -// /** 加载任务*/ -// export function loadQuest(questId, memberId, group) { -// return request({ -// url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`, -// method: 'post' -// }); -// } - -// /** 加载剧本 */ -// export function loadScript(scriptId, memberId, group) { -// return request({ -// url: `api/simulation/${group}/script/${scriptId}?memberId=${memberId}`, -// method: 'post' -// }); -// } - /** 加载剧本(新版) */ export function loadScriptNew(scriptId, memberId, group) { return request({ @@ -510,14 +180,6 @@ export function loadScriptNew(scriptId, memberId, group) { }); } -// /** 退出剧本*/ -// export function quitScript(group) { -// return request({ -// url: `/api/simulation/${group}/script`, -// method: 'delete' -// }); -// } - /** 退出剧本(新版)*/ export function quitScriptNew(group) { return request({ @@ -526,48 +188,6 @@ export function quitScriptNew(group) { }); } -// /** 退出任务*/ -// export function quitQuest(group) { -// return request({ -// url: `/api/simulation/${group}/quest`, -// method: 'put' -// }); -// } - -// /** 根据group获取仿真对象*/ -// export function getSimulationInfo(group) { -// return request({ -// url: `/api/simulation/${group}`, -// method: 'get' -// }); -// } - -// /** 获取可用的设备指令*/ -// export function getAvailableDeviceCommand(params) { -// return request({ -// url: `/api/simulation/deviceCommand/available`, -// method: 'get', -// params -// }); -// } - -// /** 保存/修改任务剧本*/ -// export function saveTaskScript(group, data) { -// return request({ -// url: `/api/simulation/${group}/questRecord/script`, -// method: 'post', -// data -// }); -// } - -// /** 暂停剧本编制的仿真 */ -// export function scriptPause(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/pause`, -// method: 'post' -// }); -// } - /** 暂停仿真 */ export function simulationPause(group) { return request({ @@ -576,14 +196,6 @@ export function simulationPause(group) { }); } -// /** 恢复仿真运行并执行刚编辑的剧本动作 */ -// export function executeScript(group) { -// return request({ -// url: `/api/simulation/${group}/scriptWrite/execute`, -// method: 'post' -// }); -// } - /** 恢复仿真运行并执行刚编辑的剧本动作(新版) */ export function executeScriptNew(group) { return request({ @@ -592,31 +204,6 @@ export function executeScriptNew(group) { }); } -// /** 生成用户自己的当日运行图*/ -// export function generateDayRunPlan(planId, group) { -// return request({ -// url: `/api/simulation/${group}/loadRunPlan/${planId}`, -// method: 'post' -// }); -// } - -// /** 创建派班计划仿真*/ -// export function schedulingNotify(params) { -// return request({ -// url: `/api/scheduling/simulation`, -// method: 'post', -// params -// }); -// } - -// /** 获取PLC网关 */ -// export function getPlcGateway(group) { -// return request({ -// url: `/api/simulation/${group}/plcGateway`, -// method: 'get' -// }); -// } - /** 处理ibp盘事件 */ export function handlerIbpEvent(group, button, stationCode) { return request({ @@ -664,14 +251,6 @@ export function getNewMapDataByGroup(group) { }); } -// /** 新版地图指令操作定义 */ -// export function newMapOperate(group, operationId, data) { -// return request({ -// url: `/simulation/${group}/operate/${operationId}`, -// method: 'post', -// data: data -// }); -// } /** 新版地图根据group获取仿真运行图 */ export function getEveryDayRunPlanNew(group) { return request({ @@ -696,15 +275,6 @@ export function clearSimulation(group) { }); } -// /** 查询进路信息*/ -// export function querySignalStatus(group, params) { -// return request({ -// url: `/api/simulation/${group}/status/signal`, -// method: 'get', -// params -// }); -// } - /** 获取仿真运行图车次号列表 */ export function getTripNumberList(group) { return request({ diff --git a/src/api/statistics.js b/src/api/statistics.js index 349dce602..c761cf7f0 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -1,89 +1 @@ // import request from '@/utils/request'; - -// // 课程列表 -// export function getLessonList(code) { -// return request({ -// url: '/api/stats/lesson/list', -// method: 'get', -// params: { -// wmCode: code -// } -// }); -// } - -// // 课程内实训数据统计 -// export function getLessonTimeChart(data) { -// return request({ -// url: `/api/stats/lesson/${data.id}/stats`, -// method: 'get', -// params: { -// wmCode: data.code -// } -// }); -// } - -// // 查询参与考试的课程列表 -// export function getExamTree(code) { -// return request({ -// url: '/api/stats/exam/lessonList', -// method: 'get', -// params: { -// wmCode: code -// } -// }); -// } - -// // 查询参与考试的试题列表 -// export function getstatsExamList(data) { -// return request({ -// url: `/api/stats/exam/${data.lessonId}/list`, -// method: 'get', -// params: { -// wmCode: data.code -// } -// }); -// } - -// // 个人考试数据统计 -// export function getExamChart(data) { -// return request({ -// url: `/api/stats/exam/${data.examId}/stats`, -// method: 'get', -// params: { -// wmCode: data.code -// } -// }); -// } - -// // 个人关注地图数据统计列表 -// export function getRelevanceMapList(code) { -// return request({ -// url: `/api/user/subscribe`, -// method: 'get', -// params: { -// wmCode: code -// } -// }); -// } - -// // 仿真地图下产品列表 -// export function getSimulationPrdList(mapId, code) { -// return request({ -// url: `/api/stats/simulation/${mapId}/prdList`, -// method: 'get', -// params: { -// wmCode: code -// } -// }); -// } - -// // 个人仿真数据统计 -// export function getSimulationTimeChart(data) { -// return request({ -// url: `/api/stats/simulation/${data.mapId}/stats`, -// method: 'get', -// params: { -// wmCode: data.code -// } -// }); -// } diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 4b927baaa..62cbc67e7 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -15,18 +15,18 @@ diff --git a/src/jmapNew/theme/aus_00/planConvert copy.js b/src/jmapNew/theme/aus_00/planConvert copy.js deleted file mode 100644 index b2cb726ef..000000000 --- a/src/jmapNew/theme/aus_00/planConvert copy.js +++ /dev/null @@ -1,268 +0,0 @@ -import { createSeriesModel, createMarkLineModels, createMartPoint } from './utils'; -import { toTimeStamp } from '@/utils/date'; - -export default { - /** 边缘高度*/ - EdgeHeight: 600, - - /** 间隔高度*/ - CoordMultiple: 1, - - /** 偏移时间*/ - TranslationTime: 0, - - /** 将后台数据解析成图形*/ - parseDataToGraph(chart, planData, stations, kmRangeCoordinateMap) { - const graphs = []; - if (planData && - planData.areaList && - planData.areaList.length) { - planData.areaList.forEach(area => { - const startTime = toTimeStamp(area.startTime); - const endTime = toTimeStamp(area.endTime); - - const fartherKm = this.getCoordinateYByObj(stations, kmRangeCoordinateMap, {stationCode: area.fartherStationCode}); - const closerKm = this.getCoordinateYByObj(stations, kmRangeCoordinateMap, {stationCode: area.closerStationCode}); - const point1 = [ startTime, fartherKm]; - const point2 = [ endTime, closerKm] - const position = chart.convertToPixel('grid', point1); - const position2 = chart.convertToPixel('grid', point2) - const width = Math.abs(position[0] - position2[0]); - const height = Math.abs(position[1] - position2[1]); - - graphs.push({ - type: 'rect', - subType: 'area', - areaNo: area.areaNo, - position, - point1, - point2, - model: area, - shape: { - x: 0, - y: 0, - width, - height - }, - style: { - fill: 'rgb(255,0,0, 0.3)', - stroke: 'rgb(255, 0, 0, 0.8)' - }, - z: 100 - }) - }) - } - - return graphs; - }, - - /** 将后台数据解析成折线*/ - parseDataToSeries(chart, planData, stations, kmRangeCoordinateMap) { - const models = []; - if (planData && - planData.serviceList && - planData.serviceList.length) { - planData.serviceList.forEach((service,i) => { - if (service.tripList && - service.tripList.length) { - - service.tripList.forEach((trip,j) => { - const opt = { - name: `plan-${service.serviceNo}-${trip.tripNo}-${trip.direction}`, - type: 'line', - symbolSize: 1, - showAllSymbol: true, - markPoint: { data: [] }, - data: [] - }; - - var lastPoint = null; - var nextPoint = null; - var pointData = { - name: `${service.serviceNo}-${trip.tripNo}`, - color: '#000', - direction: trip.direction, - coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, trip.stationTimeList[0], trip.direction, false)], - }; - - opt.markPoint.data.push(createMartPoint(pointData)); - - trip.stationTimeList.forEach(elem => { - const name = `${trip.direction}${trip.tripNo}`; - if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, elem, elem.direction, false), { - stationCode: elem.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - } - - if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, elem, elem.direction, false), { - stationCode: elem.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - } - }); - - const model = createSeriesModel(opt, - { color: '#000', width: 1 }, - { color: '#000', fill: '#000'} - ); - models.push(model); - - if (service.tripList[j + 1] && - service.tripList[j + 1].stationTimeList) { - const opt = { - name: `reentry-${service.serviceNo}-${trip.tripNo}-${trip.direction}`, - type: 'line', - symbolSize: 1, - showAllSymbol: false, - markPoint: { data: [] }, - data: [] - }; - - lastPoint = trip.stationTimeList[trip.stationTimeList.length-1]; - nextPoint = service.tripList[j + 1].stationTimeList[0]; - const name = `${trip.direction}${trip.tripNo}`; - opt.data.push([lastPoint.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, false), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - - opt.data.push([lastPoint.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, true), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - opt.data.push([nextPoint.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, true), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - opt.data.push([nextPoint.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, false), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - - - const model = createSeriesModel(opt, - { color: '#000', width: 1 }, - { color: '#000', fill: '#000'} - ); - models.push(model); - } - }); - } - }) - } - - return models; -}, - - /** 更新数据并解析成折线*/ - updateDataToModels(chart, planData, stations, kmRangeCoordinateMap, series) { - if (planData && planData.length) { - } - return series; - }, - - /** 初始化Y轴*/ - initializeYaxis(stations) { - return createMarkLineModels(stations, (elem) => { - return this.EdgeHeight + elem.kmRange * this.CoordMultiple; - }); - }, - - /** 将后台数据转换为试图序列模型*/ - convertStationsToMap(stations) { - var map = {}; - if (stations && stations.length) { - stations.forEach((elem) => { - map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple; - }); - } - - return map; - }, - - /** 计算y轴最小值*/ - computedYaxisMinValue(stations) { - return stations[0].kmRange * this.CoordMultiple; - }, - - /** 计算y轴最大值*/ - computedYaxisMaxValue(stations) { - return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2; - }, - - /** 格式化y轴数据*/ - computedFormatYAxis(stations, params) { - var yText = '0m'; - - stations.forEach(elem => { - if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) { - yText = Math.floor(elem.kmRange) + 'm'; - } - }); - - return yText; - }, - - /** 根据方向计算y折返偏移量*/ - getYvalueByDirectionCode(defaultVlue, direction) { - if (direction === '1') { - defaultVlue -= this.EdgeHeight / 2; - } else if (direction === '2') { - defaultVlue += this.EdgeHeight / 2; - } - - return defaultVlue; - }, - - - /** 根据elem计算y值*/ - getCoordinateYByObj(stations, kmRangeCoordinateMap, obj, direction, isSpecial) { - var defaultVlue = 0; - var station = stations.find(it => { return it.code == obj.stationCode; }); - if (station) { - defaultVlue = kmRangeCoordinateMap[`${station.kmRange}`]; - if (isSpecial) { - defaultVlue = this.getYvalueByDirectionCode(defaultVlue, direction); - } - } - - return defaultVlue; - }, - - /** 通过y坐标获取站信息 */ - getStationByCoordinateY(stations, y) { - for(var i = stations.length-1; i >= 0; i--) { - const station = stations[i]; - const edge = this.EdgeHeight - const preKm = i == 0? edge*2: Math.abs(station.kmRange-stations[i-1].kmRange)/2; - const nxtKm = i == stations.length-1? edge: Math.abs(station.kmRange-stations[i+1].kmRange)/2; - const min = edge + station.kmRange - preKm; - const max = edge + station.kmRange + nxtKm; - if (y >= min && y <= max) { - return station; - } - } - return null; - } -}; diff --git a/src/jmapNew/theme/aus_00/planConvert--.js b/src/jmapNew/theme/aus_00/planConvert--.js deleted file mode 100644 index c9ddea40c..000000000 --- a/src/jmapNew/theme/aus_00/planConvert--.js +++ /dev/null @@ -1,188 +0,0 @@ -import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; -import { toTimeStamp } from '@/utils/date'; - -export default { - /** 边缘高度*/ - EdgeHeight: 3, - - /** 间隔高度*/ - CoordMultiple: 3, - - /** 偏移时间*/ - TranslationTime: 0, - - /** 将后台数据解析成图形*/ - parseDataToGraph(chart, planData, stations, kmRangeCoordMap) { - const graphs = []; - if (planData && - planData.areaList && - planData.areaList.length) { - planData.areaList.forEach(el => { - const startTime = toTimeStamp(el.startTime); - const endTime = toTimeStamp(el.endTime); - - const fartherKm = this.getCoordYByObj(stations, kmRangeCoordMap, {stationCode: el.fartherStationCode}); - const closerKm = this.getCoordYByObj(stations, kmRangeCoordMap, {stationCode: el.closerStationCode}); - const point1 = [ startTime, fartherKm]; - const point2 = [ endTime, closerKm] - const position = chart.convertToPixel('grid', point1); - const position2 = chart.convertToPixel('grid', point2) - const width = Math.abs(position[0] - position2[0]); - const height = Math.abs(position[1] - position2[1]); - - graphs.push({ - type: 'rect', - subType: 'area', - areaNo: el.areaNo, - position, - point1, - point2, - model: el, - shape: { - x: 0, - y: 0, - width, - height - }, - style: { - fill: 'rgb(255,0,0, 0.3)', - stroke: 'rgb(255, 0, 0, 0.8)' - }, - z: 100 - }) - }) - } - - return graphs; - }, - - /** 将后台数据解析成折线*/ - parseDataToSeries(chart, planData, stations, kmRangeCoordMap) { - var models = []; - /** 按车次遍历数据*/ - if (planData && planData.length) { - planData.forEach(trip => { - const opt = { - name: `plan-${trip.tripNo}`, - type: 'line', - symbolSize: 1, - showAllSymbol: true, - lineStyle: { - color: '#000', - width: 1, - }, - itemStyle: { - color: '#000', - fill: '#000' - }, - markPoint: { data: [] }, - data: [] - }; - - /** 计算停站点坐标集合*/ - trip.stationTimeList.forEach((elem,idx) => { - if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordYByObj(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]); - } - - if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordYByObj(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]); - } - }); - - models.push(opt); - }); - } - - return models; - }, - - /** 更新数据并解析成折线*/ - updateDataToModels(chart, planData, stations, kmRangeCoordMap, runPlanData, series) { - if (planData && planData.length) { - } - return series; - }, - - /** 将后台数据转换为试图序列模型*/ - convertStationsToMap(stations) { - var map = {}; - if (stations && stations.length) { - stations.forEach((elem, index) => { - map[`${elem.kmRange}`] = this.EdgeHeight + index * this.CoordMultiple; - }); - } - - return map; - }, - /** 初始化Y轴*/ - initializeYaxis(stations) { - return createMarkLineModels(stations, (elem, index) => { - return this.EdgeHeight + index * this.CoordMultiple; - }); - }, - - /** 计算y轴最小值*/ - computedYaxisMinValue() { - return 0; - }, - - /** 计算y轴最大值*/ - computedYaxisMaxValue(stations) { - return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple; - }, - - /** 格式化y轴数据*/ - computedFormatYAxis(stations, params) { - var yText = '0m'; - var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple); - if (index >= 0 && index < stations.length) { - yText = Math.floor(stations[index].kmRange) + 'm'; - } - return yText; - }, - - /** 根据方向计算y折返偏移量*/ - getYvalueByDirectionCode(defaultVlue, directionCode) { - if (directionCode === '1') { - defaultVlue -= this.EdgeHeight / 2; - } else if (directionCode === '2') { - defaultVlue += this.EdgeHeight / 2; - } - - return defaultVlue; - }, - - /** 根据elem计算y值*/ - getCoordYByObj(stations, kmRangeCoordMap, elem, directionCode, isSpecial) { - var defaultVlue = 0; - var station = stations.find(it => { return it.code == elem.stationCode; }); - if (station) { - defaultVlue = kmRangeCoordMap[`${station.kmRange}`]; - if (isSpecial) { - defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode); - } - } - - return defaultVlue; - }, - - /** 通过y坐标获取站信息*/ - getStationByCoordinateY(stations, y) { - for(var i = stations.length-1; i >= 0; i--) { - const station = stations[i]; - const edge = this.EdgeHeight; - const rate = this.CoordMultiple; - - const preKm = i == 0? edge*2: rate/2; - const nxtKm = i == stations.length-1? edge: rate/2; - const min = edge + i*rate - preKm; - const max = edge + i*rate + nxtKm; - - if (y >= min && y <= max) { - return station; - } - } - return null; - } -}; diff --git a/src/jmapNew/theme/aus_00/planConvert.js b/src/jmapNew/theme/aus_00/planConvert.js index 3ded17833..ae521da21 100644 --- a/src/jmapNew/theme/aus_00/planConvert.js +++ b/src/jmapNew/theme/aus_00/planConvert.js @@ -78,15 +78,15 @@ export default { name: `${service.serviceNo}-${trip.tripNo}`, color: '#000', direction: trip.direction, - coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationCode(stations, trip.stationTimeList[0].stationCode)], + coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationId(stations, trip.stationTimeList[0].stationId)], }; opt.markPoint.data.push(createMartPoint(pointData)); trip.stationTimeList.forEach(elem => { if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { - stationCode: elem.stationCode, + opt.data.push([elem.arrivalTime, this.getCoordinateYByStationId(stations, elem.stationId), { + stationId: elem.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -95,8 +95,8 @@ export default { } if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { - stationCode: elem.stationCode, + opt.data.push([elem.departureTime, this.getCoordinateYByStationId(stations, elem.stationId), { + stationId: elem.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -112,8 +112,8 @@ export default { nextPoint = service.tripList[j + 1].stationTimeList[0]; opt.data.push({ - value: [lastPoint.arrivalTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { - stationCode: lastPoint.stationCode, + value: [lastPoint.arrivalTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), { + stationId: lastPoint.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -123,8 +123,8 @@ export default { symbolSize: 1, }); opt.data.push({ - value: [nextPoint.departureTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { - stationCode: lastPoint.stationCode, + value: [nextPoint.departureTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), { + stationId: lastPoint.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -209,9 +209,9 @@ export default { }, /** 通过站信息获取y坐标*/ - getCoordinateYByStationCode(stations, stationCode, isSpecial=false, direction='01') { + getCoordinateYByStationId(stations, stationId, isSpecial=false, direction='01') { var value = 0; - var station = stations.find(it => { return it.code == stationCode; }); + var station = stations.find(it => { return it.id == stationId; }); if (station) { value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction); } diff --git a/src/jmapNew/theme/aus_00/utils.js b/src/jmapNew/theme/aus_00/utils.js index 7344a6fb3..0e1c833de 100644 --- a/src/jmapNew/theme/aus_00/utils.js +++ b/src/jmapNew/theme/aus_00/utils.js @@ -209,16 +209,6 @@ export function formatTime(time) { } } -/** 通过code将名称格式化*/ -export function formatName(code) { - let name = ''; - const device = store.getters['map/getDeviceByCode'](code); - if (device) { - name = device.name; - } - return name; -} - /** 将时间格式化前补零*/ export function prefixTime(time) { let str = `${time}` || ''; diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 7b54a2398..88a30e2ac 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -7,6 +7,7 @@ + @@ -25,6 +26,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -35,7 +37,8 @@ export default { AlxeEffective, NoticeInfo, SetFault, - TrainAddPlan + TrainAddPlan, + LoadSpareTrain }, props: { selected: { @@ -97,6 +100,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -188,6 +196,13 @@ export default { } }); }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // // 设置计轴失效 // alxeFailure() { // const operate = { diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue index 0dfa44083..e870caf44 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue @@ -7,6 +7,7 @@ + @@ -24,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -34,7 +36,8 @@ export default { SectionControl, SectionCmdControl, SetFault, - TrainAddPlan + TrainAddPlan, + LoadSpareTrain }, props: { selected: { @@ -83,6 +86,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -214,6 +222,13 @@ export default { } }); }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, lock() { const step = { start: true, diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue index 793c7d90d..d4d2a75a7 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue @@ -6,6 +6,7 @@ + @@ -22,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -31,7 +33,8 @@ export default { SectionDetail, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -63,7 +66,6 @@ export default { handler: this.detail, cmdType: CMD.Section.CMD_SECTION_DETAILS } - ] }, menuForce: [ @@ -81,6 +83,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -141,6 +148,13 @@ export default { this.$refs.popMenu.close(); } }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 设置计轴失效 alxeFailure() { const step = { diff --git a/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue b/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue index 587359339..9a6c8e71a 100644 --- a/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue +++ b/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue @@ -16,12 +16,14 @@ - + + + @@ -89,7 +91,7 @@ export default { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; }, title() { - return '设置计划车'; + return '加载备用车'; }, rightTrueLabel() { return this.mapConfig.upRight ? '上行' : '下行'; diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index ead4076d8..7fd36bc6e 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -8,6 +8,7 @@ + @@ -25,6 +26,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import AllLineCancelLimit from './dialog/allLineCancelLimit'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -36,7 +38,8 @@ export default { NoticeInfo, TrainAddPlan, SetFault, - AllLineCancelLimit + AllLineCancelLimit, + LoadSpareTrain }, props: { selected: { @@ -115,6 +118,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -174,6 +182,13 @@ export default { this.$refs.popMenu.close(); } }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 新建计划车(开发专用) addPlanTrain() { commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index 669463855..ac1f0616a 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -7,6 +7,7 @@ + @@ -25,6 +26,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -35,7 +37,8 @@ export default { SpeedCmdControl, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -150,6 +153,11 @@ export default { label: this.$t('menu.menuSection.triggerFaultManagement'), handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -228,6 +236,13 @@ export default { this.$refs.popMenu.close(); } }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 设置故障 setStoppage() { commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/haerbin_01/menus/index.vue b/src/jmapNew/theme/haerbin_01/menus/index.vue index 6572f98d4..e89c40d72 100644 --- a/src/jmapNew/theme/haerbin_01/menus/index.vue +++ b/src/jmapNew/theme/haerbin_01/menus/index.vue @@ -1,7 +1,7 @@ @@ -17,6 +18,7 @@ import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -24,7 +26,8 @@ export default { PopMenu, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -58,6 +61,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -106,6 +114,13 @@ export default { this.menu = this.menuForce; } }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, doShow(point) { this.clickEvent(); this.initMenu(); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index 7db47bcce..a5f7a871b 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -105,12 +105,7 @@ export default { label: '取消临时限速', handler: this.cancelSpeed, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED - }, - // { - // label: '加载备用车', - // handler: this.loadSpare, - // cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN - // } + } ] }, menuForce: [ @@ -128,6 +123,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; diff --git a/src/jmapNew/theme/race_01/menus/menuSection.vue b/src/jmapNew/theme/race_01/menus/menuSection.vue index 3a924be67..03bd20178 100644 --- a/src/jmapNew/theme/race_01/menus/menuSection.vue +++ b/src/jmapNew/theme/race_01/menus/menuSection.vue @@ -8,6 +8,7 @@ + @@ -25,6 +26,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -36,7 +38,8 @@ export default { AlxeEffective, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -120,6 +123,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -213,6 +221,13 @@ export default { } }); }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 确认计轴有效 alxeEffective() { commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/xian_01/menus/menuSection.vue b/src/jmapNew/theme/xian_01/menus/menuSection.vue index d423fca7f..93a6d184f 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSection.vue @@ -7,6 +7,7 @@ + @@ -23,6 +24,7 @@ import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; // import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { @@ -34,7 +36,8 @@ export default { SpeedCmdControl, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -128,6 +131,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -213,6 +221,13 @@ export default { } }); }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 故障解锁 fault() { commitOperate(menuOperate.Section.fault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/xian_02/menus/menuSection.vue b/src/jmapNew/theme/xian_02/menus/menuSection.vue index 1fda1839a..ee4f3245e 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSection.vue @@ -7,6 +7,7 @@ + @@ -23,6 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; // import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; export default { @@ -34,7 +36,8 @@ export default { SpeedLimitControl, NoticeInfo, TrainAddPlan, - SetFault + SetFault, + LoadSpareTrain }, props: { selected: { @@ -132,6 +135,11 @@ export default { label: '触发故障管理', handler: this.triggerFaultManagement, cmdType: CMD.Fault.CMD_TRIGGER_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -251,6 +259,13 @@ export default { } }); }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); + }, // 区段封锁 lock() { commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 7dd4746ec..e459aa552 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,12 +2,12 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; - // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 + // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.8.144:9000'; // 旭强 // BASE_API = 'http://192.168.3.175:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + // BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/competitionManage/bankList/preImport.vue b/src/views/competitionManage/bankList/preImport.vue index 372d743d4..774d0650b 100644 --- a/src/views/competitionManage/bankList/preImport.vue +++ b/src/views/competitionManage/bankList/preImport.vue @@ -82,7 +82,7 @@ export default { currentPage: 1, tableData: [], pageSize: 10, - companyId: null, + companyId: '', companyList: [] }; }, diff --git a/src/views/competitionManage/bankList/question-form.vue b/src/views/competitionManage/bankList/question-form.vue index 5ce61ec79..bee7f896f 100644 --- a/src/views/competitionManage/bankList/question-form.vue +++ b/src/views/competitionManage/bankList/question-form.vue @@ -94,6 +94,16 @@ export default { { content: '', correct: false }, { content: '', correct: false } ]; + }, + fill: function() { + return [ + { content: '', correct: true} + ]; + }, + answer: function() { + return [ + { content: '', correct: true} + ]; } }; }, @@ -148,6 +158,7 @@ export default { answer.forEach((item, index) => { if (this.option.optionList[index]) { this.option.optionList[index].content = item; + this.option.optionList[index].correct = true; } else { this.option.optionList[index] = { content: item, correct: true }; } @@ -156,7 +167,7 @@ export default { if (this.option.optionList[0]) { this.option.optionList[0].content = answer; } else { - this.option.optionList[0] = [{content: answer, correct:true}]; + this.option.optionList[0] = {content: answer, correct:true}; } } }, diff --git a/src/views/competitionManage/setExamTime.vue b/src/views/competitionManage/setExamTime.vue index 1276e6079..057f4039e 100644 --- a/src/views/competitionManage/setExamTime.vue +++ b/src/views/competitionManage/setExamTime.vue @@ -2,10 +2,10 @@ -   分 +   分 -   分 +   分 导出 diff --git a/src/views/components/PopMenu/index.vue b/src/views/components/PopMenu/index.vue index 31f0832d3..bdb8f0a54 100644 --- a/src/views/components/PopMenu/index.vue +++ b/src/views/components/PopMenu/index.vue @@ -90,126 +90,126 @@ import { checkRectCollision } from '@/utils/index'; import { EventBus } from '@/scripts/event-bus'; export default { - name: 'PopMenu', - props: { - menu: { - type: Array, - required: true - } - }, - data() { - return { - show: false, - defaultFontSize: 14, - tPosition: { - x: -1000, - y: -1000 - }, - height: 'auto' - }; - }, - computed: { - width() { - let fontNum = 0; - this.menu.forEach(elem => { - if (elem.label && elem.label.length > fontNum) { - fontNum = elem.label.length; - } - }); - var width = fontNum * this.defaultFontSize + 40 + 'px'; - return width; - } - }, - mounted() { - EventBus.$on('closeMenu', () => { - this.$nextTick(() => { - this.show = false; - }); - }); - }, - methods: { - resetShowPosition(point) { - if (point) { - this.show = true; - const self = this; - this.$nextTick(() => { - const gutter = 3; - // 位置 - const height = self.$el.clientHeight; - const width = self.$el.clientWidth; - let px = 0; - let py = 0; - if (point.x + width > document.documentElement.clientWidth) { - px = document.documentElement.clientWidth - width - gutter; - } else { - px = point.x; - } - if (point.y + height > document.documentElement.clientHeight) { - py = document.documentElement.clientHeight - height - gutter; - } else { - py = point.y; - } - // 处理和提示框重叠问题 - const popTipDialog = document.getElementById('pop_tip_dialog'); - if (popTipDialog) { - const tipRect = { - point: { x: popTipDialog.offsetLeft, y: popTipDialog.offsetTop }, - width: popTipDialog.offsetWidth, - height: popTipDialog.offsetHeight - }; - const menuRect = { - point: { x: px, y: py }, - width: self.$el.offsetWidth, - height: self.$el.offsetHeight - }; - const collision = checkRectCollision(tipRect, menuRect); - // 若重叠,调整位置 - if (collision) { - px = tipRect.point.x + tipRect.width + gutter; - if (px + width > document.documentElement.clientWidth) { - px = tipRect.point.x - menuRect.width - gutter; - } - } - } - self.tPosition.x = px; - self.tPosition.y = py; - }); - } - }, - close() { - this.show = false; - }, - checkIfDisabled(menuObj) { - return menuObj.disabled === true; - }, - isShow(menuObj) { - if (typeof (menuObj.show) == 'undefined') { - return true; - } else { - return menuObj.show; - } - }, - calculateSubWidth(item) { - const children = item.children; - let width = 0; - let fontNum = 0; - children.forEach(elem => { - if (elem.label.length > fontNum) { - fontNum = elem.label.length; - } - }); - width = fontNum * this.defaultFontSize + 20 + 'px'; - return width; - }, - openLoadFile(item) { - const obj = this.$refs[item.label][0]; - if (obj.files) { - const file = obj.files[0]; - item.handler(file); - obj.value = ''; - } - } - } + name: 'PopMenu', + props: { + menu: { + type: Array, + required: true + } + }, + data() { + return { + show: false, + defaultFontSize: 14, + tPosition: { + x: -1000, + y: -1000 + }, + height: 'auto' + }; + }, + computed: { + width() { + let fontNum = 0; + this.menu.forEach(elem => { + if (elem.label && elem.label.length > fontNum) { + fontNum = elem.label.length; + } + }); + var width = fontNum * this.defaultFontSize + 40 + 'px'; + return width; + } + }, + mounted() { + EventBus.$on('closeMenu', () => { + this.$nextTick(() => { + this.show = false; + }); + }); + }, + methods: { + resetShowPosition(point) { + if (point) { + this.show = true; + const self = this; + this.$nextTick(() => { + const gutter = 3; + // 位置 + const height = self.$el.clientHeight; + const width = self.$el.clientWidth; + let px = 0; + let py = 0; + if (point.x + width > document.documentElement.clientWidth) { + px = document.documentElement.clientWidth - width - gutter; + } else { + px = point.x; + } + if (point.y + height > document.documentElement.clientHeight) { + py = document.documentElement.clientHeight - height - gutter; + } else { + py = point.y; + } + // 处理和提示框重叠问题 + const popTipDialog = document.getElementById('pop_tip_dialog'); + if (popTipDialog) { + const tipRect = { + point: { x: popTipDialog.offsetLeft, y: popTipDialog.offsetTop }, + width: popTipDialog.offsetWidth, + height: popTipDialog.offsetHeight + }; + const menuRect = { + point: { x: px, y: py }, + width: self.$el.offsetWidth, + height: self.$el.offsetHeight + }; + const collision = checkRectCollision(tipRect, menuRect); + // 若重叠,调整位置 + if (collision) { + px = tipRect.point.x + tipRect.width + gutter; + if (px + width > document.documentElement.clientWidth) { + px = tipRect.point.x - menuRect.width - gutter; + } + } + } + self.tPosition.x = px; + self.tPosition.y = py; + }); + } + }, + close() { + this.show = false; + }, + checkIfDisabled(menuObj) { + return menuObj.disabled === true; + }, + isShow(menuObj) { + if (typeof (menuObj.show) == 'undefined') { + return true; + } else { + return menuObj.show; + } + }, + calculateSubWidth(item) { + const children = item.children; + let width = 0; + let fontNum = 0; + children.forEach(elem => { + if (elem.label.length > fontNum) { + fontNum = elem.label.length; + } + }); + width = fontNum * this.defaultFontSize + 20 + 'px'; + return width; + }, + openLoadFile(item) { + const obj = this.$refs[item.label][0]; + if (obj.files) { + const file = obj.files[0]; + item.handler(file); + obj.value = ''; + } + } + } }; diff --git a/src/views/components/pay/finish.vue b/src/views/components/pay/finish.vue index d816e6dd2..7cd0b3c8b 100644 --- a/src/views/components/pay/finish.vue +++ b/src/views/components/pay/finish.vue @@ -32,50 +32,50 @@ import img_pay_fail from '@/assets/pay_images/PayFail.png'; import img_pay_success from '@/assets/pay_images/PaySuccess.png'; export default { - name: 'FinishDraft', - props: { - finishStatus: { - type: String, - required: true - } - }, - data() { - return { - count: 0, - maxTime: 5, - timer: null, - images: { - img_pay_fail, - img_pay_success - } - }; - }, - beforeDestroy() { - this.destroy(); - }, - methods: { - // 设置计时器,maxTime后返回 - createCountTimer() { - const that = this; - // 如果计时器已存在,则先注销 - this.destroy(); - // 重新创建定时器 - if (this.timer == null) { - this.count = this.maxTime; - this.timer = setInterval(() => { - (that.count-- <= 0) && that.finish(); - }, 1000); - } - }, - // 返回到课程首页 - finish() { - this.$emit('finish'); - }, - // 注销计时器 - destroy() { - clearInterval(this.timer); - this.timer = null; - } - } + name: 'FinishDraft', + props: { + finishStatus: { + type: String, + required: true + } + }, + data() { + return { + count: 0, + maxTime: 5, + timer: null, + images: { + img_pay_fail, + img_pay_success + } + }; + }, + beforeDestroy() { + this.destroy(); + }, + methods: { + // 设置计时器,maxTime后返回 + createCountTimer() { + const that = this; + // 如果计时器已存在,则先注销 + this.destroy(); + // 重新创建定时器 + if (this.timer == null) { + this.count = this.maxTime; + this.timer = setInterval(() => { + (that.count-- <= 0) && that.finish(); + }, 1000); + } + }, + // 返回到课程首页 + finish() { + this.$emit('finish'); + }, + // 注销计时器 + destroy() { + clearInterval(this.timer); + this.timer = null; + } + } }; diff --git a/src/views/components/progressBar/index.vue b/src/views/components/progressBar/index.vue index 7df3d9acc..6411e7093 100644 --- a/src/views/components/progressBar/index.vue +++ b/src/views/components/progressBar/index.vue @@ -14,8 +14,6 @@ \ No newline at end of file + diff --git a/src/views/components/systemTime/point.vue b/src/views/components/systemTime/point.vue index 6d03098c4..87805cf6e 100644 --- a/src/views/components/systemTime/point.vue +++ b/src/views/components/systemTime/point.vue @@ -7,21 +7,21 @@ diff --git a/src/views/components/systemTime/separator.vue b/src/views/components/systemTime/separator.vue index 555734ca3..34121c49e 100644 --- a/src/views/components/systemTime/separator.vue +++ b/src/views/components/systemTime/separator.vue @@ -9,35 +9,35 @@ import Point from './point'; export default { - name: 'Separator', - components: { - Point - }, - props: { - zoom: { - type: Number, - required: true - }, - fine: { - type: Number, - required: true - }, - color: { - type: String, - required: true - } - }, - computed: { - p() { - return this.fine * 1; - }, - w() { - return this.fine * 4; - }, - h() { - return this.zoom * 8 + this.fine * 6 + this.p*2; - } - } + name: 'Separator', + components: { + Point + }, + props: { + zoom: { + type: Number, + required: true + }, + fine: { + type: Number, + required: true + }, + color: { + type: String, + required: true + } + }, + computed: { + p() { + return this.fine * 1; + }, + w() { + return this.fine * 4; + }, + h() { + return this.zoom * 8 + this.fine * 6 + this.p * 2; + } + } }; diff --git a/src/views/demonstration/deomonTopic/index.vue b/src/views/demonstration/deomonTopic/index.vue index fee4f6092..30d7a100c 100644 --- a/src/views/demonstration/deomonTopic/index.vue +++ b/src/views/demonstration/deomonTopic/index.vue @@ -74,7 +74,7 @@ export default { async handleJoin() { try { this.loading = true; - const rest = await getPublishMapInfo(this.mapId); + await getPublishMapInfo(this.mapId); launchFullscreen(); const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group}; this.$router.push({path: `/jointTrainingNew`, query: query}); diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 7568da2c4..d6064243a 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -151,7 +151,7 @@ export default { name: this.$t('designPlatform.mapPreview'), type: 'mapPreview', mapId: elem.id, - cityCode: elem.cityCode, + cityCode: elem.cityCode } ]; this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : ''; @@ -162,7 +162,7 @@ export default { type: 'scriptDesign', mapId: elem.id, cityCode: elem.cityCode, - lineCode: elem.lineCode, + lineCode: elem.lineCode // code:elem.children.find(n => { return n.name.includes("行调")}) }); elem.children.push( @@ -172,7 +172,7 @@ export default { type: 'runPlanDesign', mapId: elem.id, lineCode: elem.lineCode, - cityCode: elem.cityCode, + cityCode: elem.cityCode } ); if (process.env.VUE_APP_PRO !== 'local') { diff --git a/src/views/error-page/404.vue b/src/views/error-page/404.vue index c94ad1250..0ccdb6a22 100644 --- a/src/views/error-page/404.vue +++ b/src/views/error-page/404.vue @@ -15,7 +15,7 @@
{{ message }}
Please check that the URL you entered is correct, or click the button below to return to the homepage.
- + @@ -23,18 +23,18 @@ diff --git a/src/views/planMonitor/editTool/menuBar.vue b/src/views/planMonitor/editTool/menuBar.vue index 909c1546f..a3c2effe2 100644 --- a/src/views/planMonitor/editTool/menuBar.vue +++ b/src/views/planMonitor/editTool/menuBar.vue @@ -123,10 +123,6 @@ import { publishRunPlan, deleteRunPlan } from '@/api/designPlatform'; export default { name: 'PlanMenuBar', props: { - // skinCode: { - // type: String, - // default: '' - // }, planConvert: { type: Object, default: function() { diff --git a/src/views/planMonitor/editTool/menus/addSmoothRunTime.vue b/src/views/planMonitor/editTool/menus/addSmoothRunTime.vue index defda51df..b729aac41 100644 --- a/src/views/planMonitor/editTool/menus/addSmoothRunTime.vue +++ b/src/views/planMonitor/editTool/menus/addSmoothRunTime.vue @@ -13,7 +13,7 @@
- {{$t('global.startTime')+$t('global.colon')}} + {{ $t('global.startTime')+$t('global.colon') }} @@ -21,7 +21,7 @@ - {{$t('global.endTime')+$t('global.colon')}} + {{ $t('global.endTime')+$t('global.colon') }} @@ -29,16 +29,16 @@ - {{$t('planMonitor.trainRunningTimeInterval')+$t('global.colon')}} + {{ $t('planMonitor.trainRunningTimeInterval')+$t('global.colon') }} - {{$t('global.colon')}} + {{ $t('global.colon') }} - {{$t('planMonitor.sizeOfTheLoopTrainProportion')+$t('global.colon')}} + {{ $t('planMonitor.sizeOfTheLoopTrainProportion')+$t('global.colon') }} @@ -48,28 +48,28 @@ - {{$t('planMonitor.applicationRouteSelection')+$t('global.colon')}} + {{ $t('planMonitor.applicationRouteSelection')+$t('global.colon') }} - {{$t('planMonitor.bothway')}} - {{$t('planMonitor.up')}} - {{$t('planMonitor.down')}} + {{ $t('planMonitor.bothway') }} + {{ $t('planMonitor.up') }} + {{ $t('planMonitor.down') }} - +
- {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }}
@@ -77,38 +77,38 @@ diff --git a/src/views/planMonitor/editToolAUS/line/modify.vue b/src/views/planMonitor/editToolAUS/line/modify.vue new file mode 100644 index 000000000..ae3e4bd19 --- /dev/null +++ b/src/views/planMonitor/editToolAUS/line/modify.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/views/planMonitor/editToolAUS/line/stations.vue b/src/views/planMonitor/editToolAUS/line/stations.vue new file mode 100644 index 000000000..2c8172df0 --- /dev/null +++ b/src/views/planMonitor/editToolAUS/line/stations.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/src/views/planMonitor/editToolAUS/dialog/planCreate.vue b/src/views/planMonitor/editToolAUS/tool/dialog/planCreate.vue similarity index 70% rename from src/views/planMonitor/editToolAUS/dialog/planCreate.vue rename to src/views/planMonitor/editToolAUS/tool/dialog/planCreate.vue index 2c87316cb..95bdca82c 100644 --- a/src/views/planMonitor/editToolAUS/dialog/planCreate.vue +++ b/src/views/planMonitor/editToolAUS/tool/dialog/planCreate.vue @@ -4,6 +4,11 @@ + + + + + {{ $t('map.cancel') }} @@ -13,20 +18,32 @@ + + diff --git a/src/views/planMonitor/editToolAUS/tool/monitor.js b/src/views/planMonitor/editToolAUS/tool/monitor.js index aaeac448f..940fcc2e1 100644 --- a/src/views/planMonitor/editToolAUS/tool/monitor.js +++ b/src/views/planMonitor/editToolAUS/tool/monitor.js @@ -7,10 +7,10 @@ export default { callRegister: [], markList: [], buildModel: { - startStationCode: '', + startStationId: '', startKmRange: 0, startTime: 0, - endStationCode: '', + endStationId: '', endKmRange: 0, endTime: 0 }, @@ -275,10 +275,10 @@ export default { if (markList.length == 1) { this.buildModel.startTime = pointInGrid[0]; - this.buildModel.startStationCode = yObj.code; + this.buildModel.startStationId = yObj.id; } else if (markList.length >= 2) { this.buildModel.endTime = pointInGrid[0]; - this.buildModel.endStationCode = yObj.code; + this.buildModel.endStationId = yObj.id; option.graphic[0].elements = elemList; this.$emit('create', this.buildModel); } @@ -375,7 +375,7 @@ export default { this.offset.x = pointInGrid[0]; this.offset.y = pointInGrid[1]; this.selected = { - stationIndex: this.stations.findIndex(el => { return el.code == obj.stationCode; }), + stationIndex: this.stations.findIndex(el => { return el.id == obj.stationId; }), dataIndex: e.dataIndex, seriesIndex: e.seriesIndex, seriesName: isService? e.seriesName: 'service-trip', diff --git a/src/views/planMonitor/editToolAUS/tool/schedule.vue b/src/views/planMonitor/editToolAUS/tool/schedule.vue index 5bdcbef18..4e8e3a6ef 100644 --- a/src/views/planMonitor/editToolAUS/tool/schedule.vue +++ b/src/views/planMonitor/editToolAUS/tool/schedule.vue @@ -204,7 +204,7 @@ export default { param.data.length) { const xVal = param.data[0]; const yObj = param.data[2]; - const station = this.stations.find(el => { return el.code == yObj.stationCode })||{ name: '', kmRange: ''}; + const station = this.stations.find(el => { return el.id == yObj.stationId })||{ name: '', kmRange: ''}; const list = [ `Service No: ${yObj.serviceNo}
`, `Trip No: ${yObj.tripNo}
`, @@ -331,6 +331,11 @@ export default { reSize({width, height}) { if (this.myChart) { this.myChart.resize({ width, height, silent: false }); + } + }, + clear() { + if (this.myChart) { + this.myChart.clear(); } }, destroy() { diff --git a/src/views/planSchedule/index.vue b/src/views/planSchedule/index.vue index 5ef6d523e..b00fb12d1 100644 --- a/src/views/planSchedule/index.vue +++ b/src/views/planSchedule/index.vue @@ -38,7 +38,7 @@ export default { } }, data() { - return {}; + return {}; }, computed: { skinCode() { diff --git a/src/views/planSchedule/menuBar.vue b/src/views/planSchedule/menuBar.vue index 5e3b63b01..cef0f2fd9 100644 --- a/src/views/planSchedule/menuBar.vue +++ b/src/views/planSchedule/menuBar.vue @@ -3,23 +3,23 @@