# Conflicts:
#	src/api/competition.js
This commit is contained in:
joylink_cuiweidong 2020-10-28 15:56:23 +08:00
commit cdb56ef33b
118 changed files with 2574 additions and 4618 deletions

View File

@ -22,13 +22,7 @@ export function deleteCompany(id) {
method: 'delete' method: 'delete'
}); });
} }
// /** 根据id查询公司信心 */
// export function getCompanyById(id) {
// return request({
// url: `/api/company/${id}`,
// method: 'get'
// });
// }
/** 更新公司信息 */ /** 更新公司信息 */
export function updateCompany(id, data) { export function updateCompany(id, data) {
return request({ return request({

View File

@ -7,20 +7,7 @@ export function refereeExitSimulation(group) {
method: 'delete' 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) { export function participantCreatTrainingRoom(id, data) {
return request({ 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 = {}) { export function getIsSignUp(raceId, params = {}) {
return request({ 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) { export function postCompetitionTheory(data) {
return request({ 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) { export function getRaceUserById(raceId) {
return request({ 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项目使用 // 以下drts项目使用
/** 项目获取试题列表 */ /** 项目获取试题列表 */

View File

@ -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) { export function loadDraftScriptNew(memberId, group) {
return request({ return request({
@ -153,12 +145,3 @@ export function loadDraftScriptNew(memberId, group) {
method: 'put' method: 'put'
}); });
} }
// /** 剧本预览选择角色 */
// export function loadDraftScriptNewMode(memberId, group, mode) {
// return request({
// url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`,
// method: 'put'
// });
// }

View File

@ -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) { export function dragSortLessonChapter(data) {
return request({ return request({

View File

@ -16,14 +16,6 @@ export function getPublishMapListOnline() {
}); });
} }
// /** 根据皮肤获取发布地图列表*/
// export function getPublishMapListByLineCode(lineCode) {
// return request({
// url: `/api/map/${lineCode}/list`,
// method: 'get'
// });
// }
/** 根据地图id获取地图版本信息*/ /** 根据地图id获取地图版本信息*/
export function getPublishMapVersionById(id) { export function getPublishMapVersionById(id) {
return request({ 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) { export function checkMapName(name) {
return request({ 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) { export function updatePublishMapInfo(data) {
return request({ 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获取仿真地图数据 */ /** 新版地图根据仿真mapId获取仿真地图数据 */
export function getNewMapDataByMapId(mapId) { export function getNewMapDataByMapId(mapId) {
return request({ return request({

View File

@ -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) { export function saveAsMap(data) {
return request({ 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) { export function verifyMap(id) {
return request({ 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) { export function listRoutingData(mapId, params) {
return request({ 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新数据 // 分页获取自动信号列表 new新数据
export function getAutoSignalListNew(mapId, params) { export function getAutoSignalListNew(mapId, params) {
return request({ return request({
@ -392,14 +225,6 @@ export function putAutoSignalNew(data) {
data: data data: data
}); });
} }
// export function getListByCityCode(cityCode) {
// return request({
// url: `/api/mapBuild/${cityCode}/list`,
// method: 'get'
// });
// }
// 创建信号机接近区段 // 创建信号机接近区段
export function postApproachSection(data) { export function postApproachSection(data) {
return request({ return request({
@ -464,12 +289,6 @@ export function delContinueProtect(id) {
method: 'delete' method: 'delete'
}); });
} }
// export function getContinueProtectById(id) {
// return request({
// url: `/api/mapBuild/overlap/${id}`,
// method: 'get'
// });
// }
export function getContinueProtectList(mapId, params) { export function getContinueProtectList(mapId, params) {
return request({ return request({
url: `/api/mapBuild/${mapId}/overlap/paging`, url: `/api/mapBuild/${mapId}/overlap/paging`,
@ -545,15 +364,6 @@ export function getRouteNewList(mapId, params) {
params params
}); });
} }
// // 获取自动折返分组列表
// export function getAutoReentryGroupList(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/autoReentry/group/reentryTrack`,
// method: 'get',
// params
// });
// }
// 新建进路侧防 // 新建进路侧防
export function postFlankProtection(data) { export function postFlankProtection(data) {
return request({ return request({

View File

@ -1,44 +1,2 @@
// import request from '@/utils/request'; // 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
// });
// }

View File

@ -1,29 +1,5 @@
import request from '@/utils/request'; 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) { export function sendTrainingNextStep(data, group) {
return request({ 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*/ /** 查询实训列表 0*/
export function pageQueryTraining(params) { export function pageQueryTraining(params) {
return request({ return request({
@ -69,41 +19,6 @@ export function pageQueryTraining(params) {
params: 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) { export function sendCommand(group, command) {
return request({ return request({
url: `/api/training/deviceChange?group=${group}`, url: `/api/training/deviceChange?group=${group}`,
@ -125,29 +40,6 @@ export function sendCommandNew(group, commandDefinitionId, command) {
data: 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) { export function startTrainingNew (args, group) {

View File

@ -1,34 +1,5 @@
import request from '@/utils/request'; 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) { export function checkRoomExistNew(params) {
return request({ 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) { export function putUserRolesNew(data, group) {
return request({ 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) { export function putJointTrainingSimulationUserNew(group) {
return request({ 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
// }
// });
// }

View File

@ -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) { export function getPermissonDetail(id) {
return request({ 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) { export function setLessonPermisson(data) {
return request({ 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) { export function listPermision(params) {
return request({ return request({
url: `/api/userPermission`, url: `/api/userPermission`,
@ -88,9 +53,7 @@ export function listPermision(params) {
}); });
} }
/** /** 个人权限列表*/
* 个人权限列表
*/
export function listUserPermision(params) { export function listUserPermision(params) {
return request({ return request({
url: `/api/userPermission/my`, 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) { export function putPermissionOwner(data) {
return request({ return request({

View File

@ -48,10 +48,7 @@ export function update(data) {
}); });
} }
/** /** 根据字典code获取明细列表*/
* 根据字典code获取明细列表
* @param {*} code
*/
export function getDetailList(code) { export function getDetailList(code) {
return request({ return request({
url: '/api/dictionary/getDetailListByCode', url: '/api/dictionary/getDetailListByCode',

View File

@ -1,32 +1,5 @@
import request from '@/utils/request'; 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) { export function getPermission(state) {
return request({ 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) { export function listPackagePermission(params) {
return request({ 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) { export function restorePackagePermission(id) {
return request({ 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) { export function setCommodityStatus(id) {
return request({ return request({
@ -148,11 +68,3 @@ export function givePermission(data) {
data: data data: data
}); });
} }
// /** 查询权限分发领取用户列表 */
// export function distributeUsers(distributeId) {
// return request({
// url: `/api/distribute/${distributeId}/distributeUsers`,
// method: 'get'
// });
// }

View File

@ -93,11 +93,3 @@ export function updateExamRules(data) {
data: data data: data
}); });
} }
// /** 根据课程ID获取试卷 */
// export function getExamParperList(lessonId) {
// return request({
// url: `/api/exam/${lessonId}/list`,
// method: 'get'
// });
// }

View File

@ -9,9 +9,7 @@ export function getCommodityDetailByParams(data) {
}); });
} }
/** /** 获取商品明细列表*/
* 获取商品明细列表
*/
export function getCommodityList(params) { export function getCommodityList(params) {
return request({ return request({
url: '/api/goods', 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) { export function delCommodity(id) {
return request({ return request({
url: `/api/goods/${id}`, 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) { export function updataCommodityList(data) {
return request({ return request({
url: `/api/goods/${data.id}`, url: `/api/goods/${data.id}`,
@ -72,9 +35,7 @@ export function updataCommodityList(data) {
}); });
} }
/** /** 设置失效或有效切换*/
* 设置失效或有效切换
*/
export function setCommodityStatus(id) { export function setCommodityStatus(id) {
return request({ return request({
url: `/api/goods/${id}/status`, 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) { export function getGoodsListByOrderId(id) {
return request({ return request({

View File

@ -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) { export function updateSkinCode(data) {
return request({ 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() { export function getLineCodeList() {
return request({ return request({

View File

@ -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) { export function createOrder(data) {
return request({ 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) { export function getOrderCharge(id) {
return request({ 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) { export function getDistributeFromOrder(orderCode) {
return request({ return request({

View File

@ -1,29 +1,4 @@
import request from '@/utils/request'; 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() { 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() { export function getSellerList() {
return request({ return request({
@ -211,14 +177,6 @@ export function exportStudentResults(projectCode, data) {
data: data data: data
}); });
} }
// // 生成绑定微信二维码
// export function getWxQrCode(params) {
// return request({
// url: `/api/user/wmurl`,
// method: 'get',
// params: params
// });
// }
// 获取微信小程序绑定二维码 // 获取微信小程序绑定二维码
export function getBindWxQrCodeUrl() { export function getBindWxQrCodeUrl() {

View File

@ -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) { export function updateExam(data) {
return request({ return request({
url: `/api/userExam/${data.id}`, url: `/api/userExam/${data.id}`,

View File

@ -85,6 +85,7 @@ export function setPscConfig(id, data) {
data: data data: data
}); });
} }
/** 添加/修改ibp设备配置 */ /** 添加/修改ibp设备配置 */
export function setVrIbpConfig(id, data) { export function setVrIbpConfig(id, data) {
return request({ return request({

View File

@ -1,12 +1,5 @@
import request from '@/utils/request'; import request from '@/utils/request';
// /** 获取出题规则列表 */
// export function getQuestionRuleList() {
// return request({
// url: `/api/questionsRule`,
// method: 'get'
// });
// }
/** 添加出题规则 */ /** 添加出题规则 */
export function addQuestionRule(data) { export function addQuestionRule(data) {
return request({ return request({
@ -30,13 +23,7 @@ export function deleteQuestionRule(id) {
method: 'delete' method: 'delete'
}); });
} }
// /** 查询单个出题规则 */
// export function selectedQuestionRule(id) {
// return request({
// url: `/api/questionsRule/${id}`,
// method: 'get'
// });
// }
/** 更改出题规则内容 */ /** 更改出题规则内容 */
export function updateQuestionRule(id, data) { export function updateQuestionRule(id, data) {
return request({ return request({

View File

@ -1,38 +1,5 @@
import request from '@/utils/request'; 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) { export function importQuestionBand(data, companyId) {
return request({ return request({

View File

@ -1,5 +1,36 @@
import request from '@/utils/request'; 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) { export function createRp(data) {
return request({ return request({
url: `/api/rpTools`, url: `/api/rpTools`,
@ -22,18 +51,16 @@ export function createRp(data) {
} }
/** /**
* 删除运行图 * 删除运行图
*/ */
export function deleteRp(planId) { export function deleteRp(groupId) {
return request({ return request({
url: `/api/rpTools/${planId}`, url: `/api/rpTools/${groupId}`,
method: 'delete' method: 'delete'
}); })
} }
/** /** 获取运行图配置*/
* 获取运行图配置
*/
export function getRpConfig(planId) { export function getRpConfig(planId) {
return request({ return request({
url: `/api/rpTools/${planId}/config`, url: `/api/rpTools/${planId}/config`,
@ -41,9 +68,7 @@ export function getRpConfig(planId) {
}); });
} }
/** /** 修改运行图配置*/
* 修改运行图配置
*/
export function modifyRpConfig(planId, data) { export function modifyRpConfig(planId, data) {
return request({ return request({
url: `/api/rpTools/${planId}/config`, url: `/api/rpTools/${planId}/config`,
@ -52,9 +77,7 @@ export function modifyRpConfig(planId, data) {
}); });
} }
/** /** 获取运行图数据*/
* 获取运行图数据
*/
export function getRpTools(planId) { export function getRpTools(planId) {
return request({ return request({
url: `/api/rpTools/${planId}`, 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) { export function addRpTrip(planId, data) {
return request({ return request({
url: `/api/rpTools/${planId}/trip`, url: `/api/rpTools/${planId}/trip`,
@ -83,9 +94,7 @@ export function addRpTrip(planId, data) {
}); });
} }
/** /** 删除车次*/
* 删除车次
*/
export function delRpTrip(planId, tripNo) { export function delRpTrip(planId, tripNo) {
return request({ return request({
url: `/api/rpTools/${planId}/${tripNo}/trip`, url: `/api/rpTools/${planId}/${tripNo}/trip`,
@ -93,9 +102,7 @@ export function delRpTrip(planId, tripNo) {
}); });
} }
/** /** 平移服务*/
* 平移服务
*/
export function translateRpService(planId, serviceNo, data) { export function translateRpService(planId, serviceNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`, url: `/api/rpTools/${planId}/${serviceNo}/service`,
@ -104,9 +111,7 @@ export function translateRpService(planId, serviceNo, data) {
}); });
} }
/** /** 删除服务*/
* 删除服务
*/
export function delRpService(planId, serviceNo) { export function delRpService(planId, serviceNo) {
return request({ return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`, url: `/api/rpTools/${planId}/${serviceNo}/service`,
@ -114,9 +119,7 @@ export function delRpService(planId, serviceNo) {
}); });
} }
/** /** 添加区域*/
* 添加区域
*/
export function createRpArea(planId, data) { export function createRpArea(planId, data) {
return request({ return request({
url: `/api/rpTools/${planId}/area`, url: `/api/rpTools/${planId}/area`,
@ -125,9 +128,7 @@ export function createRpArea(planId, data) {
}); });
} }
/** /** 修改区域*/
* 修改区域
*/
export function modifyRpArea(planId, areaNo, data) { export function modifyRpArea(planId, areaNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${areaNo}/area`, url: `/api/rpTools/${planId}/${areaNo}/area`,
@ -136,9 +137,7 @@ export function modifyRpArea(planId, areaNo, data) {
}); });
} }
/** /** 修改区域文字*/
* 修改区域文字
*/
export function modifyAreaNote(planId, areaNo, data) { export function modifyAreaNote(planId, areaNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${areaNo}/text`, url: `/api/rpTools/${planId}/${areaNo}/text`,
@ -146,9 +145,7 @@ export function modifyAreaNote(planId, areaNo, data) {
data data
}); });
} }
/** /** 删除区域*/
* 删除区域
*/
export function delRpArea(planId, areaNo) { export function delRpArea(planId, areaNo) {
return request({ return request({
url: `/api/rpTools/${planId}/${areaNo}/area`, url: `/api/rpTools/${planId}/${areaNo}/area`,
@ -156,9 +153,7 @@ export function delRpArea(planId, areaNo) {
}); });
} }
/** /** 修改运行时间*/
* 修改运行时间
*/
export function justTripNoRunning(planId, tripNo, data) { export function justTripNoRunning(planId, tripNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${tripNo}/running`, url: `/api/rpTools/${planId}/${tripNo}/running`,
@ -167,9 +162,7 @@ export function justTripNoRunning(planId, tripNo, data) {
}); });
} }
/** /** 修改停站时间*/
* 修改停站时间
*/
export function justTripNoStop(planId, tripNo, data) { export function justTripNoStop(planId, tripNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${tripNo}/stop`, url: `/api/rpTools/${planId}/${tripNo}/stop`,
@ -178,9 +171,7 @@ export function justTripNoStop(planId, tripNo, data) {
}); });
} }
/** /** 修改折返时间*/
* 修改折返时间
*/
export function justTripTurnBack(planId, tripNo, data) { export function justTripTurnBack(planId, tripNo, data) {
return request({ return request({
url: `/api/rpTools/${planId}/${tripNo}/turnBack`, url: `/api/rpTools/${planId}/${tripNo}/turnBack`,

View File

@ -1,19 +1,6 @@
import request from '@/utils/request'; import request from '@/utils/request';
// /** /** 获取运行图的车站列表*/
// * 新建地图速度等级列表
// */
// export function newSpeedLevels(data) {
// return request({
// url: '/api/runPlan/draft/speed',
// method: 'post',
// data: data
// });
// }
/**
* 获取运行图的车站列表
*/
export function getStationList(mapId) { export function getStationList(mapId) {
return request({ return request({
url: `/api/runPlan/draft/station/${mapId}`, 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) { export function queryRunPlan(planId) {
return request({ return request({
url: `/api/runPlan/draft/${planId}`, url: `/api/runPlan/draft/${planId}`,
@ -96,9 +70,7 @@ export function publishRunPlan(data) {
}); });
} }
/** /** 导入真实运行图*/
* 导入真实运行图
*/
export function importRunPlan(data) { export function importRunPlan(data) {
return request({ return request({
url: `/api/runPlan/draft/${data.mapId}/prdPlan`, 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) { export function getMapStationRun(mapId) {
return request({ return request({

View File

@ -1,58 +1,12 @@
import request from '@/utils/request'; 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) { export function generateSchedulingAgain(group) {
return request({ return request({
url: `/api/scheduling/${group}/rebuild`, url: `/api/scheduling/${group}/rebuild`,
method: 'delete' method: 'delete'
}); });
} }
// /** 生成地图通用派班计划 */
// export function generateCommonScheduling (data) {
// return request({
// url: `/api/v1/scheduling/generate/common`,
// method: 'post',
// data
// });
// }
/** 查询某天的派班计划 */ /** 查询某天的派班计划 */
export function querySechedulingNew (group, params) { export function querySechedulingNew (group, params) {
return request({ return request({

View File

@ -1,14 +1,5 @@
import request from '@/utils/request'; import request from '@/utils/request';
// /** 分页查找上线的剧本*/
// export function getScriptPageListOnline(params) {
// return request({
// url: `/api/script/paging/online`,
// method: 'get',
// params: params
// });
// }
/** 分页查找上线的剧本(新版)*/ /** 分页查找上线的剧本(新版)*/
export function getScriptPageListOnlineNew(params) { export function getScriptPageListOnlineNew(params) {
return request({ 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查询发布的剧本的详细信息(新版) */ /** 通过ID查询发布的剧本的详细信息(新版) */
export function getScriptByIdNew(id) { export function getScriptByIdNew(id) {
return request({ 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查询未发布剧本的详细信息(新版) */ /** 通过group查询未发布剧本的详细信息(新版) */
export function getDraftScriptByGroupNew(group) { export function getDraftScriptByGroupNew(group) {
return request({ 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) { export function postScriptImport(mapId, name, data) {
return request({ return request({

View File

@ -1,23 +1,5 @@
import request from '@/utils/request'; 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) { export function setFailureModeNew(data, group) {
return request({ 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删除故障规则 */ /** 根据id删除故障规则 */
export function deleteFailureRule(id) { export function deleteFailureRule(id) {
return request({ 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) { export function runDiagramQuit(group) {
return request({ return request({
url: `/api/simulation/${group}/quit`, 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 }) { export function trainingNotifyNew({ trainingId }) {
return request({ return request({
@ -159,16 +46,7 @@ export function trainingNotifyNew({ trainingId }) {
method: 'get' method: 'get'
}); });
} }
// /**
// * 考试系统CBTC
// * @param {*} data
// */
// export function examNotify({ examId }) {
// return request({
// url: `/api/simulation/exam/${examId}`,
// method: 'get'
// });
// }
/** 考试系统(新版地图)*/ /** 考试系统(新版地图)*/
export function examNotifyNew({ examId }) { export function examNotifyNew({ examId }) {
return request({ 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) { export function scriptRecordNotifyNew(scriptId) {
return request({ 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) { export function saveScriptScenesNew(group) {
return request({ 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) { export function saveScriptDataNew(group) {
return request({ 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) { export function updateMapLocationNew(group, data) {
return request({ 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) { export function dumpScriptDataNew(group) {
return request({ 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) { export function modifyScriptActionNew(group, data) {
return request({ return request({
@ -461,22 +163,6 @@ export function deleteExistingSimulation(group) {
method: 'delete' 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) { 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) { export function loadScriptNew(scriptId, memberId, group) {
return request({ 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) { export function quitScriptNew(group) {
return request({ 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) { export function simulationPause(group) {
return request({ 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) { export function executeScriptNew(group) {
return request({ 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盘事件 */ /** 处理ibp盘事件 */
export function handlerIbpEvent(group, button, stationCode) { export function handlerIbpEvent(group, button, stationCode) {
return request({ 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获取仿真运行图 */ /** 新版地图根据group获取仿真运行图 */
export function getEveryDayRunPlanNew(group) { export function getEveryDayRunPlanNew(group) {
return request({ 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) { export function getTripNumberList(group) {
return request({ return request({

View File

@ -1,89 +1 @@
// import request from '@/utils/request'; // 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
// }
// });
// }

View File

@ -15,18 +15,18 @@
<script> <script>
export default { export default {
name: 'Hamburger', name: 'Hamburger',
props: { props: {
isActive: { isActive: {
type: Boolean, type: Boolean,
default: false default: false
} }
}, },
methods: { methods: {
toggleClick() { toggleClick() {
this.$emit('toggleClick'); this.$emit('toggleClick');
} }
} }
}; };
</script> </script>

View File

@ -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;
}
};

View File

@ -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;
}
};

View File

@ -78,15 +78,15 @@ export default {
name: `${service.serviceNo}-${trip.tripNo}`, name: `${service.serviceNo}-${trip.tripNo}`,
color: '#000', color: '#000',
direction: trip.direction, 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)); opt.markPoint.data.push(createMartPoint(pointData));
trip.stationTimeList.forEach(elem => { trip.stationTimeList.forEach(elem => {
if (elem.arrivalTime) { if (elem.arrivalTime) {
opt.data.push([elem.arrivalTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { opt.data.push([elem.arrivalTime, this.getCoordinateYByStationId(stations, elem.stationId), {
stationCode: elem.stationCode, stationId: elem.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -95,8 +95,8 @@ export default {
} }
if (elem.departureTime) { if (elem.departureTime) {
opt.data.push([elem.departureTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { opt.data.push([elem.departureTime, this.getCoordinateYByStationId(stations, elem.stationId), {
stationCode: elem.stationCode, stationId: elem.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -112,8 +112,8 @@ export default {
nextPoint = service.tripList[j + 1].stationTimeList[0]; nextPoint = service.tripList[j + 1].stationTimeList[0];
opt.data.push({ opt.data.push({
value: [lastPoint.arrivalTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { value: [lastPoint.arrivalTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), {
stationCode: lastPoint.stationCode, stationId: lastPoint.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -123,8 +123,8 @@ export default {
symbolSize: 1, symbolSize: 1,
}); });
opt.data.push({ opt.data.push({
value: [nextPoint.departureTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { value: [nextPoint.departureTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), {
stationCode: lastPoint.stationCode, stationId: lastPoint.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -209,9 +209,9 @@ export default {
}, },
/** 通过站信息获取y坐标*/ /** 通过站信息获取y坐标*/
getCoordinateYByStationCode(stations, stationCode, isSpecial=false, direction='01') { getCoordinateYByStationId(stations, stationId, isSpecial=false, direction='01') {
var value = 0; var value = 0;
var station = stations.find(it => { return it.code == stationCode; }); var station = stations.find(it => { return it.id == stationId; });
if (station) { if (station) {
value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction); value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction);
} }

View File

@ -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) { export function prefixTime(time) {
let str = `${time}` || ''; let str = `${time}` || '';

View File

@ -7,6 +7,7 @@
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <set-fault ref="setFault" pop-class="beijing-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="beijing-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="beijing-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="beijing-01__systerm" />
</div> </div>
</template> </template>
@ -25,6 +26,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan'; import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -35,7 +37,8 @@ export default {
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo,
SetFault, SetFault,
TrainAddPlan TrainAddPlan,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -97,6 +100,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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() { // alxeFailure() {
// const operate = { // const operate = {

View File

@ -7,6 +7,7 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<set-fault ref="setFault" pop-class="chengdou-01__system" /> <set-fault ref="setFault" pop-class="chengdou-01__system" />
<train-add-plan ref="trainAddPlan" pop-class="chengdou-01__system" /> <train-add-plan ref="trainAddPlan" pop-class="chengdou-01__system" />
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-01__system" />
</div> </div>
</template> </template>
@ -24,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -34,7 +36,8 @@ export default {
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl,
SetFault, SetFault,
TrainAddPlan TrainAddPlan,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -83,6 +86,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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() { lock() {
const step = { const step = {
start: true, start: true,

View File

@ -6,6 +6,7 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" /> <set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" />
</div> </div>
</template> </template>
@ -22,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -31,7 +33,8 @@ export default {
SectionDetail, SectionDetail,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -63,7 +66,6 @@ export default {
handler: this.detail, handler: this.detail,
cmdType: CMD.Section.CMD_SECTION_DETAILS cmdType: CMD.Section.CMD_SECTION_DETAILS
} }
] ]
}, },
menuForce: [ menuForce: [
@ -81,6 +83,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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(); 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() { alxeFailure() {
const step = { const step = {

View File

@ -16,12 +16,14 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-option <el-select v-model="addModel.groupNumber" size="mini">
v-for="item in trainList" <el-option
:key="item.code" v-for="item in trainList"
:label="item.code" :key="item.code"
:value="item.code" :label="item.code"
/> :value="item.code"
/>
</el-select>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<el-select v-model="addModel.right" size="mini"> <el-select v-model="addModel.right" size="mini">
@ -89,7 +91,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
}, },
title() { title() {
return '设置计划车'; return '加载备用车';
}, },
rightTrueLabel() { rightTrueLabel() {
return this.mapConfig.upRight ? '上行' : '下行'; return this.mapConfig.upRight ? '上行' : '下行';

View File

@ -8,6 +8,7 @@
<train-add-plan ref="trainAddPlan" pop-class="foshan-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="foshan-01__systerm" />
<set-fault ref="setFault" pop-class="foshan-01__systerm" /> <set-fault ref="setFault" pop-class="foshan-01__systerm" />
<all-line-cancel-limit ref="allLineCancelLimit" /> <all-line-cancel-limit ref="allLineCancelLimit" />
<load-spare-train ref="loadSpareTrain" pop-class="foshan-01__systerm" />
</div> </div>
</template> </template>
@ -25,6 +26,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import AllLineCancelLimit from './dialog/allLineCancelLimit'; import AllLineCancelLimit from './dialog/allLineCancelLimit';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -36,7 +38,8 @@ export default {
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault, SetFault,
AllLineCancelLimit AllLineCancelLimit,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -115,6 +118,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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(); 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() { addPlanTrain() {
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{

View File

@ -7,6 +7,7 @@
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" /> <notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="fuzhou-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="fuzhou-01__systerm" />
<set-fault ref="setFault" pop-class="fuzhou-01__systerm" /> <set-fault ref="setFault" pop-class="fuzhou-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="fuzhou-01__systerm" />
</div> </div>
</template> </template>
@ -25,6 +26,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -35,7 +37,8 @@ export default {
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -150,6 +153,11 @@ export default {
label: this.$t('menu.menuSection.triggerFaultManagement'), label: this.$t('menu.menuSection.triggerFaultManagement'),
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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(); 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() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<menu-bar v-if="$store.state.training.prdType === '01'" ref="menuBar" :selected="selected" /> <menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />

View File

@ -0,0 +1,44 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" :title="title" :visible.sync="show" width="420px" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div>
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="time"
label="日期/时间"
width="180"
/>
<el-table-column
prop="name"
label="等级"
width="180"
/>
<el-table-column
prop="address"
label="设备类型"
/>
<el-table-column
prop="address"
label="设备编号"
/>
</el-table>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'Alarm',
data() {
return {
tableData: []
};
}
};
</script>
<style scoped>
</style>

View File

@ -4,6 +4,7 @@
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" /> <notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="haerbin-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" /> <set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="haerbin-01__systerm" />
</div> </div>
</template> </template>
@ -17,6 +18,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -24,7 +26,8 @@ export default {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -58,6 +61,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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; 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) { doShow(point) {
this.clickEvent(); this.clickEvent();
this.initMenu(); this.initMenu();

View File

@ -105,12 +105,7 @@ export default {
label: '取消临时限速', label: '取消临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
}, }
// {
// label: '',
// handler: this.loadSpare,
// cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
// }
] ]
}, },
menuForce: [ menuForce: [
@ -128,6 +123,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
} }
] ]
}; };

View File

@ -8,6 +8,7 @@
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
@ -25,6 +26,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -36,7 +38,8 @@ export default {
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -120,6 +123,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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() { alxeEffective() {
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{

View File

@ -7,6 +7,7 @@
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" /> <notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="xian-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="xian-01__systerm" />
<set-fault ref="setFault" pop-class="xian-01__systerm" /> <set-fault ref="setFault" pop-class="xian-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="xian-01__systerm" />
</div> </div>
</template> </template>
@ -23,6 +24,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; // import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
@ -34,7 +36,8 @@ export default {
SpeedCmdControl, SpeedCmdControl,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -128,6 +131,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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() { fault() {
commitOperate(menuOperate.Section.fault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.fault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -7,6 +7,7 @@
<notice-info ref="noticeInfo" pop-class="xian-02__system" /> <notice-info ref="noticeInfo" pop-class="xian-02__system" />
<set-fault ref="setFault" pop-class="xian-02__system" /> <set-fault ref="setFault" pop-class="xian-02__system" />
<train-add-plan ref="trainAddPlan" pop-class="xian-02__system" /> <train-add-plan ref="trainAddPlan" pop-class="xian-02__system" />
<load-spare-train ref="loadSpareTrain" pop-class="xian-02__system" />
</div> </div>
</template> </template>
@ -23,6 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; // import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
@ -34,7 +36,8 @@ export default {
SpeedLimitControl, SpeedLimitControl,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -132,6 +135,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT 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() { lock() {
commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{

View File

@ -2,12 +2,12 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪 BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.8.144:9000'; // 旭强 // BASE_API = 'http://192.168.8.144:9000'; // 旭强
// BASE_API = 'http://192.168.3.175: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://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -82,7 +82,7 @@ export default {
currentPage: 1, currentPage: 1,
tableData: [], tableData: [],
pageSize: 10, pageSize: 10,
companyId: null, companyId: '',
companyList: [] companyList: []
}; };
}, },

View File

@ -94,6 +94,16 @@ export default {
{ content: '', correct: false }, { content: '', correct: false },
{ 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) => { answer.forEach((item, index) => {
if (this.option.optionList[index]) { if (this.option.optionList[index]) {
this.option.optionList[index].content = item; this.option.optionList[index].content = item;
this.option.optionList[index].correct = true;
} else { } else {
this.option.optionList[index] = { content: item, correct: true }; this.option.optionList[index] = { content: item, correct: true };
} }
@ -156,7 +167,7 @@ export default {
if (this.option.optionList[0]) { if (this.option.optionList[0]) {
this.option.optionList[0].content = answer; this.option.optionList[0].content = answer;
} else { } else {
this.option.optionList[0] = [{content: answer, correct:true}]; this.option.optionList[0] = {content: answer, correct:true};
} }
} }
}, },

View File

@ -2,10 +2,10 @@
<el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="试卷导出" width="500px"> <el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="试卷导出" width="500px">
<el-form ref="form" :model="form" label-width="150px" :rules="rules"> <el-form ref="form" :model="form" label-width="150px" :rules="rules">
<el-form-item label="理论竞赛时长:" prop="theoryExamTime"> <el-form-item label="理论竞赛时长:" prop="theoryExamTime">
<el-input-number v-model="form.theoryExamTime" controls-position :min="1" /><span>&nbsp&nbsp</span> <el-input-number v-model="form.theoryExamTime" controls-position :min="1" /><span>&nbsp;&nbsp;</span>
</el-form-item> </el-form-item>
<el-form-item label="实操竞赛时长:" prop="operateExamTime"> <el-form-item label="实操竞赛时长:" prop="operateExamTime">
<el-input-number v-model="form.operateExamTime" controls-position :min="1" /><span>&nbsp&nbsp</span> <el-input-number v-model="form.operateExamTime" controls-position :min="1" /><span>&nbsp;&nbsp;</span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>

View File

@ -90,126 +90,126 @@ import { checkRectCollision } from '@/utils/index';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'PopMenu', name: 'PopMenu',
props: { props: {
menu: { menu: {
type: Array, type: Array,
required: true required: true
} }
}, },
data() { data() {
return { return {
show: false, show: false,
defaultFontSize: 14, defaultFontSize: 14,
tPosition: { tPosition: {
x: -1000, x: -1000,
y: -1000 y: -1000
}, },
height: 'auto' height: 'auto'
}; };
}, },
computed: { computed: {
width() { width() {
let fontNum = 0; let fontNum = 0;
this.menu.forEach(elem => { this.menu.forEach(elem => {
if (elem.label && elem.label.length > fontNum) { if (elem.label && elem.label.length > fontNum) {
fontNum = elem.label.length; fontNum = elem.label.length;
} }
}); });
var width = fontNum * this.defaultFontSize + 40 + 'px'; var width = fontNum * this.defaultFontSize + 40 + 'px';
return width; return width;
} }
}, },
mounted() { mounted() {
EventBus.$on('closeMenu', () => { EventBus.$on('closeMenu', () => {
this.$nextTick(() => { this.$nextTick(() => {
this.show = false; this.show = false;
}); });
}); });
}, },
methods: { methods: {
resetShowPosition(point) { resetShowPosition(point) {
if (point) { if (point) {
this.show = true; this.show = true;
const self = this; const self = this;
this.$nextTick(() => { this.$nextTick(() => {
const gutter = 3; const gutter = 3;
// //
const height = self.$el.clientHeight; const height = self.$el.clientHeight;
const width = self.$el.clientWidth; const width = self.$el.clientWidth;
let px = 0; let px = 0;
let py = 0; let py = 0;
if (point.x + width > document.documentElement.clientWidth) { if (point.x + width > document.documentElement.clientWidth) {
px = document.documentElement.clientWidth - width - gutter; px = document.documentElement.clientWidth - width - gutter;
} else { } else {
px = point.x; px = point.x;
} }
if (point.y + height > document.documentElement.clientHeight) { if (point.y + height > document.documentElement.clientHeight) {
py = document.documentElement.clientHeight - height - gutter; py = document.documentElement.clientHeight - height - gutter;
} else { } else {
py = point.y; py = point.y;
} }
// //
const popTipDialog = document.getElementById('pop_tip_dialog'); const popTipDialog = document.getElementById('pop_tip_dialog');
if (popTipDialog) { if (popTipDialog) {
const tipRect = { const tipRect = {
point: { x: popTipDialog.offsetLeft, y: popTipDialog.offsetTop }, point: { x: popTipDialog.offsetLeft, y: popTipDialog.offsetTop },
width: popTipDialog.offsetWidth, width: popTipDialog.offsetWidth,
height: popTipDialog.offsetHeight height: popTipDialog.offsetHeight
}; };
const menuRect = { const menuRect = {
point: { x: px, y: py }, point: { x: px, y: py },
width: self.$el.offsetWidth, width: self.$el.offsetWidth,
height: self.$el.offsetHeight height: self.$el.offsetHeight
}; };
const collision = checkRectCollision(tipRect, menuRect); const collision = checkRectCollision(tipRect, menuRect);
// //
if (collision) { if (collision) {
px = tipRect.point.x + tipRect.width + gutter; px = tipRect.point.x + tipRect.width + gutter;
if (px + width > document.documentElement.clientWidth) { if (px + width > document.documentElement.clientWidth) {
px = tipRect.point.x - menuRect.width - gutter; px = tipRect.point.x - menuRect.width - gutter;
} }
} }
} }
self.tPosition.x = px; self.tPosition.x = px;
self.tPosition.y = py; self.tPosition.y = py;
}); });
} }
}, },
close() { close() {
this.show = false; this.show = false;
}, },
checkIfDisabled(menuObj) { checkIfDisabled(menuObj) {
return menuObj.disabled === true; return menuObj.disabled === true;
}, },
isShow(menuObj) { isShow(menuObj) {
if (typeof (menuObj.show) == 'undefined') { if (typeof (menuObj.show) == 'undefined') {
return true; return true;
} else { } else {
return menuObj.show; return menuObj.show;
} }
}, },
calculateSubWidth(item) { calculateSubWidth(item) {
const children = item.children; const children = item.children;
let width = 0; let width = 0;
let fontNum = 0; let fontNum = 0;
children.forEach(elem => { children.forEach(elem => {
if (elem.label.length > fontNum) { if (elem.label.length > fontNum) {
fontNum = elem.label.length; fontNum = elem.label.length;
} }
}); });
width = fontNum * this.defaultFontSize + 20 + 'px'; width = fontNum * this.defaultFontSize + 20 + 'px';
return width; return width;
}, },
openLoadFile(item) { openLoadFile(item) {
const obj = this.$refs[item.label][0]; const obj = this.$refs[item.label][0];
if (obj.files) { if (obj.files) {
const file = obj.files[0]; const file = obj.files[0];
item.handler(file); item.handler(file);
obj.value = ''; obj.value = '';
} }
} }
} }
}; };
</script> </script>

View File

@ -32,50 +32,50 @@
import img_pay_fail from '@/assets/pay_images/PayFail.png'; import img_pay_fail from '@/assets/pay_images/PayFail.png';
import img_pay_success from '@/assets/pay_images/PaySuccess.png'; import img_pay_success from '@/assets/pay_images/PaySuccess.png';
export default { export default {
name: 'FinishDraft', name: 'FinishDraft',
props: { props: {
finishStatus: { finishStatus: {
type: String, type: String,
required: true required: true
} }
}, },
data() { data() {
return { return {
count: 0, count: 0,
maxTime: 5, maxTime: 5,
timer: null, timer: null,
images: { images: {
img_pay_fail, img_pay_fail,
img_pay_success img_pay_success
} }
}; };
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
}, },
methods: { methods: {
// maxTime // maxTime
createCountTimer() { createCountTimer() {
const that = this; const that = this;
// //
this.destroy(); this.destroy();
// //
if (this.timer == null) { if (this.timer == null) {
this.count = this.maxTime; this.count = this.maxTime;
this.timer = setInterval(() => { this.timer = setInterval(() => {
(that.count-- <= 0) && that.finish(); (that.count-- <= 0) && that.finish();
}, 1000); }, 1000);
} }
}, },
// //
finish() { finish() {
this.$emit('finish'); this.$emit('finish');
}, },
// //
destroy() { destroy() {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
} }
} }
}; };
</script> </script>

View File

@ -14,8 +14,6 @@
</template> </template>
<script> <script>
// import { requestAnimationFrame, cancelRequestAnimFrame } from '@/utils/animation';
export default { export default {
name: 'ProgressBar', name: 'ProgressBar',
props: { props: {

View File

@ -1,175 +1,186 @@
<template> <template>
<div class="quick-menu" ref="quickMenu" :style="quickMenuStyle"> <div ref="quickMenu" class="quick-menu" :style="quickMenuStyle">
<div v-for="(n,key) in menuCount" class="sub-menu" :style="getSubMenu(n-1)"> <div v-for="(n,key) in menuCount" :key="key" class="sub-menu" :style="getSubMenu(n-1)">
<router-link v-if="menuUrlList[n-1].isLink" :to="menuUrlList[n-1].url" :target="openNewTab" <router-link
:style="subMenuStyle" @mouseover.stop="mouseEnterSubMenu" @mouseout.stop="mouseOutSubMenu"> v-if="menuUrlList[n-1].isLink"
<i :class="iconClass[n-1]" ref="icon"></i> :to="menuUrlList[n-1].url"
</router-link> :target="openNewTab"
<a v-else :style="subMenuStyle" @mouseover.stop="mouseEnterSubMenu" @mouseout.stop="mouseOutSubMenu" :style="subMenuStyle"
@click="processCallback(key)"> @mouseover.stop="mouseEnterSubMenu"
<i :class="iconClass[n-1]" ref="icon"></i> @mouseout.stop="mouseOutSubMenu"
</a> >
<i ref="icon" :class="iconClass[n-1]" />
</router-link>
<a
v-else
:style="subMenuStyle"
@mouseover.stop="mouseEnterSubMenu"
@mouseout.stop="mouseOutSubMenu"
@click="processCallback(key)"
>
<i ref="icon" :class="iconClass[n-1]" />
</a>
</div>
<div class='menu' :style="menuStyle">
<div class='core-menu' @click="toggleMenu">
<div class='bar'></div>
</div>
</div>
</div> </div>
<div class="menu" :style="menuStyle">
<div class="core-menu" @click="toggleMenu">
<div class="bar" />
</div>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'quickMenu', name: 'QuickMenu',
props: { props: {
menuCount: { menuCount: {
type: Number, type: Number,
required: true, required: true,
default: 4 default: 4
},
iconClass: {
type: Array,
required: true
},
menuUrlList: {
type: Array,
required: true
},
backgroundColor: {
type: String,
default: '#20babb'
},
color: {
type: String,
default: '#fff'
},
isOpenNewTab: {
type: Boolean,
default: false
},
position: {
type: String,
default: 'top-left'
}
}, },
computed: { iconClass: {
openNewTab() { type: Array,
return this.isOpenNewTab ? '_blank' : '_self' required: true
},
quickMenuStyle() {
const topPosition = { top: '30px' },
bottomPosition = { bottom: '30px' },
leftPosition = { left: '30px' },
rightPosition = { right: '30px' }
let style = this.isTop ? topPosition : bottomPosition
Object.assign(style, this.isLeft ? leftPosition : rightPosition)
Object.assign(style, { transform: this.isLeft ? "rotate(-180deg)" : "rotate(180deg)" })
return style
},
menuStyle() {
return {
backgroundColor: this.backgroundColor,
color: this.color
}
},
subMenuStyle() {
const style = {
backgroundColor: this.backgroundColor,
color: this.color
}
return style
},
isTop() {
return !!~this.position.toLowerCase().indexOf('top')
},
isLeft() {
return !!~this.position.toLowerCase().indexOf('left')
}
}, },
data() { menuUrlList: {
type: Array,
required: true
},
backgroundColor: {
type: String,
default: '#20babb'
},
color: {
type: String,
default: '#fff'
},
isOpenNewTab: {
type: Boolean,
default: false
},
position: {
type: String,
default: 'top-left'
}
},
data() {
return {
menuSize: 60,
subMenu4: [[['0', '-160'], ['-80', '-138.6'], ['-138.6', '-80'], ['-160', '0']], [['0', '-160'], ['80', '-138.6'], ['138.6', '-80'], ['160', '0']], [['0', '160'], ['138.6', '80'], ['80', '138.6'], ['160', '0']], [['-160', '0'], ['-138.6', '80'], ['-80', '138.6'], ['0', '160']]],
subMenu3: [[['-160', '0'], ['-113', '-113'], ['0', '-160']], [['0', '-160'], ['113', '-113'], ['160', '0']], [['0', '160'], ['113', '113'], ['160', '0']], [['-160', '0'], ['-113', '113'], ['0', '160']]],
subMenu2: [[['-160', '0'], ['0', '-160']], [['0', '-160'], ['160', '0']], [['0', '160'], ['160', '0']], [['-160', '0'], ['0', '160']]]
};
},
computed: {
openNewTab() {
return this.isOpenNewTab ? '_blank' : '_self';
},
quickMenuStyle() {
const topPosition = { top: '30px' };
const bottomPosition = { bottom: '30px' };
const leftPosition = { left: '30px' };
const rightPosition = { right: '30px' };
const style = this.isTop ? topPosition : bottomPosition;
Object.assign(style, this.isLeft ? leftPosition : rightPosition);
Object.assign(style, { transform: this.isLeft ? 'rotate(-180deg)' : 'rotate(180deg)' });
return style;
},
menuStyle() {
return { return {
menuSize: 60, backgroundColor: this.backgroundColor,
subMenu4: [[["0", "-160"], ["-80", "-138.6"], ["-138.6", "-80"], ["-160", "0"]], [["0", "-160"], ["80", "-138.6"], ["138.6", "-80"], ["160", "0"]], [["0", "160"], ["138.6", "80"], ["80", "138.6"], ["160", "0"]], [["-160", "0"], ["-138.6", "80"], ["-80", "138.6"], ["0", "160"]]], color: this.color
subMenu3: [[["-160", "0"], ["-113", "-113"], ["0", "-160"]], [["0", "-160"], ["113", "-113"], ["160", "0"]], [["0", "160"], ["113", "113"], ["160", "0"]], [["-160", "0"], ["-113", "113"], ["0", "160"]]], };
subMenu2: [[["-160", "0"], ["0", "-160"]], [["0", "-160"], ["160", "0"]], [["0", "160"], ["160", "0"]], [["-160", "0"], ["0", "160"]]] },
} subMenuStyle() {
const style = {
backgroundColor: this.backgroundColor,
color: this.color
};
return style;
}, },
methods: {
getSubMenu(n) {
let menuPosition = this.menuCount === 4 ? this.subMenu4 : this.menuCount === 3 ? this.subMenu3 : this.subMenu2
menuPosition = this.isTop && this.isLeft ? menuPosition[2] : this.isTop && !this.isLeft ? menuPosition[1] : !this.isTop && this.isLeft ? menuPosition[3] : menuPosition[0]
return { top: menuPosition[n][0] + 'px', left: menuPosition[n][1] + 'px' }
},
toggleMenu(e) {
let menuEl = this.$refs.quickMenu
let menuIconEl = this.$refs.icon
if (!~menuEl.className.indexOf(' active')) {
menuEl.className += ' active';
menuIconEl.forEach(function (element, index) {
element.className += ' menu-animate';
});
} else {
menuEl.className = menuEl.className.replace(' active', '')
menuIconEl.forEach(function (element, index) {
element.className = element.className.replace(' menu-animate', '')
});
}
}, isTop() {
processCallback(key) { return !!~this.position.toLowerCase().indexOf('top');
this.$emit('process', key) },
}, isLeft() {
mouseEnterSubMenu(e) { return !!~this.position.toLowerCase().indexOf('left');
if (e.target.tagName === 'A') { }
e.target.style.backgroundColor = this.lightenColor(this.backgroundColor, 20) },
// e.target.firstElementChild.style.backgroundColor = this.lightenColor(this.backgroundColor, 20) methods: {
} else if (e.target.tagName === 'I') { getSubMenu(n) {
e.target.parentElement.style.backgroundColor = this.lightenColor(this.backgroundColor, 20) let menuPosition = this.menuCount === 4 ? this.subMenu4 : this.menuCount === 3 ? this.subMenu3 : this.subMenu2;
// e.target.style.backgroundColor = this.lightenColor(this.backgroundColor, 20) menuPosition = this.isTop && this.isLeft ? menuPosition[2] : this.isTop && !this.isLeft ? menuPosition[1] : !this.isTop && this.isLeft ? menuPosition[3] : menuPosition[0];
} return { top: menuPosition[n][0] + 'px', left: menuPosition[n][1] + 'px' };
},
}, toggleMenu(e) {
mouseOutSubMenu(e) { const menuEl = this.$refs.quickMenu;
if (e.target.tagName === 'A') { const menuIconEl = this.$refs.icon;
e.target.style.backgroundColor = this.backgroundColor if (!~menuEl.className.indexOf(' active')) {
// e.target.firstElementChild.style.backgroundColor = this.backgroundColor menuEl.className += ' active';
} else if (e.target.tagName === 'I') { menuIconEl.forEach(function (element, index) {
e.target.parentElement.style.backgroundColor = this.backgroundColor element.className += ' menu-animate';
// e.target.style.backgroundColor = this.backgroundColor });
} } else {
menuEl.className = menuEl.className.replace(' active', '');
}, menuIconEl.forEach(function (element, index) {
lightenColor(hex, amt) { element.className = element.className.replace(' menu-animate', '');
});
var usePound = false
if (hex[0] === '#') {
hex = hex.slice(1)
usePound = true
}
var num = parseInt(hex, 16)
var r = (num >> 16) + amt
if (r > 255) r = 255
else if (r < 0) r = 0
var b = ((num >> 8) & 0x00FF) + amt
if (b > 255) b = 255
else if (b < 0) b = 0
var g = (num & 0x0000FF) + amt
if (g > 255) g = 255
else if (g < 0) g = 0
return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16)
} }
},
processCallback(key) {
this.$emit('process', key);
},
mouseEnterSubMenu(e) {
if (e.target.tagName === 'A') {
e.target.style.backgroundColor = this.lightenColor(this.backgroundColor, 20);
// e.target.firstElementChild.style.backgroundColor = this.lightenColor(this.backgroundColor, 20)
} else if (e.target.tagName === 'I') {
e.target.parentElement.style.backgroundColor = this.lightenColor(this.backgroundColor, 20);
// e.target.style.backgroundColor = this.lightenColor(this.backgroundColor, 20)
}
},
mouseOutSubMenu(e) {
if (e.target.tagName === 'A') {
e.target.style.backgroundColor = this.backgroundColor;
// e.target.firstElementChild.style.backgroundColor = this.backgroundColor
} else if (e.target.tagName === 'I') {
e.target.parentElement.style.backgroundColor = this.backgroundColor;
// e.target.style.backgroundColor = this.backgroundColor
}
},
lightenColor(hex, amt) {
var usePound = false;
if (hex[0] === '#') {
hex = hex.slice(1);
usePound = true;
}
var num = parseInt(hex, 16);
var r = (num >> 16) + amt;
if (r > 255) r = 255;
else if (r < 0) r = 0;
var b = ((num >> 8) & 0x00FF) + amt;
if (b > 255) b = 255;
else if (b < 0) b = 0;
var g = (num & 0x0000FF) + amt;
if (g > 255) g = 255;
else if (g < 0) g = 0;
return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16);
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";

View File

@ -7,21 +7,21 @@
<script> <script>
export default { export default {
name: 'Point', name: 'Point',
props: { props: {
zoom: { zoom: {
type: Number, type: Number,
required: true required: true
}, },
fine: { fine: {
type: Number, type: Number,
required: true required: true
}, },
color: { color: {
type: String, type: String,
required: true required: true
} }
} }
}; };
</script> </script>

View File

@ -9,35 +9,35 @@
import Point from './point'; import Point from './point';
export default { export default {
name: 'Separator', name: 'Separator',
components: { components: {
Point Point
}, },
props: { props: {
zoom: { zoom: {
type: Number, type: Number,
required: true required: true
}, },
fine: { fine: {
type: Number, type: Number,
required: true required: true
}, },
color: { color: {
type: String, type: String,
required: true required: true
} }
}, },
computed: { computed: {
p() { p() {
return this.fine * 1; return this.fine * 1;
}, },
w() { w() {
return this.fine * 4; return this.fine * 4;
}, },
h() { h() {
return this.zoom * 8 + this.fine * 6 + this.p*2; return this.zoom * 8 + this.fine * 6 + this.p * 2;
} }
} }
}; };
</script> </script>

View File

@ -74,7 +74,7 @@ export default {
async handleJoin() { async handleJoin() {
try { try {
this.loading = true; this.loading = true;
const rest = await getPublishMapInfo(this.mapId); await getPublishMapInfo(this.mapId);
launchFullscreen(); launchFullscreen();
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group}; const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
this.$router.push({path: `/jointTrainingNew`, query: query}); this.$router.push({path: `/jointTrainingNew`, query: query});

View File

@ -151,7 +151,7 @@ export default {
name: this.$t('designPlatform.mapPreview'), name: this.$t('designPlatform.mapPreview'),
type: 'mapPreview', type: 'mapPreview',
mapId: elem.id, 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}) : ''; 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', type: 'scriptDesign',
mapId: elem.id, mapId: elem.id,
cityCode: elem.cityCode, cityCode: elem.cityCode,
lineCode: elem.lineCode, lineCode: elem.lineCode
// code:elem.children.find(n => { return n.name.includes("")}) // code:elem.children.find(n => { return n.name.includes("")})
}); });
elem.children.push( elem.children.push(
@ -172,7 +172,7 @@ export default {
type: 'runPlanDesign', type: 'runPlanDesign',
mapId: elem.id, mapId: elem.id,
lineCode: elem.lineCode, lineCode: elem.lineCode,
cityCode: elem.cityCode, cityCode: elem.cityCode
} }
); );
if (process.env.VUE_APP_PRO !== 'local') { if (process.env.VUE_APP_PRO !== 'local') {

View File

@ -15,7 +15,7 @@
<div class="bullshit__headline">{{ message }}</div> <div class="bullshit__headline">{{ message }}</div>
<div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to <div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to
return to the homepage.</div> return to the homepage.</div>
<button @click="back" class="bullshit__return-home">Back</button> <button class="bullshit__return-home" @click="back">Back</button>
</div> </div>
</div> </div>
</div> </div>
@ -23,18 +23,18 @@
<script> <script>
export default { export default {
name: 'Page404', name: 'Page404',
computed: { computed: {
message() { message() {
return 'The webmaster said that you can not enter this page...' return 'The webmaster said that you can not enter this page...';
} }
}, },
methods: { methods: {
back() { back() {
this.$router.go(-1); this.$router.go(-1);
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -15,7 +15,7 @@
<script> <script>
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training'; import { pageQueryTrainingNew } from '@/api/jmap/training';
import { getPublishMapListOnline } from '@/api/jmap/map'; import { getPublishMapListOnline } from '@/api/jmap/map';
import localStore from 'storejs'; import localStore from 'storejs';
import { getCmdList } from '@/api/management/dictionary'; import { getCmdList } from '@/api/management/dictionary';

View File

@ -12,7 +12,6 @@
</template> </template>
<script> <script>
// import { list, create, del } from '@/api/management/dictionaryDetail';
import { getOperateStepDataList, deleteOperateStepData, getPlaceholderList } from '@/api/management/operation'; import { getOperateStepDataList, deleteOperateStepData, getPlaceholderList } from '@/api/management/operation';
import TrainingDetailEdit from './edit'; import TrainingDetailEdit from './edit';
export default { export default {

View File

@ -14,11 +14,7 @@
</template> </template>
<script> <script>
import { import { getTrainingRulesList, deleteTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
getTrainingRulesList,
deleteTrainingRulesData,
getPlaceholderList
} from '@/api/management/operation';
import TrainingEdit from './addEdit'; import TrainingEdit from './addEdit';
import AddBatch from './addBatch'; import AddBatch from './addBatch';
import SaveAs from './saveAs.vue'; import SaveAs from './saveAs.vue';

View File

@ -544,14 +544,14 @@ export default {
}; };
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery }); this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
} else if (this.$route.query.type === 'ILW') { } else if (this.$route.query.type === 'ILW') {
const ilwQuery = { // const ilwQuery = {
mapid: query.mapId, // mapid: query.mapId,
group: query.group, // group: query.group,
project: getSessionStorage('project'), // project: getSessionStorage('project'),
token: getToken(), // token: getToken(),
projectDevice: this.$route.query.projectDevice, // projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type // type: this.$route.query.type
}; // };
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });
} else { } else {
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });

View File

@ -11,7 +11,7 @@
<script> <script>
import ChatBox from '../chatView/chatBox.vue'; import ChatBox from '../chatView/chatBox.vue';
import ScriptTip from '@/views/newMap/displayNew/scriptDisplay/component/scriptTip'; import ScriptTip from '@/views/newMap/displayNew/scriptDisplay/component/scriptTip';
// import {getAllConversition} from '@/api/chat';
export default { export default {
name:'DemonChat', name:'DemonChat',
components:{ components:{

View File

@ -32,7 +32,7 @@
</div> </div>
</template> </template>
<script> <script>
import { ScriptMode } from '@/scripts/ConstDic'; // import { ScriptMode } from '@/scripts/ConstDic';
import { getDraftScriptByGroupNew } from '@/api/script'; import { getDraftScriptByGroupNew } from '@/api/script';
import {loadCompetitionPracticalScene, getCompetitionPracticalScene} from '@/api/competition'; import {loadCompetitionPracticalScene, getCompetitionPracticalScene} from '@/api/competition';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';

View File

@ -159,7 +159,8 @@ export default {
this.questionList = res.data; this.questionList = res.data;
if (this.isTest) { if (this.isTest) {
this.questionList.forEach((question, index)=>{ this.questionList.forEach((question, index)=>{
this.hasAnswerList[index] = {questionId:question.id, answerOptionId:[]}; // answerOptionId:[]
this.hasAnswerList[index] = {questionId:question.id, answerContents:[]};
}); });
} }
if (this.mode == 'practice') { if (this.mode == 'practice') {
@ -175,6 +176,14 @@ export default {
this.wrongQuestionNum = 0; this.wrongQuestionNum = 0;
this.loading = false; this.loading = false;
} }
}).catch(error=>{
if (error.code == '10007') {
this.$messageBox('获取试卷失败:试题不存在');
} else if (error.code == '10011') {
this.$messageBox('获取试卷失败:缺少出题规则');
} else {
this.$messageBox('获取试卷失败,请稍后再试');
}
}); });
this.dialogVisible = true; this.dialogVisible = true;
}, },
@ -249,13 +258,18 @@ export default {
}, },
checkCurrentData(currentQuestionNum) { checkCurrentData(currentQuestionNum) {
if (this.hasAnswerList[currentQuestionNum]) { if (this.hasAnswerList[currentQuestionNum]) {
const answerObj = this.hasAnswerList[currentQuestionNum].answerOptionId; const answerObj = this.hasAnswerList[currentQuestionNum].answerContents;
// answerOptionId;
if (answerObj.length > 0) { if (answerObj.length > 0) {
const question = this.questionList[currentQuestionNum]; const question = this.questionList[currentQuestionNum];
if (question.type == 'judge' || question.type == 'select') { if (question.type == 'judge' || question.type == 'select') {
this.currentRadioAnswer = answerObj[0]; this.currentRadioAnswer = answerObj[0].optionId;
} else { } else {
this.currentSelectAnswer = answerObj; const data = [];
answerObj.forEach(each=>{
data.push(each.optionId);
});
this.currentSelectAnswer = data;
} }
} else { } else {
this.currentSelectAnswer = []; this.currentSelectAnswer = [];
@ -270,7 +284,7 @@ export default {
const submitData = Object.values(this.hasAnswerList); const submitData = Object.values(this.hasAnswerList);
let submitWriteLength = 0; let submitWriteLength = 0;
submitData.forEach(each=>{ submitData.forEach(each=>{
if (each.answerOptionId.length > 0) { if (each.answerContents.length > 0) {
submitWriteLength++; submitWriteLength++;
} }
}); });
@ -313,6 +327,7 @@ export default {
} }
}).catch(()=>{ }).catch(()=>{
this.loading = false;
this.$message.error('提交失败,请稍后再试'); this.$message.error('提交失败,请稍后再试');
}); });
}, },
@ -378,13 +393,23 @@ export default {
}, },
changeAnswer(data) { changeAnswer(data) {
if (this.isTest) { if (this.isTest) {
let answerOptionId = []; let answerContents = [];
if (data instanceof Array) { if (data instanceof Array) {
answerOptionId = data; data.forEach(each=>{
const answerList = this.questionList[this.currentQuestionNum].optionList;
const answerContent = answerList.find(answer=>{ return answer.id == each; });
if (answerContent) {
answerContents.push({optionId:each, answerContent:answerContent.content});
}
});
} else { } else {
answerOptionId = [data]; const answerList = this.questionList[this.currentQuestionNum].optionList;
const answerContent = answerList.find(answer=>{ return answer.id == data; });
if (answerContent) {
answerContents = [{optionId:data, answerContent:answerContent.content}];
}
} }
this.hasAnswerList[this.currentQuestionNum].answerOptionId = answerOptionId; this.hasAnswerList[this.currentQuestionNum].answerContents = answerContents;
document.querySelector('#eachQuestionNum' + this.currentQuestionNum).classList.add('hasSelect'); document.querySelector('#eachQuestionNum' + this.currentQuestionNum).classList.add('hasSelect');
} }
} }

View File

@ -47,9 +47,6 @@
<script> <script>
import { newMap, newUsePublishMap } from '@/api/jmap/mapdraft'; import { newMap, newUsePublishMap } from '@/api/jmap/mapdraft';
// import XLSX from 'xlsx';
// import { translate, translateSheetTitle } from '@/scripts/translate';
// import { sheet_to_json } from '@/utils/Export2Excel';
import { getLineCodeList } from '@/api/management/mapline'; import { getLineCodeList } from '@/api/management/mapline';
import { getMapListByProject } from '@/utils/mapList'; import { getMapListByProject } from '@/utils/mapList';

View File

@ -19,7 +19,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
//
import { postBuildMapImport } from '@/api/jmap/mapdraft'; import { postBuildMapImport } from '@/api/jmap/mapdraft';
export default { export default {
name: 'MapImport', name: 'MapImport',

View File

@ -21,9 +21,8 @@
</template> </template>
<script> <script>
import { publishMap3d } from '@/api/jmap/mapdraft';
// import { checkMapName } from '@/api/jmap/map'; import { publishMap3d } from '@/api/jmap/mapdraft';
export default { export default {
name: 'MapPublish3d', name: 'MapPublish3d',
props: { props: {

View File

@ -10,7 +10,7 @@
import { listPermision, setLessonPermisson } from '@/api/management/author'; import { listPermision, setLessonPermisson } from '@/api/management/author';
import Detail from './detail'; import Detail from './detail';
import Belong from './belong'; import Belong from './belong';
import localStore from 'storejs'; // import localStore from 'storejs';
export default { export default {
name: 'Author', name: 'Author',

View File

@ -213,7 +213,7 @@ export default {
} }
}, },
refreshRunPlanName(name) { refreshRunPlanName(name) {
this.$refs.schedule.refreshRunPlanName(name); this.$refs.schedule.refreshRunPlanName(name);
} }
} }
}; };
@ -254,298 +254,4 @@ export default {
.planEdit__tool { .planEdit__tool {
overflow: hidden !important; overflow: hidden !important;
} }
/* .planEdit__tool .el-dialog {
overflow: hidden !important;
background: rgba(202, 221, 253, 0.88);;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375;
border-radius: 4px;
color: #000;
font-size: 14px;
}
.planEdit__tool .el-dialog .el-dialog__header {
height: 30px;
padding: 5px;
}
.planEdit__tool .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.planEdit__tool .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 3px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
color: #000;
background: #ECE9D8;
opacity: 1;
}
.planEdit__tool .el-dialog .el-dialog__title {
font-size: 16px;
}
.planEdit__tool .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
top: 0px;
right: 3px;
line-height: 26px;
width: 26px;
}
.planEdit__tool .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.planEdit__tool .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.planEdit__tool .el-dialog .el-tabs--top {
border: 2px outset #FEFEFD;
border-radius: 4px;
}
.planEdit__tool .el-dialog .el-tabs__item {
height: 30px;
line-height: 30px;
text-align: center;
color: #000 !important;
border-right: 2px outset #fff;
padding-left: 10px !important;
padding-right: 10px !important;
}
.planEdit__tool .el-dialog .el-tab-pane {
margin: 10px !important;
}
.planEdit__tool .el-dialog .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
border-bottom: none
}
.planEdit__tool .el-dialog .el-tabs--card>.el-tabs__header .el-tabs__item:not(.is-active) {
border-bottom: 2px inset #fff
}
.planEdit__tool .el-dialog .el-form {
background: #ECE9D8 !important;
}
.planEdit__tool .el-dialog .el-card {
background: #ECE9D8 !important;
}
.planEdit__tool .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #ECE9D8;
}
.planEdit__tool .el-dialog .expand {
width: 120px;
}
.planEdit__tool .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.planEdit__tool .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.planEdit__tool .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.planEdit__tool .el-dialog .el-button:disabled span {
border: 0px;
}
.planEdit__tool .el-dialog .button-group {
margin-top: 10px;
}
.planEdit__tool .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.planEdit__tool .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.planEdit__tool .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.planEdit__tool .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.planEdit__tool .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.planEdit__tool .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.planEdit__tool .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.planEdit__tool .el-dialog .el-table .cell {
line-height: unset !important;
}
.planEdit__tool .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.planEdit__tool .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.planEdit__tool .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.planEdit__tool .el-dialog .current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
.planEdit__tool .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.planEdit__tool .el-dialog .el-checkbox__label {
color: #000 !important;
}
.planEdit__tool .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.planEdit__tool .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.planEdit__tool .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.planEdit__tool .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.planEdit__tool .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.planEdit__tool .el-dialog .el-radio__label {
color: #000 !important;
}
.planEdit__tool .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.planEdit__tool .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.planEdit__tool .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.planEdit__tool .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.planEdit__tool .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.planEdit__tool .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.planEdit__tool .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.planEdit__tool .el-dialog .table {
margin-top: 10px;
}
.planEdit__tool .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.planEdit__tool .el-dialog .button-group {
margin-top: 10px;
}
.planEdit__tool .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important;
color: #000 !important;
} */
</style> </style>

View File

@ -123,10 +123,6 @@ import { publishRunPlan, deleteRunPlan } from '@/api/designPlatform';
export default { export default {
name: 'PlanMenuBar', name: 'PlanMenuBar',
props: { props: {
// skinCode: {
// type: String,
// default: ''
// },
planConvert: { planConvert: {
type: Object, type: Object,
default: function() { default: function() {

View File

@ -13,7 +13,7 @@
<div style="margin: 10px;"> <div style="margin: 10px;">
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('global.startTime')+$t('global.colon')}}</span> <span>{{ $t('global.startTime')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-time-picker v-model="model.startTime" /> <el-time-picker v-model="model.startTime" />
@ -21,7 +21,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('global.endTime')+$t('global.colon')}}</span> <span>{{ $t('global.endTime')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-time-picker v-model="model.endTime" /> <el-time-picker v-model="model.endTime" />
@ -29,16 +29,16 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('planMonitor.trainRunningTimeInterval')+$t('global.colon')}}</span> <span>{{ $t('planMonitor.trainRunningTimeInterval')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input v-model="model.runInterval" :placeholder="this.$t('rules.pleaseEnterContent')" /> <el-input v-model="model.runInterval" :placeholder="this.$t('rules.pleaseEnterContent')" />
<span>{{$t('global.colon')}}</span> <span>{{ $t('global.colon') }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('planMonitor.sizeOfTheLoopTrainProportion')+$t('global.colon')}}</span> <span>{{ $t('planMonitor.sizeOfTheLoopTrainProportion')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-select v-model="model.scale" :placeholder="this.$t('global.choose')"> <el-select v-model="model.scale" :placeholder="this.$t('global.choose')">
@ -48,28 +48,28 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('planMonitor.applicationRouteSelection')+$t('global.colon')}}</span> <span>{{ $t('planMonitor.applicationRouteSelection')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-radio-group v-model="model.direction"> <el-radio-group v-model="model.direction">
<el-radio :label="0">{{$t('planMonitor.bothway')}}</el-radio> <el-radio :label="0">{{ $t('planMonitor.bothway') }}</el-radio>
<el-radio :label="1">{{$t('planMonitor.up')}}</el-radio> <el-radio :label="1">{{ $t('planMonitor.up') }}</el-radio>
<el-radio :label="2">{{$t('planMonitor.down')}}</el-radio> <el-radio :label="2">{{ $t('planMonitor.down') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-table :data="model.smoothList" border :height="240"> <el-table :data="model.smoothList" border :height="240">
<el-table-column prop="startTime" :label="this.$t('global.startTime')" /> <el-table-column prop="startTime" :label="this.$t('global.startTime')" />
<el-table-column prop="stopTime" :label="this.$t('global.endTime')"/> <el-table-column prop="stopTime" :label="this.$t('global.endTime')" />
<el-table-column prop="runInterval" :label="this.$t('planMonitor.runningInterval')" /> <el-table-column prop="runInterval" :label="this.$t('planMonitor.runningInterval')" />
<el-table-column prop="scale" :label="this.$t('planMonitor.distributionRatio')" /> <el-table-column prop="scale" :label="this.$t('planMonitor.distributionRatio')" />
</el-table> </el-table>
</el-row> </el-row>
</div> </div>
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -77,38 +77,38 @@
<script> <script>
export default { export default {
name: 'AddSmoothRunTime', name: 'AddSmoothRunTime',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
model: { model: {
useSame: false, useSame: false,
smoothList: [] smoothList: []
}, },
scaleList: [] scaleList: []
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.addASmoothRunningTime'); return this.$t('planMonitor.addASmoothRunningTime');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -160,7 +160,6 @@
<script> <script>
import { getRoutingList, addPlanTrip, getMapStationRun } from '@/api/runplan'; import { getRoutingList, addPlanTrip, getMapStationRun } from '@/api/runplan';
import { formatTime, formatName } from '@/utils/runPlan'; import { formatTime, formatName } from '@/utils/runPlan';
// import { getUID } from '@/jmap/utils/Uid';
export default { export default {
name: 'AddTask', name: 'AddTask',

View File

@ -12,26 +12,26 @@
> >
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-radio-group v-model="model.forward"> <el-radio-group v-model="model.forward">
<el-radio :label="true">{{$t('planMonitor.forward')}}</el-radio> <el-radio :label="true">{{ $t('planMonitor.forward') }}</el-radio>
<el-radio :label="false">{{$t('planMonitor.backward')}}</el-radio> <el-radio :label="false">{{ $t('planMonitor.backward') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-col :span="5" :offset="4">{{$t('planMonitor.frequency')}}</el-col> <el-col :span="5" :offset="4">{{ $t('planMonitor.frequency') }}</el-col>
<el-col :span="10"> <el-col :span="10">
<el-input-number v-model="model.times" size="mini" :min="1" controls-position="right" /> <el-input-number v-model="model.times" size="mini" :min="1" controls-position="right" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin: 10px 0px"> <el-row style="margin: 10px 0px">
<el-col :span="5" :offset="4">{{$t('planMonitor.intervals')}}</el-col> <el-col :span="5" :offset="4">{{ $t('planMonitor.intervals') }}</el-col>
<el-col :span="10"> <el-col :span="10">
<el-input-number v-model="model.intervals" size="mini" :min="30" controls-position="right" /> <el-input-number v-model="model.intervals" size="mini" :min="30" controls-position="right" />
<span>{{$t('global.second')}}</span> <span>{{ $t('global.second') }}</span>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose">{{$t('global.cancel')}}</el-button> <el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -40,57 +40,57 @@
import { duplicateService } from '@/api/runplan'; import { duplicateService } from '@/api/runplan';
export default { export default {
name: 'DuplicateTrain', name: 'DuplicateTrain',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
model: { model: {
serviceNumber: '', serviceNumber: '',
forward: false, forward: false,
times: 0, times: 0,
intervals: 0 intervals: 0
} }
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.duplicateTrain'); return this.$t('planMonitor.duplicateTrain');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow(params) { doShow(params) {
this.model.serviceNumber = params.serviceNumber; this.model.serviceNumber = params.serviceNumber;
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
this.model['planId'] = this.$route.query.planId; this.model['planId'] = this.$route.query.planId;
this.model['serviceNumber'] = this.model.serviceNumber; this.model['serviceNumber'] = this.model.serviceNumber;
this.doClose(); this.doClose();
duplicateService(this.model).then(resp => { duplicateService(this.model).then(resp => {
// this.$emit('dispatchOperate', { // this.$emit('dispatchOperate', {
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) // dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
// }); // });
this.$emit('refresh'); this.$emit('refresh');
this.$message.success(this.$t('tip.duplicatePlanSuccessful')); this.$message.success(this.$t('tip.duplicatePlanSuccessful'));
}).catch((error) => { }).catch((error) => {
if(error.code===500001){ if (error.code === 500001) {
this.$messageBox(this.$t('tip.duplicatePlanFailed')+this.$t('tip.duplicatePlanFailedTips')); this.$messageBox(this.$t('tip.duplicatePlanFailed') + this.$t('tip.duplicatePlanFailedTips'));
}else{ } else {
this.$messageBox(this.$t('tip.duplicatePlanFailed')); this.$messageBox(this.$t('tip.duplicatePlanFailed'));
} }
}); });
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -63,7 +63,6 @@
<script> <script>
import { formatName, formatTime } from '@/utils/runPlan'; import { formatName, formatTime } from '@/utils/runPlan';
import { addPlanService, updatePlanService, getRoutingBySDTNumber } from '@/api/runplan'; import { addPlanService, updatePlanService, getRoutingBySDTNumber } from '@/api/runplan';
import { getUID } from '@/jmapNew/utils/Uid';
export default { export default {
name: 'EditPlanningTrain', name: 'EditPlanningTrain',

View File

@ -13,14 +13,14 @@
<div style="margin: 10px;"> <div style="margin: 10px;">
<div style="border: 1px solid #B9B5A7"> <div style="border: 1px solid #B9B5A7">
<el-row> <el-row>
<span style="position: relative; top: -8px; left: 20px">{{$t('planMonitor.editSmoothRun.trainProportion')}}</span> <span style="position: relative; top: -8px; left: 20px">{{ $t('planMonitor.editSmoothRun.trainProportion') }}</span>
<el-col :offset="1"> <el-col :offset="1">
<el-checkbox v-model="model.useSame">{{$t('planMonitor.editSmoothRun.allTheLoopTrainProportion')}}</el-checkbox> <el-checkbox v-model="model.useSame">{{ $t('planMonitor.editSmoothRun.allTheLoopTrainProportion') }}</el-checkbox>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>{{$t('planMonitor.editSmoothRun.sizeOfTheLoopTrainProportion')}}</span> <span>{{ $t('planMonitor.editSmoothRun.sizeOfTheLoopTrainProportion') }}</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-select v-model="model.scale" :placeholder="$t('planMonitor.editSmoothRun.pleaseSelect')"> <el-select v-model="model.scale" :placeholder="$t('planMonitor.editSmoothRun.pleaseSelect')">
@ -43,14 +43,14 @@
</el-table> </el-table>
</el-row> </el-row>
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleAdd">{{$t('planMonitor.editSmoothRun.add')}}</el-button> <el-button @click="handleAdd">{{ $t('planMonitor.editSmoothRun.add') }}</el-button>
<el-button @click="handleDelete">{{$t('planMonitor.editSmoothRun.delete')}}</el-button> <el-button @click="handleDelete">{{ $t('planMonitor.editSmoothRun.delete') }}</el-button>
<el-button @click="handleEdit">{{$t('planMonitor.editSmoothRun.modify')}}</el-button> <el-button @click="handleEdit">{{ $t('planMonitor.editSmoothRun.modify') }}</el-button>
</el-row> </el-row>
</div> </div>
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button style="padding: 0px; margin: 0px 30px" @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button style="padding: 0px; margin: 0px 30px" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button style="padding: 0px; margin: 0px 30px" @click="doClose">{{$t('global.cancel')}}</el-button> <el-button style="padding: 0px; margin: 0px 30px" @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -58,47 +58,47 @@
<script> <script>
export default { export default {
name: 'EditSmoothRunTime', name: 'EditSmoothRunTime',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
model: { model: {
useSame: false, useSame: false,
smoothList: [] smoothList: []
}, },
scaleList: [] scaleList: []
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.editSmoothRun.editSmoothRunTime'); return this.$t('planMonitor.editSmoothRun.editSmoothRunTime');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleAdd() { handleAdd() {
this.$emit('dispatchDialog', { name: 'addSmoothRunTime', params: {} }); this.$emit('dispatchDialog', { name: 'addSmoothRunTime', params: {} });
}, },
handleDelete() { handleDelete() {
this.$emit('dispatchDialog', { name: 'addSmoothRunTime', params: {} }); this.$emit('dispatchDialog', { name: 'addSmoothRunTime', params: {} });
}, },
handleEdit() { handleEdit() {
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'EditStationBetweenTime', name: 'EditStationBetweenTime',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.modifying.modifyTwoStationTime'); return this.$t('planMonitor.modifying.modifyTwoStationTime');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'LookUp', name: 'LookUp',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.modifying.search'); return this.$t('planMonitor.modifying.search');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,48 +11,48 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-row>
<el-col :span="9" :offset="1" style="height: 32px; line-height: 32px;">{{$t('planMonitor.modifying.modifyStartTime')}}</el-col> <el-col :span="9" :offset="1" style="height: 32px; line-height: 32px;">{{ $t('planMonitor.modifying.modifyStartTime') }}</el-col>
<el-col :span="14"> <el-col :span="14">
<el-time-picker v-model="beginTime" size="mini" :clearable="false" /> <el-time-picker v-model="beginTime" size="mini" :clearable="false" />
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" justify="center" style="margin-top: 20px"> <el-row type="flex" justify="center" style="margin-top: 20px">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
export default { export default {
name: 'ModifyingBeginTime', name: 'ModifyingBeginTime',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
beginTime: '' beginTime: ''
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.modifying.modifyStartTimeTitle'); return this.$t('planMonitor.modifying.modifyStartTimeTitle');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -13,14 +13,14 @@
<div style="margin: 10px"> <div style="margin: 10px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<span style="position:relative; left: 12px; top: 9px">{{$t('planMonitor.modifying.time')}}</span> <span style="position:relative; left: 12px; top: 9px">{{ $t('planMonitor.modifying.time') }}</span>
<div style="border: 1px solid #ADA99A"> <div style="border: 1px solid #ADA99A">
<el-radio-group v-model="timeType" style="margin: 10px"> <el-radio-group v-model="timeType" style="margin: 10px">
<el-row style="margin: 5px 0px"> <el-row style="margin: 5px 0px">
<el-radio :label="1">{{$t('planMonitor.modifying.startStationTips')}}</el-radio> <el-radio :label="1">{{ $t('planMonitor.modifying.startStationTips') }}</el-radio>
</el-row> </el-row>
<el-row style="margin: 5px 0px"> <el-row style="margin: 5px 0px">
<el-radio :label="2">{{$t('planMonitor.modifying.endStationTips')}}</el-radio> <el-radio :label="2">{{ $t('planMonitor.modifying.endStationTips') }}</el-radio>
</el-row> </el-row>
</el-radio-group> </el-radio-group>
</div> </div>
@ -36,8 +36,8 @@
</el-table> </el-table>
</el-row> </el-row>
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</div> </div>
</el-dialog> </el-dialog>
@ -46,35 +46,35 @@
<script> <script>
export default { export default {
name: 'ModifyingRouting', name: 'ModifyingRouting',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
timeType: '1', timeType: '1',
routeDate: [] routeDate: []
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.modifying.modifyTaskRoute'); return this.$t('planMonitor.modifying.modifyTaskRoute');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -21,50 +21,50 @@
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('planMonitor.minimumTrainInterval')+this.$t('global.colon')" prop="minInterval"> <el-form-item :label="this.$t('planMonitor.minimumTrainInterval')+this.$t('global.colon')" prop="minInterval">
<el-input-number v-model="model.minInterval" controls-position="right" /> <el-input-number v-model="model.minInterval" controls-position="right" />
<span>{{$t('global.second')}}</span> <span>{{ $t('global.second') }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('planMonitor.maximumTrainInterval')+this.$t('global.colon')" prop="maxInterval"> <el-form-item :label="this.$t('planMonitor.maximumTrainInterval')+this.$t('global.colon')" prop="maxInterval">
<el-input-number v-model="model.maxInterval" controls-position="right" /> <el-input-number v-model="model.maxInterval" controls-position="right" />
<span>{{$t('global.second')}}</span> <span>{{ $t('global.second') }}</span>
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('planMonitor.trainGeneratesInitialLabel')+this.$t('global.colon')" prop="beginServiceNumber"> <el-form-item :label="this.$t('planMonitor.trainGeneratesInitialLabel')+this.$t('global.colon')" prop="beginServiceNumber">
<el-input-number v-model="model.beginServiceNumber" controls-position="right" /> <el-input-number v-model="model.beginServiceNumber" controls-position="right" />
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('planMonitor.minimumTurnbackTime')+this.$t('global.colon')" prop="minReentryTime"> <el-form-item :label="this.$t('planMonitor.minimumTurnbackTime')+this.$t('global.colon')" prop="minReentryTime">
<el-input-number v-model="model.minReentryTime" controls-position="right" /> <el-input-number v-model="model.minReentryTime" controls-position="right" />
<span>{{$t('global.second')}}</span> <span>{{ $t('global.second') }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<script> <script>
export default { export default {
name: 'BaseParameter', name: 'BaseParameter',
components: { components: {
}, },
data() { data() {
return { return {
model: { model: {
planName: '', planName: '',
auxIconDesc: '', auxIconDesc: '',
upBeginTripNumber: 0, upBeginTripNumber: 0,
upBeginTrain: 0, upBeginTrain: 0,
minInterval: 0, minInterval: 0,
maxInterval: 0, maxInterval: 0,
beginServiceNumber: 0, beginServiceNumber: 0,
minReentryTime: 0 minReentryTime: 0
} }
}; };
}, },
computed: { computed: {
rules() { rules() {
return {}; return {};
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -7,28 +7,28 @@
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<el-button style="margin-top: 20px" @click="handleModifyingStationProperty">{{$t('planMonitor.modifyAttribute')}}</el-button> <el-button style="margin-top: 20px" @click="handleModifyingStationProperty">{{ $t('planMonitor.modifyAttribute') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script> <script>
export default { export default {
name: 'BaseStation', name: 'BaseStation',
components: { components: {
}, },
data() { data() {
return { return {
stationData: [] stationData: []
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
handleModifyingStationProperty() { handleModifyingStationProperty() {
this.$emit('dispatchDialog', { name: 'modifyingStationProperty', params: {} }); this.$emit('dispatchDialog', { name: 'modifyingStationProperty', params: {} });
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'QuickLoopsIncrease', name: 'QuickLoopsIncrease',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.quicklyAddLoop'); return this.$t('planMonitor.updateStation.quicklyAddLoop');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'QuickTaskIncrease', name: 'QuickTaskIncrease',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.quicklyAddTask'); return this.$t('planMonitor.updateStation.quicklyAddTask');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'RoutingSelection', name: 'RoutingSelection',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.routeSelect'); return this.$t('planMonitor.updateStation.routeSelect');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'SelectDeleteRoute', name: 'SelectDeleteRoute',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.selectDeleteRoute'); return this.$t('planMonitor.updateStation.selectDeleteRoute');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button> <el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -20,33 +20,33 @@
<script> <script>
export default { export default {
name: 'SelectPrintArea', name: 'SelectPrintArea',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.selectPrintArea'); return this.$t('planMonitor.updateStation.selectPrintArea');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -33,70 +33,70 @@
<script> <script>
export default { export default {
name: 'UpdateStationIntervalTime', name: 'UpdateStationIntervalTime',
components: { components: {
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
editModel: {}, editModel: {},
runPlanLevelVO: {} runPlanLevelVO: {}
}; };
}, },
computed: { computed: {
title() { title() {
return this.$t('planMonitor.updateStation.updateData'); return this.$t('planMonitor.updateStation.updateData');
}, },
rules() { rules() {
return { return {
level1: [ level1: [
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel1'), trigger: 'blur' } { required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel1'), trigger: 'blur' }
], ],
level2: [ level2: [
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel2'), trigger: 'blur' } { required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel2'), trigger: 'blur' }
], ],
level3: [ level3: [
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel3'), trigger: 'blur' } { required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel3'), trigger: 'blur' }
], ],
level4: [ level4: [
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel4'), trigger: 'blur' } { required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel4'), trigger: 'blur' }
], ],
level5: [ level5: [
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel5'), trigger: 'blur' } { required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel5'), trigger: 'blur' }
] ]
}; };
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow(params) { doShow(params) {
this.editModel = params || {}; this.editModel = params || {};
this.runPlanLevelVO = Object.assign({}, this.editModel.runPlanLevelVO || {}); this.runPlanLevelVO = Object.assign({}, this.editModel.runPlanLevelVO || {});
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
handleCommit() { handleCommit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
const model = { const model = {
level1: this.runPlanLevelVO.level1, level1: this.runPlanLevelVO.level1,
level2: this.runPlanLevelVO.level2, level2: this.runPlanLevelVO.level2,
level3: this.runPlanLevelVO.level3, level3: this.runPlanLevelVO.level3,
level4: this.runPlanLevelVO.level4, level4: this.runPlanLevelVO.level4,
level5: this.runPlanLevelVO.level5, level5: this.runPlanLevelVO.level5,
stationRunningId: this.runPlanLevelVO.stationRunningId stationRunningId: this.runPlanLevelVO.stationRunningId
}; };
this.$emit('handleConfirm', model); this.$emit('handleConfirm', model);
this.doClose(); this.doClose();
} }
}); });
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="drawer" :class="{visible}" tabindex="-1"> <div class="drawer" :class="{visible}" tabindex="-1">
<div class="drawer__wrapper" tabindex="-1" @click="doClose"> <div class="drawer__wrapper" @click.self="doClose">
<div class="layer" :class="[direction]" :style="{width: width+'px'}" tabindex="-1"> <div class="layer" :class="[direction]" :style="{width: width+'px'}">
<div class="title"> <div class="title">
<span> <span>
<slot name="title" /> <slot name="title" />
@ -50,7 +50,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.visible { .visible {
visibility: visible !important; visibility: visible !important;
.ltr { .layer {
transform: translateX(0) !important; transform: translateX(0) !important;
} }
} }
@ -64,6 +64,15 @@ export default {
transform: translateX(-100%); transform: translateX(-100%);
} }
.rtl {
transition: all .3s cubic-bezier(.7, .3, .1, 1);
position: absolute;
height: 100%;
top: 0;
right: 0;
transform: translateX(100%);
}
.drawer { .drawer {
position: fixed; position: fixed;
z-index: 2001; z-index: 2001;
@ -76,7 +85,7 @@ export default {
visibility: hidden; visibility: hidden;
&__wrapper { &__wrapper {
position: relative; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: 0; top: 0;
@ -90,7 +99,6 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12); box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12);
overflow: hidden; overflow: hidden;
position: relative;
.title { .title {
display: flex; display: flex;

View File

@ -6,18 +6,11 @@
<i class="el-icon-document" /> <i class="el-icon-document" />
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<span slot="title">Line List</span> <span slot="title">线路列表</span>
<el-tree :data="lineList" :props="defaultProps" @node-click="onSelectLine"> <el-tree :data="lineList" :props="defaultProps" @node-click="onSelectLine">
<template slot-scope="{data}"> <template slot-scope="{data}">
<span class="flex" > <span class="flex" style="padding-right: 20px">
<span><i class="el-icon-document"/>&ensp;{{data.name}}</span> <span><i class="el-icon-document"/>&ensp;{{data.name}}</span>
<el-button
type="text"
style="color:red"
size="mini"
@click="doDeletePlan(data)">
Delete
</el-button>
</span> </span>
</template> </template>
</el-tree> </el-tree>
@ -25,22 +18,35 @@
</el-submenu> </el-submenu>
</el-menu> </el-menu>
<div class="container"> <div class="container">
<div class="title"> <el-card class="card" shadow="never">
<span>title</span> <div slot="header" class="clearfix">
</div> <span>{{ title||'请选择线路' }}</span>
<div class="form"> </div>
11111111111 <stations :list="stationList" @select="onSelectStation">
</div> <template slot-scope="{data}">
<div class="line">公里标{{data.kmRange}}m</div>
<div class="line">中转站{{data.transferable? '是': '否'}}</div>
<div class="line">上行容量{{data.upReception}}</div>
<div class="line">下行容量{{data.downReception}}</div>
</template>
</stations>
</el-card>
</div> </div>
<modify ref="modfiy" @update="onUpdateStation" />
</div> </div>
</template> </template>
<script> <script>
import Drawer from '../components/drawer.vue'; import Drawer from '../components/drawer.vue';
import Stations from './stations';
import Modify from './modify';
import { listLines, listStations, updateStation } from '@/api/rpTools';
export default { export default {
components: { components: {
Drawer Drawer,
Stations,
Modify
}, },
data() { data() {
return { return {
@ -48,54 +54,57 @@ export default {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
lineList: [ lineList: [],
{name: '1', id: 1}, stationList: []
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
]
} }
}, },
computed: {
lineId() {
return this.$route.query.lineId;
},
title() {
return this.$route.query.title;
}
},
watch: {
$route: function() {
this.refreshStationList();
}
},
mounted() {
this.loadInitData();
this.refreshStationList();
},
methods: { methods: {
loadInitData() {
listLines().then(resp => {
this.lineList = resp.data;
}).catch(error => {
this.$message.info(error.message);
})
},
refreshStationList() {
if (this.lineId) {
listStations(this.lineId).then(resp => {
this.stationList = resp.data;
}).catch(error => {
this.$message.info(error.message);
})
}
},
onSelectLine(el) { onSelectLine(el) {
this.$router.replace({ path: 'AUSline', query: { lineId: el.id, title: el.name }});
},
onSelectStation(el) {
this.$refs.modfiy.doShow(el);
},
onUpdateStation(el) {
updateStation(this.lineId, el).then(resp => {
this.refreshStationList();
this.$message.success('修改成功。')
}).catch(error => {
this.$message.info(error.message);
})
} }
} }
} }
@ -114,22 +123,48 @@ export default {
.container { .container {
flex: 1; flex: 1;
.title { .card {
width: 100%; width: 60%;
height: 32px;
font-size: 26px;
padding: 7px;
background: rgba(240,240,240,0.3);
display: flex;
justify-content: center;
align-items: center;
}
.form {
padding: 30px;
width: 50%;
margin: auto; margin: auto;
height: calc(100% - 10px);
/deep/ {
.el-card__body {
height: 100%;
overflow-y: auto;
&::-webkit-scrollbar {
width: 5px;
height: 5px;
}
&::-webkit-scrollbar-track {
background: rgb(239, 239, 239);
border-radius: 2px;
}
&::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 10px;
}
&::-webkit-scrollbar-thumb:hover {
background: #666;
}
&::-webkit-scrollbar-corner {
background: #fff;
}
}
}
.line {
line-height: 28px;
height: 28px;
}
} }
} }
} }
.flex {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
</style> </style>

View File

@ -0,0 +1,114 @@
<template>
<drawer :visible.sync="drawer" direction="rtl" :width="600" @before-close="e => drawer=false">
<template slot="title">修改表单</template>
<div class="container" v-if="model">
<el-form class="form" :model="model" :rules="rules" ref="form" label-width="100px" >
<el-form-item label="车站名称" prop="name">
<el-input v-model="model.name"></el-input>
</el-form-item>
<el-form-item label="公里标" prop="kmRange">
<el-input-number v-model="model.kmRange" controls-position="right" :min="0" /><span>m</span>
</el-form-item>
<el-form-item label="中转站" prop="transferable">
<el-checkbox v-model="model.transferable" />
</el-form-item>
<el-form-item label="上行容量" prop="upReception">
<el-input-number v-model="model.upReception" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="上行容量" prop="downReception">
<el-input-number v-model="model.downReception" controls-position="right" :min="1" />
</el-form-item>
</el-form>
<div class="footer">
<el-button type="primary" @click="doSubmit('form')">更新</el-button>
<el-button @click="drawer=false">取消</el-button>
</div>
</div>
</drawer>
</template>
<script>
import Drawer from '../components/drawer.vue';
export default {
components: {
Drawer
},
data() {
return {
drawer: false,
model: {
name: '',
kmRange: 0,
transferable: false,
upReception: 1,
downReception: 1
}
}
},
computed: {
rules() {
return {
name: [
{ required: true, message: '请输入车站名称', trigger: 'blur' }
],
kmRange: [
{ required: true, type: 'number', min: 0, message: '车站公里标不能小于0', trigger: 'blur' }
],
transferable: [
{ required: true, message: '请选择是否中转站', trigger: 'blur' },
],
upReception: [
{ required: true, type: 'number', min: 1, message: '请输入上行容量', trigger: 'blur' }
],
downReception: [
{ required: true, type: 'number', min: 1, message: '请输入下行容量', trigger: 'blur' }
]
}
}
},
methods: {
doShow(model) {
this.model = {
name: model.name,
kmRange: model.kmRange,
transferable: model.transferable,
upReception: model.upReception,
downReception: model.downReception
};
this.drawer = true;
},
doClose() {
this.drawer = false;
this.model = null;
},
doSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.$emit('update', {...this.model});
this.drawer = false;
}
});
}
}
}
</script>
<style lang="scss" scoped>
.container {
height: calc(100% - 20px);
.form {
padding: 30px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
text-align: right;
padding: 5px 20px;
background: #f1f1f1;
}
}
</style>

View File

@ -0,0 +1,50 @@
<template>
<div class="container">
<template v-if="list.length" >
<el-card class="el" v-for="(el,i) in list" :key="i" shadow="hover">
<div slot="header" class="clearfix">
<span>{{el.name}}</span>
</div>
<div style="padding: 30px 80px">
<slot :data="el" />
</div>
<div class="clearfix" style="text-align:right">
<el-button type="text" @click.stop="onSelect(el)">编辑</el-button>
</div>
</el-card>
</template>
<template v-else>
<span>暂无数据</span>
</template>
</div>
</template>
<script>
export default {
props: {
list: {
type: Array,
required: true
}
},
data() {
return {
}
},
methods: {
onSelect(el) {
this.$emit('select', el)
}
}
}
</script>
<style lang="scss" scoped>
.container {
padding: 0 50px;
.el {
padding: 30px 50px;
margin: 10px 0;
}
}
</style>

View File

@ -4,6 +4,11 @@
<el-form-item label="Name" prop="name"> <el-form-item label="Name" prop="name">
<el-input v-model="formModel.name" placeholder="Please Input Run Plan Name." /> <el-input v-model="formModel.name" placeholder="Please Input Run Plan Name." />
</el-form-item> </el-form-item>
<el-form-item label="Lines" prop="maps">
<el-select v-model="formModel.maps" multiple filterable placeholder="Please Select Lines.">
<el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button> <el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
@ -13,20 +18,32 @@
</template> </template>
<script> <script>
import { MenuEnum } from '../utils.js'; import { MenuEnum } from '../../utils.js';
export default { export default {
props: {
lineList: {
type: Array,
required: true
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
formModel: { formModel: {
name: '', name: '',
maps: []
}, },
rules: { rules: {
name: [ name: [
{ {
required: true, message: 'Please Input Run Plan Name.', trigger: 'blur' required: true, message: 'Please Input Run Plan Name.', trigger: 'blur'
} }
],
maps: [
{
required: true, type: 'array', message: 'Please Select Lines.', trigger: 'change'
}
] ]
} }
}; };
@ -38,6 +55,7 @@ export default {
methods: { methods: {
doShow() { doShow() {
this.formModel.name = ''; this.formModel.name = '';
this.formModel.lineList = [];
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {

View File

@ -11,7 +11,7 @@
</template> </template>
<script> <script>
import * as utils from '../utils' import * as utils from '../../utils'
import echarts from 'echarts'; import echarts from 'echarts';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';

View File

@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import { MenuEnum } from '../utils.js'; import { MenuEnum } from '../../utils.js';
export default { export default {
props: { props: {

View File

@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import { MenuEnum } from '../utils.js'; import { MenuEnum } from '../../utils.js';
export default { export default {
props: { props: {

View File

@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import { MenuEnum } from '../utils.js'; import { MenuEnum } from '../../utils.js';
export default { export default {
props: { props: {

View File

@ -34,7 +34,7 @@
</template> </template>
<script> <script>
import { MenuEnum } from '../utils.js'; import { MenuEnum } from '../../utils.js';
export default { export default {
props: { props: {

View File

@ -1,150 +1,119 @@
<template> <template>
<div class="monitor"> <div class="monitor">
<schedule <schedule
ref="schedule" ref="schedule"
:plan-util="planUtil" :planUtil="planUtil"
:title="title" :title="title"
:height="height" :height="height"
:width="width" :width="width"
:model="model" :model="model"
@tag="onTarget" @tag="onTarget"
@select="onSelected" @select="onSelected"
@clear="onClear" @clear="onClear"
@create="onCreate" @create="onCreate"
@translate="onTranslate" @translate="onTranslate"
@setInput="onSetInput" @setInput="onSetInput"
@submit="onSubmit" @submit="onSubmit"
@refresh="refresh" @refresh="refresh"
> >
<template slot="header"> <template slot="header">
<div class="header"> <div class="header">
<div class="menus-left"> <div class="menus-left">
<el-button type="primary" @click="drawer=true">Open</el-button> <el-button type="primary" @click="doOpenPlan">Open</el-button>
<el-button type="primary" @click="doNewPlan">New</el-button> <el-button type="primary" @click="doNewPlan">New</el-button>
<el-button type="primary" :disabled="disabled" @click="onDialog(MenuEnum.planSetParams)">Set Param</el-button> <el-button type="primary" :disabled="disabled" @click="onDialog(MenuEnum.planSetParams)">Set Param</el-button>
<el-button type="primary" :disabled="disabled" @click="doExport"> Export </el-button> <el-button type="primary" @click="doExport" :disabled="disabled"> Export </el-button>
</div> </div>
<div class="menus-right"> <div class="menus-right">
<span style="font-size:22px;padding:0 17px;">Plan</span> <span style="font-size:22px;padding:0 17px;">Plan</span>
<menus <menus
:model="model" :model="model"
:selected="selected" :selected="selected"
:target="target" :target="target"
:disabled="disabled" :disabled="disabled"
@remove="onRemove" @remove="onRemove"
@clear="onClear" @clear="onClear"
/> />
</div> </div>
</div> </div>
</template> </template>
</schedule> </schedule>
<drawer :visible.sync="drawer" @before-close="e => drawer=false"> <list ref="list" :planList="planList" @select="doSelectPlan" @delete="doDeletePlan" />
<template slot="title">Run Plan List</template>
<el-tree style="padding-right: 20px" :data="planList" :props="defaultProps" @node-click="onSelectPlan">
<template slot-scope="{data}">
<span class="flex">
<span><i class="el-icon-document" />&ensp;{{ data.name }}</span>
<el-button
type="text"
style="color:red"
size="mini"
@click="doDeletePlan(data)"
>
Delete
</el-button>
</span>
</template>
</el-tree>
</drawer>
<plan-just-running :config="config" :selected="selected" :stations="stations" @justRunning="doJustRunning" /> <plan-just-running :config="config" :selected="selected" :stations="stations" @justRunning="doJustRunning" />
<plan-just-stop :config="config" :selected="selected" @justStop="doJustStop" /> <plan-just-stop :config="config" :selected="selected" @justStop="doJustStop"/>
<plan-just-turnback :config="config" :selected="selected" @justTurnBack="doJustTurnback" /> <plan-just-turnback :config="config" :selected="selected" @justTurnBack="doJustTurnback"/>
<plan-set-params :config="config" @setParams="doSetPlanParams" /> <plan-set-params :config="config" @setParams="doSetPlanParams" />
<plan-create ref="create" @createPlan="doCreatePlan" />
<plan-export ref="export" :plan-util="planUtil" :title="title" :width="3600*2+2050" :height="height-160" />
<div v-show="show" class="fixed">
<textarea <plan-create ref="create" :lineList="lineList" @createPlan="doCreatePlan" />
v-if="textareaModel.show" <plan-export ref="export" :planUtil="planUtil" :title="title" :width="3600*2+2050" :height="height-160" />
v-model="textareaModel.text"
v-focus
:auto-focus="true" <div class="fixed" v-show="show">
class="fixed-textarea" <textarea :auto-focus="true" v-if="textareaModel.show" v-focus v-model="textareaModel.text" class="fixed-textarea"
:style="{ left: rect.x+'px', top: rect.y+'px', width: rect.width+'px', height: rect.height+'px', }" :style="{ left: rect.x+'px', top: rect.y+'px', width: rect.width+'px', height: rect.height+'px', }"/>
/> </div>
</div>
</div> </div>
</template> </template>
<script> <script>
import PlanJustRunning from '../dialog/planJustRunning.vue'; import PlanJustRunning from './dialog/planJustRunning.vue';
import PlanJustStop from '../dialog/planJustStop.vue'; import PlanJustStop from './dialog/planJustStop.vue';
import PlanJustTurnback from '../dialog/planJustTurnback.vue'; import PlanJustTurnback from './dialog/planJustTurnback.vue';
import PlanSetParams from '../dialog/planSetParams.vue'; import PlanSetParams from './dialog/planSetParams.vue';
import PlanCreate from '../dialog/planCreate.vue'; import PlanCreate from './dialog/planCreate.vue';
import PlanExport from '../dialog/planExport.vue'; import PlanExport from './dialog/planExport.vue';
import Schedule from './schedule.vue'; import Schedule from './schedule.vue';
import Menus from './menus.vue'; import Menus from './menus.vue';
import Drawer from '../components/drawer.vue'; import List from './list.vue';
import * as utils from '../utils.js'; import * as utils from '../utils.js';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
// import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getStationList } from '@/api/runplan';
import { import {
listRps, createRp, deleteRp, listLines, listStations,
getRpTools, addRpTrip, delRpTrip, listRps, createRp, deleteRp,
justTripNoRunning, justTripNoStop, justTripTurnBack, getRpTools, clearRpPlan, addRpTrip, delRpTrip,
translateRpService, delRpService, justTripNoRunning, justTripNoStop, justTripTurnBack,
getRpConfig, modifyRpConfig, translateRpService, delRpService,
createRpArea, modifyRpArea, modifyAreaNote, delRpArea getRpConfig, modifyRpConfig,
createRpArea, modifyRpArea, modifyAreaNote, delRpArea
} from '@/api/rpTools'; } from '@/api/rpTools';
export default { export default {
components: { components: {
Schedule, Schedule,
PlanJustRunning, PlanJustRunning,
PlanJustStop, PlanJustStop,
PlanJustTurnback, PlanJustTurnback,
PlanSetParams, PlanSetParams,
PlanCreate, PlanCreate,
PlanExport, PlanExport,
Menus, Menus,
Drawer List
},
directives: {
focus: {
inserted: function (el) {
el.focus();
}
}
}, },
data() { data() {
return { return {
defaultProps: { planList: [],
children: 'children', lineList: [],
label: 'name' stations: [],
}, planData: {},
drawer: false, selected: null,
planList: [], target: null,
stations: [], textareaModel: {
planData: {}, id: 0,
selected: null, show: false,
target: null, text: '',
textareaModel: { },
id: 0, rect: {
show: false, x: 0,
text: '' y: 0,
}, width: 0,
rect: { height: 0
x: 0, },
y: 0, model: {
width: 0,
height: 0
},
model: {
choice: 'Plan', choice: 'Plan',
action: '' action: ''
}, },
@ -164,22 +133,22 @@ export default {
}, },
height() { height() {
return this.$store.state.app.height - 72; return this.$store.state.app.height - 72;
}, },
planId() { title() {
return this.$route.query.title||'';
},
planId() {
return this.$route.query.planId; return this.$route.query.planId;
}, },
title() { lineId() {
return this.$route.query.title || ''; return this.$route.query.lineId;
}, },
mapId() { lineCode() {
return 9; return '00';
}, },
lineCode() { MenuEnum() {
return '00'; return utils.MenuEnum;
}, }
MenuEnum() {
return utils.MenuEnum;
}
}, },
watch: { watch: {
width() { width() {
@ -187,210 +156,232 @@ export default {
}, },
height() { height() {
this.setPosition(); this.setPosition();
}, },
$route() { $route() {
this.loadPlanData(); this.loadPlanData();
} }
}, },
created() { created() {
this.planUtil = this.$theme.loadPlanConvert(this.lineCode); this.planUtil = this.$theme.loadPlanConvert(this.lineCode);
}, },
mounted() { mounted() {
this.setPosition(); this.setPosition();
this.loadPlanList(); this.loadPlanData();
this.loadPlanData(); },
},
methods: { methods: {
buildPlanList(list) {
return list.map(el => {
if (el.planList &&
el.planList.length) {
el.planList = el.planList.map(it => {
return {
id: it.id,
isPlan: true,
name: it.mapName,
lineId: it.mapId,
}
})
}
return el;
})
},
setPosition() { setPosition() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('rpTools/resize', { width: this.width, height: this.height }); this.$store.dispatch('rpTools/resize', { width: this.width, height: this.height });
}); });
}, },
loadPlanList() { loadPlanData() {
listRps().then(resp => { if (this.lineId) {
this.planList = resp.data; listStations(this.lineId).then(resp => {
}); const stations = this.stations = resp.data
},
loadPlanData() {
getStationList(this.mapId).then(resp => {
const stations = this.stations = resp.data.filter(el => {
return ['车辆段', '停车场'].findIndex(it => { return el.name.includes(it); }) < 0;
});
this.$store.commit('rpTools/setStations', stations); this.$store.commit('rpTools/setStations', stations);
this.$refs.schedule.loadChartPage(stations); this.$refs.schedule.loadChartPage(stations);
if (this.planId) { if (this.planId) {
getRpTools(this.planId).then(rest => { getRpTools(this.planId).then(rest => {
const planData = this.planData = rest.data; const planData = this.planData = rest.data;
this.$store.commit('rpTools/setPlanData', planData); this.$store.commit('rpTools/setPlanData', planData);
this.$refs.schedule.loadChartData(planData); this.$refs.schedule.loadChartData(planData);
getRpConfig(this.planId).then(resm => { getRpConfig(this.planId).then(resm => {
const data = resm.data; const data = resm.data;
this.config = { this.config = {
averageSpeed: data.averageSpeed, averageSpeed: data.averageSpeed,
maxSpeed: data.maxSpeed, maxSpeed: data.maxSpeed,
stopTime: data.stopTime, stopTime: data.stopTime,
minStopTime: data.minStopTime, minStopTime: data.minStopTime,
minIntervalTime: data.minIntervalTime, minIntervalTime: data.minIntervalTime,
turnBackTime: data.turnBackTime turnBackTime: data.turnBackTime
}; }
}).catch(error => { }).catch(error => {
this.$message.info(error.message); this.$message.info(error.message);
}); })
}).catch(error => { }).catch(error => {
this.$message.info(error.message); this.$message.info(error.message);
}); })
} else { } else {
const planData = {}; this.$refs.schedule.clear();
this.$store.commit('rpTools/setPlanData', planData); }
this.$refs.schedule.loadChartData(planData); }).catch(error => {
} this.$messageBox(error.message);
}).catch(error => { })
this.$messageBox(error.message); } else {
}); this.$refs.schedule.clear();
}, }
onDialog(menu) { },
this.$store.dispatch('menuOperation/setPopMenu', { position: {x: 0, y: 0}, menu }); onDialog(menu) {
}, this.$store.dispatch('menuOperation/setPopMenu', { position: {x: 0, y: 0}, menu });
onTarget(target) { },
this.target = target; onTarget(target) {
}, this.target = target;
onSelected(selected) { },
this.selected = selected; onSelected(selected) {
}, this.selected = selected;
onSetInput(target) { },
switch (this.model.choice) { onSetInput(target) {
case 'Construction': switch(this.model.choice) {
if (this.model.action == 'Note') { case 'Construction':
if (target) { if (this.model.action == 'Note') {
this.rect = target.getBoundingRect().clone(); if (target) {
this.rect.x += target.position[0] + 1; this.rect = target.getBoundingRect().clone();
this.rect.y += target.position[1] + 70; this.rect.x += target.position[0]+1;
this.textareaModel.id = target.model.areaNo; this.rect.y += target.position[1]+70;
this.textareaModel.text = target.model.text || ''; this.textareaModel.id = target.model.areaNo;
this.textareaModel.show = true; this.textareaModel.text = target.model.text||'';
target.setStyle({text: ''}); this.textareaModel.show = true;
} target.setStyle({text: ''});
} }
break; }
} break;
}, }
onSubmit() { },
switch (this.model.choice) { onSubmit() {
case 'Construction': switch(this.model.choice) {
if (this.model.action == 'Note') { case 'Construction':
if (this.textareaModel.id) { if (this.model.action == 'Note') {
this.doSetAreaNote(this.textareaModel); if (this.textareaModel.id) {
this.textareaModel.id = 0; this.doSetAreaNote(this.textareaModel);
this.textareaModel.show = false; this.textareaModel.id = 0;
} this.textareaModel.show = false;
} }
break; }
} break;
}, }
onCreate(data) { },
switch (this.model.choice) { onCreate(data) {
case 'Plan': switch(this.model.choice) {
this.doCreateTrip(data); case 'Plan':
break; this.doCreateTrip(data);
case 'Construction': break;
this.doCreateArea(data); case 'Construction':
break; this.doCreateArea(data);
} break;
}, }
onTranslate(data) { },
switch (this.model.choice) { onTranslate(data) {
case 'Plan': switch(this.model.choice) {
this.doTranslateService(data); case 'Plan':
break; this.doTranslateService(data);
case 'Construction': break;
this.doTranslateArea(data); case 'Construction':
break; this.doTranslateArea(data);
} break;
}, }
onClear() { },
this.selected = null; onClear() {
this.target = null; this.selected = null;
this.textareaModel.show = false; this.target = null;
this.$refs.schedule.setLineReset(); this.textareaModel.show = false;
this.$refs.schedule.setTargetReset(); this.$refs.schedule.setLineReset();
this.$refs.schedule.clearTrip(); this.$refs.schedule.setTargetReset();
if (this.model.action != 'Translate') { this.$refs.schedule.clearTrip();
this.$refs.schedule.clearDraggable(); if (this.model.action != 'Translate') {
} this.$refs.schedule.clearDraggable();
}
if (this.model.action != 'Add') { if (this.model.action != 'Add') {
this.$refs.schedule.clearGraphic(); this.$refs.schedule.clearGraphic();
} }
}, },
onRemove() { onRemove(){
switch (this.model.choice) { switch(this.model.choice) {
case 'Plan': case 'Plan':
if (['Translate', 'Edit'].includes(this.model.action)) { if (['Translate', 'Edit'].includes(this.model.action)) {
this.doRemoveService(); this.doRemoveService();
} else { } else {
this.doRemoveTrip(); this.doRemoveTrip();
} }
break; break;
case 'Construction': case 'Construction':
this.doRemoveArea(); this.doRemoveArea();
break; break;
} }
}, },
onSelectPlan(el) { doExport() {
this.$router.replace({ path: 'AUStool', query: { planId: el.id, title: el.name }}); this.$refs.export.doShow(this.stations, this.planData);
this.drawer = false; },
}, doOpenPlan() {
doExport() { listRps().then(resp => {
this.$refs.export.doShow(this.stations, this.planData); this.planList = this.buildPlanList(resp.data);
}, this.$refs.list.doShow();
doNewPlan() { })
this.$refs.create.doShow(); },
this.$nextTick(e => { doNewPlan() {
if (this.$refs.tree) { listLines().then(resp => {
this.$refs.tree.setCurrentKey(this.planId); this.lineList = resp.data;
} this.$refs.create.doShow(resp.data);
}); this.$nextTick(e => {
}, if (this.$refs.tree) {
doCreatePlan(model) { this.$refs.tree.setCurrentKey(this.planId);
createRp(model).then(resp => { }
this.loadPlanList(); })
this.onSelectPlan({id: resp.data, name: model.name}); });
}).catch(error => { },
this.$message.info(error.message); doSelectPlan(el) {
}); this.$router.replace({ path: 'AUStool', query: { planId: el.id, lineId: el.lineId, title: el.name }});
}, },
doDeletePlan(el) { doCreatePlan(model) {
this.$confirm('This operation will permanently delete the data. Do you want to continue?', 'Tips', { createRp(model).then(resp => {
confirmButtonText: 'Confirm', this.$message.success('Run plan group created successfully.')
cancelButtonText: 'Cancel', }).catch(error => {
type: 'warning' this.$message.info(error.message);
}).then(() => { })
deleteRp(el.id).then(resp => { },
this.loadPlanList(); doDeletePlan(el) {
this.planId == el.id this.$confirm('This operation will permanently delete the data. Do you want to continue?', 'Tips', {
? this.$router.replace({ path: 'AUStool'}) confirmButtonText: 'Confirm',
: this.loadPlanData(); cancelButtonText: 'Cancel',
}).catch(error => { type: 'warning'
this.$message.info(error.message); }).then(() => {
}); deleteRp(el.id).then(resp => {
}).catch(() => { listRps().then(resp => {
this.$message({ type: 'info', message: 'Deletion cancelled.' }); this.planList = this.buildPlanList(resp.data);
}); el.planList.findIndex(el => { return el.id == this.planId; }) >= 0
}, ? this.$router.replace({ path: 'AUStool'})
doSetPlanParams(data) { : this.loadPlanData();
modifyRpConfig(this.planId, data).then(resp => { }).catch(error => {
this.config = data; this.$message.info(error.message);
this.$message.success('Parameters of plan were modified successfully.'); })
}).catch(error => { }).catch(error => {
this.$message.info(error.message); this.$message.info(error.message);
}); })
}, }).catch(() => {
doSetAreaNote(data) { this.$message({ type: 'info', message: 'Deletion cancelled.' });
const model = { });
text: data.text },
}; doSetPlanParams(data) {
modifyRpConfig(this.planId, data).then(resp => {
this.config = data;
this.$message.success('Parameters of plan were modified successfully.');
}).catch(error => {
this.$message.info(error.message);
})
},
doSetAreaNote(data) {
const model = {
text: data.text
}
modifyAreaNote(this.planId, data.id, model).then(resp => { modifyAreaNote(this.planId, data.id, model).then(resp => {
this.refresh(false); this.refresh(false);
@ -403,8 +394,8 @@ export default {
if (this.selected) { if (this.selected) {
const model = { const model = {
seconds: time, seconds: time,
stationCode: this.selected.stationCode stationId: this.selected.stationId
}; }
justTripNoRunning(this.planId, this.selected.tripNo, model).then(resp => { justTripNoRunning(this.planId, this.selected.tripNo, model).then(resp => {
this.refresh(false); this.refresh(false);
@ -418,8 +409,8 @@ export default {
if (this.selected) { if (this.selected) {
const model = { const model = {
seconds: time, seconds: time,
stationCode: this.selected.stationCode stationId: this.selected.stationId
}; }
justTripNoStop(this.planId, this.selected.tripNo, model).then(resp => { justTripNoStop(this.planId, this.selected.tripNo, model).then(resp => {
this.refresh(false); this.refresh(false);
@ -433,8 +424,8 @@ export default {
if (this.selected) { if (this.selected) {
const model = { const model = {
seconds: time, seconds: time,
stationCode: this.selected.stationCode stationId: this.selected.stationId
}; }
justTripTurnBack(this.planId, this.selected.tripNo, model).then(resp => { justTripTurnBack(this.planId, this.selected.tripNo, model).then(resp => {
this.refresh(false); this.refresh(false);
@ -443,14 +434,14 @@ export default {
this.refresh(false); this.refresh(false);
}); });
} }
}, },
doCreateTrip(data) { doCreateTrip(data) {
const model = { const model = {
endStationCode: data.endStationCode, endStationId: data.endStationId,
startStationCode: data.startStationCode, startStationId: data.startStationId,
startTime: timeFormat(data.startTime), startTime: timeFormat(data.startTime),
endTime: timeFormat(data.endTime) endTime: timeFormat(data.endTime)
}; }
addRpTrip(this.planId, model).then(resp => { addRpTrip(this.planId, model).then(resp => {
this.refresh(); this.refresh();
@ -623,11 +614,4 @@ export default {
} }
} }
} }
.flex {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
</style> </style>

View File

@ -0,0 +1,71 @@
<template>
<drawer :visible.sync="drawer" @before-close="e => drawer=false">
<template slot="title">Run Plan List</template>
<el-tree style="padding-right: 20px" :data="planList" :props="defaultProps" @node-click="onSelect" default-expand-all>
<template slot-scope="{data}">
<span class="flex" >
<span><i :class="data.isPlan? 'el-icon-document': 'el-icon-folder'"/>&ensp;{{data.name}}</span>
<el-button
v-if="!data.isPlan"
type="text"
style="color:red"
size="mini"
@click.stop="onDelete(data)">
Delete
</el-button>
</span>
</template>
</el-tree>
</drawer>
</template>
<script>
import Drawer from '../components/drawer.vue';
export default {
components: {
Drawer
},
props: {
planList: {
type: Array,
required: true,
}
},
data() {
return {
defaultProps: {
children: 'planList',
label: 'name'
},
drawer: false
}
},
methods: {
onSelect(el) {
if (el.isPlan) {
this.$emit('select', el);
this.drawer = false;
}
},
onDelete(el) {
this.$emit('delete', el);
},
doShow() {
this.drawer = true;
},
doClose() {
this.drawer = false;
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
</style>

Some files were not shown because too many files have changed in this diff Show More