This commit is contained in:
sunzhenyu 2020-10-30 18:09:32 +08:00
commit 744a990097
247 changed files with 7269 additions and 8220 deletions

View File

@ -1,300 +1,6 @@
import request from '@/utils/request'; import request from '@/utils/request';
export function postDataBd(data) {
return request({
url: `/api/audio/bd?group=${data.group}&conversationId=${data.conversationId}`,
method: 'post',
data: data.file
});
}
// 创建/获取会话id
export function getConversation(data) {
return request({
url: `/api/audio/conversation`,
method: 'get',
params: {
group: data.group,
userId: data.userId,
code: data.code
}
});
}
export function postDataXf(data) {
return request({
url: `/api/audio/xf`,
method: 'post',
data: data
});
}
// 获取语音历史记录
export function getHistoryVoice(code) {
return request({
url: `/api/audio/${code}/history`,
method: 'get'
});
}
// 文字聊天 发送文字
export function chatWithText(data, group) {
return request({
url: `/api/jointTraining/chatWithText?group=${group}`,
method: 'post',
data: {
message: data
}
});
}
// 文字聊天 发送语音
export function chatWithAudio(file, group) {
return request({
url: `/api/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 文字聊天 发送语音(新版)
export function chatWithAudioNew(file, group) {
return request({
url: `/api/v1/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 生成分发二维码
export function getJoinTrainCode(data, group) {
return request({
url: `/api/jointTraining/qrCode?group=${group}`,
method: 'post',
data: data
});
}
// 创建房间
export function postCreateRoom(data) {
return request({
url: `/api/jointTraining/room`,
method: 'post',
data: data
});
}
// 检查房间存在
export function checkRoomExist(params) {
return request({
url: `/api/simulationRoom`,
method: 'get',
params
});
}
// 获取房间详情
export function postRoomDetail(group) {
return request({
url: `/api/jointTraining/room/${group}`,
method: 'get'
});
}
// 销毁房间
export function deljointTrainRoom(group) {
return request({
url: `/api/jointTraining/room`,
method: 'delete',
params: {
group: group
}
});
}
// 查询有权限房间列表
export function getjointTrainList(params) {
return request({
url: `/api/jointTraining/room/list`,
method: 'get',
params: params
});
}
// 加入房间
export function getjointTraining(group) {
return request({
url: `/api/jointTraining/room/join`,
method: 'put',
params: {
group: group
}
});
}
// 设置人员角色
export function putUserRoles(data, group) {
return request({
url: `/api/jointTraining/room/user/role?group=${group}`,
method: 'put',
data: data
});
}
// 获取房间里的用户列表
export function getJointTrainRoomUserList(group) {
return request({
url: `/api/jointTraining/room/${group}/user/list`,
method: 'get'
});
}
// 离开房间接口
export function putJointTrainingExit(group) {
return request({
url: `/api/jointTraining/room/exit`,
method: 'put',
params: {
group: group
}
});
}
// 开始联合演练
export function startJointTraining(group) {
return request({
url: `/api/jointTraining/room/simulation`,
method: 'post',
params: {
group: group
}
});
}
// 获取个人信息
export function getUserRoles(group) {
return request({
url: `/api/jointTraining/room/user/role`,
method: 'get',
params: {
group: group
}
});
}
// 踢出用户
export function putJointTrainingUserkicked(userId, group) {
return request({
url: `/api/jointTraining/room/user`,
method: 'put',
params: {
userId: userId,
group: group
}
});
}
// 管理员结束所有人的仿真
export function putJointTrainingSimulation(group) {
return request({
url: `/api/jointTraining/room/simulation/all`,
method: 'put',
params: {
group: group
}
});
}
// 结束仿真返回房间
export function putJointTrainingSimulationUser(group) {
return request({
url: `/api/jointTraining/room/simulation/user/exit`,
method: 'put',
params: {
group: group
}
});
}
// 进入仿真
export function putJointTrainingSimulationEntrance(group) {
return request({
url: `/api/jointTraining/room/simulation/user/entrance`,
method: 'put',
params: {
group: group
}
});
}
/**
* 权限获取(房间权限)
*/
export function getPermissionJoint(group) {
return request({
url: '/api/jointTraining/qrCode',
method: 'get',
params: {
group: group
}
});
}
// 添加或更新真实设备和仿真对象连接
export function setRealDevice(group, data) {
return request({
url: `/api/jointTraining/room/realDevice?group=${group}`,
method: 'post',
data: data
});
}
// 删除真实设备和仿真对象连接
export function delRealDevice(id, group) {
return request({
url: `/api/jointTraining/room/realDevice/${id}`,
method: 'delete',
params: { group: group }
});
}
// 获取真实设备列表
export function getRealDevices(group) {
return request({
url: `/api/jointTraining/room/${group}/devices`,
method: 'get'
});
}
// 获取房间真实设备连接关系
export function getRealDevicesInRoom(group) {
return request({
url: `/api/jointTraining/room/${group}/realDevice/connect`,
method: 'get'
});
}
// 更新真实设备的连接关系
export function updateRealDevices(group, data) {
return request({
url: `/api/jointTraining/room/${group}/realDevice`,
method: 'put',
data: data
});
}
// 真实设备是否被其他仿真使用
export function realDeviceIsUsed(group, projectCode) {
return request({
url: `/api/jointTraining/room/${group}/realDeviceUsed`,
method: 'get',
params: {
projectCode: projectCode
}
});
}
// 获取仿真成员列表(新版地图) // 获取仿真成员列表(新版地图)
export function getSimulationMembersNew(group) { export function getSimulationMembersNew(group) {
return request({ return request({
@ -302,23 +8,6 @@ export function getSimulationMembersNew(group) {
method: 'get' method: 'get'
}); });
} }
// 获取仿真会话消息列表(新版地图)
export function getSimulationContextListNew(group, conversationId) {
return request({
url: `/simulation/${group}/conversation/${conversationId}`,
method: 'get'
});
}
// 接受其他人的会话邀请 (新版地图)
export function acceptCoversitionInvite(group, conversationId) {
return request({
url: `/simulation/${group}/${conversationId}/accept`,
method: 'put'
});
}
/** 发起会话 */ /** 发起会话 */
export function startConversition(group, data, sign) { export function startConversition(group, data, sign) {
return request({ return request({
@ -327,13 +16,6 @@ export function startConversition(group, data, sign) {
data data
}); });
} }
/** 根据会话id获取仿真会话 */
export function getSimulationConversition(group, conversationId) {
return request({
url: `/api/simulation/${group}/conversation/${conversationId}`,
method: 'get'
});
}
/** 发送会话消息 */ /** 发送会话消息 */
export function sendSimulationConversition(group, conversationId, file) { export function sendSimulationConversition(group, conversationId, file) {
return request({ return request({

View File

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

View File

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

View File

@ -138,37 +138,10 @@ export function previewRunPlan(planId) {
}); });
} }
/** 加载剧本 */
export function loadDraftScript(scriptId, memberId, group) {
return request({
url: `/api/simulation/${group}/scriptDraft/${scriptId}?memberId=${memberId}`,
method: 'post'
});
}
/** 剧本预览选择角色 */ /** 剧本预览选择角色 */
export function loadDraftScriptNew(memberId, group) { export function loadDraftScriptNew(memberId, group) {
return request({ return request({
// url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`, url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`,
method: 'put' method: 'put'
}); });
} }
/** 剧本预览选择角色 */
export function loadDraftScriptNewMode(memberId, group, mode) {
return request({
// url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`,
method: 'put'
});
}
/** 获取已发布的有地图的城市列表*/
export function publisMapCityList(data) {
return request({
url: `/api/map/city?dicCode=${data}`,
method: 'get'
});
}

View File

@ -95,3 +95,10 @@ export function aKeyGeneratingLesson(data) {
data: data data: data
}); });
} }
/** 根据课程ID获取班级 */
export function getExamClassList(lessonId) {
return request({
url: `/api/lesson/${lessonId}/classes`,
method: 'get'
});
}

View File

@ -85,15 +85,6 @@ export function getLessonChapterDetail(data) {
}); });
} }
/** 发布课程*/
export function publishLesson(data) {
return request({
url: `/api/lessonDraft/${data.id}/publish`,
method: 'post',
data: data
});
}
/** 课程章节拖拽排序*/ /** 课程章节拖拽排序*/
export function dragSortLessonChapter(data) { export function dragSortLessonChapter(data) {
return request({ return request({

View File

@ -16,14 +16,6 @@ export function getPublishMapListOnline() {
}); });
} }
/** 根据皮肤获取发布地图列表*/
export function getPublishMapListByLineCode(lineCode) {
return request({
url: `/api/map/${lineCode}/list`,
method: 'get'
});
}
/** 根据地图id获取地图版本信息*/ /** 根据地图id获取地图版本信息*/
export function getPublishMapVersionById(id) { export function getPublishMapVersionById(id) {
return request({ return request({
@ -107,15 +99,6 @@ export function putMapOffLine(mapId) {
}); });
} }
// /** 修改发布地图名称*/
// export function updatePublishMapName(data) {
// return request({
// url: `/api/map/${data.mapId}/updateName`,
// method: 'put',
// data: data
// });
// }
// 检测地图名称唯一性 // 检测地图名称唯一性
export function checkMapName(name) { export function checkMapName(name) {
return request({ return request({
@ -133,23 +116,6 @@ export function getPublishMapDetailList(params, code) {
}); });
} }
/** 获取有屏蔽门的站台列表*/
export function hasDoorStationList(mapId) {
return request({
url: `/api/map/${mapId}/stand/hasDoor`,
method: 'get'
});
}
// /** 修改发布地图城市*/
// export function updatePublishMapCity(data) {
// return request({
// url: `/api/map/${data.mapId}/city`,
// method: 'put',
// data: data
// });
// }
// 修改地图基本信息 // 修改地图基本信息
export function updatePublishMapInfo(data) { export function updatePublishMapInfo(data) {
return request({ return request({
@ -254,3 +220,19 @@ export function getStandListByStationCode(id, stationCode) {
method: 'get' method: 'get'
}); });
} }
/** 获取已发布的有地图的城市列表*/
export function publisMapCityList(data) {
return request({
url: `/api/map/city?dicCode=${data}`,
method: 'get'
});
}
/** 新版地图根据仿真mapId获取仿真地图数据 */
export function getNewMapDataByMapId(mapId) {
return request({
url: `/api/map/${mapId}/mapData`,
method: 'get'
});
}

View File

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

View File

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

View File

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

View File

@ -1,34 +1,5 @@
import request from '@/utils/request'; import request from '@/utils/request';
// 文字聊天 发送文字
export function chatWithTextNew(data, group) {
return request({
url: `/api/v1/jointTraining/chatWithText?group=${group}`,
method: 'post',
data: {
message: data
}
});
}
// 生成分发二维码
export function getJoinTrainCodeNew(data, group) {
return request({
url: `/api/v1/jointTraining/qrCode?group=${group}`,
method: 'post',
data: data
});
}
// 创建房间
export function postCreateRoomNew(data) {
return request({
url: `/api/v1/jointTraining/room`,
method: 'post',
data: data
});
}
// 检查房间存在 // 检查房间存在
export function checkRoomExistNew(params) { export function checkRoomExistNew(params) {
return request({ return request({
@ -38,45 +9,6 @@ export function checkRoomExistNew(params) {
}); });
} }
// 获取房间详情
export function postRoomDetailNew(group) {
return request({
url: `/api/v1/jointTraining/room/${group}`,
method: 'get'
});
}
// 销毁房间
export function deljointTrainRoomNew(group) {
return request({
url: `/api/v1/jointTraining/room`,
method: 'delete',
params: {
group: group
}
});
}
// 查询有权限房间列表
export function getjointTrainListNew(params) {
return request({
url: `/api/v1/jointTraining/room/list`,
method: 'get',
params: params
});
}
// 加入房间
export function getjointTrainingNew(group) {
return request({
url: `/api/v1/jointTraining/room/join`,
method: 'put',
params: {
group: group
}
});
}
// 设置人员角色 // 设置人员角色
export function putUserRolesNew(data, group) { export function putUserRolesNew(data, group) {
return request({ return request({
@ -86,70 +18,6 @@ export function putUserRolesNew(data, group) {
}); });
} }
// 获取房间里的用户列表
export function getJointTrainRoomUserListNew(group) {
return request({
url: `/api/v1/jointTraining/room/${group}/user/list`,
method: 'get'
});
}
// 离开房间接口
export function putJointTrainingExitNew(group) {
return request({
url: `/api/v1/jointTraining/room/exit`,
method: 'put',
params: {
group: group
}
});
}
// 开始联合演练
export function startJointTrainingNew(group) {
return request({
url: `/api/v1/jointTraining/room/simulation`,
method: 'post',
params: {
group: group
}
});
}
// 获取个人信息
export function getUserRolesNew(group) {
return request({
url: `/api/v1/jointTraining/room/user/role`,
method: 'get',
params: {
group: group
}
});
}
// 踢出用户
export function putJointTrainingUserkickedNew(userId, group) {
return request({
url: `/api/v1/jointTraining/room/user`,
method: 'put',
params: {
userId: userId,
group: group
}
});
}
// 管理员结束所有人的仿真
export function putJointTrainingSimulationNew(group) {
return request({
url: `/api/v1/jointTraining/room/simulation/all`,
method: 'put',
params: {
group: group
}
});
}
// 结束仿真返回房间 // 结束仿真返回房间
export function putJointTrainingSimulationUserNew(group) { export function putJointTrainingSimulationUserNew(group) {
return request({ return request({
@ -160,90 +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
}
});
}
// 获取所有需要值班员的车站(新版)
export function getAvailableStaionList(mapId) {
return request({
url: `/api/map/${mapId}/station/needSupervisor`,
method: 'get'
});
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,14 +26,6 @@ export function delSkinCode(id) {
}); });
} }
/** 根据id查询真实线路 */
export function querySkinCode(id) {
return request({
url: `/api/realLine/${id}`,
method: 'get'
});
}
/** 修改真实线路*/ /** 修改真实线路*/
export function updateSkinCode(data) { export function updateSkinCode(data) {
return request({ return request({
@ -60,23 +52,6 @@ export function putRealLineConfig(id, data) {
}); });
} }
/** 通过皮肤Code更新地图皮肤*/
export function updateSkinCodeByCode(data) {
return request({
url: `/api/realLine/${data.code}/update`,
method: 'put',
data: data
});
}
/** 检查code是否存在*/
export function querySkinCodeExistByCode(code) {
return request({
url: `/api/realLine/${code}/exist`,
method: 'get'
});
}
/** 获取真实线路列表*/ /** 获取真实线路列表*/
export function getLineCodeList() { export function getLineCodeList() {
return request({ return request({

View File

@ -10,15 +10,6 @@ export function getOrderPageList(params) {
}); });
} }
/** 根据ID获取订单数据*/
export function getOrderDetail(id, params) {
return request({
url: `/api/order/${id}`,
method: 'get',
params: params
});
}
/** 创建一个订单*/ /** 创建一个订单*/
export function createOrder(data) { export function createOrder(data) {
return request({ return request({
@ -37,31 +28,6 @@ export function updateOrder(data) {
}); });
} }
export function deleteOrder(id) {
return request({
url: `/api/order/${id}`,
method: 'delete'
});
}
/** 订单权限领取*/
export function getOrder(params) {
return request({
url: '/api/order/getOrder',
method: 'get',
params: params
});
}
/** 订单权限分发*/
export function giveOrder(data) {
return request({
url: '/api/order/giveOrder',
method: 'post',
data: data
});
}
/** 订单续费*/ /** 订单续费*/
export function getOrderCharge(id) { export function getOrderCharge(id) {
return request({ return request({
@ -104,14 +70,6 @@ export function cancalOrder(orderId) {
}); });
} }
// 万能权限查询权限包商品
export function postFindPermission(ids) {
return request({
url: `/api/goods/permissionIds?ids=${ids}`,
method: 'get'
});
}
// 获取订单的分发二维码 // 获取订单的分发二维码
export function getDistributeFromOrder(orderCode) { export function getDistributeFromOrder(orderCode) {
return request({ return request({

View File

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

View File

@ -51,22 +51,6 @@ export function delPublishExam(id) {
}); });
} }
/** 删除用户实训*/
export function delTrainingList() {
return request({
url: `/api/userExam/list`,
method: 'delet'
});
}
/** 设置试卷失效 */
export function setExamGive(id) {
return request({
url: `/api/userExam/${id}/abandon`,
method: 'put'
});
}
export function updateExam(data) { export function updateExam(data) {
return request({ return request({
url: `/api/userExam/${data.id}`, url: `/api/userExam/${data.id}`,

View File

@ -23,13 +23,6 @@ export function getProjectDeviceList(params) {
params:params params:params
}); });
} }
// export function getProjectDeviceList(params) {
// return request({
// url: `/api/device/paging`,
// method: 'get',
// params:params
// });
// }
/** 删除项目设备 */ /** 删除项目设备 */
export function deleteProjectDevice(id) { export function deleteProjectDevice(id) {
return request({ return request({
@ -92,14 +85,7 @@ export function setPscConfig(id, data) {
data: data data: data
}); });
} }
/** 查询项目下的所有设备 */
export function getAllDeviceInProject(params) {
return request({
url: `/api/project/device/project`,
method: 'get',
params
});
}
/** 添加/修改ibp设备配置 */ /** 添加/修改ibp设备配置 */
export function setVrIbpConfig(id, data) { export function setVrIbpConfig(id, data) {
return request({ return request({

View File

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

View File

@ -1,43 +1,17 @@
import request from '@/utils/request'; import request from '@/utils/request';
/** 分页查询竞赛 */
export function getRaceList(params) {
return request({
url: `/api/race`,
method: 'get',
params: params
});
}
/** 创建竞赛 */
export function createRace(data) {
return request({
url: `/api/race`,
method: 'post',
data
});
}
/** 修改竞赛信息 */
export function updateRace(id, data) {
return request({
url: `/api/race/${id}`,
method: 'put',
data
});
}
// /** 获取实操试题列表(题库)*/
// export function getPracticeList(params) {
// return request({
// url: `/api/v1/competitionPractical`,
// method: 'get',
// params
// });
// }
/** 导入项目试题库 */ /** 导入项目试题库 */
export function importQuestionBand(data) { export function importQuestionBand(data, companyId) {
return request({ return request({
url: `/api/questionBank/questions/import`, url: `/api/questionBank/questions/import?id=${companyId}`,
method: 'post', method: 'post',
data data
}); });
} }
/** 查询公司下题目类型数量 */
export function selectQuestionTypeNum(companyId) {
return request({
url: `/api/questionBank/type/number?companyId=${companyId}`,
method: 'get'
});
}

View File

@ -1,161 +1,197 @@
import request from '@/utils/request'; import request from '@/utils/request';
/** /**
* 获取运行图配置 * 查询线路列表
*/ */
export function getRpConfig() { export function listLines() {
return request({ return request({
url: `/api/rpTools/config`, url: `/api/rpTools/map`,
method: 'get' method: 'get'
}) })
} }
/** /**
* 修改运行图配置 * 查询线路列表
*/ */
export function modifyRpConfig(data) { export function listStations(lineId) {
return request({ return request({
url: `/api/rpTools/config`, url: `/api/rpTools/${lineId}/station`,
method: 'get'
})
}
/**
* 更新线路车站
*/
export function updateStation(stationId, data) {
return request({
url: `/api/rpTools/station/${stationId}`,
method: 'put', method: 'put',
data data
}) })
} }
/** /**
* 获取运行图数据 * 查询运行图列表
*/ */
export function getRpTools() { export function listRps() {
return request({ return request({
url: '/api/rpTools', url: `/api/rpTools`,
method: 'get' method: 'get'
}); });
} }
/** /** 创建运行图*/
* 清除运行图 export function createRp(data) {
*/
export function clearRpPlan() {
return request({ return request({
url: `/api/rpTools/clear`, url: `/api/rpTools`,
method: 'post',
data
});
}
/**
* 删除运行图组
*/
export function deleteRp(groupId) {
return request({
url: `/api/rpTools/${groupId}`,
method: 'delete'
})
}
/** 获取运行图配置*/
export function getRpConfig(planId) {
return request({
url: `/api/rpTools/${planId}/config`,
method: 'get'
});
}
/** 修改运行图配置*/
export function modifyRpConfig(planId, data) {
return request({
url: `/api/rpTools/${planId}/config`,
method: 'put',
data
});
}
/** 获取运行图数据*/
export function getRpTools(planId) {
return request({
url: `/api/rpTools/${planId}`,
method: 'get'
});
}
/** 添加车次*/
export function addRpTrip(planId, data) {
return request({
url: `/api/rpTools/${planId}/trip`,
method: 'post',
data
});
}
/** 删除车次*/
export function delRpTrip(planId, tripNo) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/trip`,
method: 'delete'
});
}
/** 平移服务*/
export function translateRpService(planId, serviceNo, data) {
return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`,
method: 'put',
data
});
}
/** 删除服务*/
export function delRpService(planId, serviceNo) {
return request({
url: `/api/rpTools/${planId}/${serviceNo}/service`,
method: 'delete'
});
}
/** 添加区域*/
export function createRpArea(planId, data) {
return request({
url: `/api/rpTools/${planId}/area`,
method: 'post',
data
});
}
/** 修改区域*/
export function modifyRpArea(planId, areaNo, data) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/area`,
method: 'put',
data
});
}
/** 修改区域文字*/
export function modifyAreaNote(planId, areaNo, data) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/text`,
method: 'put',
data
});
}
/** 删除区域*/
export function delRpArea(planId, areaNo) {
return request({
url: `/api/rpTools/${planId}/${areaNo}/area`,
method: 'delete'
});
}
/** 修改运行时间*/
export function justTripNoRunning(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/running`,
method: 'put',
data
});
}
/** 修改停站时间*/
export function justTripNoStop(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/stop`,
method: 'put',
data
});
}
/** 修改折返时间*/
export function justTripTurnBack(planId, tripNo, data) {
return request({
url: `/api/rpTools/${planId}/${tripNo}/turnBack`,
method: 'put',
data
});
}
/** 开始编辑*/
export function startRpEdit(planId) {
return request({
url: `/api/rpTools/${planId}/edit`,
method: 'put' method: 'put'
}) })
} }
/** /** 开始编辑*/
* 添加车次 export function endRpEdit(planId) {
*/
export function addRpTrip(data) {
return request({ return request({
url: '/api/rpTools/trip', url: `/api/rpTools/${planId}/endEdit`,
method: 'post', method: 'put'
data
});
}
/**
* 删除车次
*/
export function delRpTrip(tripNo) {
return request({
url: `/api/rpTools/${tripNo}/trip`,
method: 'delete'
})
}
/**
* 平移服务
*/
export function translateRpService(serviceNo, data) {
return request({
url: `/api/rpTools/${serviceNo}/service`,
method: 'put',
data
})
}
/**
* 删除服务
*/
export function delRpService(serviceNo) {
return request({
url: `/api/rpTools/${serviceNo}/service`,
method: 'delete'
})
}
/**
* 添加区域
*/
export function createRpArea(data) {
return request({
url: `/api/rpTools/area`,
method: 'post',
data
})
}
/**
* 修改区域
*/
export function modifyRpArea(areaNo, data) {
return request({
url: `/api/rpTools/${areaNo}/area`,
method: 'put',
data
})
}
/**
* 修改区域文字
*/
export function modifyAreaNote(areaNo, data) {
return request({
url: `/api/rpTools/${areaNo}/text`,
method: 'put',
data
})
}
/**
* 删除区域
*/
export function delRpArea(areaNo) {
return request({
url: `/api/rpTools/${areaNo}/area`,
method: 'delete'
})
}
/**
* 修改运行时间
*/
export function justTripNoRunning(tripNo, data) {
return request({
url: `/api/rpTools/${tripNo}/running`,
method: 'put',
data
})
}
/**
* 修改停站时间
*/
export function justTripNoStop(tripNo, data) {
return request({
url: `/api/rpTools/${tripNo}/stop`,
method: 'put',
data
})
}
/**
* 修改折返时间
*/
export function justTripTurnback(tripNo, data) {
return request({
url: `/api/rpTools/${tripNo}/turnBack`,
method: 'put',
data
}) })
} }

View File

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

View File

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

View File

@ -1,15 +1,5 @@
import request from '@/utils/request'; import request from '@/utils/request';
/** 分页查找上线的剧本*/
export function getScriptPageListOnline(params) {
return request({
url: `/api/script/paging/online`,
// url: `/api/script/paging/published`,
method: 'get',
params: params
});
}
/** 分页查找上线的剧本(新版)*/ /** 分页查找上线的剧本(新版)*/
export function getScriptPageListOnlineNew(params) { export function getScriptPageListOnlineNew(params) {
return request({ return request({
@ -19,14 +9,6 @@ export function getScriptPageListOnlineNew(params) {
}); });
} }
/** 通过ID查询发布的剧本的详细信息 */
export function getScriptById(id) {
return request({
url: `/api/script/${id}/detail`,
method: 'get'
});
}
/** 通过ID查询发布的剧本的详细信息(新版) */ /** 通过ID查询发布的剧本的详细信息(新版) */
export function getScriptByIdNew(id) { export function getScriptByIdNew(id) {
return request({ return request({
@ -35,14 +17,6 @@ export function getScriptByIdNew(id) {
}); });
} }
/** 通过group查询未发布剧本的详细信息 */
export function getDraftScriptByGroup(group) {
return request({
url: `/api/simulation/${group}/script/loadedScript`,
method: 'get'
});
}
/** 通过group查询未发布剧本的详细信息(新版) */ /** 通过group查询未发布剧本的详细信息(新版) */
export function getDraftScriptByGroupNew(group) { export function getDraftScriptByGroupNew(group) {
return request({ return request({
@ -52,7 +26,7 @@ export function getDraftScriptByGroupNew(group) {
} }
/** 剧本撤销发布 */ /** 剧本撤销发布 */
export function retractScript(id, data) { export function retractScript(id) {
return request({ return request({
url: `/api/script/draft/${id}/retract`, url: `/api/script/draft/${id}/retract`,
method: 'put' method: 'put'
@ -127,19 +101,20 @@ export function getAllSelectedScriptRole(group) {
}); });
} }
/** 加载剧本接口(仿真使用 竞赛) */ /** 草稿剧本数据导入*/
export function loadScript(group, scriptId) { export function postScriptImport(mapId, name, data) {
return request({ return request({
url: `/api/scriptSimulation/${group}/load/script/${scriptId}`, url: `/api/script/draft/${mapId}/import?name=${name}`,
method: 'PUT' method: 'post',
data: data,
time: 60000
}); });
} }
/** 剧本实训结束 接口(仿真使用 竞赛) */ /** 草稿剧本数据导出 */
export function endScriptTraining(group) { export function getScriptExport(id) {
return request({ return request({
url: `/api/scriptSimulation/${group}/finish`, url: `/api/script/draft/${id}/export`,
method: 'get' method: 'get'
}); });
} }

View File

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

View File

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

View File

@ -1,75 +1,68 @@
import request from '@/utils/request'; import request from '@/utils/request';
export function getTrainingSystemList(cityCode, params) {
/** 根据cityCode后去对应地图及其子系统 */ /** 根据cityCode后去对应地图及其子系统 */
export function getTrainingSystemList(cityCode, params) {
return request({ return request({
url: `/api/mapSystem/city/${cityCode}`, url: `/api/mapSystem/city/${cityCode}`,
method: 'get', method: 'get',
params params
}); });
} }
export function generateMapSystem(mapId) {
/** 根据mapId生成地图子系统 */ /** 根据mapId生成地图子系统 */
export function generateMapSystem(mapId) {
return request({ return request({
url: `/api/mapSystem/generate/${mapId}`, url: `/api/mapSystem/generate/${mapId}`,
method: 'post' method: 'post'
}); });
} }
export function getSubSystemInfo(id) {
/** 查询子系统信息 */ /** 查询子系统信息 */
export function getSubSystemInfo(id) {
return request({ return request({
url: `/api/mapSystem/${id}`, url: `/api/mapSystem/${id}`,
method: 'get' method: 'get'
}); });
} }
export function getSubSystemDetail(id) {
/** 查询子系统详情*/ /** 查询子系统详情*/
export function getSubSystemDetail(id) {
return request({ return request({
url: `/api/mapSystem/${id}/detail`, url: `/api/mapSystem/${id}/detail`,
method: 'get' method: 'get'
}); });
} }
export function getMapSystemPageList(params) {
/** 分页查询地图系统 */ /** 分页查询地图系统 */
export function getMapSystemPageList(params) {
return request({ return request({
url: `/api/mapSystem`, url: `/api/mapSystem`,
method: 'get', method: 'get',
params params
}); });
} }
export function createMapSubSystem(data) {
/** 创建地图系统 */ /** 创建地图系统 */
export function createMapSubSystem(data) {
return request({ return request({
url: `/api/mapSystem`, url: `/api/mapSystem`,
method: 'post', method: 'post',
data: data data: data
}); });
} }
export function updateSubSystem(id, data) {
/** 查询子系统信息 */ /** 查询子系统信息 */
export function updateSubSystem(id, data) {
return request({ return request({
url: `/api/mapSystem/${id}`, url: `/api/mapSystem/${id}`,
method: 'put', method: 'put',
data: data data: data
}); });
} }
export function deleteSubSystem(id) {
/** 删除地图系统 */ /** 删除地图系统 */
export function deleteSubSystem(id) {
return request({ return request({
url: `/api/mapSystem/${id}`, url: `/api/mapSystem/${id}`,
method: 'delete' method: 'delete'
}); });
} }
export function getSubSystemByProjectCode() {
/** 根据项目编号查询地图子系统 */ /** 根据项目编号查询地图子系统 */
export function getSubSystemByProjectCode() {
return request({ return request({
url: `/api/mapSystem/project`, url: `/api/mapSystem/project`,
method: 'get' method: 'get'

BIN
src/assets/voiceClose.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
src/assets/voiceOpen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -28,7 +28,6 @@ export default {
}, },
methods: { methods: {
getBreadcrumb() { getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title); let matched = this.$route.matched.filter(item => item.meta && item.meta.title);
const first = matched[0]; const first = matched[0];
@ -46,7 +45,6 @@ export default {
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase(); return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase();
}, },
pathCompile(path) { pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route; const { params } = this.$route;
var toPath = pathToRegexp.compile(path); var toPath = pathToRegexp.compile(path);
return toPath(params); return toPath(params);

View File

@ -214,6 +214,7 @@
<el-select <el-select
v-model="formModel[item.prop]" v-model="formModel[item.prop]"
filterable filterable
:clearable="item.clearable"
:placeholder="item.placeholder" :placeholder="item.placeholder"
:disabled="item.disabled" :disabled="item.disabled"
@change="((val)=>{deviceChange(val, item)})" @change="((val)=>{deviceChange(val, item)})"

View File

@ -302,6 +302,7 @@ export default {
// //
initPageData() { initPageData() {
this.modelFields = []; this.modelFields = [];
this.formModel = {};
this.exportFlag = this.queryForm.canExport; this.exportFlag = this.queryForm.canExport;
this.resetShow = this.queryForm.reset; this.resetShow = this.queryForm.reset;
this.buildQueryField(); this.buildQueryField();

View File

@ -41,7 +41,7 @@ export default {
nickname: 'Nickname', nickname: 'Nickname',
wellDelType: 'This operation will delete the type. Do you want to continue?', wellDelType: 'This operation will delete the type. Do you want to continue?',
permission: 'Permission', permission: 'Permission',
editUserPermission: 'Edit User Rights', editUserPermission: 'Edit User Info',
lessonName: 'Lesson Name', lessonName: 'Lesson Name',
selectTraining: 'Selection Training', selectTraining: 'Selection Training',
createUserTraining: 'Creating User Training', createUserTraining: 'Creating User Training',

View File

@ -41,7 +41,7 @@ export default {
nickname: '昵称', nickname: '昵称',
wellDelType: '此操作将删除该类型, 是否继续?', wellDelType: '此操作将删除该类型, 是否继续?',
permission: '权限', permission: '权限',
editUserPermission: '编辑用户权限', editUserPermission: '编辑用户信息',
lessonName: '课程名称', lessonName: '课程名称',
selectTraining: '选择实训', selectTraining: '选择实训',
createUserTraining: '创建用户实训', createUserTraining: '创建用户实训',

View File

@ -363,9 +363,6 @@ class SkinCode extends defaultStyle {
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离 distance: 5 // 灯跟文字距离
} }
// trainStop: {}, // 停车标志
// trainDepart: {}, // 停车计时
}; };
this[deviceType.StationCounter] = { this[deviceType.StationCounter] = {

View File

@ -688,6 +688,7 @@ class SkinCode extends defaultStyle {
trainServer: { trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀 serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'AA', // 默认服务号(表号) defaultServiceNumber: 'AA', // 默认服务号(表号)
defaultServiceHeadNum: 'MM', // 人工车号
trainServerOffset: { x: 4, y: 4 }// 列车服务号偏移 trainServerOffset: { x: 4, y: 4 }// 列车服务号偏移
}, },
trainTarget: { trainTarget: {

View File

@ -338,7 +338,7 @@ class Jlmap {
}); });
} }
setUpdateMapDevice(list) { setUpdateMapDevice(list) {
store.dispatch('map/updateMapDevice', list); store.commit('map/updateMapDevice', list);
(list || []).forEach(elem => { (list || []).forEach(elem => {
const code = elem.code; const code = elem.code;
const type = elem._type; const type = elem._type;
@ -483,8 +483,7 @@ class Jlmap {
} else { } else {
if (elem.deviceType === 'TRAIN') { if (elem.deviceType === 'TRAIN') {
this.isUpdateShowTrainList = true; this.isUpdateShowTrainList = true;
store.dispatch('map/updateActiveTrainList', elem); store.commit('map/updateActiveTrainList', elem);
// store.dispatch('map/updateTrainState', elem);
} else if (elem.deviceType === 'STAND') { } else if (elem.deviceType === 'STAND') {
store.dispatch('map/updateStationStand', elem); store.dispatch('map/updateStationStand', elem);
const psdDevice = this.mapDevice[this.mapDevice[elem.code].psdCode]; const psdDevice = this.mapDevice[this.mapDevice[elem.code].psdCode];
@ -505,9 +504,7 @@ class Jlmap {
if (elem.dispose) { if (elem.dispose) {
this.$painter.delete(oDevice); this.$painter.delete(oDevice);
} else { } else {
// if (this.hookHandle(oDevice, elem)) {
this.$painter.update(oDevice); this.$painter.update(oDevice);
// }
} }
} }
}); });

View File

@ -287,7 +287,7 @@ class MouseController extends Eventful {
} }
}); });
this.deviceList = includeDeviceList; this.deviceList = includeDeviceList;
store.dispatch('map/setSeclectDeviceList', this.deviceList); // 给store设置框选的 model store.commit('map/setSeclectDeviceList', this.deviceList); // 给store设置框选的 model
} }
// 生成包围盒对象坐标 // 生成包围盒对象坐标
createFakeBoundingRect(instance) { createFakeBoundingRect(instance) {

View File

@ -126,7 +126,7 @@ class ETextName extends Group {
fontSize: styleModel.fontSize, fontSize: styleModel.fontSize,
fontFamily: styleModel.fontFamily || this.model.style.fontFamily, fontFamily: styleModel.fontFamily || this.model.style.fontFamily,
text: styleName, text: styleName,
textFill: model.approach ? styleModel.approachColor : styleModel.fontColor, textFill: model.approach && this.model.type === 'name' ? styleModel.approachColor : styleModel.fontColor,
textAlign: styleModel.textAlign, textAlign: styleModel.textAlign,
textPosition: styleModel.textPosition || 'inside', textPosition: styleModel.textPosition || 'inside',
textVerticalAlign: styleModel.textVerticalAlign || null textVerticalAlign: styleModel.textVerticalAlign || null

View File

@ -371,6 +371,10 @@ class Signal extends Group {
} else { } else {
this.lamps[0].setColor(this.style.Signal.lamp.redColor); this.lamps[0].setColor(this.style.Signal.lamp.redColor);
} }
} else if (this.count == 3) {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
this.lamps[2] && this.lamps[2].setColor(this.style.backgroundColor);
} }
} }
} }

View File

@ -0,0 +1,45 @@
import Group from 'zrender/src/container/Group';
import EControl from '../../element/EControl';
class ECancelStopJumpLamp extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model.modelData;
const style = this.model.style;
this.cancelStopJumpLamp = new EControl({
zlevel: this.model.zlevel,
z: this.model.z,
arc: {
shape: {
cx: model.cancelStopJumpLampPoint.x,
cy: model.cancelStopJumpLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'CancelStopJumpLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.cancelStopJumpLampPoint.x,
y: model.cancelStopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '取消跳停',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: style
});
this.add(this.cancelStopJumpLamp);
}
}
export default ECancelStopJumpLamp;

View File

@ -0,0 +1,45 @@
import Group from 'zrender/src/container/Group';
import EControl from '../../element/EControl';
class EDownDetainLamp extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model.modelData;
const style = this.model.style;
this.downDetainLamp = new EControl({
zlevel: this.model.zlevel,
z: this.model.z,
arc: {
shape: {
cx: model.downDetainLampPoint.x,
cy: model.downDetainLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'DownDetainLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.downDetainLampPoint.x,
y: model.downDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '下行扣车',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: style
});
this.add(this.downDetainLamp);
}
}
export default EDownDetainLamp;

View File

@ -0,0 +1,45 @@
import Group from 'zrender/src/container/Group';
import EControl from '../../element/EControl';
class EStopJumpLampButton extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model.modelData;
const style = this.model.style;
this.stopJumpLampButton = new EControl({
zlevel: this.model.zlevel,
z: this.model.z,
arc: {
shape: {
cx: model.stopJumpLampPoint.x,
cy: model.stopJumpLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'StopJumpLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.stopJumpLampPoint.x,
y: model.stopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '跳停',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: style
});
this.add(this.stopJumpLampButton);
}
}
export default EStopJumpLampButton;

View File

@ -0,0 +1,45 @@
import Group from 'zrender/src/container/Group';
import EControl from '../../element/EControl';
class EUpDetainLamp extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model.modelData;
const style = this.model.style;
this.upDetainLamp = new EControl({
zlevel: this.model.zlevel,
z: this.model.z,
arc: {
shape: {
cx: model.upDetainLampPoint.x,
cy: model.upDetainLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'UpDetainLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.upDetainLampPoint.x,
y: model.upDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '上行扣车',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: style
});
this.add(this.upDetainLamp);
}
}
export default EUpDetainLamp;

View File

@ -26,11 +26,15 @@ import EMouse from './EMouse';
import EHighlight from '../element/EHighlight'; import EHighlight from '../element/EHighlight';
import ETrainStop from './ETrainStop'; import ETrainStop from './ETrainStop';
import ETrainDepart from './ETrainDepart'; import ETrainDepart from './ETrainDepart';
import EControl from '../element/EControl';
import EPatternFilter from './EPatternFilter'; import EPatternFilter from './EPatternFilter';
import EStopJumpLamp from './functionButton/EStopJumpLamp';
import ECancelStopJumpLamp from './functionButton/ECancelStopJumpLamp';
import EUpDetainLamp from './functionButton/EUpDetainLamp';
import EDownDetainLamp from './functionButton/EDownDetainLamp';
import {isShowThePrdType} from '../../utils/handlePath'; import {isShowThePrdType} from '../../utils/handlePath';
import {traverseLineElements} from '../utils/ShapeStatusCovert'; import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert';
class StationStand extends Group { class StationStand extends Group {
constructor(model, style) { constructor(model, style) {
@ -44,17 +48,17 @@ class StationStand extends Group {
this.isShowShape = true; this.isShowShape = true;
this.create(); this.create();
this.createMouseEvent(); this.createMouseEvent();
if (isShowThePrdType(model.prdType, style.StationStand.common.functionButtonShow) || model.previewOrMapDraw) { // if (isShowThePrdType(model.prdType, style.StationStand.common.functionButtonShow) || model.previewOrMapDraw) {
this.createFunctionButton(); // this.createFunctionButton();
} // }
if (model.previewOrMapDraw) { // if (model.previewOrMapDraw) {
this.setShowMode(); // this.setShowMode();
} // }
this.setVisible(model.visible); this.setVisible(model.visible);
this.setState(model); this.setState(model);
this.checkIsDrawMap();
} }
create() { create() {
// 加载皮肤控制的元素
const model = this.model; const model = this.model;
const style = this.style; const style = this.style;
// // 站台所有的绘图元素 // // 站台所有的绘图元素
@ -85,9 +89,28 @@ class StationStand extends Group {
}; };
// 遍历当前线路下的绘图元素 组合模式 // 遍历当前线路下的绘图元素 组合模式
traverseLineElements(style.StationStand, elementTypeList, model, style, this); traverseLineElements(style.StationStand, elementTypeList, model, style, this);
// 加载后端返回的状态控制的绘图
const statusElementList = {
'stopJumpLamp':EStopJumpLamp,
'cancelStopJumpLamp':ECancelStopJumpLamp,
'upDetainLamp':EUpDetainLamp,
'downDetainLamp':EDownDetainLamp
};
// 遍历后端返回的状态控制的绘图
if (model.previewOrMapDraw || isShowThePrdType(model.prdType, style.StationStand.common.functionButtonShow)) {
traverseStatusElements(statusElementList, model, style, this);
}
} }
createMouseEvent() { createMouseEvent() {
const path = window.location.href;
if (path.includes('/map/draw')) {
this.highlight = new EHighlight(this);
this.add(this.highlight);
this.on('mouseout', () => { this.highlight.mouseout(); });
this.on('mouseover', () => { this.highlight.mouseover(); });
} else {
if (this.style.StationStand.mouseOverStyle) { if (this.style.StationStand.mouseOverStyle) {
this.mouseEvent = new EMouse(this); this.mouseEvent = new EMouse(this);
this.add(this.mouseEvent); this.add(this.mouseEvent);
@ -95,130 +118,6 @@ class StationStand extends Group {
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
} }
} }
createFunctionButton() {
const model = this.model;
const style = this.style;
if (model.stopJumpLamp) {
this.stopJumpLampButton = new EControl({
zlevel: this.zlevel,
z: this.z,
arc: {
shape: {
cx: model.stopJumpLampPoint.x,
cy: model.stopJumpLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'StopJumpLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.stopJumpLampPoint.x,
y: model.stopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '跳停',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: this.style
});
this.add(this.stopJumpLampButton);
}
if (model.cancelStopJumpLamp) {
this.cancelStopJumpLampButton = new EControl({
zlevel: this.zlevel,
z: this.z,
arc: {
shape: {
cx: model.cancelStopJumpLampPoint.x,
cy: model.cancelStopJumpLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'CancelStopJumpLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.cancelStopJumpLampPoint.x,
y: model.cancelStopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '取消跳停',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: this.style
});
this.add(this.cancelStopJumpLampButton);
}
if (model.upDetainLamp) {
this.upDetainLampButton = new EControl({
zlevel: this.zlevel,
z: this.z,
arc: {
shape: {
cx: model.upDetainLampPoint.x,
cy: model.upDetainLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'UpDetainLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.upDetainLampPoint.x,
y: model.upDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '上行扣车',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: this.style
});
this.add(this.upDetainLampButton);
}
if (model.downDetainLamp) {
this.downDetainLampButton = new EControl({
zlevel: this.zlevel,
z: this.z,
arc: {
shape: {
cx: model.downDetainLampPoint.x,
cy: model.downDetainLampPoint.y,
r: style.Station.lamp.radiusR
},
subType: 'DownDetainLamp',
lineWidth: 0,
fill: style.StationStand.lamp.lampColor
},
text: {
position: [0, 0],
x: model.downDetainLampPoint.x,
y: model.downDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
fontWeight: style.StationStand.text.fontWeight,
fontSize: style.StationStand.text.fontSize,
fontFamily: style.fontFamily,
text: '下行扣车',
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
},
style: this.style
});
this.add(this.downDetainLampButton);
}
} }
setVisible(visible) { setVisible(visible) {
@ -266,19 +165,19 @@ class StationStand extends Group {
} }
switch (opts.subDeviceType) { switch (opts.subDeviceType) {
case 'StopJumpLamp': { case 'StopJumpLamp': {
rect = this.stopJumpLampButton.getBoundingRect(); rect = this.stopJumpLamp.getBoundingRect();
break; break;
} }
case 'CancelStopJumpLamp': { case 'CancelStopJumpLamp': {
rect = this.cancelStopJumpLampButton.getBoundingRect(); rect = this.cancelStopJumpLamp.getBoundingRect();
break; break;
} }
case 'UpDetainLamp': { case 'UpDetainLamp': {
rect = this.upDetainLampButton.getBoundingRect(); rect = this.upDetainLamp.getBoundingRect();
break; break;
} }
case 'DownDetainLamp': { case 'DownDetainLamp': {
rect = this.downDetainLampButton.getBoundingRect(); rect = this.downDetainLamp.getBoundingRect();
break; break;
} }
default: { default: {
@ -299,31 +198,18 @@ class StationStand extends Group {
this.highlight && this.highlight.drawSelected(selected); this.highlight && this.highlight.drawSelected(selected);
} }
checkIsDrawMap() {
const path = window.location.href;
if (path.includes('/map/draw')) {
this.highlight = new EHighlight(this);
this.add(this.highlight);
this.on('mouseout', () => { this.highlight.mouseout(); });
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
// 设置显示模式 // 设置显示模式
setShowMode() { setShowMode() {
const showMode = this.model.showMode; const showMode = this.model.showMode;
const showConditions = this.style.StationStand.common.functionButtonShow; const showConditions = this.style.StationStand.common.functionButtonShow;
if (!showConditions || showConditions === '01' || showMode === showConditions) { if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.stopJumpLampButton && this.stopJumpLampButton.show(); this.stopJumpLamp && this.stopJumpLamp.show();
this.cancelStopJumpLampButton && this.cancelStopJumpLampButton.show(); this.cancelStopJumpLamp && this.cancelStopJumpLamp.show();
this.upDetainLampButton && this.upDetainLampButton.show();
this.downDetainLampButton && this.downDetainLampButton.show();
this.upDetainLamp && this.upDetainLamp.show(); this.upDetainLamp && this.upDetainLamp.show();
this.downDetainLamp && this.downDetainLamp.show(); this.downDetainLamp && this.downDetainLamp.show();
} else { } else {
this.stopJumpLampButton && this.stopJumpLampButton.hide(); this.stopJumpLamp && this.stopJumpLamp.hide();
this.cancelStopJumpLampButton && this.cancelStopJumpLampButton.hide(); this.cancelStopJumpLamp && this.cancelStopJumpLamp.hide();
this.upDetainLampButton && this.upDetainLampButton.hide();
this.downDetainLampButton && this.downDetainLampButton.hide();
this.upDetainLamp && this.upDetainLamp.hide(); this.upDetainLamp && this.upDetainLamp.hide();
this.downDetainLamp && this.downDetainLamp.hide(); this.downDetainLamp && this.downDetainLamp.hide();
} }

View File

@ -40,12 +40,22 @@ export default class TrainBody extends Group {
create() { create() {
const model = this.model; const model = this.model;
const style = this.model.style; const style = this.model.style;
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber);// 服务号(表号) this.nameFormat = model.nameFormat;
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号 : model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号
let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber); // 车组号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber); // 车组号
let serviceNumber = ''; // 服务号(表号)
if (this.model.type == 'PLAN') { // 计划车
serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber);
} else if (this.model.type == 'HEAD') { // 头码车
serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode);
this.nameFormat = 'serviceNumber:groupNumber';
} else if (this.model.type == 'MANUAL') { // 人工车
serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceHeadNum);
this.nameFormat = 'serviceNumber:groupNumber';
}
let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码
if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好 if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好
targetCode = '01'; targetCode = '01';
} }

View File

@ -14,3 +14,20 @@ export function traverseLineElements(currentType, elementTypeList, model, style,
obj.add(obj[element]); obj.add(obj[element]);
}); });
} }
// 遍历后端返回的状态控制的绘图
export function traverseStatusElements(statusElementList, model, style, obj) {
// if (model.showMode == undefined || model.showMode) {
Object.keys(statusElementList).forEach(element => {
const ClassName = statusElementList[element];
if (model[element]) {
obj[element] = new ClassName({
zlevel: model.zlevel,
z: 1,
style: style,
modelData:model
});
obj.add(obj[element]);
}
});
// }
}

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

@ -2,6 +2,12 @@ import { createSeriesModel, createMarkLineModels, createRectArea, createMartPoin
import { toTimeStamp } from '@/utils/date'; import { toTimeStamp } from '@/utils/date';
export default { export default {
/** 最小时间*/
MinTime: 0,
/** 最大时间*/
MaxTime: 3600*24-1,
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -13,11 +19,10 @@ export default {
/** 转换model为Rect数据*/ /** 转换model为Rect数据*/
calcAreaArgsByModel(chart, model) { calcAreaArgsByModel(chart, model) {
const startTime = model.startTime;
const endTime = model.endTime;
const fartherKmRange = model.fartherKmRange; const fartherKmRange = model.fartherKmRange;
const closerKmRange = model.closerKmRange; const closerKmRange = model.closerKmRange;
const startTime = model.startTime;
const endTime = model.endTime;
const point1 = [ startTime, this.getCoordinateYByKmRange(fartherKmRange)]; const point1 = [ startTime, this.getCoordinateYByKmRange(fartherKmRange)];
const point2 = [ endTime, this.getCoordinateYByKmRange(closerKmRange)] const point2 = [ endTime, this.getCoordinateYByKmRange(closerKmRange)]
const position1 = chart.convertToPixel('grid', point1); const position1 = chart.convertToPixel('grid', point1);
@ -43,8 +48,8 @@ export default {
planData.areaList && planData.areaList &&
planData.areaList.length) { planData.areaList.length) {
planData.areaList.forEach(model => { planData.areaList.forEach(model => {
model.startTime = toTimeStamp(model.startTime); if (typeof model.startTime == 'string') model.startTime = toTimeStamp(model.startTime);
model.endTime = toTimeStamp(model.endTime); if (typeof model.endTime == 'string') model.endTime = toTimeStamp(model.endTime);
graphs.push(createRectArea(this.calcAreaArgsByModel(chart, model))); graphs.push(createRectArea(this.calcAreaArgsByModel(chart, model)));
}) })
} }
@ -78,15 +83,15 @@ export default {
name: `${service.serviceNo}-${trip.tripNo}`, name: `${service.serviceNo}-${trip.tripNo}`,
color: '#000', color: '#000',
direction: trip.direction, direction: trip.direction,
coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationCode(stations, trip.stationTimeList[0].stationCode)], coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationId(stations, trip.stationTimeList[0].stationId)],
}; };
opt.markPoint.data.push(createMartPoint(pointData)); opt.markPoint.data.push(createMartPoint(pointData));
trip.stationTimeList.forEach(elem => { trip.stationTimeList.forEach(elem => {
if (elem.arrivalTime) { if (elem.arrivalTime) {
opt.data.push([elem.arrivalTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { opt.data.push([elem.arrivalTime, this.getCoordinateYByStationId(stations, elem.stationId), {
stationCode: elem.stationCode, stationId: elem.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -95,8 +100,8 @@ export default {
} }
if (elem.departureTime) { if (elem.departureTime) {
opt.data.push([elem.departureTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { opt.data.push([elem.departureTime, this.getCoordinateYByStationId(stations, elem.stationId), {
stationCode: elem.stationCode, stationId: elem.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -112,8 +117,8 @@ export default {
nextPoint = service.tripList[j + 1].stationTimeList[0]; nextPoint = service.tripList[j + 1].stationTimeList[0];
opt.data.push({ opt.data.push({
value: [lastPoint.arrivalTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { value: [lastPoint.arrivalTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), {
stationCode: lastPoint.stationCode, stationId: lastPoint.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -123,8 +128,8 @@ export default {
symbolSize: 1, symbolSize: 1,
}); });
opt.data.push({ opt.data.push({
value: [nextPoint.departureTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { value: [nextPoint.departureTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), {
stationCode: lastPoint.stationCode, stationId: lastPoint.stationId,
serviceNo: service.serviceNo, serviceNo: service.serviceNo,
tripNo: trip.tripNo, tripNo: trip.tripNo,
direction: trip.direction, direction: trip.direction,
@ -209,9 +214,9 @@ export default {
}, },
/** 通过站信息获取y坐标*/ /** 通过站信息获取y坐标*/
getCoordinateYByStationCode(stations, stationCode, isSpecial=false, direction='01') { getCoordinateYByStationId(stations, stationId, isSpecial=false, direction='01') {
var value = 0; var value = 0;
var station = stations.find(it => { return it.code == stationCode; }); var station = stations.find(it => { return it.id == stationId; });
if (station) { if (station) {
value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction); value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction);
} }
@ -235,13 +240,32 @@ export default {
return null; return null;
}, },
/**限制区域范围 */
limitAreaTime(model) {
if (model) {
model.startTime = model.startTime < this.MinTime
? this.MinTime
: model.startTime > this.MaxTime
? this.MaxTime
: model.startTime;
model.endTime = model.endTime < this.MinTime
? this.MinTime
: model.endTime > this.MaxTime
? this.MaxTime
: model.endTime;
}
return model;
},
/** 检查公里表是否超出范围*/ /** 检查公里表是否超出范围*/
limitAreaKmRange(stations, model) { limitAreaKmRange(stations, model) {
const closerKmRange = model.closerKmRange; const closerKmRange = model.closerKmRange;
const fartherKmRange = model.fartherKmRange; const fartherKmRange = model.fartherKmRange;
const length = stations.length; const length = stations.length;
const first = stations[0]||{};
const last = stations[length-1]||{}; const last = stations[length-1]||{};
const minRange = -this.EdgeHeight/2; const minRange = first.kmRange-this.EdgeHeight;
const maxRange = last.kmRange; const maxRange = last.kmRange;
const tolerant = 0; const tolerant = 0;

View File

@ -52,6 +52,8 @@ export function createRectArea(opt, style={}) {
point1: opt.point1, point1: opt.point1,
point2: opt.point2, point2: opt.point2,
model: opt.model, model: opt.model,
culling: true,
progressive: true,
shape: { shape: {
x: 0, x: 0,
y: 0, y: 0,
@ -96,10 +98,13 @@ export function createMarkLineModels(stations, computedYaxis) {
show: true, show: true,
position: 'start', position: 'start',
formatter: elem.name, formatter: elem.name,
color: 'black' color: elem.transferable ? '#000': '#000',
backgroundColor: elem.transferable ? '#008800': '',
padding: [5,3,3,3],
}, },
lineStyle: { lineStyle: {
type: 'solid', type: 'solid',
color: elem.transferable? '#008800': '#000',
width: 0.5, width: 0.5,
opacity: 0.5 opacity: 0.5
}, },
@ -209,16 +214,6 @@ export function formatTime(time) {
} }
} }
/** 通过code将名称格式化*/
export function formatName(code) {
let name = '';
const device = store.getters['map/getDeviceByCode'](code);
if (device) {
name = device.name;
}
return name;
}
/** 将时间格式化前补零*/ /** 将时间格式化前补零*/
export function prefixTime(time) { export function prefixTime(time) {
let str = `${time}` || ''; let str = `${time}` || '';

View File

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

View File

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

View File

@ -0,0 +1,19 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
list: [
{
maxDuration: 8,
minDuration: 5,
operateType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN.value,
skinCode: '03',
trainingName: '设置扣车({10}-{12} 站台)',
trainingRemark: '设置扣车功能',
trainingType:'Stand',
productTypes: ['02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】'},
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
]
}
]
};

View File

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

View File

@ -0,0 +1,178 @@
<template>
<el-dialog
v-dialogDrag
:class="popClass+' train-set-plan'"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="11">车组号</el-col>
<el-col :span="11" :offset="1">上下行</el-col>
</el-row>
<el-row>
<el-col :span="11">
<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">
<el-option :value="true" :label="rightTrueLabel" />
<el-option :value="false" :label="rightFalseLabel" />
</el-select>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
props:{
popClass:{
type:String,
required:true
}
},
data() {
return {
trainNoList: [],
selected: null,
messageTip1:'',
addModel: {
groupNumber: '',
right: '',
sectionCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'mapConfig',
'trainList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '加载备用车';
},
rightTrueLabel() {
return this.mapConfig.upRight ? '上行' : '下行';
},
rightFalseLabel() {
return this.mapConfig.upRight ? '下行' : '上行';
}
},
watch:{},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel.sectionCode = selected.code;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
if (!this.addModel.groupNumber) {
this.messageTip1 = '请输入车组号';
return;
}
const params = {
groupNumber: this.addModel.groupNumber,
sectionCode: this.addModel.sectionCode,
right: this.addModel.right
};
this.messageTip1 = '';
this.loading = true;
commitOperate(menuOperate.Section.loadSpareTrain, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-01__systerm .el-dialog .base-label {
// background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -392,15 +392,6 @@ export default {
} catch (e) { } catch (e) {
this.$message.error('获取列车信息失败!'); this.$message.error('获取列车信息失败!');
} }
// getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
// if (resp.data) {
// this.formModel.serviceNumber = resp.data.serviceNumber;
// this.formModel.destinationCode = resp.data.destinationCode;
// }
// }).catch(() => {
// this.$message.error('');
// });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -64,6 +64,11 @@ export const menuOperate = {
// 区段详情 // 区段详情
operation: OperationEvent.Section.detail.menu.operation, operation: OperationEvent.Section.detail.menu.operation,
cmdType: CMD.Section.CMD_SECTION_DETAILS cmdType: CMD.Section.CMD_SECTION_DETAILS
},
loadSpareTrain: {
// 添加备用车
operation: OperationEvent.Section.loadSpareTrain.menu.operation,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
} }
}, },
Signal:{ Signal:{

View File

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

View File

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

View File

@ -15,120 +15,232 @@ export default {
beginRow: 1, beginRow: 1,
beginCol: 0, beginCol: 0,
// fieldNum: 10, // fieldNum: 10,
columns: { trainId: '车次号',
'默认上行折返轨': { key: 'upTrack', formatter: (val) => { return val; } }, columns: ['备注', '车次号']
'默认下行折返轨': { key: 'downTrack', formatter: (val) => { return val; } } // beginRow: 1,
} // beginCol: 0,
// // fieldNum: 10,
// columns: {
// '默认上行折返轨': { key: 'upTrack', formatter: (val) => { return val; } },
// '默认下行折返轨': { key: 'downTrack', formatter: (val) => { return val; } }
// }
}, },
// /** 解析exal数据转换为Json后台数据*/
// importData(Sheet, JsonData) {
// const dataList = convertSheetToList(Sheet, true);
// const needList = Object.keys(this.ExcelConfig.columns);
// const tripObj = { upTrack: '', downTrack: '' };
// if (dataList && dataList.length && dataList[1] && dataList[0]) {
// const tIndex = dataList.findIndex(it => { return it[0]; });
// if (dataList[0][0] == needList[0] && dataList[1][0] == needList[1]) {
// for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += 1) {
// var isContinue = true;
// for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
// isContinue = false;
// var title = dataList[colIndex][0];
// var value = dataList[colIndex][rowIndex];
// if (title && value) {
// // 数据列解析
// isContinue = true;
// var titleStr = `${title}`.replace(/\s*/g, '');
// var valueStr = `${value}`.replace(/\s*/g, '');
// // 取需要的字段
// if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
// tripObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
// }
// }
// }
// }
// } else {
// /** 解析二维数组为json对象*/
// const reg0 = /^[↑|↓|¡|ü|ý|]+(.*)/; // ↑|↓
// const reg1 = /^([▼|▲|¡ø|¨‹]+)\s*(\d+:\d+:\d+)/; // ▲ 06:10:00
// const reg2 = /^(\d+:\d+:\d+)\s*([▼|▲|¡ø|¨‹]+)/; // 06:10:00 ▲
// const reg3 = /^(\d+:\d+:\d+)\s*(\d+:\d+:\d+|)/; // 06:10:00 06:12:00
// const reg4 = /[▼|▲|¡|ø|¨|‹]+/; // ▲
// dataList.forEach((elem, i) => {
// var begin = -1;
// /** 跳过名称所在的行*/
// if (i != tIndex && elem && elem.length > 0) {
// elem.forEach((item, j) => {
// /** 过滤空值*/
// if (item) {
// var value = `${item}`.trim();
// var title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
// /** 匹配到开始位置或者结束位置*/
// if (reg0.test(value)) {
// if (begin == -1) {
// begin = value; // 设置初始索引
// JsonData.push({
// code: reg0.exec(value)[1],
// arrivalList: []
// });
// } else if (begin === value) {
// begin = -1; // 清空初始索引
// }
// } else if (begin !== -1) {
// /** 匹配到中间位置*/
// var begTime, endTime;
// var runFlag = JsonData[JsonData.length - 1].code[2];
// var stationName = title.replace(/\s/, '');
// var need = false;
// var flag = false;
// if (reg1.test(value)) {
// /** 含有特殊字符的时间格式*/
// [, begTime, endTime] = reg1.exec(value);
// begTime = reg4.test(begTime) ? '' : begTime;
// endTime = reg4.test(endTime) ? '' : endTime;
// /** 下行方向时间互换*/
// if (runFlag === '2') {
// [begTime, endTime] = [endTime, begTime];
// }
// /** 设置标志*/
// [need, flag] = [true, true];
// } else if (reg2.test(value)) {
// /** 含有特殊字符的时间格式*/
// [, begTime, endTime] = reg2.exec(value);
// begTime = reg4.test(begTime) ? '' : begTime;
// endTime = reg4.test(endTime) ? '' : endTime;
// /** 下行方向时间互换*/
// if (runFlag === '2') {
// [begTime, endTime] = [endTime, begTime];
// }
// /** 设置标志*/
// [need, flag] = [true, true];
// } else if (reg3.test(value)) {
// /** 正常时间格式*/
// [, begTime, endTime] = reg3.exec(value);
// /** 如果只存在一个数据时,则开始和结束设置一样*/
// endTime = endTime || begTime;
// /** 下行方向时间互换*/
// if (runFlag === '2') {
// [begTime, endTime] = [endTime, begTime];
// }
// /** 设置标志*/
// [need, flag] = [true, false];
// }
// /** 添加json数据*/
// if (need) { // 储存非空 数据
// var stationObj = {
// stationName: stationName
// };
// if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); }
// if (endTime) { stationObj['departureTime'] = prefixTime(endTime); }
// if (flag) { stationObj['flag'] = flag; } // 是否转换轨
// JsonData[JsonData.length - 1].arrivalList.push(stationObj);
// }
// }
// }
// });
// }
// });
// }
// }
// JsonData.forEach(item => {
// item['upTrack'] = tripObj.upTrack;
// item['downTrack'] = tripObj.downTrack;
// });
// return JsonData;
// },
/** 解析exal数据转换为Json后台数据*/ /** 解析exal数据转换为Json后台数据*/
importData(Sheet, JsonData) { importData(Sheet, JsonData) {
const dataList = convertSheetToList(Sheet, true); const dataList = convertSheetToList(Sheet, true);
const needList = Object.keys(this.ExcelConfig.columns);
const tripObj = { upTrack: '', downTrack: '' };
if (dataList && dataList.length && dataList[1] && dataList[0]) { if (dataList && dataList.length && dataList[1] && dataList[0]) {
const tIndex = dataList.findIndex(it => { return it[0]; }); const tIndex = 8; // 设置不用过滤行数
if (dataList[0][0] == needList[0] && dataList[1][0] == needList[1]) {
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += 1) {
var isContinue = true;
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
isContinue = false;
var title = dataList[colIndex][0];
var value = dataList[colIndex][rowIndex];
if (title && value) {
// 数据列解析
isContinue = true;
var titleStr = `${title}`.replace(/\s*/g, '');
var valueStr = `${value}`.replace(/\s*/g, '');
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
tripObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
}
}
}
}
} else {
/** 解析二维数组为json对象*/ /** 解析二维数组为json对象*/
const reg0 = /^[↑|↓|¡|ü|ý|]+(.*)/; // ↑|↓ const reg3 = /^(\d+:\d+:\d+|)/; // 06:12:00
const reg1 = /^([▼|▲|¡ø|¨‹]+)\s*(\d+:\d+:\d+)/; // ▲ 06:10:00
const reg2 = /^(\d+:\d+:\d+)\s*([▼|▲|¡ø|¨‹]+)/; // 06:10:00 ▲
const reg3 = /^(\d+:\d+:\d+)\s*(\d+:\d+:\d+|)/; // 06:10:00 06:12:00
const reg4 = /[▼|▲|¡|ø|¨|‹]+/; // ▲ const reg4 = /[▼|▲|¡|ø|¨|‹]+/; // ▲
dataList.forEach((elem, i) => { dataList.forEach((elem, i) => {
var begin = -1; var begin = -1;
/** 跳过名称所在的行*/ /** 跳过名称所在的行*/
if (i != tIndex && elem && elem.length > 0) { if (i != tIndex && elem && elem.length > 0) {
elem.forEach((item, j) => { let flag = false;
/** 过滤空值*/ let param = { begTime: '', endTime: '' };
if (item) { if (i > tIndex) { elem.reverse(); }
let interval = 1;
for (let j = 0; j < elem.length;) {
const item = elem[j];
let title = '';
var value = `${item}`.trim(); var value = `${item}`.trim();
var title = `${dataList[tIndex][j]}`.replace(/\s*/g, ''); if (i > tIndex) { // 上行线
title = `${dataList[tIndex][dataList[tIndex].length - j - 1]}`.replace(/\s*/g, '');
if (title == 'undefined') {
title = `${dataList[tIndex][dataList[tIndex].length - j - 2]}`.replace(/\s*/g, '');
}
} else { // 下行线
title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
if (title == 'undefined') {
title = `${dataList[tIndex][j - 1]}`.replace(/\s*/g, '');
}
}
/** 匹配到开始位置或者结束位置*/ /** 匹配到开始位置或者结束位置*/
if (reg0.test(value)) { if (title == this.ExcelConfig.trainId && value != 'undefined') {
if (begin == -1) { if (begin == -1) {
interval = 2;
flag = true;
begin = value; // 设置初始索引 begin = value; // 设置初始索引
JsonData.push({ JsonData.push({
code: reg0.exec(value)[1], code: value,
destinationCode: '',
arrivalList: [] arrivalList: []
}); });
} else if (begin === value) { } else if (flag) {
interval = 1;
begin = -1; // 清空初始索引 begin = -1; // 清空初始索引
JsonData[JsonData.length - 1].destinationCode = value;
flag = false;
} }
} else if (title == this.ExcelConfig.columns[0]) {
interval = 1;
} else if (begin !== -1) { } else if (begin !== -1) {
const item1 = `${elem[j]}`.trim();
const item2 = `${elem[j + 1]}`.trim();
if (item1 != 'undefined' || item2 != 'undefined') {
/** 匹配到中间位置*/ /** 匹配到中间位置*/
var begTime, endTime;
var runFlag = JsonData[JsonData.length - 1].code[2];
var stationName = title.replace(/\s/, ''); var stationName = title.replace(/\s/, '');
var need = false; const flag = reg3.test(item1) || reg3.test(item2);
var flag = false; if (this.ExcelConfig.columns.indexOf(stationName) == -1 && flag) {
if (reg1.test(value)) { let need = false;
/** 含有特殊字符的时间格式*/ if (value.split(':')[0] == '24') { // 24:XX:XX 类似这种数据 变24为00
[, begTime, endTime] = reg1.exec(value); const arr = value.split(':');
arr[0] = '00';
begTime = reg4.test(begTime) ? '' : begTime; value = arr.join(':');
endTime = reg4.test(endTime) ? '' : endTime; }
const item1 = elem[j] ? `${elem[j]}`.trim() : '';
/** 下行方向时间互换*/ const item2 = elem[j + 1] ? `${elem[j + 1]}`.trim() : '';
if (runFlag === '2') { if (item1 && item2) {
[begTime, endTime] = [endTime, begTime]; param.begTime = item1;
param.endTime = item2;
} else if (item1 && !item2) {
param.begTime = item1;
param.endTime = item1;
} else if (!item1 && item2) {
param.begTime = item2;
param.endTime = item2;
} }
/** 设置标志*/ if (param.begTime && param.endTime) {
[need, flag] = [true, true]; need = true;
} else if (reg2.test(value)) {
/** 含有特殊字符的时间格式*/
[, begTime, endTime] = reg2.exec(value);
begTime = reg4.test(begTime) ? '' : begTime;
endTime = reg4.test(endTime) ? '' : endTime;
/** 下行方向时间互换*/
if (runFlag === '2') {
[begTime, endTime] = [endTime, begTime];
}
/** 设置标志*/
[need, flag] = [true, true];
} else if (reg3.test(value)) {
/** 正常时间格式*/
[, begTime, endTime] = reg3.exec(value);
/** 如果只存在一个数据时,则开始和结束设置一样*/
endTime = endTime || begTime;
/** 下行方向时间互换*/
if (runFlag === '2') {
[begTime, endTime] = [endTime, begTime];
}
/** 设置标志*/
[need, flag] = [true, false];
} }
/** 添加json数据*/ /** 添加json数据*/
@ -136,25 +248,32 @@ export default {
var stationObj = { var stationObj = {
stationName: stationName stationName: stationName
}; };
if (reg4.test(param.begTime)) {
if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); } param.begTime = '';
if (endTime) { stationObj['departureTime'] = prefixTime(endTime); } }
if (flag) { stationObj['flag'] = flag; } // 是否转换轨 if (reg4.test(param.endTime)) {
param.endTime = '';
}
stationObj['arriveTime'] = prefixTime(param.begTime);
stationObj['departureTime'] = prefixTime(param.endTime);
JsonData[JsonData.length - 1].arrivalList.push(stationObj); JsonData[JsonData.length - 1].arrivalList.push(stationObj);
param = { begTime: '', endTime: '' };
} }
} }
} }
}
j = j + interval;
}
}
}); });
} }
}); const arr = [];
JsonData.forEach((item, i) => {
if (item.code) {
arr.push(item);
} }
}
JsonData.forEach(item => {
item['upTrack'] = tripObj.upTrack;
item['downTrack'] = tripObj.downTrack;
}); });
return arr;
return JsonData;
}, },
/** 将后台数据解析成图表*/ /** 将后台数据解析成图表*/

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<div id="menuBar"> <div id="menuBar" :style="{height: $store.state.training.prdType === '01'? '90px': '130px'}">
<div class="haerbin-01__systerm nav"> <div class="haerbin-01__systerm nav">
<el-row> <el-row v-if="$store.state.training.prdType === '01'">
<el-col :span="2"> <el-col :span="2">
<div class="nav-border"> <div class="nav-border">
<el-row> <el-row>
@ -36,13 +36,13 @@
<el-col :span="10"> <el-col :span="10">
<div class="nav-border"> <div class="nav-border">
<el-row> <el-row>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">A级警报</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#FFF' }" plain :class="{'headerBox' :isNoConfirmLevelA}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">B级警报</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#FFF' }" plain :class="{'headerBox' :isNoConfirmLevelB}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">C级警报</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#F00':'#FFF' }" plain>C级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">声音</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" plain @click="controlAudio(false)">声音</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col> <el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
@ -64,19 +64,101 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-else-if="$store.state.training.prdType === '02'" style="padding: 3px;">
<el-col :span="16">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
<el-row style="padding: 4px;">
<div class="tip-content-box">
<div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div>
<div v-if="tipContent[0]">{{ `${tipContent[0].time}` }}</div>
<div v-if="tipContent[0]">{{ `${tipContent[0].confirm ? '确认': '未确认'}` }}</div>
</div>
<div class="tip-content-box">
<div v-if="tipContent[1]">{{ `${tipContent[1].level}` }}</div>
<div v-if="tipContent[1]">{{ `${tipContent[1].time}` }}</div>
<div v-if="tipContent[1]">{{ `${tipContent[1].confirm ? '确认': '未确认'}` }}</div>
</div>
<div class="tip-content-box">
<div v-if="tipContent[2]">{{ `${tipContent[2].level}` }}</div>
<div v-if="tipContent[2]">{{ `${tipContent[2].time}` }}</div>
<div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div>
</div>
</el-row>
<el-row class="button-row">
<div class="div-simulate-button" @click="undeveloped">系统</div>
<div class="div-simulate-button" @click="undeveloped">联锁</div>
<div class="div-simulate-button" @click="undeveloped">列监</div>
<div class="div-simulate-button" @click="undeveloped">站控</div>
<div class="div-simulate-button" @click="undeveloped">车场</div>
<div class="div-simulate-button" @click="undeveloped">编表</div>
<div class="div-simulate-button" @click="undeveloped">车辆段</div>
</el-row>
<el-row class="button-row" style="margin-top: 10px;">
<div class="div-simulate-button" @click="undeveloped">轨道</div>
<div class="div-simulate-button" @click="undeveloped">调度</div>
<div class="div-simulate-button" @click="undeveloped">录放</div>
<div class="div-simulate-button" @click="undeveloped">管理</div>
<div class="div-simulate-button" @click="undeveloped">列车信息</div>
<div class="div-simulate-button" @click="undeveloped">职权</div>
<div style="width: 80px;" />
</el-row>
</div>
</el-col>
<el-col :span="4">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;">
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#FFF' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#FFF' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#FFF' }" @click="showHimAlarm('C')">C</div>
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
</el-row>
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
</el-row>
<el-row class="button-row" style="margin-top: 10px;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报表</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">时刻表</div>
</el-row>
</div>
</el-col>
<el-col :span="4" style="border: 2px solid #DDD9CA;border-radius: 5px;">
<el-row style="height: 68px;" />
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">日志</div>
</el-row>
<el-row class="button-row" style="margin-top: 10px;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">退出</div>
</el-row>
</el-col>
</el-row>
</div> </div>
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" /> <notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
<alarm-table-low ref="alarmTableLow" />
<alarm-table-hmi ref="alarmTableHmi" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import voiceOpen from '@/assets/voiceOpen.png';
import voiceClose from '@/assets/voiceClose.png';
import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
export default { export default {
name: 'MenuBar', name: 'MenuBar',
components: { components: {
NoticeInfo NoticeInfo,
AlarmTableLow,
AlarmTableHmi
}, },
props: { props: {
selected: { selected: {
@ -103,7 +185,20 @@ export default {
centralizedStationList2: [], centralizedStationList2: [],
colsNum: 0, colsNum: 0,
version: '', version: '',
centralizedMap: {} centralizedMap: {},
tipContent: [],
sound: false,
buzzerAudio: BuzzerAudio,
noConfirmMapA: {},
noConfirmMapB: {},
confirmNoRecoverMapA: {},
confirmNoRecoverMapB: {},
confirmNoRecoverMapC: {},
noConfirmMapAString: '{}',
noConfirmMapBString: '{}',
confirmNoRecoverMapAString: '{}',
confirmNoRecoverMapBString: '{}',
confirmNoRecoverMapCString: '{}'
}; };
}, },
computed: { computed: {
@ -119,6 +214,24 @@ export default {
]), ]),
userId() { userId() {
return this.$store.state.user ? this.$store.state.user.id : ''; return this.$store.state.user ? this.$store.state.user.id : '';
},
voiceIcon() {
return this.sound ? voiceOpen : voiceClose;
},
isNoConfirmLevelA() {
return this.noConfirmMapAString !== '{}';
},
isNoConfirmLevelB() {
return this.noConfirmMapBString !== '{}';
},
isNoRecoverLevelA() {
return this.confirmNoRecoverMapAString !== '{}';
},
isNoRecoverLevelB() {
return this.confirmNoRecoverMapBString !== '{}';
},
isNoRecoverLevelC() {
return this.confirmNoRecoverMapCString !== '{}';
} }
}, },
watch: { watch: {
@ -152,6 +265,54 @@ export default {
if (list && list.length) { if (list && list.length) {
this.checkRoleChange(list); this.checkRoleChange(list);
} }
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
this.tipContent.push(item);
this.handleAlarm(item);
if (this.tipContent.length > 3) {
this.tipContent.shift();
}
if (item.level === 'A') {
this.noConfirmMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
} else if (item.level === 'B') {
this.noConfirmMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
}
} else if (!item.recovered) {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
this.confirmNoRecoverMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
this.confirmNoRecoverMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
this.confirmNoRecoverMapC[item.code] = item;
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
} else {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
delete this.confirmNoRecoverMapA[item.code];
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
delete this.confirmNoRecoverMapB[item.code];
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
delete this.confirmNoRecoverMapC[item.code];
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
}
});
} }
}, },
mounted() { mounted() {
@ -163,6 +324,11 @@ export default {
} }
}, },
methods: { methods: {
handleAlarm(val) {
if (val.level === 'A' || val.level === 'B') {
this.controlAudio(true);
}
},
initMenu() { initMenu() {
// //
const centralizedStationList = []; const centralizedStationList = [];
@ -245,6 +411,23 @@ export default {
this.switchShowStation(this.centralizedMap[item.deviceCode]); this.switchShowStation(this.centralizedMap[item.deviceCode]);
} }
}); });
},
showHimAlarm(level) {
this.$refs.alarmTableHmi.doShow(level);
},
showLowAlarm(level) {
this.$refs.alarmTableLow.doShow(level);
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
} }
} }
}; };
@ -423,4 +606,60 @@ export default {
background: #ffffff; background: #ffffff;
cursor: not-allowed; cursor: not-allowed;
} }
.div-simulate-button{
height: 20px;
line-height: 20px;
display: inline-block;
font-size: 14px;
color: #303030;
border: 1px solid #44556D;
background: #FFF;
text-align: center;
border-radius: 5px;
width: 80px;
}
.tip-content-box{
height: 20px;
width: 100%;
line-height: 20px;
background: #001528;
color: #C20F29;
font-size: 14px;
display: flex;
justify-content: space-around;
}
.button-row{
height: 20px;
line-height: 20px;
display: flex;
justify-content:space-between;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
@-webkit-keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
.headerBox {
background: #f00;
animation: fade 600ms infinite;
-webkit-animation: fade 600ms infinite;
}
</style> </style>

View File

@ -0,0 +1,155 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
<el-row>
<el-col :span="10" style="text-align: center;">
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
<el-date-picker
v-model="startTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
</el-col>
<el-col :span="10" style="text-align: center;">
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
<el-date-picker
v-model="endTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
</el-col>
<el-col :span="4" style="text-align: center;">
<el-button style="margin-left: 10px;" @click="queryData(true)">查询</el-button>
<el-button style="margin-left: 10px;" @click="queryData(false)">撤销查询</el-button>
</el-col>
</el-row>
</div>
<div style="position: relative;height: 20px;line-height: 20px;top: -120px;text-align: left;right: -80px;background: #F0F0F0;width: 88px;">筛选条件查询</div>
<el-row>
<el-col :span="8">
<el-button @click="infoConfirm">消息确认</el-button>
</el-col>
<el-col :span="8">
<el-button :disabled="true">消息打印</el-button>
</el-col>
<el-col :span="8">
<el-button :disabled="true">删除备注</el-button>
</el-col>
</el-row>
<el-table
:data="totalData"
style="width: 100%"
height="450"
>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-checkbox v-model="checkList[scope.$index]" @change="operateChange(scope)" />
</template>
</el-table-column>
<el-table-column prop="level" label="报警级别" />
<el-table-column prop="time" label="日期/时间" width="150px" />
<el-table-column prop="code" label="报警序号" />
<el-table-column prop="deviceCode" label="设备编号">
<template slot-scope="scope">
<span>{{ handleDeviceName(scope.row.deviceCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="信号编号" />
<el-table-column prop="address" label="元素编号" />
<el-table-column prop="confirmed" label="确认">
<template slot-scope="scope">
<span>{{ scope.row.confirmed? 'Y':'N' }}</span>
</template>
</el-table-column>
<el-table-column prop="confirmedUserName" label="确认人编号" width="120px" />
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
<el-table-column prop="recoverTime" label="恢复">
<template slot-scope="scope">
<span>{{ scope.row.recovered? 'Y':'N' }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="恢复时间" />
<el-table-column prop="address" label="备注信息" width="200px" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import {getAlarmList, confirmAlarm} from '@/api/simulation';
export default {
name: 'AlarmHmi',
data() {
return {
currentPage: 1,
show: false,
level: '',
startTime: '',
endTime: '',
deviceCode: '',
elementCode: '',
totalData: [],
checkList: []
};
},
computed:{
},
methods:{
doShow(level) {
this.show = true;
this.level = level;
this.queryData(false);
},
handleClose() {
this.level = '';
this.startTime = '';
this.endTime = '';
this.show = false;
},
operateChange(row) {
},
queryData(flag) {
if (!flag) {
this.endTime = '';
this.startTime = '';
this.deviceCode = '';
this.elementCode = '';
}
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
getAlarmList(this.$route.query.group, params).then(resp => {
this.totalData = resp.data;
});
},
infoConfirm() {
const codes = [];
this.checkList.forEach((check, index) => {
if (check) {
codes.push(this.totalData[index].code);
}
});
confirmAlarm(this.$route.query.group, codes).then(resp => {
this.queryData(true);
}).catch(() => {
this.$message.error('确认消息失败!');
});
},
handleDeviceName(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return device.name;
}
}
};
</script>
<style scoped>
/deep/ .el-dialog .el-input {
border: 0 !important;
}
</style>

View File

@ -0,0 +1,114 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;">
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
<el-date-picker
v-model="startTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
<el-date-picker
v-model="endTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
<el-button style="margin-left: 10px;" @click="queryData">查询</el-button>
</div>
<el-table
:data="totalData"
style="width: 100%"
height="600"
>
<el-table-column prop="time" label="日期/时间" width="150px" />
<el-table-column prop="level" label="等级" />
<el-table-column prop="deviceCode" label="设备类型">
<template slot-scope="scope">
<span>{{ handleDeviceType(scope.row.deviceCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="deviceCode" label="设备编号">
<template slot-scope="scope">
<span>{{ handleDeviceName(scope.row.deviceCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="code" label="故障号" />
<el-table-column prop="description" label="故障描述" />
<el-table-column prop="recover" label="已恢复">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.recovered" />
</template>
</el-table-column>
<el-table-column prop="address" label="恢复时间" />
<el-table-column prop="confirm" label="已确认">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.confirmed" />
</template>
</el-table-column>
<el-table-column prop="confirmedUserName" label="确认人" />
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
<el-table-column prop="address" label="备注信息" width="200px" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import {getAlarmList} from '@/api/simulation';
import {deviceType} from '@/scripts/cmdPlugin/Config';
export default {
name: 'AlarmLow',
data() {
return {
currentPage: 1,
show: false,
level: '',
startTime: '',
endTime: '',
totalData: [],
tableData: []
};
},
computed:{
},
methods:{
doShow(level) {
this.show = true;
this.level = level;
this.queryData();
},
handleClose() {
this.level = '';
this.startTime = '';
this.endTime = '';
this.show = false;
},
queryData() {
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
getAlarmList(this.$route.query.group, params).then(resp => {
this.totalData = resp.data;
});
},
handleDeviceType(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return deviceType[device.type];
},
handleDeviceName(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return device.name;
}
}
};
</script>
<style scoped>
/deep/ .el-dialog .el-input {
border: 0 !important;
}
</style>

View File

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

View File

@ -8,6 +8,7 @@
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
@ -15,6 +16,7 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl'; import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan'; import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock'; import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl'; import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
@ -36,7 +38,8 @@ export default {
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo,
TrainAddPlan, TrainAddPlan,
SetFault SetFault,
LoadSpareTrain
}, },
props: { props: {
selected: { selected: {
@ -120,6 +123,11 @@ export default {
label: '触发故障管理', label: '触发故障管理',
handler: this.triggerFaultManagement, handler: this.triggerFaultManagement,
cmdType: CMD.Fault.CMD_TRIGGER_FAULT cmdType: CMD.Fault.CMD_TRIGGER_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
} }
] ]
}; };
@ -270,6 +278,13 @@ export default {
} }
}); });
}, },
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
},
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -110,6 +110,7 @@ export default {
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.addModel.groupNumber = selected.groupNumber; this.addModel.groupNumber = selected.groupNumber;
this.addModel.serviceNumber = selected.serviceNumber;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {

View File

@ -19,18 +19,18 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11">服务</el-col> <el-col :span="11">车次</el-col>
<el-col :span="11" :offset="2">序列</el-col> <el-col :span="11" :offset="2">服务</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
</el-col>
<el-col :span="11" :offset="2">
<el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" /> <el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div> <div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip2 }}</div>
</el-col> </el-col>
<el-col :span="11" :offset="2">
<el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
<div style="color:red;font-size:13px;margin-top:5px;">{{ messageTip1 }}</div>
</el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10"> <el-col :span="10">
@ -50,6 +50,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import {getTrainDetailBytripNumber} from '@/api/simulation';
export default { export default {
name: 'TrainSetPlan', name: 'TrainSetPlan',
@ -99,6 +100,13 @@ export default {
if (this.dialogShow) { if (this.dialogShow) {
this.commit(); this.commit();
} }
},
'addModel.tripNumber': function(val) {
if (val.length == 4) {
this.trainNoChange(val);
} else {
this.addModel.serviceNumber = '';
}
} }
}, },
mounted() { mounted() {
@ -113,6 +121,8 @@ export default {
// if (!this.dialogShow) { // if (!this.dialogShow) {
// } // }
this.addModel.groupNumber = selected.groupNumber; this.addModel.groupNumber = selected.groupNumber;
this.tripNumber = '';
this.serviceNumber = '';
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -125,6 +135,15 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
trainNoChange(tripNumber) {
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
if (resp.data) {
this.addModel.serviceNumber = resp.data.serviceNumber;
}
}).catch(() => {
this.$message.error('获取列车信息失败!');
});
},
commit() { commit() {
if (!this.addModel.serviceNumber) { if (!this.addModel.serviceNumber) {
this.messageTip1 = '请输入服务号'; this.messageTip1 = '请输入服务号';

View File

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

View File

@ -100,12 +100,12 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, },
{ {
label: '进路交人工控', label: '进路自排关',
handler: this.humanControl, handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
}, },
{ {
label: '进路交自动控', label: '进路自排开',
handler: this.atsAutoControl, handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}, },
@ -137,12 +137,12 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
}, },
{ {
label: '进路交人工控', label: '进路自排关',
handler: this.humanControl, handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
}, },
{ {
label: '进路交自动控', label: '进路自排开',
handler: this.atsAutoControl, handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}, },
@ -291,7 +291,7 @@ export default {
} }
}); });
}, },
// //
humanControl() { humanControl() {
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -299,7 +299,7 @@ export default {
} }
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -114,7 +114,7 @@ export default {
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.right, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata)); opt.markPointData.push(createMartPoint(pointdata));
@ -130,7 +130,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) { index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode} // ${train.directionCode}
const aa = `${train.tripNumber}`; const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]); opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.right, false), elem.stationCode, aa]);
} }
}); });
@ -141,8 +141,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber); num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode} // ${train.directionCode}
const aa = `${train.tripNumber}`; const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]); opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.right, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]); opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.right, true, num), nextPoint.stationCode, aa]);
} }
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/
@ -221,13 +221,14 @@ export default {
} }
/** 计算折返点*/ /** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode]; elem.right = elem.tripNumber[0] == '2';
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.tripNumber, elem.right];
if (serie.data.length > 0) { if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1]; var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) { if (lastPoint[2] !== nextPoint[2]) {
var num = this.computedReentryNumber(elem.tripNumber); var num = this.computedReentryNumber(elem.tripNumber);
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]); serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3], num), lastPoint[3]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]); serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[3], num), lastPoint[3]]);
} }
} }
@ -295,10 +296,10 @@ export default {
}, },
/** 根据方向计算y折返偏移量*/ /** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) { getYvalueByDirectionCode(defaultVlue, right, num) {
if (directionCode === '1') { if (!right) {
defaultVlue -= this.EdgeHeight / 2 * num; defaultVlue -= this.EdgeHeight / 2 * num;
} else if (directionCode === '2') { } else if (right) {
defaultVlue += this.EdgeHeight / 2 * num; defaultVlue += this.EdgeHeight / 2 * num;
} }
@ -306,13 +307,13 @@ export default {
}, },
/** 根据elem计算y值*/ /** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) { getCoordYByElem(stations, kmRangeCoordMap, elem, right, isSpecial, num) {
var defaultVlue = 0; var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; }); var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) { if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`]; defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) { if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num); defaultVlue = this.getYvalueByDirectionCode(defaultVlue, right, num);
} }
} }

View File

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

View File

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

View File

@ -242,7 +242,7 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(elem.sectionPathList || [], item => { zrUtil.each(elem.sectionPathList || [], item => {
zrUtil.each(item.sectionList || [], section => { zrUtil.each(item.sectionList || [], section => {
if (mapDevice[section] && mapDevice[section].parentCode) { if (mapDevice[section] && mapDevice[section].parentCode) {
mapDevice[mapDevice[section].parentCode].approach = true; (mapDevice[mapDevice[section].parentCode] || {}).approach = true;
} else if (mapDevice[section]) { } else if (mapDevice[section]) {
mapDevice[section].approach = true; mapDevice[section].approach = true;
} }

View File

@ -1,7 +1,6 @@
<template> <template>
<el-dialog v-dialogDrag title="选择仿真" :visible.sync="dialogShow" width="30%" center> <el-dialog v-dialogDrag title="选择仿真" :visible.sync="dialogShow" width="30%" center>
<el-input v-model="input" placeholder="请输入仿真号" /> <el-input v-model="input" placeholder="请输入仿真号" />
<el-checkbox v-if="!isShow" v-model="isNewMap">是否新版地图房间</el-checkbox>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button> <el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button v-loading="loading" :disabled="!input.length" type="primary" @click="comit">{{ $t('global.confirm') }}</el-button> <el-button v-loading="loading" :disabled="!input.length" type="primary" @click="comit">{{ $t('global.confirm') }}</el-button>
@ -11,7 +10,6 @@
<script> <script>
import { jointSimulationByPermission } from '@/api/jointSimulation'; import { jointSimulationByPermission } from '@/api/jointSimulation';
import { getPermissionJoint } from '@/api/chat';
export default { export default {
name: 'Dashboard', name: 'Dashboard',
@ -19,8 +17,7 @@ export default {
return { return {
input: '', input: '',
dialogShow: false, dialogShow: false,
loading: false, loading: false
isNewMap: true
}; };
}, },
computed: { computed: {
@ -38,11 +35,7 @@ export default {
async comit() { async comit() {
try { try {
this.loading = true; this.loading = true;
if (this.isNewMap || this.isShow) {
await jointSimulationByPermission(`${this.input}`); await jointSimulationByPermission(`${this.input}`);
} else {
await getPermissionJoint(`${this.input}`);
}
this.dialogShow = false; this.dialogShow = false;
} catch (error) { } catch (error) {
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError'); const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');

View File

@ -236,6 +236,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form_box">
<div class="title">单位:</div>
<div class="content_box_info">
<div v-show="companyShow" class="show_box">
<span>{{ handleCompany(userInfo.companyId) }}</span>
</div>
</div>
</div>
<div v-if="!wmOpenId" class="form_box"> <div v-if="!wmOpenId" class="form_box">
<div class="title">绑定微信:</div> <div class="title">绑定微信:</div>
<div class="content_box_info"> <div class="content_box_info">
@ -278,6 +286,7 @@ import QrcodeVue from 'qrcode.vue';
import { setInterval, clearInterval } from 'timers'; import { setInterval, clearInterval } from 'timers';
import { checkLoginStatus } from '@/api/login'; import { checkLoginStatus } from '@/api/login';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { getCompanyList } from '@/api/company';
export default { export default {
components: { QrcodeVue }, components: { QrcodeVue },
@ -296,14 +305,16 @@ export default {
nickname: '', nickname: '',
mobile: '', mobile: '',
email: '', email: '',
passWord: '' passWord: '',
companyId: ''
}, },
editInfo: { editInfo: {
name: '', name: '',
nickname: '', nickname: '',
mobile: '', mobile: '',
email: '', email: '',
passWord: '' passWord: '',
companyId: ''
}, },
nationCode: '86', nationCode: '86',
nameShow: true, nameShow: true,
@ -311,6 +322,7 @@ export default {
mobileShow: true, mobileShow: true,
emailShow: true, emailShow: true,
passwordShow: true, passwordShow: true,
companyShow: true,
mobileCode: null, mobileCode: null,
emailCode: null, emailCode: null,
passWordCode: null, passWordCode: null,
@ -340,7 +352,8 @@ export default {
nationCodeInit: '86', // nationCodeInit: '86', //
loginClient: 'LianKeTang', loginClient: 'LianKeTang',
project:'', project:'',
wmOpenId: '' wmOpenId: '',
companyList: []
}; };
}, },
computed: { computed: {
@ -372,7 +385,8 @@ export default {
nickname: user.nickname, nickname: user.nickname,
mobile: user.mobile, mobile: user.mobile,
email: user.email, email: user.email,
passWord: '' passWord: '',
companyId: user.companyId
}; };
this.wmOpenId = user.wmOpenId || ''; this.wmOpenId = user.wmOpenId || '';
this.oldPassWord = user.password; this.oldPassWord = user.password;
@ -384,6 +398,11 @@ export default {
.catch(error => { .catch(error => {
console.log(error, '请求个人信息失败'); console.log(error, '请求个人信息失败');
}); });
getCompanyList().then(resp => {
this.companyList = resp.data;
}).catch((error) => {
console.log(error, '获取公司列表信息失败');
});
}, },
doClose() { doClose() {
this.visible = false; this.visible = false;
@ -394,6 +413,10 @@ export default {
this.editInfo.name = this.userInfo.name; this.editInfo.name = this.userInfo.name;
this.nameShow = !this.nameShow; this.nameShow = !this.nameShow;
}, },
switcherCompany() {
this.editInfo.companyId = this.userInfo.companyId;
this.companyShow = !this.companyShow;
},
async saveName() { async saveName() {
if (this.editInfo.name) { if (this.editInfo.name) {
try { try {
@ -406,7 +429,16 @@ export default {
} }
} }
}, },
async saveCompany() {
try {
await getUserinfoName(this.info.id, this.editInfo.name);
this.userInfo.name = this.editInfo.name;
this.nameShow = !this.nameShow;
this.$store.commit('SET_NAME', this.editInfo.name);
} catch (error) {
console.log(error, '错误');
}
},
switcherNickname() { switcherNickname() {
this.editInfo.nickname = this.userInfo.nickname; this.editInfo.nickname = this.userInfo.nickname;
this.nickNameShow = !this.nickNameShow; this.nickNameShow = !this.nickNameShow;
@ -426,7 +458,15 @@ export default {
} }
} }
}, },
handleCompany(companyId) {
let name = '';
this.companyList.forEach(item => {
if (item.id == companyId) {
name = item.name;
}
});
return name;
},
switcherMobile() { switcherMobile() {
// this.editInfo.mobile = this.userInfo.mobile; // this.editInfo.mobile = this.userInfo.mobile;
this.mobileShow = !this.mobileShow; this.mobileShow = !this.mobileShow;

View File

@ -4,7 +4,6 @@ import router from './router/index_APP_TARGET';
import {loginInfo} from '@/scripts/ProjectConfig'; import {loginInfo} from '@/scripts/ProjectConfig';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
// import { admin } from './router/index_APP_TARGET';
import { getToken, removeToken, getSessionStorage } from '@/utils/auth'; import { getToken, removeToken, getSessionStorage } from '@/utils/auth';
import localStore from 'storejs'; import localStore from 'storejs';
@ -14,22 +13,15 @@ import localStore from 'storejs';
// return roles.some(role => permissionRoles.indexOf(role) >= 0); // return roles.some(role => permissionRoles.indexOf(role) >= 0);
// } // }
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUStool']; // 不重定向白名单 const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool']; // 不重定向白名单
// const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/, /^\/practiceDisplayNew/, /^\/bigSplitScreen/];
// function isDesignPage(toRoutePath) {
// return designPageRegex.some(item => item.test(toRoutePath) );
// }
for (const val in loginInfo) { for (const val in loginInfo) {
if (loginInfo[val].loginPath && !whiteList.includes(loginInfo[val].loginPath)) { if (loginInfo[val].loginPath && !whiteList.includes(loginInfo[val].loginPath)) {
whiteList.push(loginInfo[val].loginPath); whiteList.push(loginInfo[val].loginPath);
} }
} }
// const loginPage = whiteList[0];
// const loginDesignPage = whiteList[1];
// 获取路径数据 // 登录路径判断获取
function getRouteInfo(to) { function getRouteInfo(to) {
let loginPath = ''; let loginPath = '';
const toRoutePath = to.redirectedFrom || to.path; const toRoutePath = to.redirectedFrom || to.path;
@ -71,14 +63,12 @@ function handleRoute(to, next, loginPath) {
}); });
} else { } else {
// 除没有动态改变权限的需求可直接next() 删下方权限判断 // 除没有动态改变权限的需求可直接next() 删下方权限判断
// if (hasPermission(store.getters.roles, to.meta.roles)) {
if (to.path === '/404' && to.redirectedFrom === '/') { if (to.path === '/404' && to.redirectedFrom === '/') {
const project = getSessionStorage('project'); const project = getSessionStorage('project');
next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform'); next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform');
} else { } else {
next(); next();
} }
// }
} }
} }

View File

@ -80,7 +80,8 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index'); const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index'); const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/index'); const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail'); const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
const DesignPlatformHome = () => import('@/views/designPlatform/home'); const DesignPlatformHome = () => import('@/views/designPlatform/home');
@ -124,13 +125,6 @@ const Scene = () => import('@/views/drts/scene/index');
const QuestionCreatePage = () => import('@/views/competitionManage/bankList/question-create-page'); const QuestionCreatePage = () => import('@/views/competitionManage/bankList/question-create-page');
const QuestionUpdatePage = () => import('@/views/competitionManage/bankList/question-update-page'); const QuestionUpdatePage = () => import('@/views/competitionManage/bankList/question-update-page');
const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
const CompetitionManage = () => import('@/views/jsxt/competition/index');
const CompetitionHome = () => import('@/views/jsxt/competition/home');
const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index');
const RefereeResult = () => import('@/views/jsxt/competition/theory/result');
const JsxtExamResult = () => import('@/views/jsxt/competition/result');
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
const Approval = () => import('@/views/approval/index'); const Approval = () => import('@/views/approval/index');
const CompanyManage = () => import('@/views/system/companyManage/index'); const CompanyManage = () => import('@/views/system/companyManage/index');
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index'); const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
@ -211,6 +205,11 @@ export const constantRoutes = [
component: Jlmap3dAssetManager, component: Jlmap3dAssetManager,
hidden: true hidden: true
}, },
{ // 线信息
path: '/AUSline',
component: PlanMonitorEditAUSLine,
hidden: true
},
{ // 运行图编辑 { // 运行图编辑
path: '/AUStool', path: '/AUStool',
component: PlanMonitorEditAUSTool, component: PlanMonitorEditAUSTool,
@ -1078,59 +1077,6 @@ export const projectRoute = {
} }
] ]
}; };
// 竞赛系统
export const JSXT = [
{
path: '/jsxt',
redirect: '/jsxt/home',
component: Layout,
meta: {
roles: [user, admin, userTrainingPlatform]
},
hidden: true,
children: [
{
path: '',
redirect: '/jsxt/home',
component: CompetitionManage,
meta: {
},
children: [
{
path: 'home',
component: CompetitionHome,
hidden: true
},
// {
// path: 'theory/:id',
// component: theoryManage,
// hidden: true
// },
{
path: 'examDetail',
component: CompetitionDetail,
hidden: true
},
{ // 考试结果
path: 'result',
component: JsxtExamResult,
hidden: true
}
]
}
]
},
{
path: '/jsxt/theory/detail',
component: Refereedetail,
hidden: true
},
{
path: '/jsxt/theory/result', // 考试结果页面
component: RefereeResult,
hidden: true
}
];
const createRouter = () => new Router({ const createRouter = () => new Router({
base: '/cbtc/', base: '/cbtc/',
mode: 'history', // require service support mode: 'history', // require service support

View File

@ -95,9 +95,9 @@ export default {
{label: '司机', value: 'DRIVER', enLabel: 'Driver '}, {label: '司机', value: 'DRIVER', enLabel: 'Driver '},
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '}, {label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '},
{label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '}, {label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '},
{label: '电调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'}, {label: '调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent_department'} {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'}
], ],
SimulationType: [ SimulationType: [

View File

@ -145,7 +145,9 @@ export default {
/** 详情 */ /** 详情 */
CMD_SECTION_DETAILS: {value: 'Section_Details', label: '属性'}, CMD_SECTION_DETAILS: {value: 'Section_Details', label: '属性'},
/** 新建计划列车 */ /** 新建计划列车 */
CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'} CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'},
/** 加载备用车 */
CMD_TRAIN_LOAD_SPARE_TRAIN: {value: 'Train_Load_Spare_Train', label: '加载备用车'}
}, },
// 站台 // 站台

View File

@ -25,6 +25,13 @@ class CommandHandle {
simulationRole: 'Center', simulationRole: 'Center',
controlMode: ['OperateCenterControl'], controlMode: ['OperateCenterControl'],
conditionList: [] conditionList: []
},
Train_Load_Spare_Train:{
operate: 'Train_Load_Spare_Train',
paramList:[{name: 'groupNumber'}, {name: 'sectionCode'}, {name: 'right'}],
simulationRole: 'Center',
controlMode: ['OperateCenterControl'],
conditionList: []
} }
} }
}; };

