# 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'
});
}
// /** 根据id查询公司信心 */
// export function getCompanyById(id) {
// return request({
// url: `/api/company/${id}`,
// method: 'get'
// });
// }
/** 更新公司信息 */
export function updateCompany(id, data) {
return request({

View File

@ -7,20 +7,7 @@ export function refereeExitSimulation(group) {
method: 'delete'
});
}
// /** 裁判进入仿真 */
// export function refereeEnterSimulation(group) {
// return request({
// url: `/api/v1/competition/room/${group}/refree`,
// method: 'post'
// });
// }
// /** 裁判查询竞赛人员的房间列表 */
// export function refereeGetCompetitionList(id) {
// return request({
// url: `/api/v1/competition/${id}/room`,
// method: 'get'
// });
// }
/** 参赛者创建演练房间 */
export function participantCreatTrainingRoom(id, data) {
return request({
@ -30,23 +17,6 @@ export function participantCreatTrainingRoom(id, data) {
});
}
// // 加载试卷
// export function loadingPaper(competitionId, data) {
// return request({
// url: `/api/v1/competition/${competitionId}/testPaper`,
// method: 'post',
// data
// });
// }
// /** 竞赛报名 */
// export function postSignUp(id, data) {
// return request({
// url: `/api/race/${id}/signUp`,
// method: 'post',
// data
// });
// }
/** 查询用户是否已经报名该竞赛 */
export function getIsSignUp(raceId, params = {}) {
return request({
@ -56,24 +26,6 @@ export function getIsSignUp(raceId, params = {}) {
});
}
// /** 分页查询竞赛报名人员 */
// export function getRaceUserList(params) {
// return request({
// url: `/api/race/${params.raceId}/raceUser/page`,
// method: 'get',
// params
// });
// }
// /** 裁判打分 */
// export function putRefereeScoring(data) {
// return request({
// url: `/api/v1/competition/referee/scoring`,
// method: 'put',
// data
// });
// }
/** 提交试卷 */
export function postCompetitionTheory(data) {
return request({
@ -83,14 +35,6 @@ export function postCompetitionTheory(data) {
});
}
// /** 查询本竞赛用的实操列表 */
// export function getCompetitionPractical(competitionId) {
// return request({
// url: `/api/v1/competitionPractical/competition/${competitionId}`,
// method: 'get'
// });
// }
/** 查询竞赛报名人员详情 */
export function getRaceUserById(raceId) {
return request({
@ -169,68 +113,6 @@ export function getPracticalCompetitionResult(competitionId) {
});
}
// /** 回访准备 */
// export function playBackReady(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/ready`,
// method: 'get',
// params
// });
// }
// /** 设置倍速 */
// export function setPlaySpeed(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/setPlaySpeed`,
// method: 'get',
// params
// });
// }
// /** 开始播放 */
// export function startPlaying(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/startPlaying`,
// method: 'get',
// params
// });
// }
// /** 暂停播放 */
// export function playingPause(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/pausePlaying`,
// method: 'get',
// params
// });
// }
// /** 结束播放 */
// export function endPlaying(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/endPlaying`,
// method: 'get',
// params
// });
// }
// /** 从暂停中播放 */
// export function fromPauseToPlay(params) {
// return request({
// url: `/api/v1/simulationRecord/playback/playing`,
// method: 'get',
// params
// });
// }
// /** 裁判查询理论考试结果 */
// export function getTheroyCompetitionResult(competitionId, raceUserId) {
// return request({
// url: `api/v1/competitionTheory/detail/competition/${competitionId}/raceUser/${raceUserId}`,
// method: 'get'
// });
// }
// 以下drts项目使用
/** 项目获取试题列表 */

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

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) {
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获取地图版本信息*/
export function getPublishMapVersionById(id) {
return request({
@ -107,15 +99,6 @@ export function putMapOffLine(mapId) {
});
}
// /** 修改发布地图名称*/
// export function updatePublishMapName(data) {
// return request({
// url: `/api/map/${data.mapId}/updateName`,
// method: 'put',
// data: data
// });
// }
// 检测地图名称唯一性
export function checkMapName(name) {
return request({
@ -133,23 +116,6 @@ export function getPublishMapDetailList(params, code) {
});
}
// /** 获取有屏蔽门的站台列表*/
// export function hasDoorStationList(mapId) {
// return request({
// url: `/api/map/${mapId}/stand/hasDoor`,
// method: 'get'
// });
// }
// /** 修改发布地图城市*/
// export function updatePublishMapCity(data) {
// return request({
// url: `/api/map/${data.mapId}/city`,
// method: 'put',
// data: data
// });
// }
// 修改地图基本信息
export function updatePublishMapInfo(data) {
return request({
@ -263,14 +229,6 @@ export function publisMapCityList(data) {
});
}
// // 获取所有需要值班员的车站(新版)
// export function getAvailableStaionList(mapId) {
// return request({
// url: `/api/map/${mapId}/station/needSupervisor`,
// method: 'get'
// });
// }
/** 新版地图根据仿真mapId获取仿真地图数据 */
export function getNewMapDataByMapId(mapId) {
return request({

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) {
return request({
@ -124,78 +115,6 @@ export function getBuildMapExport(mapId) {
});
}
// /** 查询进路列表*/
// export function listRouteRoute(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/route`,
// method: 'get',
// params: params
// });
// }
// /** 查询进路地图列表*/
// export function listRouteMapRoute(mapId) {
// return request({
// url: `/api/mapBuild/${mapId}/route/all`,
// method: 'get'
// });
// }
// /** 查询进路明细*/
// export function queryRouteRouteDetail(data) {
// return request({
// url: `/api/mapBuild/route/${data.id}`,
// method: 'get'
// });
// }
// /** 创建进路*/
// export function createRouteRoute(data) {
// return request({
// url: `/api/mapBuild/route`,
// method: 'post',
// data: data
// });
// }
// /** 删除进路*/
// export function deleteRouteRoute(id) {
// return request({
// url: `/api/mapBuild/route/${id}`,
// method: 'delete'
// });
// }
// /** 更新进路*/
// export function updateRouteRoute(data) {
// return request({
// url: `/api/mapBuild/route/${data.id}`,
// method: 'put',
// data: data
// });
// }
// /** 创建联动道岔*/
// export function createLinkageSwitch(data) {
// return request({
// url: `/api/mapBuild/switchCoupled`,
// method: 'post',
// data: data
// });
// }
// /** 删除联动道岔*/
// export function deleteLinkageSwitch(coupleId) {
// return request({
// url: `/api/mapBuild/switchCoupled/${coupleId}`,
// method: 'delete'
// });
// }
// /** get联动道岔列表*/
// export function listLinkageSwitch(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/switchCoupled`,
// method: 'get',
// params: params
// });
// }
/** 草稿地图数据校验*/
export function verifyMap(id) {
return request({
@ -204,49 +123,6 @@ export function verifyMap(id) {
});
}
// /** 分页查询交路数据*/
// export function listRouting(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/routing`,
// method: 'get',
// params: params
// });
// }
// /** 创建交路*/
// export function addRouting(data) {
// return request({
// url: `/api/mapBuild/routing`,
// method: 'post',
// data: data
// });
// }
// /** 删除交路*/
// export function deleteRouting(routingId) {
// return request({
// url: `/api/mapBuild/routing/${routingId}`,
// method: 'delete'
// });
// }
// /** 获取交路详情*/
// export function getRouting(routingId) {
// return request({
// url: `/api/mapBuild/routing/${routingId}`,
// method: 'get'
// });
// }
// /** 更新交路*/
// export function updateRouting(data) {
// return request({
// url: `/api/mapBuild/routing/${data.id}`,
// method: 'put',
// data: data
// });
// }
/** 分页查询交路数据(新版)*/
export function listRoutingData(mapId, params) {
return request({
@ -307,49 +183,6 @@ export function generateStationRunData(routingId) {
});
}
// // 创建自动信号 old旧数据
// export function postAutoSignal(data) {
// return request({
// url: `/api/mapBuild/autoSignal`,
// method: 'post',
// data: data
// });
// }
// // 删除自动信号 old旧数据
// export function delAutoSignal(autoSignalId) {
// return request({
// url: `/api/mapBuild/autoSignal/${autoSignalId}`,
// method: 'delete'
// });
// }
// // 分页获取自动信号列表 old旧数据
// export function getAutoSignalList(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/autoSignal`,
// method: 'get',
// params
// });
// }
// // 获取自动信号详情 old旧数据
// export function getAutoSignalDetail(autoSignalId) {
// return request({
// url: `/api/mapBuild/autoSignal/${autoSignalId}`,
// method: 'get'
// });
// }
// // 更新自动信号 old旧数据
// export function putAutoSignal(data) {
// return request({
// url: `/api/mapBuild/autoSignal/${data.autoSignalId}`,
// method: 'put',
// data: data
// });
// }
// 分页获取自动信号列表 new新数据
export function getAutoSignalListNew(mapId, params) {
return request({
@ -392,14 +225,6 @@ export function putAutoSignalNew(data) {
data: data
});
}
// export function getListByCityCode(cityCode) {
// return request({
// url: `/api/mapBuild/${cityCode}/list`,
// method: 'get'
// });
// }
// 创建信号机接近区段
export function postApproachSection(data) {
return request({
@ -464,12 +289,6 @@ export function delContinueProtect(id) {
method: 'delete'
});
}
// export function getContinueProtectById(id) {
// return request({
// url: `/api/mapBuild/overlap/${id}`,
// method: 'get'
// });
// }
export function getContinueProtectList(mapId, params) {
return request({
url: `/api/mapBuild/${mapId}/overlap/paging`,
@ -545,15 +364,6 @@ export function getRouteNewList(mapId, params) {
params
});
}
// // 获取自动折返分组列表
// export function getAutoReentryGroupList(mapId, params) {
// return request({
// url: `/api/mapBuild/${mapId}/autoReentry/group/reentryTrack`,
// method: 'get',
// params
// });
// }
// 新建进路侧防
export function postFlankProtection(data) {
return request({

View File

@ -1,44 +1,2 @@
// import request from '@/utils/request';
// /** 获取路径单元列表*/
// export function getRouteUnitList(id, data) {
// return request({
// url: `/api/mapBuild/${id}/routeUnit`,
// method: 'get',
// params: data
// });
// }
// /** 创建路径单元*/
// export function addRouteUnit(data) {
// return request({
// url: `/api/mapBuild/routeUnit`,
// method: 'post',
// data: data
// });
// }
// /** 删除路径单元*/
// export function delRouteUnit(id) {
// return request({
// url: `/api/mapBuild/routeUnit/${id}`,
// method: 'DELETE'
// });
// }
// /** 获取路径单元*/
// export function getRouteUnit(id) {
// return request({
// url: `/api/mapBuild/routeUnit/${id}`,
// method: 'get'
// });
// }
// /** 更新路径单元*/
// export function setRouteUnit(data) {
// return request({
// url: `/api/mapBuild/routeUnit/${data.id}`,
// method: 'put',
// data: data
// });
// }

View File

@ -1,29 +1,5 @@
import request from '@/utils/request';
// /** 开始实训 0*/
// export function startTraining(args, group) {
// return request({
// url: `/api/training/${args.id}/start`,
// method: 'get',
// params: {
// group
// }
// });
// }
// /** 实训结束*/
// export function endTraining(args, group) {
// return request({
// url: `/api/training/${args.lessonId}/${args.id}/end`,
// method: 'get',
// params: {
// mode: args.mode,
// usedTime: args.usedTime,
// group
// }
// });
// }
/** 发送步骤数据*/
export function sendTrainingNextStep(data, group) {
return request({
@ -35,32 +11,6 @@ export function sendTrainingNextStep(data, group) {
}
});
}
// /** 获取章节基本信息 0*/
// export function getTrainingDetail(trainingId) {
// return request({
// url: `/api/training/${trainingId}`,
// method: 'get'
// });
// }
// /** 添加实训 0*/
// export function addTraining(data) {
// return request({
// url: '/api/training',
// method: 'post',
// data: data
// });
// }
// /** 获取实训步骤数据 0*/
// export function getTrainingStepsDetail(trainingId, params) {
// return request({
// url: `/api/training/${trainingId}/detail`,
// method: 'get',
// params: params
// });
// }
/** 查询实训列表 0*/
export function pageQueryTraining(params) {
return request({
@ -69,41 +19,6 @@ export function pageQueryTraining(params) {
params: params
});
}
// /** 自动生成实训操作 0*/
// export function addAutoTraining(data) {
// return request({
// url: `/api/training/generate`,
// method: 'post',
// data: data
// });
// }
// /** 修改自动删除实训操作 0*/
// export function updateAutoTraining(data) {
// return request({
// url: `/api/training/batchUpdateGenerate`,
// method: 'put',
// data: data
// });
// }
// /** 删除自动生成实训 0*/
// export function deleteAutoTraining(params) {
// return request({
// url: `/api/training/generate`,
// method: 'delete',
// params: params
// });
// }
// /** 获取用户实训列表 0*/
// export function getTrainingList(data) {
// return request({
// url: `/api/training/list`,
// method: 'get',
// params: data
// });
// }
export function sendCommand(group, command) {
return request({
url: `/api/training/deviceChange?group=${group}`,
@ -125,29 +40,6 @@ export function sendCommandNew(group, commandDefinitionId, command) {
data: command
});
}
// // 添加用户实训数据 0
// export function addUserTraining(data) {
// return request({
// url: `/api/training/userTraining`,
// method: 'post',
// data: data
// });
// }
// // 更新用户实训数据 0
// export function putUserTraining(data) {
// return request({
// url: `/api/training/userTraining/${data.id}`,
// method: 'put',
// data: data
// });
// }
// // 清除实训数据 0
// export function deleteUserTraining(statsId) {
// return request({
// url: `/api/training/userTraining/${statsId}`,
// method: 'delete'
// });
// }
/** 开始实训 (新版地图) */
export function startTrainingNew (args, group) {

View File

@ -1,34 +1,5 @@
import request from '@/utils/request';
// // 文字聊天 发送文字
// export function chatWithTextNew(data, group) {
// return request({
// url: `/api/v1/jointTraining/chatWithText?group=${group}`,
// method: 'post',
// data: {
// message: data
// }
// });
// }
// // 生成分发二维码
// export function getJoinTrainCodeNew(data, group) {
// return request({
// url: `/api/v1/jointTraining/qrCode?group=${group}`,
// method: 'post',
// data: data
// });
// }
// // 创建房间
// export function postCreateRoomNew(data) {
// return request({
// url: `/api/v1/jointTraining/room`,
// method: 'post',
// data: data
// });
// }
// 检查房间存在
export function checkRoomExistNew(params) {
return request({
@ -38,45 +9,6 @@ export function checkRoomExistNew(params) {
});
}
// // 获取房间详情
// export function postRoomDetailNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/${group}`,
// method: 'get'
// });
// }
// // 销毁房间
// export function deljointTrainRoomNew(group) {
// return request({
// url: `/api/v1/jointTraining/room`,
// method: 'delete',
// params: {
// group: group
// }
// });
// }
// // 查询有权限房间列表
// export function getjointTrainListNew(params) {
// return request({
// url: `/api/v1/jointTraining/room/list`,
// method: 'get',
// params: params
// });
// }
// // 加入房间
// export function getjointTrainingNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/join`,
// method: 'put',
// params: {
// group: group
// }
// });
// }
// 设置人员角色
export function putUserRolesNew(data, group) {
return request({
@ -86,70 +18,6 @@ export function putUserRolesNew(data, group) {
});
}
// // 获取房间里的用户列表
// export function getJointTrainRoomUserListNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/${group}/user/list`,
// method: 'get'
// });
// }
// // 离开房间接口
// export function putJointTrainingExitNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/exit`,
// method: 'put',
// params: {
// group: group
// }
// });
// }
// // 开始联合演练
// export function startJointTrainingNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/simulation`,
// method: 'post',
// params: {
// group: group
// }
// });
// }
// // 获取个人信息
// export function getUserRolesNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/user/role`,
// method: 'get',
// params: {
// group: group
// }
// });
// }
// // 踢出用户
// export function putJointTrainingUserkickedNew(userId, group) {
// return request({
// url: `/api/v1/jointTraining/room/user`,
// method: 'put',
// params: {
// userId: userId,
// group: group
// }
// });
// }
// // 管理员结束所有人的仿真
// export function putJointTrainingSimulationNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/simulation/all`,
// method: 'put',
// params: {
// group: group
// }
// });
// }
// 结束仿真返回房间
export function putJointTrainingSimulationUserNew(group) {
return request({
@ -160,82 +28,3 @@ export function putJointTrainingSimulationUserNew(group) {
}
});
}
// // 进入仿真
// export function putJointTrainingSimulationEntranceNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/simulation/user/entrance`,
// method: 'put',
// params: {
// group: group
// }
// });
// }
// /**
// * 权限获取(房间权限)
// */
// export function getPermissionJointNew(group) {
// return request({
// url: '/api/v1/jointTraining/qrCode',
// method: 'get',
// params: {
// group: group
// }
// });
// }
// // 添加或更新真实设备和仿真对象连接
// export function setRealDeviceNew(group, data) {
// return request({
// url: `/api/v1/jointTraining/room/realDevice?group=${group}`,
// method: 'post',
// data: data
// });
// }
// // 删除真实设备和仿真对象连接
// export function delRealDeviceNew(id, group) {
// return request({
// url: `/api/v1/jointTraining/room/realDevice/${id}`,
// method: 'delete',
// params: { group: group }
// });
// }
// // 获取真实设备列表
// export function getRealDevicesNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/${group}/devices`,
// method: 'get'
// });
// }
// // 获取房间真实设备连接关系
// export function getRealDevicesInRoomNew(group) {
// return request({
// url: `/api/v1/jointTraining/room/${group}/realDevice/connect`,
// method: 'get'
// });
// }
// // 更新真实设备的连接关系
// export function updateRealDevicesNew(group, data) {
// return request({
// url: `/api/v1/jointTraining/room/${group}/realDevice`,
// method: 'put',
// data: data
// });
// }
// // 真实设备是否被其他仿真使用
// export function realDeviceIsUsedNew(group, projectCode) {
// return request({
// url: `/api/v1/jointTraining/room/${group}/realDeviceUsed`,
// method: 'get',
// params: {
// projectCode: projectCode
// }
// });
// }

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) {
return request({
@ -44,14 +35,6 @@ export function postPermissonList(mapId) {
});
}
// /** 获取用户某课程某段时间内可用的权限数量*/
// export function getTotalRemains(params) {
// return request({
// url: '/api/userPermission/totalRemains',
// method: 'get',
// params: params
// });
// }
/** 设置权限失效或有效*/
export function setLessonPermisson(data) {
return request({
@ -61,25 +44,7 @@ export function setLessonPermisson(data) {
});
}
// /** 设置权限失效或有效*/
// export function getPermissionList(id) {
// return request({
// url: `/api/permission/${id}`,
// method: 'get'
// });
// }
// /** 获取大屏权限列表*/
// export function queryPermissionScreen() {
// return request({
// url: `/api/userPermission/bigScreen`,
// method: 'get'
// });
// }
/**
* 用户权限列表
*/
/** 用户权限列表*/
export function listPermision(params) {
return request({
url: `/api/userPermission`,
@ -88,9 +53,7 @@ export function listPermision(params) {
});
}
/**
* 个人权限列表
*/
/** 个人权限列表*/
export function listUserPermision(params) {
return request({
url: `/api/userPermission/my`,
@ -99,14 +62,6 @@ export function listUserPermision(params) {
});
}
// /** 用户权限列表 */
// export function getDistribute(id) {
// return request({
// url: `/api/distribute/${id}`,
// method: 'get'
// });
// }
/** 设置权限所有者 */
export function putPermissionOwner(data) {
return request({

View File

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

View File

@ -1,32 +1,5 @@
import request from '@/utils/request';
// /** 权限转增*/
// export function getLessons(data) {
// return request({
// url: '/api/distribute/getLessons',
// method: 'get',
// data: data
// });
// }
// /** 权限分发*/
// export function giveLessons(data) {
// return request({
// url: '/api/distribute/distribute',
// method: 'post',
// data: data
// });
// }
// /** 权限转增*/
// export function permissionTurnAdd(data) {
// return request({
// url: '/api/distribute/transfer',
// method: 'post',
// data: data
// });
// }
/** 权限获取*/
export function getPermission(state) {
return request({
@ -35,24 +8,6 @@ export function getPermission(state) {
});
}
// /** 接收课程权限*/
// export function receiveLessons(data) {
// return request({
// url: '/api/distribute/receiveLessons',
// method: 'get',
// data: data
// });
// }
// /** 考试权限分发*/
// export function giveExams(data) {
// return request({
// url: `/api/distribute/giveExams`,
// method: 'post',
// data: data
// });
// }
/** 权限打包分页查询*/
export function listPackagePermission(params) {
return request({
@ -62,15 +17,6 @@ export function listPackagePermission(params) {
});
}
// /** 打包权限*/
// export function packagePermissionDistribute(data) {
// return request({
// url: `/api/distribute/givePermission/package`,
// method: 'post',
// data: data
// });
// }
/** 权限回收*/
export function restorePackagePermission(id) {
return request({
@ -97,32 +43,6 @@ export function getPermissionPackageDetail(id, params) {
});
}
// /** 权限分发打包*/
// export function permissionDistributePackage(data) {
// return request({
// url: `/api/distribute/package`,
// method: 'post',
// data: data
// });
// }
// /** 权限分发解包*/
// export function permissionDistributeUnPackage(permissionId) {
// return request({
// url: `/api/distribute/${permissionId}/unPackage`,
// method: 'delete'
// });
// }
// /** 查询可打包的权限分发*/
// export function listCanPackagePermission(params) {
// return request({
// url: `/api/distribute/package`,
// method: 'get',
// params: params
// });
// }
// 设置权限分发列表 权限失效
export function setCommodityStatus(id) {
return request({
@ -148,11 +68,3 @@ export function givePermission(data) {
data: data
});
}
// /** 查询权限分发领取用户列表 */
// export function distributeUsers(distributeId) {
// return request({
// url: `/api/distribute/${distributeId}/distributeUsers`,
// method: 'get'
// });
// }

View File

@ -93,11 +93,3 @@ export function updateExamRules(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) {
return request({
url: '/api/goods',
@ -20,20 +18,7 @@ export function getCommodityList(params) {
});
}
// /**
// * 保存商品明细列表
// */
// export function saveCommodityList(params) {
// return request({
// url: '/api/goods',
// method: 'post',
// data: params
// });
// }
/**
* 删除商品明细
*/
/** 删除商品明细*/
export function delCommodity(id) {
return request({
url: `/api/goods/${id}`,
@ -41,29 +26,7 @@ export function delCommodity(id) {
});
}
// /**
// * 获取商品地图,产品,课程列表
// */
// export function getMapLesson() {
// return request({
// url: `/api/goods/tree`,
// method: 'get'
// });
// }
// /**
// * 获取商品地图,产品,课程列表
// */
// export function getCommodityDetailById(id) {
// return request({
// url: `/api/goods/${id}`,
// method: 'get'
// });
// }
/**
* 获取商品地图产品课程列表
*/
/** 获取商品地图,产品,课程列表*/
export function updataCommodityList(data) {
return request({
url: `/api/goods/${data.id}`,
@ -72,9 +35,7 @@ export function updataCommodityList(data) {
});
}
/**
* 设置失效或有效切换
*/
/** 设置失效或有效切换*/
export function setCommodityStatus(id) {
return request({
url: `/api/goods/${id}/status`,
@ -110,44 +71,6 @@ export function getGoodsList() {
});
}
// // 根据权限id查询商品
// export function getGoodsByPermissionId(id) {
// return request({
// url: `/api/goods/permissionId`,
// method: 'get',
// params: {
// permissionId: id
// }
// });
// }
// // 创建商品
// export function postsPermissionGoods(data) {
// return request({
// // url: `/api/goods`,
// url: `/api/goods/create/list`,
// method: 'post',
// data: data
// });
// }
// // 创建万能权限商品
// export function postPermissionIdsGoods(data) {
// return request({
// url: `/api/goods/permissionIds`,
// method: 'post',
// data: data
// });
// }
// // 创建万能权限商品
// export function postCreatePackage(data) {
// return request({
// url: `/api/goods/create/package`,
// method: 'post',
// data: data
// });
// }
// 获取订单对应的商品列表
export function getGoodsListByOrderId(id) {
return request({

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) {
return request({
@ -60,23 +52,6 @@ export function putRealLineConfig(id, data) {
});
}
// /** 通过皮肤Code更新地图皮肤*/
// export function updateSkinCodeByCode(data) {
// return request({
// url: `/api/realLine/${data.code}/update`,
// method: 'put',
// data: data
// });
// }
// /** 检查code是否存在*/
// export function querySkinCodeExistByCode(code) {
// return request({
// url: `/api/realLine/${code}/exist`,
// method: 'get'
// });
// }
/** 获取真实线路列表*/
export function getLineCodeList() {
return request({

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) {
return request({
@ -37,31 +28,6 @@ export function updateOrder(data) {
});
}
// export function deleteOrder(id) {
// return request({
// url: `/api/order/${id}`,
// method: 'delete'
// });
// }
// /** 订单权限领取*/
// export function getOrder(params) {
// return request({
// url: '/api/order/getOrder',
// method: 'get',
// params: params
// });
// }
// /** 订单权限分发*/
// export function giveOrder(data) {
// return request({
// url: '/api/order/giveOrder',
// method: 'post',
// data: data
// });
// }
/** 订单续费*/
export function getOrderCharge(id) {
return request({
@ -104,14 +70,6 @@ export function cancalOrder(orderId) {
});
}
// // 万能权限查询权限包商品
// export function postFindPermission(ids) {
// return request({
// url: `/api/goods/permissionIds?ids=${ids}`,
// method: 'get'
// });
// }
// 获取订单的分发二维码
export function getDistributeFromOrder(orderCode) {
return request({

View File

@ -1,29 +1,4 @@
import request from '@/utils/request';
// /** 注册用户*/
// export function createUserInfo(data) {
// return request({
// url: '/api/userinfo/create',
// method: 'put',
// data: data
// });
// }
// /** 根据用户Id获取用户信息*/
// export function getUserInfoByOpenId(params) {
// return request({
// url: '/api/userinfo/getByOpenId',
// method: 'get',
// params: params
// });
// }
// /** 根据姓名或者手机号查询用户*/
// export function getUserInfoByNameOrMobile(params) {
// return request({
// url: '/api/userinfo/nameOrMobile',
// method: 'get',
// params: params
// });
// }
/** 查询用户参数*/
export function getUserConfigInfo() {
@ -33,15 +8,6 @@ export function getUserConfigInfo() {
});
}
// /** 设置用户参数*/
// export function setUserConfigInfo(data) {
// return request({
// url: '/api/user/config',
// method: 'post',
// data: data
// });
// }
/** 获取销售列表*/
export function getSellerList() {
return request({
@ -211,14 +177,6 @@ export function exportStudentResults(projectCode, data) {
data: data
});
}
// // 生成绑定微信二维码
// export function getWxQrCode(params) {
// return request({
// url: `/api/user/wmurl`,
// method: 'get',
// params: params
// });
// }
// 获取微信小程序绑定二维码
export function getBindWxQrCodeUrl() {

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

View File

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

View File

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

View File

@ -1,38 +1,5 @@
import request from '@/utils/request';
// /** 分页查询竞赛 */
// export function getRaceList(params) {
// return request({
// url: `/api/race`,
// method: 'get',
// params: params
// });
// }
// /** 创建竞赛 */
// export function createRace(data) {
// return request({
// url: `/api/race`,
// method: 'post',
// data
// });
// }
// /** 修改竞赛信息 */
// export function updateRace(id, data) {
// return request({
// url: `/api/race/${id}`,
// method: 'put',
// data
// });
// }
// /** 获取实操试题列表(题库)*/
// export function getPracticeList(params) {
// return request({
// url: `/api/v1/competitionPractical`,
// method: 'get',
// params
// });
// }
/** 导入项目试题库 */
export function importQuestionBand(data, companyId) {
return request({

View File

@ -1,5 +1,36 @@
import request from '@/utils/request';
/**
* 查询线路列表
*/
export function listLines() {
return request({
url: `/api/rpTools/map`,
method: 'get'
})
}
/**
* 查询线路列表
*/
export function listStations(lineId) {
return request({
url: `/api/rpTools/${lineId}/station`,
method: 'get'
})
}
/**
* 更新线路车站
*/
export function updateStation(lineId, data) {
return request({
url: `/api/rpTools/station/${lineId}`,
method: 'put',
data
})
}
/**
* 查询运行图列表
*/
@ -10,9 +41,7 @@ export function listRps() {
});
}
/**
* 创建运行图
*/
/** 创建运行图*/
export function createRp(data) {
return request({
url: `/api/rpTools`,
@ -22,18 +51,16 @@ export function createRp(data) {
}
/**
* 删除运行图
* 删除运行图
*/
export function deleteRp(planId) {
return request({
url: `/api/rpTools/${planId}`,
method: 'delete'
});
export function deleteRp(groupId) {
return request({
url: `/api/rpTools/${groupId}`,
method: 'delete'
})
}
/**
* 获取运行图配置
*/
/** 获取运行图配置*/
export function getRpConfig(planId) {
return request({
url: `/api/rpTools/${planId}/config`,
@ -41,9 +68,7 @@ export function getRpConfig(planId) {
});
}
/**
* 修改运行图配置
*/
/** 修改运行图配置*/
export function modifyRpConfig(planId, data) {
return request({
url: `/api/rpTools/${planId}/config`,
@ -52,9 +77,7 @@ export function modifyRpConfig(planId, data) {
});
}
/**
* 获取运行图数据
*/
/** 获取运行图数据*/
export function getRpTools(planId) {
return request({
url: `/api/rpTools/${planId}`,
@ -62,19 +85,7 @@ export function getRpTools(planId) {
});
}
// /**
// * 清除运行图
// */
// export function clearRpPlan(planId) {
// return request({
// url: `/api/rpTools/${planId}/clear`,
// method: 'put'
// });
// }
/**
* 添加车次
*/
/** 添加车次*/
export function addRpTrip(planId, data) {
return request({
url: `/api/rpTools/${planId}/trip`,
@ -83,9 +94,7 @@ export function addRpTrip(planId, data) {
});
}
/**
* 删除车次
*/
/** 删除车次*/
export function delRpTrip(planId, tripNo) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/trip`,
@ -93,9 +102,7 @@ export function delRpTrip(planId, tripNo) {
});
}
/**
* 平移服务
*/
/** 平移服务*/
export function translateRpService(planId, serviceNo, data) {
return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`,
@ -104,9 +111,7 @@ export function translateRpService(planId, serviceNo, data) {
});
}
/**
* 删除服务
*/
/** 删除服务*/
export function delRpService(planId, serviceNo) {
return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`,
@ -114,9 +119,7 @@ export function delRpService(planId, serviceNo) {
});
}
/**
* 添加区域
*/
/** 添加区域*/
export function createRpArea(planId, data) {
return request({
url: `/api/rpTools/${planId}/area`,
@ -125,9 +128,7 @@ export function createRpArea(planId, data) {
});
}
/**
* 修改区域
*/
/** 修改区域*/
export function modifyRpArea(planId, areaNo, data) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/area`,
@ -136,9 +137,7 @@ export function modifyRpArea(planId, areaNo, data) {
});
}
/**
* 修改区域文字
*/
/** 修改区域文字*/
export function modifyAreaNote(planId, areaNo, data) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/text`,
@ -146,9 +145,7 @@ export function modifyAreaNote(planId, areaNo, data) {
data
});
}
/**
* 删除区域
*/
/** 删除区域*/
export function delRpArea(planId, areaNo) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/area`,
@ -156,9 +153,7 @@ export function delRpArea(planId, areaNo) {
});
}
/**
* 修改运行时间
*/
/** 修改运行时间*/
export function justTripNoRunning(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/running`,
@ -167,9 +162,7 @@ export function justTripNoRunning(planId, tripNo, data) {
});
}
/**
* 修改停站时间
*/
/** 修改停站时间*/
export function justTripNoStop(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/stop`,
@ -178,9 +171,7 @@ export function justTripNoStop(planId, tripNo, data) {
});
}
/**
* 修改折返时间
*/
/** 修改折返时间*/
export function justTripTurnBack(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/turnBack`,

View File

@ -1,19 +1,6 @@
import request from '@/utils/request';
// /**
// * 新建地图速度等级列表
// */
// export function newSpeedLevels(data) {
// return request({
// url: '/api/runPlan/draft/speed',
// method: 'post',
// data: data
// });
// }
/**
* 获取运行图的车站列表
*/
/** 获取运行图的车站列表*/
export function getStationList(mapId) {
return request({
url: `/api/runPlan/draft/station/${mapId}`,
@ -30,20 +17,7 @@ export function populatingGenericData(planId, data) {
});
}
// /**
// * 创建运行图
// */
// export function newRunPlan(data) {
// return request({
// url: '/api/runPlan/draft',
// method: 'post',
// data: data
// });
// }
/**
* 查询运行图获取数据
*/
/** 查询运行图获取数据*/
export function queryRunPlan(planId) {
return request({
url: `/api/runPlan/draft/${planId}`,
@ -96,9 +70,7 @@ export function publishRunPlan(data) {
});
}
/**
* 导入真实运行图
*/
/** 导入真实运行图*/
export function importRunPlan(data) {
return request({
url: `/api/runPlan/draft/${data.mapId}/prdPlan`,
@ -115,13 +87,6 @@ export function getRpListByMapId(mapId) {
});
}
// /** 获取站间运行时间*/
// export function getStationRunning(mapId) {
// return request({
// url: `/api/runPlan/draft/${mapId}/stationRunning`,
// method: 'get'
// });
// }
/** 获取地图原始站间运行等级 */
export function getMapStationRun(mapId) {
return request({

View File

@ -1,58 +1,12 @@
import request from '@/utils/request';
// export function querySecheduling(group, params) {
// return request({
// url: `/api/scheduling/${group}/day`,
// method: 'get',
// params
// });
// }
// export function generateScheduling(group, params) {
// return request({
// url: `/api/scheduling/${group}/generate`,
// method: 'post',
// params
// });
// }
// export function getSchedulingAllTrains(group) {
// return request({
// url: `/api/scheduling/${group}/train/all`,
// method: 'get'
// });
// }
// export function checkScheduling(group, data) {
// return request({
// url: `/api/scheduling/${group}/check`,
// method: 'post',
// data
// });
// }
// export function saveScheduling(group, data) {
// return request({
// url: `/api/scheduling/${group}/save`,
// method: 'post',
// data
// });
// }
export function generateSchedulingAgain(group) {
return request({
url: `/api/scheduling/${group}/rebuild`,
method: 'delete'
});
}
// /** 生成地图通用派班计划 */
// export function generateCommonScheduling (data) {
// return request({
// url: `/api/v1/scheduling/generate/common`,
// method: 'post',
// data
// });
// }
/** 查询某天的派班计划 */
export function querySechedulingNew (group, params) {
return request({

View File

@ -1,14 +1,5 @@
import request from '@/utils/request';
// /** 分页查找上线的剧本*/
// export function getScriptPageListOnline(params) {
// return request({
// url: `/api/script/paging/online`,
// method: 'get',
// params: params
// });
// }
/** 分页查找上线的剧本(新版)*/
export function getScriptPageListOnlineNew(params) {
return request({
@ -18,14 +9,6 @@ export function getScriptPageListOnlineNew(params) {
});
}
// /** 通过ID查询发布的剧本的详细信息 */
// export function getScriptById(id) {
// return request({
// url: `/api/script/${id}/detail`,
// method: 'get'
// });
// }
/** 通过ID查询发布的剧本的详细信息(新版) */
export function getScriptByIdNew(id) {
return request({
@ -34,14 +17,6 @@ export function getScriptByIdNew(id) {
});
}
// /** 通过group查询未发布剧本的详细信息 */
// export function getDraftScriptByGroup(group) {
// return request({
// url: `/api/simulation/${group}/script/loadedScript`,
// method: 'get'
// });
// }
/** 通过group查询未发布剧本的详细信息(新版) */
export function getDraftScriptByGroupNew(group) {
return request({
@ -126,22 +101,6 @@ export function getAllSelectedScriptRole(group) {
});
}
// /** 加载剧本接口(仿真使用 竞赛) */
// export function loadScript(group, scriptId) {
// return request({
// url: `/api/scriptSimulation/${group}/load/script/${scriptId}`,
// method: 'PUT'
// });
// }
// /** 剧本实训结束 接口(仿真使用 竞赛) */
// export function endScriptTraining(group) {
// return request({
// url: `/api/scriptSimulation/${group}/finish`,
// method: 'get'
// });
// }
/** 草稿剧本数据导入*/
export function postScriptImport(mapId, name, data) {
return request({

View File

@ -1,23 +1,5 @@
import request from '@/utils/request';
// /** 获取故障规则列表*/
// export function getFailureGenerateRules(params) {
// return request({
// url: `/api/simulation/failureGenerateRules`,
// method: 'get',
// params: params
// });
// }
// /** 设置自动故障*/
// export function setFailureMode(data, group) {
// return request({
// url: `/api/simulation/${group}/failureMode`,
// method: 'post',
// data: data
// });
// }
/** 设置自动故障(新版)*/
export function setFailureModeNew(data, group) {
return request({
@ -41,15 +23,6 @@ export function getSimulationFaultRules(group) {
});
}
// // 创建故障规则(新版)
// export function addFailureRule(data) {
// return request({
// url: `/api/v1/faultRule`,
// method: 'post',
// data: data
// });
// }
/** 根据id删除故障规则 */
export function deleteFailureRule(id) {
return request({
@ -58,56 +31,7 @@ export function deleteFailureRule(id) {
});
}
// /** 获取故障规则列表(新版)*/
// export function getFailureRulesNew(params) {
// return request({
// url: `/api/v1/faultRule/page`,
// method: 'get',
// params: params
// });
// }
// // 修改故障规则(新版)
// export function modifyFailureRule(data) {
// return request({
// url: `/api/v1/faultRule`,
// method: 'put',
// data: data
// });
// }
// /** 通过id获取故障规则(新版)*/
// export function getFailureRulesByIdNew(id) {
// return request({
// url: `/api/v1/faultRule/${id}`,
// method: 'get'
// });
// }
// /**
// * 仿真系统按计划行车
// */
// export function runDiagramStart(params, group) {
// return request({
// url: `/api/simulation/${group}/start`,
// method: 'put',
// params: params
// });
// }
// /**
// * 仿真系统结束计划行车
// */
// export function runDiagramOver(group) {
// return request({
// url: `/api/simulation/${group}/over`,
// method: 'put'
// });
// }
/**
* 退出仿真系统
*/
/** 退出仿真系统*/
export function runDiagramQuit(group) {
return request({
url: `/api/simulation/${group}/quit`,
@ -115,43 +39,6 @@ export function runDiagramQuit(group) {
});
}
// /** 获取仿真系统时间*/
// export function runDiagramGetTime(group) {
// return request({
// url: `/api/simulation/${group}/systemTime`,
// method: 'get'
// });
// }
// // 查看是否开始按计划行车
// export function runDiagramIsStart(group) {
// return request({
// url: `/api/simulation/${group}/isRunPlanStart`,
// method: 'get'
// });
// }
// /**
// * 仿真系统CBTC
// * @param {*} mapId
// */
// export function simulationNotify({ mapId, prdType }) {
// return request({
// url: `/api/simulation/${mapId}/${prdType}`,
// method: 'get'
// });
// }
// /**
// * 实训系统CBTC
// * @param {*} data
// */
// export function trainingNotify({ trainingId }) {
// return request({
// url: `/api/simulation/training/${trainingId}`,
// method: 'get'
// });
// }
/** 实训系统(新版地图) */
export function trainingNotifyNew({ trainingId }) {
return request({
@ -159,16 +46,7 @@ export function trainingNotifyNew({ trainingId }) {
method: 'get'
});
}
// /**
// * 考试系统CBTC
// * @param {*} data
// */
// export function examNotify({ examId }) {
// return request({
// url: `/api/simulation/exam/${examId}`,
// method: 'get'
// });
// }
/** 考试系统(新版地图)*/
export function examNotifyNew({ examId }) {
return request({
@ -211,30 +89,6 @@ export function deleteSimulationStats(statsId) {
});
}
// /** 获取用户鼠标左键选中的设备信息*/
// export function letfMouseSelectDevice(deviceCode, group) {
// return request({
// url: `/api/simulation/${group}/device/${deviceCode}`,
// method: 'get'
// });
// }
// /** 获取每日运行图*/
// export function getEveryDayRunPlanData(group) {
// return request({
// url: `/api/simulation/${group}/runPlan`,
// method: 'get'
// });
// }
// /** 录制脚本仿真*/
// export function scriptRecordNotify(scriptId) {
// return request({
// url: `/api/simulation/scriptWrite/${scriptId}`,
// method: 'get'
// });
// }
/** 录制脚本仿真(新版)*/
export function scriptRecordNotifyNew(scriptId) {
return request({
@ -243,14 +97,6 @@ export function scriptRecordNotifyNew(scriptId) {
});
}
// /** 保存剧本背景*/
// export function saveScriptScenes(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/scenes`,
// method: 'put'
// });
// }
/** 保存剧本背景(新版)*/
export function saveScriptScenesNew(group) {
return request({
@ -267,14 +113,6 @@ export function scriptRePreview(group) {
});
}
// /** 保存录制任务数据*/
// export function saveScriptData(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/saveData`,
// method: 'put'
// });
// }
/** 保存录制任务数据(新版)*/
export function saveScriptDataNew(group) {
return request({
@ -283,15 +121,6 @@ export function saveScriptDataNew(group) {
});
}
// /** 更新任务地图定位信息*/
// export function updateMapLocation(group, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/mapLocation`,
// method: 'put',
// data
// });
// }
/** 更新任务地图定位信息(新版)*/
export function updateMapLocationNew(group, data) {
return request({
@ -301,82 +130,6 @@ export function updateMapLocationNew(group, data) {
});
}
// /** 获取剧本编制的所有成员角色*/
// export function getScriptMemberData(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/members`,
// method: 'get'
// });
// }
// /** 获取剧本出演成员角色 */
// export function getScriptPlayMember(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/players`,
// method: 'get'
// });
// }
// /** 获取剧本出演成员角色(新版地图) */
// export function getScriptPlayMemberNew(group) {
// return request({
// url: `/api/scriptSimulation/${group}/allPlayer`,
// method: 'get'
// });
// }
// /** 取消剧本演出成员角色 */
// export function cancleScriptMembers(group, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/removePlayers`,
// method: 'put',
// data
// });
// }
// /** 取消剧本演出成员角色 */
// export function cancleScriptMembersNew(group, data) {
// return request({
// url: `/api/scriptSimulation/${group}/removePlayers`,
// method: 'put',
// data
// });
// }
// /** 选择剧本演出成员角色 */
// export function selectScriptMembers(group, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/choosePlayers`,
// method: 'put',
// data
// });
// }
// /** 选择剧本演出成员角色 (新版地图)*/
// export function selectScriptMembersNew(group, data) {
// return request({
// url: `/api/scriptSimulation/${group}/choosePlayers`,
// method: 'put',
// data
// });
// }
// /** 修改剧本演出成员性别 */
// export function modifyScriptMemberSex(group, playerId, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`,
// method: 'put'
// });
// }
// /** 清除仿真剧本数据*/
// export function dumpScriptData(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/saveData`,
// method: 'delete'
// });
// }
/** 清除仿真剧本数据(新版)*/
export function dumpScriptDataNew(group) {
return request({
@ -385,57 +138,6 @@ export function dumpScriptDataNew(group) {
});
}
// /** 查询录制剧本步骤*/
// export function queryScriptStep(group) {
// return request({
// url: `/api/simulation/${group}/scriptRecordStage`,
// method: 'get'
// });
// }
// /** 获取指定时间里可加载列车的个数*/
// export function getDesignatedTimeTrainNum(params, group) {
// return request({
// url: `/api/simulation/${group}/plan/trainNum`,
// method: 'get',
// params
// });
// }
// /** 添加剧本动作 */
// export function addScriptAction(group, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/action`,
// method: 'post',
// data
// });
// }
// /** 添加剧本动作(新版) */
// export function addScriptActionNew(group, data) {
// return request({
// url: `/api/scriptSimulation/${group}/addAction`,
// method: 'PUT',
// data
// });
// }
// /** 删除剧本动作 */
// export function deleteScriptAction(group, actionId) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/action/${actionId}`,
// method: 'delete'
// });
// }
// /** 修改剧本动作 */
// export function modifyScriptAction(group, actionId, data) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/action/${actionId}`,
// method: 'put',
// data
// });
// }
/** 修改剧本动作(新版) */
export function modifyScriptActionNew(group, data) {
return request({
@ -461,22 +163,6 @@ export function deleteExistingSimulation(group) {
method: 'delete'
});
}
// /** 根据设备类型获取设备列表 */
// export function getDeviceCodeByDeviceType(group, params) {
// return request({
// url: `/api/simulation/${group}/deviceType/devices`,
// method: 'get',
// params
// });
// }
// /** 获取任务录制的数据 */
// export function getScriptRecord(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite`,
// method: 'get'
// });
// }
/** 获取任务录制的所有动作(新版)*/
export function getScriptAllAction(group) {
@ -486,22 +172,6 @@ export function getScriptAllAction(group) {
});
}
// /** 加载任务*/
// export function loadQuest(questId, memberId, group) {
// return request({
// url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`,
// method: 'post'
// });
// }
// /** 加载剧本 */
// export function loadScript(scriptId, memberId, group) {
// return request({
// url: `api/simulation/${group}/script/${scriptId}?memberId=${memberId}`,
// method: 'post'
// });
// }
/** 加载剧本(新版) */
export function loadScriptNew(scriptId, memberId, group) {
return request({
@ -510,14 +180,6 @@ export function loadScriptNew(scriptId, memberId, group) {
});
}
// /** 退出剧本*/
// export function quitScript(group) {
// return request({
// url: `/api/simulation/${group}/script`,
// method: 'delete'
// });
// }
/** 退出剧本(新版)*/
export function quitScriptNew(group) {
return request({
@ -526,48 +188,6 @@ export function quitScriptNew(group) {
});
}
// /** 退出任务*/
// export function quitQuest(group) {
// return request({
// url: `/api/simulation/${group}/quest`,
// method: 'put'
// });
// }
// /** 根据group获取仿真对象*/
// export function getSimulationInfo(group) {
// return request({
// url: `/api/simulation/${group}`,
// method: 'get'
// });
// }
// /** 获取可用的设备指令*/
// export function getAvailableDeviceCommand(params) {
// return request({
// url: `/api/simulation/deviceCommand/available`,
// method: 'get',
// params
// });
// }
// /** 保存/修改任务剧本*/
// export function saveTaskScript(group, data) {
// return request({
// url: `/api/simulation/${group}/questRecord/script`,
// method: 'post',
// data
// });
// }
// /** 暂停剧本编制的仿真 */
// export function scriptPause(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/pause`,
// method: 'post'
// });
// }
/** 暂停仿真 */
export function simulationPause(group) {
return request({
@ -576,14 +196,6 @@ export function simulationPause(group) {
});
}
// /** 恢复仿真运行并执行刚编辑的剧本动作 */
// export function executeScript(group) {
// return request({
// url: `/api/simulation/${group}/scriptWrite/execute`,
// method: 'post'
// });
// }
/** 恢复仿真运行并执行刚编辑的剧本动作(新版) */
export function executeScriptNew(group) {
return request({
@ -592,31 +204,6 @@ export function executeScriptNew(group) {
});
}
// /** 生成用户自己的当日运行图*/
// export function generateDayRunPlan(planId, group) {
// return request({
// url: `/api/simulation/${group}/loadRunPlan/${planId}`,
// method: 'post'
// });
// }
// /** 创建派班计划仿真*/
// export function schedulingNotify(params) {
// return request({
// url: `/api/scheduling/simulation`,
// method: 'post',
// params
// });
// }
// /** 获取PLC网关 */
// export function getPlcGateway(group) {
// return request({
// url: `/api/simulation/${group}/plcGateway`,
// method: 'get'
// });
// }
/** 处理ibp盘事件 */
export function handlerIbpEvent(group, button, stationCode) {
return request({
@ -664,14 +251,6 @@ export function getNewMapDataByGroup(group) {
});
}
// /** 新版地图指令操作定义 */
// export function newMapOperate(group, operationId, data) {
// return request({
// url: `/simulation/${group}/operate/${operationId}`,
// method: 'post',
// data: data
// });
// }
/** 新版地图根据group获取仿真运行图 */
export function getEveryDayRunPlanNew(group) {
return request({
@ -696,15 +275,6 @@ export function clearSimulation(group) {
});
}
// /** 查询进路信息*/
// export function querySignalStatus(group, params) {
// return request({
// url: `/api/simulation/${group}/status/signal`,
// method: 'get',
// params
// });
// }
/** 获取仿真运行图车次号列表 */
export function getTripNumberList(group) {
return request({

View File

@ -1,89 +1 @@
// import request from '@/utils/request';
// // 课程列表
// export function getLessonList(code) {
// return request({
// url: '/api/stats/lesson/list',
// method: 'get',
// params: {
// wmCode: code
// }
// });
// }
// // 课程内实训数据统计
// export function getLessonTimeChart(data) {
// return request({
// url: `/api/stats/lesson/${data.id}/stats`,
// method: 'get',
// params: {
// wmCode: data.code
// }
// });
// }
// // 查询参与考试的课程列表
// export function getExamTree(code) {
// return request({
// url: '/api/stats/exam/lessonList',
// method: 'get',
// params: {
// wmCode: code
// }
// });
// }
// // 查询参与考试的试题列表
// export function getstatsExamList(data) {
// return request({
// url: `/api/stats/exam/${data.lessonId}/list`,
// method: 'get',
// params: {
// wmCode: data.code
// }
// });
// }
// // 个人考试数据统计
// export function getExamChart(data) {
// return request({
// url: `/api/stats/exam/${data.examId}/stats`,
// method: 'get',
// params: {
// wmCode: data.code
// }
// });
// }
// // 个人关注地图数据统计列表
// export function getRelevanceMapList(code) {
// return request({
// url: `/api/user/subscribe`,
// method: 'get',
// params: {
// wmCode: code
// }
// });
// }
// // 仿真地图下产品列表
// export function getSimulationPrdList(mapId, code) {
// return request({
// url: `/api/stats/simulation/${mapId}/prdList`,
// method: 'get',
// params: {
// wmCode: code
// }
// });
// }
// // 个人仿真数据统计
// export function getSimulationTimeChart(data) {
// return request({
// url: `/api/stats/simulation/${data.mapId}/stats`,
// method: 'get',
// params: {
// wmCode: data.code
// }
// });
// }

View File

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

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) {
let str = `${time}` || '';

View File

@ -7,6 +7,7 @@
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
<set-fault ref="setFault" 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>
</template>
@ -25,6 +26,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -35,7 +37,8 @@ export default {
AlxeEffective,
NoticeInfo,
SetFault,
TrainAddPlan
TrainAddPlan,
LoadSpareTrain
},
props: {
selected: {
@ -97,6 +100,11 @@ export default {
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -188,6 +196,13 @@ export default {
}
});
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
},
// //
// alxeFailure() {
// const operate = {

View File

@ -7,6 +7,7 @@
<speed-limit-control ref="speedLimitControl" />
<set-fault ref="setFault" 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>
</template>
@ -24,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -34,7 +36,8 @@ export default {
SectionControl,
SectionCmdControl,
SetFault,
TrainAddPlan
TrainAddPlan,
LoadSpareTrain
},
props: {
selected: {
@ -83,6 +86,11 @@ export default {
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -214,6 +222,13 @@ export default {
}
});
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
},
lock() {
const step = {
start: true,

View File

@ -6,6 +6,7 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<train-add-plan ref="trainAddPlan" 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>
</template>
@ -22,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -31,7 +33,8 @@ export default {
SectionDetail,
NoticeInfo,
TrainAddPlan,
SetFault
SetFault,
LoadSpareTrain
},
props: {
selected: {
@ -63,7 +66,6 @@ export default {
handler: this.detail,
cmdType: CMD.Section.CMD_SECTION_DETAILS
}
]
},
menuForce: [
@ -81,6 +83,11 @@ export default {
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -141,6 +148,13 @@ export default {
this.$refs.popMenu.close();
}
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
},
//
alxeFailure() {
const step = {

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<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-train ref="menuTrain" :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" />
<train-add-plan ref="trainAddPlan" 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>
</template>
@ -17,6 +18,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -24,7 +26,8 @@ export default {
PopMenu,
NoticeInfo,
TrainAddPlan,
SetFault
SetFault,
LoadSpareTrain
},
props: {
selected: {
@ -58,6 +61,11 @@ export default {
label: '触发故障管理',
handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -106,6 +114,13 @@ export default {
this.menu = this.menuForce;
}
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
},
doShow(point) {
this.clickEvent();
this.initMenu();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -94,6 +94,16 @@ export default {
{ content: '', correct: false },
{ content: '', correct: false }
];
},
fill: function() {
return [
{ content: '', correct: true}
];
},
answer: function() {
return [
{ content: '', correct: true}
];
}
};
},
@ -148,6 +158,7 @@ export default {
answer.forEach((item, index) => {
if (this.option.optionList[index]) {
this.option.optionList[index].content = item;
this.option.optionList[index].correct = true;
} else {
this.option.optionList[index] = { content: item, correct: true };
}
@ -156,7 +167,7 @@ export default {
if (this.option.optionList[0]) {
this.option.optionList[0].content = answer;
} else {
this.option.optionList[0] = [{content: answer, correct:true}];
this.option.optionList[0] = {content: answer, correct:true};
}
}
},

View File

@ -2,10 +2,10 @@
<el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="试卷导出" width="500px">
<el-form ref="form" :model="form" label-width="150px" :rules="rules">
<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 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-button type="primary" @click="handleExport">导出</el-button>

View File

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

View File

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

View File

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

View File

@ -1,175 +1,186 @@
<template>
<div class="quick-menu" ref="quickMenu" :style="quickMenuStyle">
<div v-for="(n,key) in menuCount" class="sub-menu" :style="getSubMenu(n-1)">
<router-link v-if="menuUrlList[n-1].isLink" :to="menuUrlList[n-1].url" :target="openNewTab"
:style="subMenuStyle" @mouseover.stop="mouseEnterSubMenu" @mouseout.stop="mouseOutSubMenu">
<i :class="iconClass[n-1]" ref="icon"></i>
</router-link>
<a v-else :style="subMenuStyle" @mouseover.stop="mouseEnterSubMenu" @mouseout.stop="mouseOutSubMenu"
@click="processCallback(key)">
<i :class="iconClass[n-1]" ref="icon"></i>
</a>
<div ref="quickMenu" class="quick-menu" :style="quickMenuStyle">
<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"
:style="subMenuStyle"
@mouseover.stop="mouseEnterSubMenu"
@mouseout.stop="mouseOutSubMenu"
>
<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 class="menu" :style="menuStyle">
<div class="core-menu" @click="toggleMenu">
<div class="bar" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'quickMenu',
props: {
menuCount: {
type: Number,
required: true,
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'
}
export default {
name: 'QuickMenu',
props: {
menuCount: {
type: Number,
required: true,
default: 4
},
computed: {
openNewTab() {
return this.isOpenNewTab ? '_blank' : '_self'
},
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')
}
iconClass: {
type: Array,
required: true
},
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 {
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"]]]
}
backgroundColor: this.backgroundColor,
color: this.color
};
},
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', '')
});
}
},
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)
isTop() {
return !!~this.position.toLowerCase().indexOf('top');
},
isLeft() {
return !!~this.position.toLowerCase().indexOf('left');
}
},
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) {
const menuEl = this.$refs.quickMenu;
const 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', '');
});
}
},
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>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
@ -445,4 +456,4 @@
transform: translateY(-2px);
}
}
</style>
</style>

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
<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
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>
@ -23,18 +23,18 @@
<script>
export default {
name: 'Page404',
computed: {
message() {
return 'The webmaster said that you can not enter this page...'
}
},
name: 'Page404',
computed: {
message() {
return 'The webmaster said that you can not enter this page...';
}
},
methods: {
back() {
this.$router.go(-1);
this.$router.go(-1);
}
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -15,7 +15,7 @@
<script>
import ConstConfig from '@/scripts/ConstConfig';
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 localStore from 'storejs';
import { getCmdList } from '@/api/management/dictionary';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,9 +47,6 @@
<script>
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 { getMapListByProject } from '@/utils/mapList';

View File

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

View File

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

View File

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

View File

@ -213,7 +213,7 @@ export default {
}
},
refreshRunPlanName(name) {
this.$refs.schedule.refreshRunPlanName(name);
this.$refs.schedule.refreshRunPlanName(name);
}
}
};
@ -254,298 +254,4 @@ export default {
.planEdit__tool {
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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,14 +13,14 @@
<div style="margin: 10px">
<el-row>
<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">
<el-radio-group v-model="timeType" style="margin: 10px">
<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 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-radio-group>
</div>
@ -36,8 +36,8 @@
</el-table>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</div>
</el-dialog>
@ -46,35 +46,35 @@
<script>
export default {
name: 'ModifyingRouting',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
timeType: '1',
routeDate: []
};
},
computed: {
title() {
return this.$t('planMonitor.modifying.modifyTaskRoute');
}
},
mounted() {
},
methods: {
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
}
}
name: 'ModifyingRouting',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
timeType: '1',
routeDate: []
};
},
computed: {
title() {
return this.$t('planMonitor.modifying.modifyTaskRoute');
}
},
mounted() {
},
methods: {
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

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

View File

@ -7,28 +7,28 @@
</el-table>
</el-col>
<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-row>
</template>
<script>
export default {
name: 'BaseStation',
components: {
},
data() {
return {
stationData: []
};
},
mounted() {
},
methods: {
handleModifyingStationProperty() {
this.$emit('dispatchDialog', { name: 'modifyingStationProperty', params: {} });
}
}
name: 'BaseStation',
components: {
},
data() {
return {
stationData: []
};
},
mounted() {
},
methods: {
handleModifyingStationProperty() {
this.$emit('dispatchDialog', { name: 'modifyingStationProperty', params: {} });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template>
<div class="drawer" :class="{visible}" tabindex="-1">
<div class="drawer__wrapper" tabindex="-1" @click="doClose">
<div class="layer" :class="[direction]" :style="{width: width+'px'}" tabindex="-1">
<div class="drawer__wrapper" @click.self="doClose">
<div class="layer" :class="[direction]" :style="{width: width+'px'}">
<div class="title">
<span>
<slot name="title" />
@ -50,7 +50,7 @@ export default {
<style lang="scss" scoped>
.visible {
visibility: visible !important;
.ltr {
.layer {
transform: translateX(0) !important;
}
}
@ -64,6 +64,15 @@ export default {
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 {
position: fixed;
z-index: 2001;
@ -76,7 +85,7 @@ export default {
visibility: hidden;
&__wrapper {
position: relative;
position: absolute;
left: 0;
right: 0;
top: 0;
@ -90,7 +99,6 @@ export default {
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);
overflow: hidden;
position: relative;
.title {
display: flex;

View File

@ -6,18 +6,11 @@
<i class="el-icon-document" />
</template>
<el-menu-item-group>
<span slot="title">Line List</span>
<span slot="title">线路列表</span>
<el-tree :data="lineList" :props="defaultProps" @node-click="onSelectLine">
<template slot-scope="{data}">
<span class="flex" >
<span class="flex" style="padding-right: 20px">
<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>
@ -25,22 +18,35 @@
</el-submenu>
</el-menu>
<div class="container">
<div class="title">
<span>title</span>
</div>
<div class="form">
11111111111
</div>
<el-card class="card" shadow="never">
<div slot="header" class="clearfix">
<span>{{ title||'请选择线路' }}</span>
</div>
<stations :list="stationList" @select="onSelectStation">
<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>
<modify ref="modfiy" @update="onUpdateStation" />
</div>
</template>
<script>
import Drawer from '../components/drawer.vue';
import Stations from './stations';
import Modify from './modify';
import { listLines, listStations, updateStation } from '@/api/rpTools';
export default {
components: {
Drawer
Drawer,
Stations,
Modify
},
data() {
return {
@ -48,54 +54,57 @@ export default {
children: 'children',
label: 'name'
},
lineList: [
{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},
{name: '1', id: 1},
{name: '2', id: 2},
]
lineList: [],
stationList: []
}
},
computed: {
lineId() {
return this.$route.query.lineId;
},
title() {
return this.$route.query.title;
}
},
watch: {
$route: function() {
this.refreshStationList();
}
},
mounted() {
this.loadInitData();
this.refreshStationList();
},
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) {
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 {
flex: 1;
.title {
width: 100%;
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%;
.card {
width: 60%;
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>

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-input v-model="formModel.name" placeholder="Please Input Run Plan Name." />
</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>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
@ -13,20 +18,32 @@
</template>
<script>
import { MenuEnum } from '../utils.js';
import { MenuEnum } from '../../utils.js';
export default {
props: {
lineList: {
type: Array,
required: true
}
},
data() {
return {
dialogShow: false,
formModel: {
name: '',
maps: []
},
rules: {
name: [
{
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: {
doShow() {
this.formModel.name = '';
this.formModel.lineList = [];
this.dialogShow = true;
},
doClose() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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