241 lines
5.3 KiB
JavaScript
241 lines
5.3 KiB
JavaScript
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 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
|
|
}
|
|
});
|
|
}
|