View File

@ -99,18 +99,12 @@ class Handler {
if (operation.cmdType && valid) { if (operation.cmdType && valid) {
const command = this.getCommand(operation); const command = this.getCommand(operation);
if (command) { if (command) {
// 判断当前是否是剧本 添加动作指令操作
// if (store.state.scriptRecord.isScriptCommand && store.state.scriptRecord.bgSet ) {
// store.dispatch('scriptRecord/updateScriptCommand', {operationId:command.id, cmdType:operation.cmdType, param:command.get()});
// resolve(rtn);
// } else {
CommandHandler.execute(command.id, command.get()).then(response => { CommandHandler.execute(command.id, command.get()).then(response => {
rtn.response = response; rtn.response = response;
resolve(rtn); resolve(rtn);
}).catch(error => { }).catch(error => {
reject(error); reject(error);
}); });
// }
} else { } else {
rtn.response = '获取指令失败,暂无指令或参数传值不正确,请检查指令字典'; rtn.response = '获取指令失败,暂无指令或参数传值不正确,请检查指令字典';
reject(rtn); reject(rtn);

View File

@ -64,7 +64,6 @@ class MenuContextHandler {
const selected = this.getCurrentStateObject(); const selected = this.getCurrentStateObject();
let menu = []; let menu = [];
const control = this.getStationControl(selected); const control = this.getStationControl(selected);
// (!store.state.scriptRecord.bgSet || store.state.scriptRecord.isScriptCommand)
if (control && !store.state.scriptRecord.audioPlay) { if (control && !store.state.scriptRecord.audioPlay) {
if (this.getPrdType() != '' && this.getPrdType() != null) { if (this.getPrdType() != '' && this.getPrdType() != null) {
const type = State2SimulationMap[this.getPrdType()]; const type = State2SimulationMap[this.getPrdType()];

View File

@ -1464,6 +1464,12 @@ export const OperationEvent = {
operation: '414', operation: '414',
domId: '_Tips-Section-Confirm-Limit-Menu' domId: '_Tips-Section-Confirm-Limit-Menu'
} }
},
loadSpareTrain: {
menu: {
operation: '415',
domId: '_Tips-Section-Load-Spare-Train'
}
} }
}, },

View File

@ -11,8 +11,7 @@ const config = {
canvasSizeCount: 0, // 地图canvas 大小变更标识 canvasSizeCount: 0, // 地图canvas 大小变更标识
canvasId: '', // 地图canvas容器dom id canvasId: '', // 地图canvas容器dom id
canvasOffset: {}, // canvas dom 偏移 canvasOffset: {}, // canvas dom 偏移
canvasOffsetCount: 0, // 地图canvas 偏移变更标识 canvasOffsetCount: 0 // 地图canvas 偏移变更标识
switchMap: 'old' // 新旧版本地图开关
}, },
getters: { getters: {
@ -43,9 +42,6 @@ const config = {
setCanvasOffset: (state, offset) => { setCanvasOffset: (state, offset) => {
state.canvasOffset = offset; state.canvasOffset = offset;
}, },
changeSwitchMap: (state, swtichMap) => {
state.switchMap = swtichMap;
},
setMaskOpen: (state, flag) => { setMaskOpen: (state, flag) => {
state.maskOpen = flag; state.maskOpen = flag;
} }
@ -78,9 +74,6 @@ const config = {
state.canvasOffsetCount += 1; state.canvasOffsetCount += 1;
} }
}, },
changeSwitchMap: ({ commit, state}, switchMap) => {
commit('changeSwitchMap', switchMap);
},
setMaskOpen: ({ commit }, flag) => { setMaskOpen: ({ commit }, flag) => {
commit('setMaskOpen', flag); commit('setMaskOpen', flag);
} }

View File

@ -9,7 +9,7 @@ const exam = {
usedTime: 0, // 考试当前所用时间 usedTime: 0, // 考试当前所用时间
totalTime: 0, // 考试总时间 totalTime: 0, // 考试总时间
timeInterval: null, // 计时器 timeInterval: null, // 计时器
suspend: false, // 暂停 // suspend: false, // 暂停
ruleList: [], // 考试规则列表 ruleList: [], // 考试规则列表
courseDetail: {}, // 课程详情 courseDetail: {}, // 课程详情
courseList: [] // 课程列表 courseList: [] // 课程列表
@ -23,18 +23,18 @@ const exam = {
}, },
totalTime: (state) => { totalTime: (state) => {
return state.totalTime; return state.totalTime;
},
suspend: (state) => {
return state.suspend;
} }
// suspend: (state) => {
// return state.suspend;
// }
}, },
mutations: { mutations: {
setStarted: (state, started) => { setStarted: (state, started) => {
state.started = started; state.started = started;
}, },
setSuspend: (state, suspend) => { // setSuspend: (state, suspend) => {
state.suspend = suspend; // state.suspend = suspend;
}, // },
setUsedTime: (state, usedTime) => { setUsedTime: (state, usedTime) => {
state.usedTime = usedTime; state.usedTime = usedTime;
}, },
@ -74,15 +74,9 @@ const exam = {
actions: { actions: {
start({ commit }) { start({ commit }) {
commit('setStarted', true); commit('setStarted', true);
// commit('setSuspend', false);
// commit('setUsedTime', 0);
// commit('countUsedTime');
}, },
over({ commit }) { over({ commit }) {
commit('setStarted', false); commit('setStarted', false);
// commit('setSuspend', true);
// commit('setUsedTime', 0);
// commit('stopCountTime');
}, },
isOver() { isOver() {
const trainingList = store.getters['trainingList/trainingList']; const trainingList = store.getters['trainingList/trainingList'];
@ -94,9 +88,9 @@ const exam = {
return true; return true;
} }
}, },
setSuspend({ commit }, suspend) { // setSuspend({ commit }, suspend) {
commit('setSuspend', suspend); // commit('setSuspend', suspend);
}, // },
setUsedTime({ commit }, usedTime) { setUsedTime({ commit }, usedTime) {
commit('setUsedTime', usedTime || 0); commit('setUsedTime', usedTime || 0);
}, },

View File

@ -8,34 +8,31 @@ const ibp = {
state: { state: {
ibp: null, // 数据 ibp: null, // 数据
ibpDevice: {}, // 解析后的地图数据
ibpList: {}, // 数据列表
ibpIdList: {}, // 数据列表(以id为标识)
updateDeviceData: {}, // 修改的数据 updateDeviceData: {}, // 修改的数据
rightClickCount: 0, // 右键点击设备 rightClickCount: 0, // 右键点击设备
ibpBgDevice: {} // ibp背景设备 ibpBgDevice: {} // ibp背景设备
}, },
getters: { getters: {
ibpList: (state) => { // ibpList: (state) => {
return state.ibpList; // return state.ibpList;
}, // },
ibp: (state) => { ibp: (state) => {
return state.ibp; return state.ibp;
}, },
version: (state) => { // version: (state) => {
if (state.ibp) { // if (state.ibp) {
return state.ibp.version; // return state.ibp.version;
} else { // } else {
return null; // return null;
} // }
}, // },
updateDeviceData: (state) => { updateDeviceData: (state) => {
return state.updateDeviceData; return state.updateDeviceData;
},
ibpBgDevice: (state) => {
return state.ibpBgDevice;
} }
// ibpBgDevice: (state) => {
// return state.ibpBgDevice;
// }
}, },
mutations: { mutations: {

View File

@ -7,9 +7,6 @@ const iscs = {
state: { state: {
iscs: null, // 数据 iscs: null, // 数据
iscsDevice: {}, // 解析后的地图数据
iscsList: {}, // 数据列表
iscsIdList: {}, // 数据列表(以id为标识)
updateDeviceData: {}, // 修改的数据 updateDeviceData: {}, // 修改的数据
rightClickCount: 0, // 右键点击设备 rightClickCount: 0, // 右键点击设备
selected: '', // 左键选中设备 selected: '', // 左键选中设备
@ -25,19 +22,19 @@ const iscs = {
alarmList: (state) => { alarmList: (state) => {
return state.alarmList; return state.alarmList;
}, },
iscsList: (state) => { // iscsList: (state) => {
return state.iscsList; // return state.iscsList;
}, // },
iscs: (state) => { iscs: (state) => {
return state.iscs; return state.iscs;
}, },
version: (state) => { // version: (state) => {
if (state.iscs) { // if (state.iscs) {
return state.iscs.version; // return state.iscs.version;
} else { // } else {
return null; // return null;
} // }
}, // },
updateDeviceData: (state) => { updateDeviceData: (state) => {
return state.updateDeviceData; return state.updateDeviceData;
}, },
@ -47,107 +44,107 @@ const iscs = {
} else { } else {
return []; return [];
} }
},
vidiconList: (state) => {
if (state.iscs) {
return state.iscs.vidiconList;
} else {
return [];
}
},
vidiconCloudList: (state) => {
if (state.iscs.vidiconCloudList) {
return state.iscs.vidiconCloudList;
} else {
return [];
}
},
frozenPumpList:(state)=>{
if (state.iscs.frozenPumpList) {
return state.iscs.frozenPumpList;
} else {
return [];
}
},
airConditionerList:(state)=>{
if (state.iscs.airConditionerList) {
return state.iscs.airConditionerList;
} else {
return [];
}
},
tunnelFanList:(state)=>{
if (state.iscs.tunnelFanList) {
return state.iscs.tunnelFanList;
} else {
return [];
}
},
orbitalVentilatorList:(state)=>{
if (state.iscs.orbitalVentilatorList) {
return state.iscs.orbitalVentilatorList;
} else {
return [];
}
},
smookProofFdList:(state)=>{
if (state.iscs.smookProofFdList) {
return state.iscs.smookProofFdList;
} else {
return [];
}
},
chillerList:(state)=>{
if (state.iscs.chillerList) {
return state.iscs.chillerList;
} else {
return [];
}
},
coolTowerList:(state)=>{
if (state.iscs.coolTowerList) {
return state.iscs.coolTowerList;
} else {
return [];
}
},
fireDamperList:(state)=>{
if (state.iscs.fireDamperList) {
return state.iscs.fireDamperList;
} else {
return [];
}
},
jetFanList:(state)=>{
if (state.iscs.jetFanList) {
return state.iscs.jetFanList;
} else {
return [];
}
},
ventilatorList:(state)=>{
if (state.iscs.ventilatorList) {
return state.iscs.ventilatorList;
} else {
return [];
}
},
arcStatusList:(state)=>{
if (state.iscs.arcStatusList) {
return state.iscs.arcStatusList;
} else {
return [];
}
},
selected: (state) => {
return state.selected;
},
selectedCount: (state) => {
return state.selectedCount;
},
getDeviceByCode: (state) => (code) => {
return state.iscsDevice[code];
} }
// vidiconList: (state) => {
// if (state.iscs) {
// return state.iscs.vidiconList;
// } else {
// return [];
// }
// },
// vidiconCloudList: (state) => {
// if (state.iscs.vidiconCloudList) {
// return state.iscs.vidiconCloudList;
// } else {
// return [];
// }
// },
// frozenPumpList:(state)=>{
// if (state.iscs.frozenPumpList) {
// return state.iscs.frozenPumpList;
// } else {
// return [];
// }
// },
// airConditionerList:(state)=>{
// if (state.iscs.airConditionerList) {
// return state.iscs.airConditionerList;
// } else {
// return [];
// }
// },
// tunnelFanList:(state)=>{
// if (state.iscs.tunnelFanList) {
// return state.iscs.tunnelFanList;
// } else {
// return [];
// }
// },
// orbitalVentilatorList:(state)=>{
// if (state.iscs.orbitalVentilatorList) {
// return state.iscs.orbitalVentilatorList;
// } else {
// return [];
// }
// },
// smookProofFdList:(state)=>{
// if (state.iscs.smookProofFdList) {
// return state.iscs.smookProofFdList;
// } else {
// return [];
// }
// },
// chillerList:(state)=>{
// if (state.iscs.chillerList) {
// return state.iscs.chillerList;
// } else {
// return [];
// }
// },
// coolTowerList:(state)=>{
// if (state.iscs.coolTowerList) {
// return state.iscs.coolTowerList;
// } else {
// return [];
// }
// },
// fireDamperList:(state)=>{
// if (state.iscs.fireDamperList) {
// return state.iscs.fireDamperList;
// } else {
// return [];
// }
// },
// jetFanList:(state)=>{
// if (state.iscs.jetFanList) {
// return state.iscs.jetFanList;
// } else {
// return [];
// }
// },
// ventilatorList:(state)=>{
// if (state.iscs.ventilatorList) {
// return state.iscs.ventilatorList;
// } else {
// return [];
// }
// },
// arcStatusList:(state)=>{
// if (state.iscs.arcStatusList) {
// return state.iscs.arcStatusList;
// } else {
// return [];
// }
// },
// selected: (state) => {
// return state.selected;
// },
// selectedCount: (state) => {
// return state.selectedCount;
// },
// getDeviceByCode: (state) => (code) => {
// return state.iscsDevice[code];
// }
}, },
mutations: { mutations: {

View File

@ -1,5 +1,4 @@
import deviceType from '@/jmapNew/constant/deviceType'; import deviceType from '@/jmapNew/constant/deviceType';
// import { parser, updateMapData } from '@/jmap/utils/parser';
import { parser, updateMapData } from '@/jmapNew/utils/parser'; import { parser, updateMapData } from '@/jmapNew/utils/parser';
import Vue from 'vue'; import Vue from 'vue';
import { deepAssign } from '@/utils/index'; import { deepAssign } from '@/utils/index';
@ -237,15 +236,15 @@ const map = {
holdStatus: false, // 是否有扣车状态 holdStatus: false, // 是否有扣车状态
jumpStandList: [], // 跳停站台列表 jumpStandList: [], // 跳停站台列表
jumpStatus: false, // 是否有跳停状态 jumpStatus: false, // 是否有跳停状态
selectDeviceFlag: false, // 设备管理激活判断 // selectDeviceFlag: false, // 设备管理激活判断
keyboardEnterCount: 0, // 键盘enter键触发 keyboardEnterCount: 0, // 键盘enter键触发
controlTransfer:[] // 控制权转移消息 controlTransfer:[] // 控制权转移消息
}, },
getters: { getters: {
mapList: (state) => { // mapList: (state) => {
return state.mapList; // return state.mapList;
}, // },
trainWindowSectionCode: (state) => { trainWindowSectionCode: (state) => {
return state.trainWindowSectionCode; return state.trainWindowSectionCode;
}, },
@ -258,13 +257,13 @@ const map = {
routeData: (state) => { routeData: (state) => {
return state.routeData; return state.routeData;
}, },
routeStartSignalData: (state) => { // routeStartSignalData: (state) => {
if (state.map) { // if (state.map) {
return state.map.routeStartSignalData || {}; // return state.map.routeStartSignalData || {};
} else { // } else {
return {}; // return {};
} // }
}, // },
overlapData: (state) => { overlapData: (state) => {
return state.overlapData; return state.overlapData;
}, },
@ -274,12 +273,12 @@ const map = {
autoReentryList: (state) => { autoReentryList: (state) => {
return state.autoReentryList; return state.autoReentryList;
}, },
signalApproachSectionData: (state) => { // signalApproachSectionData: (state) => {
return state.signalApproachSectionData; // return state.signalApproachSectionData;
}, // },
signalApproachSectionList: (state) => { // signalApproachSectionList: (state) => {
return state.signalApproachSectionList; // return state.signalApproachSectionList;
}, // },
seclectDeviceList: (state) => { seclectDeviceList: (state) => {
return state.seclectDeviceList; return state.seclectDeviceList;
}, },
@ -318,20 +317,20 @@ const map = {
return null; return null;
} }
}, },
version: (state) => { // version: (state) => {
if (state.map) { // if (state.map) {
return state.version; // return state.version;
} else { // } else {
return null; // return null;
} // }
}, // },
linkList: (state) => { // linkList: (state) => {
if (state.map) { // if (state.map) {
return state.map.linkList; // return state.map.linkList;
} else { // } else {
return []; // return [];
} // }
}, // },
switchList: (state) => { switchList: (state) => {
if (state.map) { if (state.map) {
return state.map.switchList; return state.map.switchList;
@ -346,13 +345,13 @@ const map = {
return []; return [];
} }
}, },
buttonList: (state) => { // buttonList: (state) => {
if (state.map) { // if (state.map) {
return state.map.buttonList; // return state.map.buttonList;
} else { // } else {
return []; // return [];
} // }
}, // },
signalList: (state) => { signalList: (state) => {
if (state.map) { if (state.map) {
return state.map.signalList; return state.map.signalList;
@ -549,15 +548,15 @@ const map = {
return []; return [];
} }
}, },
trainDetails: (state) => { // trainDetails: (state) => {
return state.trainDetails; // return state.trainDetails;
}, // },
flankProtectList: (state) => { flankProtectList: (state) => {
return state.flankProtectList; return state.flankProtectList;
}, },
mapDevice: (state) => { // mapDevice: (state) => {
return state.mapDevice; // return state.mapDevice;
}, // },
getDeviceByCode: (state) => (code) => { getDeviceByCode: (state) => (code) => {
return state.mapDevice[code]; return state.mapDevice[code];
}, },
@ -596,21 +595,21 @@ const map = {
return device; return device;
}, },
// 查询所属车站关联的控制模式 // // 查询所属车站关联的控制模式
getStationControlByStationCode: (state) => (code) => { // getStationControlByStationCode: (state) => (code) => {
let device = null; // let device = null;
if (code && // if (code &&
state.map && // state.map &&
state.map.stationControlList && state.map.stationControlList.length) { // state.map.stationControlList && state.map.stationControlList.length) {
state.map.stationControlList.forEach(elem => { // state.map.stationControlList.forEach(elem => {
if (elem.stationCode == code) { // if (elem.stationCode == code) {
device = state.mapDevice[elem.code]; // device = state.mapDevice[elem.code];
} // }
}); // });
} // }
return device; // return device;
}, // },
// 查询所属车站的控制模式 // 查询所属车站的控制模式
getDeviceStationCodeByStationCode: (state) => (code) => { getDeviceStationCodeByStationCode: (state) => (code) => {
@ -654,6 +653,7 @@ const map = {
}, },
mutations: { mutations: {
// 设置地图数据
setMapData: (state, map) => { setMapData: (state, map) => {
if (map && map.skinVO) { if (map && map.skinVO) {
state.map = map; state.map = map;
@ -673,12 +673,15 @@ const map = {
state.mapDevice[elem.code] = deepAssign(state.mapDevice[elem.code] || {}, elem); state.mapDevice[elem.code] = deepAssign(state.mapDevice[elem.code] || {}, elem);
}); });
}, },
// 设置地图所属线路
setMapConfig: (state, config) => { setMapConfig: (state, config) => {
state.mapConfig = config; state.mapConfig = config;
}, },
// 获取包围框选中元素列表
setSeclectDeviceList: (state, list) => { setSeclectDeviceList: (state, list) => {
state.seclectDeviceList = list; state.seclectDeviceList = list;
}, },
// 设置缩放位置
setDataZoom: (state, dataZoom) => { setDataZoom: (state, dataZoom) => {
state.dataZoom = dataZoom; state.dataZoom = dataZoom;
}, },
@ -784,6 +787,7 @@ const map = {
setMousemove: (state) => { setMousemove: (state) => {
state.mousemove++; state.mousemove++;
}, },
// 设置进路数据
setRouteData: (state, routeDataList) => { setRouteData: (state, routeDataList) => {
state.routeData = {}; state.routeData = {};
state.routeStartSignalData = {}; state.routeStartSignalData = {};
@ -795,7 +799,7 @@ const map = {
state.routeStartSignalData[data.startSignalCode] = [data]; state.routeStartSignalData[data.startSignalCode] = [data];
} }
}); });
state.map.automaticRouteButtonList && state.map.automaticRouteButtonList.forEach(item => { state.map && state.map.automaticRouteButtonList && state.map.automaticRouteButtonList.forEach(item => {
state.routeData[item.automaticRouteCode].automaticRouteCode = item.code; state.routeData[item.automaticRouteCode].automaticRouteCode = item.code;
}); });
state.routeList = routeDataList; state.routeList = routeDataList;
@ -812,7 +816,7 @@ const map = {
autoReentryList.forEach(data => { autoReentryList.forEach(data => {
state.autoReentryData[data.code] = data; state.autoReentryData[data.code] = data;
}); });
state.map.cycleButtonList && state.map.cycleButtonList.forEach(item => { state.map && state.map.cycleButtonList && state.map.cycleButtonList.forEach(item => {
state.autoReentryData[item.cycleCode].cycleButtonCode = item.code; state.autoReentryData[item.cycleCode].cycleButtonCode = item.code;
}); });
state.autoReentryList = autoReentryList; state.autoReentryList = autoReentryList;
@ -830,11 +834,6 @@ const map = {
updateAutoReentryState: (state, status) => { updateAutoReentryState: (state, status) => {
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status); state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
}, },
// updateTrainState:(state, status) =>{
// if (state.map.trainList) {
// state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
// }
// },
updateStationStand: (state, status) => { updateStationStand: (state, status) => {
const holdIndex = state.holdStandList.indexOf(status.code); const holdIndex = state.holdStandList.indexOf(status.code);
const jumpIndex = state.jumpStandList.indexOf(status.code); const jumpIndex = state.jumpStandList.indexOf(status.code);
@ -870,6 +869,7 @@ const map = {
} }
}); });
}, },
// 更新激活的列车信息
updateActiveTrainList: (state, data)=>{ updateActiveTrainList: (state, data)=>{
let isExist = false; let isExist = false;
state.activeTrainList.forEach(elem => { state.activeTrainList.forEach(elem => {
@ -899,31 +899,12 @@ const map = {
}, },
actions: { actions: {
setMapData:({ commit }, mapData) => {
commit('setMapData', mapData);
},
mapClear:({ commit }) => { mapClear:({ commit }) => {
commit('mapClear'); commit('mapClear');
}, },
// 获取包围框选中元素列表
setSeclectDeviceList: ({ commit }, list) => {
commit('setSeclectDeviceList', list);
},
// 设置缩放位置
updateZoom: ({ commit }, dataZoom) => {
commit('setDataZoom', dataZoom);
},
setMapData: ({ commit }, map) => { // 设置地图数据
commit('setMapData', map);
},
updateMapDevice: ({ commit }, list) => {
commit('updateMapDevice', list);
},
setMapConfig: ({ commit }, config) => { // 设置地图所属线路
commit('setMapConfig', config);
},
setRouteData: ({ commit }, routeData) => { // 设置进路数据
commit('setRouteData', routeData);
},
setOverlapData: ({ commit }, overlapData) => { setOverlapData: ({ commit }, overlapData) => {
commit('setOverlapData', overlapData); commit('setOverlapData', overlapData);
commit('mapRender', overlapData); commit('mapRender', overlapData);
@ -940,9 +921,6 @@ const map = {
updateAutoReentryState: ({ commit }, status) => { updateAutoReentryState: ({ commit }, status) => {
commit('updateAutoReentryState', status); commit('updateAutoReentryState', status);
}, },
// updateTrainState:({ commit }, status) => {
// commit('updateTrainState', status);
// },
updateStationStand: ({ commit }, status) => { updateStationStand: ({ commit }, status) => {
commit('updateStationStand', status); commit('updateStationStand', status);
}, },
@ -970,11 +948,6 @@ const map = {
} }
}, },
// 更新激活的列车信息
updateActiveTrainList:({ commit }, train) => {
commit('updateActiveTrainList', train);
},
setMapDataIdList: ({ state }, data) => { setMapDataIdList: ({ state }, data) => {
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData; state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
}, },

View File

@ -7,9 +7,9 @@ const order = {
orderList: [] // 选中的商品列表, orderList: [] // 选中的商品列表,
}, },
getters: { getters: {
orderList: (state)=>{ // orderList: (state)=>{
return state.orderList; // return state.orderList;
} // }
}, },
mutations: { mutations: {
setOrderList: (state, orderList) => { setOrderList: (state, orderList) => {

View File

@ -11,7 +11,7 @@ const runPlan = {
selected: {}, // 选择的对象 selected: {}, // 选择的对象
refreshCount: 0, // 刷新页面重新加载 refreshCount: 0, // 刷新页面重新加载
width: 800, // 运行图canvas 容器 宽度 width: 800, // 运行图canvas 容器 宽度
height: 600, // 运行图canvas 容器 高度 height: 600 // 运行图canvas 容器 高度
}, },
getters: { getters: {
stations: (state) => { stations: (state) => {

View File

@ -6,15 +6,11 @@ const scriptRecord = {
state: { state: {
mapLocation: {}, // 地图定位, mapLocation: {}, // 地图定位,
simulationPause: true, // 剧本 暂停判断 simulationPause: true, // 剧本 暂停判断
scriptId: '',
bgSet: false, bgSet: false,
isScriptCommand:false, // 当前是否为添加剧本动作指令状态
scriptCommand:{}, // 剧本动作添加的指令
updateRoleStatus:0, // 剧本更新角色标志 updateRoleStatus:0, // 剧本更新角色标志
updateRoleId:'', // 剧本更新角色id updateRoleId:'', // 剧本更新角色id
updateCoversitionStatus:0, // 剧本仿真更新会话信息 updateCoversitionStatus:0, // 剧本仿真更新会话信息
userRole:null, // 剧本更新的角色 userRole:null, // 剧本更新的角色
operationalItemVOs:{}, // 剧本场景的运营统计数据缓存
audioPlay:false // 语音是否自动播放 audioPlay:false // 语音是否自动播放
}, },
getters: { getters: {
@ -24,18 +20,9 @@ const scriptRecord = {
simulationPause: (state)=>{ simulationPause: (state)=>{
return state.simulationPause; return state.simulationPause;
}, },
scriptId: (state)=>{
return state.scriptId;
},
bgSet: (state)=>{ bgSet: (state)=>{
return state.bgSet; return state.bgSet;
}, },
isScriptCommand:(state)=>{
return state.isScriptCommand;
},
scriptCommand:(state)=>{
return state.scriptCommand;
},
updateRoleStatus:(state)=>{ updateRoleStatus:(state)=>{
return state.updateRoleStatus; return state.updateRoleStatus;
} }
@ -47,18 +34,9 @@ const scriptRecord = {
setSimulationPause: (state, simulationPause) => { setSimulationPause: (state, simulationPause) => {
state.simulationPause = simulationPause; state.simulationPause = simulationPause;
}, },
setscriptId: (state, scriptId) => {
state.scriptId = scriptId;
},
setBgSet: (state, bgSet) => { setBgSet: (state, bgSet) => {
state.bgSet = bgSet; state.bgSet = bgSet;
}, },
setIsScriptCommand:(state, isScriptCommand) => {
state.isScriptCommand = isScriptCommand;
},
setScriptCommand:(state, scriptCommand) => {
state.scriptCommand = scriptCommand;
},
updateRole:(state, userRole) => { updateRole:(state, userRole) => {
if (userRole) { if (userRole) {
const userRoleParam = userRole.split(':'); const userRoleParam = userRole.split(':');
@ -75,9 +53,6 @@ const scriptRecord = {
updateCoversitionInfo:(state) => { updateCoversitionInfo:(state) => {
state.updateCoversitionStatus += 1; state.updateCoversitionStatus += 1;
}, },
updateOperationalItemVOs:(state, operationalItemVOs) => {
state.operationalItemVOs = operationalItemVOs;
},
setAudioPlay:(state, audioPlay) => { setAudioPlay:(state, audioPlay) => {
state.audioPlay = audioPlay; state.audioPlay = audioPlay;
} }
@ -92,27 +67,15 @@ const scriptRecord = {
updateSimulationPause: ({ commit }, simulationPause) => { updateSimulationPause: ({ commit }, simulationPause) => {
commit('setSimulationPause', simulationPause); commit('setSimulationPause', simulationPause);
}, },
updateScriptId: ({ commit }, scriptId) => {
commit('setscriptId', scriptId);
},
updateBgSet: ({ commit }, bgSet) => { updateBgSet: ({ commit }, bgSet) => {
commit('setBgSet', bgSet); commit('setBgSet', bgSet);
}, },
updateIsScriptCommand:({ commit }, isScriptCommand) => {
commit('setIsScriptCommand', isScriptCommand);
},
updateScriptCommand:({ commit }, scriptCommand) => {
commit('setScriptCommand', scriptCommand);
},
updateRole:({ commit }, userRole) => { updateRole:({ commit }, userRole) => {
commit('updateRole', userRole); commit('updateRole', userRole);
}, },
updateCoversitionInfo:({ commit }) => { updateCoversitionInfo:({ commit }) => {
commit('updateCoversitionInfo'); commit('updateCoversitionInfo');
}, },
updateOperationalItemVOs:({ commit }, operationalItemVOs) => {
commit('updateOperationalItemVOs', operationalItemVOs);
},
updateAudioPlay:({ commit }, audioPlay) => { updateAudioPlay:({ commit }, audioPlay) => {
commit('setAudioPlay', audioPlay); commit('setAudioPlay', audioPlay);
} }

View File

@ -138,6 +138,9 @@ function handle(state, data) {
case 'Simulation_Competition_Practice_Finish': case 'Simulation_Competition_Practice_Finish':
state.competitionPracticeFinish++; state.competitionPracticeFinish++;
break; break;
case 'Simulation_Alarm':
state.simulationAlarmInfo = msg;
break;
} }
} }
@ -240,7 +243,6 @@ const socket = {
simulationStart: '', // 仿真-开始消息 simulationStart: '', // 仿真-开始消息
simulationOver:0, // 退出仿真推送消息 simulationOver:0, // 退出仿真推送消息
simulationReset: 0, // 仿真-异常消息 simulationReset: 0, // 仿真-异常消息
// coversitionList:{}, // 历史仿真-用户消息列表
inviteSimulationConversition: {}, // 仿真会话邀请消息 inviteSimulationConversition: {}, // 仿真会话邀请消息
acceptConversionInvite:{}, // 仿真会话成员接收邀请 acceptConversionInvite:{}, // 仿真会话成员接收邀请
createConversition:{}, // 仿真创建会话 createConversition:{}, // 仿真创建会话
@ -264,7 +266,6 @@ const socket = {
roomIsSubscribe:false, // 房间是否订阅 roomIsSubscribe:false, // 房间是否订阅
assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅 assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅
isInRoom:false, // 是否己经进入房间
tipOperateCount: 0, // 任务结束提示消息 tipOperateCount: 0, // 任务结束提示消息
realDeviceInfo: 0, // 真实设备信息 realDeviceInfo: 0, // 真实设备信息
@ -274,7 +275,8 @@ const socket = {
roomInvite: {}, roomInvite: {},
simulationTimeSync: '', // 仿真时间 simulationTimeSync: '', // 仿真时间
simulationIbpStatus: null, simulationIbpStatus: null,
competitionPracticeFinish:0 // 竞赛场景结束标识 competitionPracticeFinish:0, // 竞赛场景结束标识
simulationAlarmInfo: []// 仿真报警信息
}, },
getters: { getters: {
}, },
@ -330,9 +332,6 @@ const socket = {
}, },
setAssistantSubscribe:(state, assistantIsSubscribe)=>{ setAssistantSubscribe:(state, assistantIsSubscribe)=>{
state.assistantIsSubscribe = assistantIsSubscribe; state.assistantIsSubscribe = assistantIsSubscribe;
},
setInRoom:(state, isInRoom)=>{
state.isInRoom = isInRoom;
} }
}, },
@ -394,9 +393,6 @@ const socket = {
}, },
setAssistantSubscribe:({ commit }, msg) => { setAssistantSubscribe:({ commit }, msg) => {
commit('setAssistantSubscribe', msg); commit('setAssistantSubscribe', msg);
},
setInRoom:({ commit }, msg) => {
commit('setInRoom', msg);
} }
} }
}; };

View File

@ -35,7 +35,6 @@ const training = {
prdType: '', // 产品类型 prdType: '', // 产品类型
roles: '', // 角色权限类型 roles: '', // 角色权限类型
roleDeviceCode:'', // 当前角色对应的deviceCode roleDeviceCode:'', // 当前角色对应的deviceCode
group: '', // 设置全局 group
centerStationCode:'', // 当前居中的集中站code centerStationCode:'', // 当前居中的集中站code
memberList: [], // 综合仿真成员列表 memberList: [], // 综合仿真成员列表
memberData: {}, // 综合仿真成员列表 memberData: {}, // 综合仿真成员列表
@ -54,9 +53,6 @@ const training = {
order: (state) => { order: (state) => {
return state.order; return state.order;
}, },
offsetStationCode: (state) => {
return state.offsetStationCode;
},
basicInfo: (state) => { basicInfo: (state) => {
return state.basicInfo; return state.basicInfo;
}, },
@ -75,24 +71,9 @@ const training = {
usedTime: (state) => { usedTime: (state) => {
return state.usedTime; return state.usedTime;
}, },
tipEvent: (state) => {
return state.tipEvent;
},
initTime: (state) => {
return state.initTime;
},
prdType: (state) => {
return state.prdType;
},
roles: (state) => {
return state.roles;
},
memberList: (state) => { memberList: (state) => {
return state.memberList; return state.memberList;
}, },
simulationUserList: (state) => {
return state.simulationUserList;
},
// 视图中的列车列表 // 视图中的列车列表
viewTrainList: (state) => () =>{ viewTrainList: (state) => () =>{
const trainList = []; const trainList = [];
@ -104,21 +85,6 @@ const training = {
}); });
return trainList; return trainList;
},
commonMenuStep: (state) => {
return state.commonMenuStep;
},
scriptQuitCount: (state) => {
return state.scriptQuitCount;
},
scriptOperationType: (state) => {
return state.scriptOperationType;
},
triggerFaultCount: (state) => {
return state.triggerFaultCount;
},
triggerFaultDevice: (state) => {
return state.triggerFaultDevice;
} }
}, },
@ -225,9 +191,6 @@ const training = {
setRoles: (state, roles) => { setRoles: (state, roles) => {
state.roles = roles; state.roles = roles;
}, },
setGroup: (state, group) => {
state.group = group;
},
notifyGetCommandDefinition: (state, lineCode) => { notifyGetCommandDefinition: (state, lineCode) => {
Handler.notify(lineCode); Handler.notify(lineCode);
}, },
@ -676,13 +639,6 @@ const training = {
commit('tipEventIncrement'); commit('tipEventIncrement');
}, },
/**
* 设置WebSocket链接状态
*/
setConnected: ({ commit }, isConnected) => {
commit('setConnected', isConnected);
},
/** /**
* 设置系统时间 * 设置系统时间
*/ */
@ -704,13 +660,6 @@ const training = {
commit('setRoles', roles); commit('setRoles', roles);
}, },
/**
* 设置仿真组
*/
setGroup: ({ commit }, group) => {
commit('setGroup', group);
},
/** 设置当前居中的集中站code */ /** 设置当前居中的集中站code */
setCenterStationCode:({ commit }, centerStationCode) => { setCenterStationCode:({ commit }, centerStationCode) => {
commit('setCenterStationCode', centerStationCode); commit('setCenterStationCode', centerStationCode);

View File

@ -8,23 +8,23 @@ const trainingList = {
getters: { getters: {
trainingList: (state) => { trainingList: (state) => {
return state.trainingList; return state.trainingList;
},
prevTraining: (state) => () => {
if (state.trainingList && state.trainingList.length > 0) {
state.index = state.index - 1;
if (state.index >= 0) {
return state.trainingList[state.index];
}
}
},
nextTraining: (state) => () => {
if (state.trainingList && state.trainingList.length > 0) {
state.index = state.index + 1;
if (state.index < state.trainingList.length) {
return state.trainingList[state.index];
}
}
} }
// prevTraining: (state) => () => {
// if (state.trainingList && state.trainingList.length > 0) {
// state.index = state.index - 1;
// if (state.index >= 0) {
// return state.trainingList[state.index];
// }
// }
// },
// nextTraining: (state) => () => {
// if (state.trainingList && state.trainingList.length > 0) {
// state.index = state.index + 1;
// if (state.index < state.trainingList.length) {
// return state.trainingList[state.index];
// }
// }
// }
}, },
mutations: { mutations: {
setIndex: (state, index) => { setIndex: (state, index) => {
@ -39,20 +39,6 @@ const trainingList = {
} }
}, },
actions: { actions: {
setIndex({ commit }, index) {
commit('setIndex', index);
},
setIndexByTrainingObj({ commit, state }, trainingId) {
let index = 0;
if (state.trainingList && state.trainingList.length) {
state.trainingList.forEach((elem, i) => {
if (elem.id === trainingId) {
index = i;
}
});
}
commit('setIndex', index);
},
setTrainingList({ commit }, trainingList) { setTrainingList({ commit }, trainingList) {
commit('setTrainingList', trainingList); commit('setTrainingList', trainingList);
}, },

View File

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

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