diff --git a/src/api/chat.js b/src/api/chat.js index a1c59fe90..6bbb3d402 100644 --- a/src/api/chat.js +++ b/src/api/chat.js @@ -258,7 +258,7 @@ export function getRealDevices(group) { } // 获取房间真实设备连接关系 -export function getRealDevicesNew(group) { +export function getRealDevicesInRoom(group) { return request({ url: `/api/jointTraining/room/${group}/realDevice/connect`, method: 'get' @@ -266,7 +266,7 @@ export function getRealDevicesNew(group) { } // 更新真实设备的连接关系 -export function updateRealDevicesNew(group, data) { +export function updateRealDevices(group, data) { return request({ url: `/api/jointTraining/room/${group}/realDevice`, method: 'put', diff --git a/src/api/jointTraining.js b/src/api/jointTraining.js new file mode 100644 index 000000000..ff4a72a42 --- /dev/null +++ b/src/api/jointTraining.js @@ -0,0 +1,248 @@ +import request from '@/utils/request'; + +// 文字聊天 发送文字 +export function chatWithTextNew(data, group) { + return request({ + url: `/api/v1/jointTraining/chatWithText?group=${group}`, + method: 'post', + data: { + message: data + } + }); +} + +// 生成分发二维码 +export function getJoinTrainCodeNew(data, group) { + return request({ + url: `/api/v1/jointTraining/qrCode?group=${group}`, + method: 'post', + data: data + }); +} + +// 创建房间 +export function postCreateRoomNew(data) { + return request({ + url: `/api/v1/jointTraining/room`, + method: 'post', + data: data + }); +} + +// 检查房间存在 +export function checkRoomExistNew(params) { + return request({ + url: `/api/simulationRoom`, + method: 'get', + params + }); +} + +// 获取房间详情 +export function postRoomDetailNew(group) { + return request({ + url: `/api/v1/jointTraining/room/${group}`, + method: 'get' + }); +} + +// 销毁房间 +export function deljointTrainRoomNew(group) { + return request({ + url: `/api/v1/jointTraining/room`, + method: 'delete', + params: { + group: group + } + }); +} + +// 查询有权限房间列表 +export function getjointTrainListNew(params) { + return request({ + url: `/api/v1/jointTraining/room/list`, + method: 'get', + params: params + }); +} + +// 加入房间 +export function getjointTrainingNew(group) { + return request({ + url: `/api/v1/jointTraining/room/join`, + method: 'put', + params: { + group: group + } + }); +} + +// 设置人员角色 +export function putUserRolesNew(data, group) { + return request({ + url: `/api/v1/jointTraining/room/user/role?group=${group}`, + method: 'put', + data: data + }); +} + +// 获取房间里的用户列表 +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 putJointTrainingStateNew() { + return request({ + url: `/api/v1/jointTraining/room/back`, + method: 'put' + }); +} + +// 踢出用户 +export function putJointTrainingUserkickedNew(userId, group) { + return request({ + url: `/api/v1/jointTraining/room/user`, + method: 'put', + params: { + userId: userId, + group: group + } + }); +} + +// 管理员结束所有人的仿真 +export function putJointTrainingSimulationNew(group) { + return request({ + url: `/api/v1/jointTraining/room/simulation/all`, + method: 'put', + params: { + group: group + } + }); +} + +// 结束仿真返回房间 +export function putJointTrainingSimulationUserNew(group) { + return request({ + url: `/api/v1/jointTraining/room/simulation/user/exit`, + method: 'put', + params: { + group: group + } + }); +} + +// 进入仿真 +export function putJointTrainingSimulationEntranceNew(group) { + return request({ + url: `/api/v1/jointTraining/room/simulation/user/entrance`, + method: 'put', + params: { + group: group + } + }); +} + +/** + * 权限获取(房间权限) + */ +export function getPermissionJointNew(group) { + return request({ + url: '/api/v1/jointTraining/qrCode', + method: 'get', + params: { + group: group + } + }); +} + +// 添加或更新真实设备和仿真对象连接 +export function setRealDeviceNew(group, data) { + return request({ + url: `/api/v1/jointTraining/room/realDevice?group=${group}`, + method: 'post', + data: data + }); +} + +// 删除真实设备和仿真对象连接 +export function delRealDeviceNew(id, group) { + return request({ + url: `/api/v1/jointTraining/room/realDevice/${id}`, + method: 'delete', + params: { group: group } + }); +} + +// 获取真实设备列表 +export function getRealDevicesNew(group) { + return request({ + url: `/api/v1/jointTraining/room/${group}/devices`, + method: 'get' + }); +} + +// 获取房间真实设备连接关系 +export function getRealDevicesInRoomNew(group) { + return request({ + url: `/api/v1/jointTraining/room/${group}/realDevice/connect`, + method: 'get' + }); +} + +// 更新真实设备的连接关系 +export function updateRealDevicesNew(group, data) { + return request({ + url: `/api/v1/jointTraining/room/${group}/realDevice`, + method: 'put', + data: data + }); +} + +// 真实设备是否被其他仿真使用 +export function realDeviceIsUsedNew(group, projectCode) { + return request({ + url: `/api/v1/jointTraining/room/${group}/realDeviceUsed`, + method: 'get', + params: { + projectCode: projectCode + } + }); +} diff --git a/src/jmapNew/theme/chengdu_01/planSchedule/schedule.vue b/src/jmapNew/theme/chengdu_01/planSchedule/schedule.vue index 8b4fc030c..57008bbed 100644 --- a/src/jmapNew/theme/chengdu_01/planSchedule/schedule.vue +++ b/src/jmapNew/theme/chengdu_01/planSchedule/schedule.vue @@ -25,7 +25,6 @@