688 lines
16 KiB
JavaScript
688 lines
16 KiB
JavaScript
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 runDiagramStart(params, group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/start`,
|
|
method: 'put',
|
|
params: params
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 仿真系统结束计划行车
|
|
*/
|
|
export function runDiagramOver(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/over`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 退出仿真系统
|
|
*/
|
|
export function runDiagramQuit(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/quit`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 获取仿真系统时间*/
|
|
export function runDiagramGetTime(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/systemTime`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
// 查看是否开始按计划行车
|
|
export function runDiagramIsStart(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/isRunPlanStart`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 仿真系统CBTC
|
|
* @param {*} mapId
|
|
*/
|
|
export function simulationNotify({ mapId, prdType }) {
|
|
return request({
|
|
url: `/api/simulation/${mapId}/${prdType}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 实训系统CBTC
|
|
* @param {*} data
|
|
*/
|
|
export function trainingNotify({ trainingId }) {
|
|
return request({
|
|
url: `/api/simulation/training/${trainingId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 实训系统(新版地图) */
|
|
export function trainingNotifyNew({ trainingId }) {
|
|
return request({
|
|
url: `/simulation/training/${trainingId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/**
|
|
* 考试系统CBTC
|
|
* @param {*} data
|
|
*/
|
|
export function examNotify({ examId }) {
|
|
return request({
|
|
url: `/api/simulation/exam/${examId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 考试系统(新版地图)*/
|
|
export function examNotifyNew({ examId }) {
|
|
return request({
|
|
url: `/simulation/exam/${examId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 获取用户实训列表*/
|
|
export function getSimulationList(data) {
|
|
return request({
|
|
url: `/api/simulation/stats`,
|
|
method: 'get',
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/** 添加用户仿真数据*/
|
|
export function postSimulationStats(data) {
|
|
return request({
|
|
url: `/api/simulation/stats`,
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/** 更新用户仿真数据*/
|
|
export function putSimulationStats(data) {
|
|
return request({
|
|
url: `/api/simulation/${data.id}/stats`,
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/** 删除用户仿真数据*/
|
|
export function deleteSimulationStats(statsId) {
|
|
return request({
|
|
url: `/api/simulation/${statsId}`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 获取用户鼠标左键选中的设备信息*/
|
|
export function letfMouseSelectDevice(deviceCode, group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/device/${deviceCode}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 获取每日运行图*/
|
|
export function getEveryDayRunPlanData(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/runPlan`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 录制脚本仿真*/
|
|
export function scriptRecordNotify(scriptId) {
|
|
return request({
|
|
url: `/api/simulation/scriptWrite/${scriptId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 录制脚本仿真(新版)*/
|
|
export function scriptRecordNotifyNew(scriptId) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${scriptId}/scriptWrite`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 保存剧本背景*/
|
|
export function saveScriptScenes(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/scenes`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 保存剧本背景(新版)*/
|
|
export function saveScriptScenesNew(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/saveScenes`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 剧本预览再次加载剧本*/
|
|
export function scriptRePreview(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/rePreview`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 保存录制任务数据*/
|
|
export function saveScriptData(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/saveData`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 保存录制任务数据(新版)*/
|
|
export function saveScriptDataNew(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/saveData`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 更新任务地图定位信息*/
|
|
export function updateMapLocation(group, data) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/mapLocation`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 更新任务地图定位信息(新版)*/
|
|
export function updateMapLocationNew(group, data) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/mapLocation`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 获取剧本编制的所有成员角色*/
|
|
export function getScriptMemberData(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/members`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 获取剧本编制的所有成员角色(新版地图)*/
|
|
export function getScriptMemberDataNew(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/allMember`,
|
|
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 scriptExecuteNew(group) {
|
|
return request({
|
|
url: `/api/scriptExecute/${group}`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 选择剧本演出成员角色 (新版地图)*/
|
|
export function selectScriptMembersNew(group, data) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/choosePlayers`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 修改剧本演出成员性别 */
|
|
export function modifyScriptMemberSex(group, playerId, data) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 清除仿真剧本数据*/
|
|
export function dumpScriptData(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/saveData`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 清除仿真剧本数据(新版)*/
|
|
export function dumpScriptDataNew(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/reset`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 查询录制剧本步骤*/
|
|
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 getExistingSimulation(params) {
|
|
return request({
|
|
url: `/manage/simulation/exists`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 删除存在的仿真 */
|
|
export function deleteExistingSimulation(group) {
|
|
return request({
|
|
url: `/manage/simulation/${group}`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
/** 根据设备类型获取设备列表 */
|
|
export function getDeviceCodeByDeviceType(group, params) {
|
|
return request({
|
|
url: `/api/simulation/${group}/deviceType/devices`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 获取任务录制的数据 */
|
|
export function getScriptRecord(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 获取任务录制的所有动作(新版)*/
|
|
export function getScriptAllAction(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/allAction`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 加载任务*/
|
|
export function loadQuest(questId, memberId, group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
|
|
/** 加载剧本 */
|
|
export function loadScript(scriptId, memberId, group) {
|
|
return request({
|
|
url: `api/simulation/${group}/script/${scriptId}?memberId=${memberId}`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
|
|
/** 加载剧本(新版) */
|
|
export function loadScriptNew(scriptId, memberId, group) {
|
|
return request({
|
|
url: `/simulation/${group}/script/${scriptId}?memberId=${memberId}`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 退出剧本*/
|
|
export function quitScript(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/script`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 退出剧本(新版)*/
|
|
export function quitScriptNew(group) {
|
|
return request({
|
|
url: `/simulation/${group}/exitScript`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 退出任务*/
|
|
export function quitQuest(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/quest`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
/** 根据group获取仿真对象*/
|
|
export function getSimulationInfo(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 获取可用的设备指令*/
|
|
export function getAvailableDeviceCommand(params) {
|
|
return request({
|
|
url: `/api/simulation/deviceCommand/available`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 保存/修改任务剧本*/
|
|
export function saveTaskScript(group, data) {
|
|
return request({
|
|
url: `/api/simulation/${group}/questRecord/script`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 暂停剧本编制的仿真 */
|
|
export function scriptPause(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/pause`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
|
|
/** 暂停仿真 */
|
|
export function simulationPause(group) {
|
|
return request({
|
|
url: `/simulation/${group}/pause`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 恢复仿真运行并执行刚编辑的剧本动作 */
|
|
export function executeScript(group) {
|
|
return request({
|
|
url: `/api/simulation/${group}/scriptWrite/execute`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
|
|
/** 恢复仿真运行并执行刚编辑的剧本动作(新版) */
|
|
export function executeScriptNew(group) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${group}/recoverAndExecute`,
|
|
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盘事件 */
|
|
export function handlerIbpEvent(group, data) {
|
|
return request({
|
|
url: `/api/simulation/${group}/ibp/event`,
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/** 预览脚本仿真*/
|
|
export function scriptDraftRecordNotify(scriptId) {
|
|
return request({
|
|
url: `/api/simulation/scriptDraft/${scriptId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 预览脚本仿真(新版)*/
|
|
export function scriptDraftRecordNotifyNew(scriptId) {
|
|
return request({
|
|
url: `/api/scriptSimulation/${scriptId}/preview`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 新版地图创建仿真 */
|
|
export function createSimulationNew(params) {
|
|
return request({
|
|
url: `/simulation`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
/** 新版地图根据仿真group获取仿真基础信息 */
|
|
export function getSimulationInfoNew(group) {
|
|
return request({
|
|
url: `/simulation/${group}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 新版地图根据仿真group获取仿真地图数据 */
|
|
export function getNewMapDataByGroup(group) {
|
|
return request({
|
|
url: `/simulation/${group}/mapData`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 新版地图指令操作定义 */
|
|
export function newMapOperate(group, operationId, data) {
|
|
return request({
|
|
url: `/simulation/${group}/operate/${operationId}`,
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
/** 新版地图根据group获取仿真运行图 */
|
|
export function getEveryDayRunPlanNew(group) {
|
|
return request({
|
|
url: `/simulation/${group}/runPlan`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 新版地图按计划行车 */
|
|
export function ranAsPlan(data, group) {
|
|
return request({
|
|
url: `/simulation/${group}/ranAsPlan`,
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
/** 新版地图清理仿真 */
|
|
export function clearSimulation(group) {
|
|
return request({
|
|
url: `/simulation/${group}/clear`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 查询进路信息*/
|
|
export function querySignalStatus(group, params) {
|
|
return request({
|
|
url: `/api/simulation/${group}/status/signal`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 获取仿真运行图车次号列表 */
|
|
export function getTripNumberList(group) {
|
|
return request({
|
|
url: `/simulation/${group}/tripNumbers`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 根据车次号获取服务号 */
|
|
export function getServiceNumbersByTripNum(group, tripNumber) {
|
|
return request({
|
|
url: `/simulation/${group}/serviceNumber`,
|
|
method: 'get',
|
|
params: {
|
|
tripNumber: tripNumber
|
|
}
|
|
});
|
|
}
|
|
/** 根据计划时间获取此时间点可加载的最大列车数量 */
|
|
export function getLoadTrainNumber(params, group) {
|
|
return request({
|
|
url: `/simulation/${group}/loadTrainNumber`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
/** 推出按计划行车 */
|
|
export function exitRunPlan (group) {
|
|
return request({
|
|
url: `/simulation/${group}/planOver`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
/** 加载指定运行计划 */
|
|
export function simulationLoadRunPlan(group, templateId) {
|
|
return request({
|
|
url: `/simulation/${group}/load/runPlan/${templateId}`,
|
|
method: 'put'
|
|
});
|
|
}
|