This commit is contained in:
zyy 2020-01-03 15:50:32 +08:00
commit c13963f793
14 changed files with 360 additions and 45 deletions

View File

@ -255,3 +255,20 @@ export function getRealDevices(group) {
method: 'get'
});
}
// 获取房间真实设备连接关系
export function getRealDevicesNew(group) {
return request({
url: `/api/jointTraining/room/${group}/realDevice/connect`,
method: 'get'
});
}
// 更新真实设备的连接关系
export function undateRealDevicesNew(group, data) {
return request({
url: `/api/jointTraining/room/${group}/realDevice`,
method: 'put',
data: data
});
}

View File

@ -61,3 +61,11 @@ export function setSwitchConfig(id, data) {
data: data
});
}
/** 查询项目下的所有设备 */
export function getAllDeviceInProject(params) {
return request({
url: `/api/project/device/project`,
method: 'get',
params
});
}

View File

@ -53,6 +53,17 @@
<template v-else-if="checkFieldType(item, 'number')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<el-input-number
v-if="item.precisionFlag"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
:min="isNaN(item.min) ? -Infinity : item.min"
:max="isNaN(item.max)? Infinity : item.max"
:step="isNaN(item.step) ? -Infinity : item.step"
:precision="item.precision"
/>
<el-input-number
v-else
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"

View File

@ -86,13 +86,16 @@ class MenuContextHandler {
covert(menuList) {
const selected = this.getCurrentStateObject();
let menu = [];
console.log(selected, 'selected');
const control = this.getStationControl(selected);
console.log(control, 'control');
if (control) {
if ( this.getPrdType() != '') {
const type = State2SimulationMap[this.getPrdType()];
// const status = State2ControlMap[control.status]; // 缺少车站控制模式字段
const status = State2ControlMap['01']; // 缺少车站控制模式字段
menu = [...menuList[type]];
console.log(menu, 'menu');
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
@ -117,6 +120,7 @@ class MenuContextHandler {
}
}
}
console.log(menu, '=========212');
return menu;
// if (menuList.constructor === Array) {

View File

@ -5,7 +5,7 @@ export function getBaseUrl() {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
BASE_API = 'http://192.168.3.82:9000'; // 杜康
} else {

View File

@ -237,6 +237,7 @@ export default {
},
async beforeDestroy() {
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
EventBus.$off('clearCheckLogin');

View File

@ -235,6 +235,7 @@ export default {
},
async beforeDestroy() {
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
EventBus.$off('clearCheckLogin');

View File

@ -2,6 +2,7 @@
<div>
<div class="display-draft">
<el-button-group>
<el-button v-if="isProject" type="primary" @click="setRelDevice">设置真实设备</el-button>
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
<template v-if="isAdmin">
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
@ -12,6 +13,7 @@
</div>
<qr-code ref="qrCode" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<real-device ref="realDevice" />
</div>
</template>
@ -23,12 +25,15 @@ import { exitFullscreen } from '@/utils/screen';
import { putJointTrainingSimulationUser } from '@/api/chat';
import { timeFormat } from '@/utils/date';
import { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth';
import RealDevice from './menuDraft/realDevice';
export default {
name: 'MenuDemonJoint',
components: {
QrCode,
SetTime
SetTime,
RealDevice
},
props: {
group: {
@ -83,6 +88,9 @@ export default {
},
isBigScreen() {
return this.userRole == 'BigScreen';
},
isProject() {
return getSessionStorage('project').endsWith('gzb');
}
},
watch: {
@ -308,6 +316,9 @@ export default {
},
jumpjlmap3d() {
this.$emit('hidepanel');
},
setRelDevice() {
this.$refs.realDevice.doShow();
}
}
};

View File

@ -0,0 +1,247 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
:visible.sync="dialogShow"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
center
>
<div>
<ul>
<li v-for="(node, index) in options" :key="index" style="height: 45px">
<span>{{ handleDeviceTitle(node) }}</span>
<div style="float: right;">
<el-select
v-if="node.projectDeviceType ==='PSD'"
v-model="node.deviceCode"
:placeholder="$t('global.choose')"
filterable
clearable
size="mini"
@change="psdDeviceChange"
>
<el-option
v-for="item in doorList"
:key="item.code"
:label="item.name"
:value="item.code"
:disabled="item.disabled"
style="margin-left: 10px"
/>
</el-select>
<el-select
v-else-if="node.projectDeviceType ==='SWITCH'"
v-model="node.deviceCode"
:placeholder="$t('global.choose')"
filterable
clearable
size="mini"
@change="switchDeviceChange"
>
<el-option
v-for="item in switchList"
:key="item.code"
:label="item.name"
:value="item.code"
:disabled="item.disabled"
style="margin-left: 10px"
/>
</el-select>
<el-select
v-else-if="node.projectDeviceType ==='SIGNAL'"
v-model="node.deviceCode"
:placeholder="$t('global.choose')"
filterable
clearable
size="mini"
@change="signalDeviceChange"
>
<el-option
v-for="item in signalList"
:key="item.code"
:label="item.name"
:value="item.code"
:disabled="item.disabled"
style="margin-left: 10px"
/>
</el-select>
</div>
</li>
</ul>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getRealDevicesNew, undateRealDevicesNew } from '@/api/chat';
import { hasDoorStationList } from '@/api/jmap/map';
import {getAllDeviceInProject} from '@/api/project';
import { mapGetters } from 'vuex';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'RealDevice',
data() {
return {
dialogShow: false,
options: [],
loading: false,
doorList: [],
deviceRelList: [],
title: '设置真实设备连接'
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationStandList',
'switchList',
'signalList'
])
},
mounted() {
},
methods: {
handleDeviceTitle(node) {
const online = node.online ? '[在线]' : '[离线]';
return node.projectDeviceCode + online;
},
psdDeviceChange() {
const psdDevices = [];
this.options.forEach(item => {
if (item.projectDeviceType === 'PSD' || item.deviceCode) {
psdDevices.push(item.deviceCode);
}
});
this.doorList.forEach(it => {
it.disabled = psdDevices.includes(it.code);
});
},
switchDeviceChange() {
const switchDevices = [];
this.options.forEach(item => {
if (item.projectDeviceType === 'SWITCH' || item.deviceCode) {
switchDevices.push(item.deviceCode);
}
});
this.switchList.forEach(it => {
it.disabled = switchDevices.includes(it.code);
});
},
signalDeviceChange() {
const signalDevices = [];
this.options.forEach(item => {
if (item.projectDeviceType === 'SIGNAL' || item.deviceCode) {
signalDevices.push(item.deviceCode);
}
});
this.signalList.forEach(it => {
it.disabled = signalDevices.includes(it.code);
});
},
doShow() {
this.dialogShow = true;
this.options = [];
const projectCode = getSessionStorage('project').toUpperCase();
this.getDoorList(this.$route.query.mapId, this.stationList);
getAllDeviceInProject({projectCode: projectCode}).then(resp => {
getRealDevicesNew(this.$route.query.group).then(res => {
resp.data.forEach((it, index) => {
this.options.push({
deviceCode: '',
id: null,
online: it.online,
projectDeviceId: it.id,
projectDeviceCode: it.code,
projectDeviceType: it.type,
roomId: this.$route.query.roomId
});
res.data.forEach(item => {
if (it.id == item.projectDeviceId) { // it.idint item.projectDeviceIdstring
this.options[index].id = item.id;
this.options[index].deviceCode = item.deviceCode;
}
});
});
this.psdDeviceChange();
this.switchDeviceChange();
this.signalDeviceChange();
});
}).catch(() => {
this.$message.error('获取真实设备失败!');
});
},
async getDoorList(mapId, stationList) {
const doorList = [];
hasDoorStationList(mapId).then(res =>{
stationList.forEach(item => {
res.data.forEach(it =>{
if (item.code === it.stationCode) {
const direction = parseInt(it.doorLocationType) % 2 === 0 ? this.$t('trainRoom.uplinkPlatform') : this.$t('trainRoom.downlinkPlatform');
doorList.push({code: it.code, name: item.name + direction});
}
});
});
this.doorList = doorList;
}).catch(() => {
this.$messageBox(this.$t('error.getScreenDoorsListFailed'));
});
},
doClose() {
this.dialogShow = false;
this.options = [];
this.doorList = [];
this.deviceRelList = [];
},
doSave() {
const paramsList = [];
this.options.forEach(item => {
if (item.deviceCode || item.id) {
paramsList.push(item);
}
});
undateRealDevicesNew(this.$route.query.group, paramsList).then(res => {
this.$message.success('更新真实设备连接关系成功!');
this.doClose();
}).catch(() => {
this.$message.error('更新真实设备连接关系失败!');
});
}
}
};
</script>
<style scoped lang="scss">
/deep/ {
.el-dialog__body {
padding: 0px 20px;
}
}
.listBox {
margin: 0px;
max-height: 270px;
overflow-y: auto;
padding-inline-start: 0px;
width: 100%;
.listLi {
list-style: none;
height: 30px;
line-height: 30px;
}
}
.tipLable {
line-height: 33px;
}
</style>

View File

@ -234,6 +234,7 @@ export default {
},
async beforeDestroy() {
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
EventBus.$off('clearCheckLogin');

View File

@ -240,6 +240,7 @@ export default {
},
async beforeDestroy() {
await this.clearAllTimer();
await this.quit();
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
EventBus.$off('clearCheckLogin');

View File

@ -120,7 +120,6 @@ export default {
methods: {
initForm(row) {
var validateDevice = (rule, value, callback) => {
console.log(value);
const list = [];
rule.list.forEach(item=> {
if (item.value !== rule.field && this.formModel[item.value] === value) {
@ -144,25 +143,34 @@ export default {
callback();
}
};
var validateAddr = (rule, value, callback) => {
if (!value) {
callback(new Error(rule.messageEmpty));
} else if (this.formModel.i_addr === this.formModel.o_addr) {
callback(new Error('输入网关字地址与输出网关字地址不能相同!'));
} else {
callback();
}
};
switch (row.type) {
case 'PSD': {
this.setDeviceConfigFunction = setPsdConfig;
this.formLeft = {
labelWidth: '220px',
items: [
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'i_c', label: '输入-是否关门位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_dc_b', label: '输入-PSL关门按钮位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_do_b', label: '输入-PSL开门按钮位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_ir', label: '输入-互锁解除钥匙开关位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_l', label: '输入-是否锁闭位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_psl', label: '输入-PSL允许钥匙开关位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_ts_b', label: '输入-PSL试灯按钮位:', type: 'number', min: 1, max: 16, step: 1}
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_c', label: '输入-是否关门位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_dc_b', label: '输入-PSL关门按钮位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_do_b', label: '输入-PSL开门按钮位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_ir', label: '输入-互锁解除钥匙开关位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_l', label: '输入-是否锁闭位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_psl', label: '输入-PSL允许钥匙开关位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_ts_b', label: '输入-PSL试灯按钮位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.leftRules = {
i_addr: [
{ required: true, message: '请填写输入网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输入网关字地址', trigger: 'blur' }
],
i_c: [
{ validator: validateDevice, messageEmpty: '请填写输入-是否关门位', list: this.psdLeftValue, trigger: 'blur' }
@ -189,20 +197,20 @@ export default {
this.formRight = {
labelWidth: '220px',
items: [
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'o_c', label: '输出-关门位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_dc_s', label: '输出-关门信号灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_dcl_s', label: '输出-关门且锁闭信号灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_do_s', label: '输出-开门信号灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_ir_s', label: '输出-互锁解除信号灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_l', label: '输出-锁闭位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_o', label: '输出-开门位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_psl_s', label: '输出-PSL信号灯控制位:', type: 'number', min: 1, max: 16, step: 1}
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_c', label: '输出-关门位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_dc_s', label: '输出-关门信号灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_dcl_s', label: '输出-关门且锁闭信号灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_do_s', label: '输出-开门信号灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_ir_s', label: '输出-互锁解除信号灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_l', label: '输出-锁闭位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_o', label: '输出-开门位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_psl_s', label: '输出-PSL信号灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.rightRules = {
o_addr: [
{ required: true, message: '请填写输出网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输出网关字地址', trigger: 'blur' }
],
o_c: [
{ validator: validateDevice, messageEmpty: '请填写输入-关门位', list: this.psdRightValue, trigger: 'blur' }
@ -237,16 +245,16 @@ export default {
this.formLeft = {
labelWidth: '150px',
items: [
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'i_f', label: '输入-故障表示位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_g', label: '输入-绿灯表示位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_r', label: '输入-红灯表示位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_y', label: '输入-黄灯表示位:', type: 'number', min: 1, max: 16, step: 1}
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_f', label: '输入-故障表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_g', label: '输入-绿灯表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_r', label: '输入-红灯表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_y', label: '输入-黄灯表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.leftRules = {
i_addr: [
{ required: true, message: '请填写输入网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输入网关字地址', trigger: 'blur' }
],
i_f: [
{ validator: validateDevice, messageEmpty: '请填写输入-故障表示位', list: this.signalLeftValue, trigger: 'blur' }
@ -265,16 +273,16 @@ export default {
labelWidth: '150px',
size: 'mini',
items: [
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'o_f', label: '输出-故障控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_g', label: '输出-绿灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_r', label: '输出-红灯控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_y', label: '输出-黄灯控制位:', type: 'number', min: 1, max: 16, step: 1}
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_f', label: '输出-故障控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_g', label: '输出-绿灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_r', label: '输出-红灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_y', label: '输出-黄灯控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.rightRules = {
o_addr: [
{ required: true, message: '请填写输出网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输出网关字地址', trigger: 'blur' }
],
o_f: [
{ validator: validateDevice, messageEmpty: '请填写输入-故障控制位', list: this.signalRightValue, trigger: 'blur' }
@ -297,15 +305,15 @@ export default {
this.formLeft = {
labelWidth: '160px',
items: [
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'i_f', label: '输入-故障挤岔表示位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_n', label: '输入-定位表示位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'i_r', label: '输入-反位表示位:', type: 'number', min: 1, max: 16, step: 1}
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_f', label: '输入-故障挤岔表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_n', label: '输入-定位表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_r', label: '输入-反位表示位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.leftRules = {
i_addr: [
{ required: true, message: '请填写输入网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输入网关字地址', trigger: 'blur' }
],
i_f: [
{ validator: validateDevice, messageEmpty: '请填写输入-故障挤岔表示位', list: this.switchLeftValue, trigger: 'blur' }
@ -320,15 +328,15 @@ export default {
this.formRight = {
labelWidth: '160px',
items: [
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 1, max: 20000, step: 1},
{ prop: 'o_f', label: '输出-故障挤岔控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_n', label: '输出-定操控制位:', type: 'number', min: 1, max: 16, step: 1},
{ prop: 'o_r', label: '输出-反操控制位:', type: 'number', min: 1, max: 16, step: 1}
{ prop: 'o_addr', label: '输出网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_f', label: '输出-故障挤岔控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_n', label: '输出-定操控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0},
{ prop: 'o_r', label: '输出-反操控制位:', type: 'number', min: 1, max: 16, step: 1, precisionFlag: true, precision: 0}
]
};
this.rightRules = {
o_addr: [
{ required: true, message: '请填写输出网关字地址', trigger: 'blur' }
{ validator: validateAddr, messageEmpty: '请填写输出网关字地址', trigger: 'blur' }
],
o_f: [
{ validator: validateDevice, messageEmpty: '请填写输出-故障挤岔控制位', list: this.switchRightValue, trigger: 'blur' }

View File

@ -75,6 +75,7 @@
@delUser="handleDelUser"
/>
<e-device
v-if="isXtyProject"
class="role"
title-i18n="trainRoom.realDevice"
device-type="StationStand"
@ -113,6 +114,7 @@ import AddPerson from './add-person';
import QrCode from '@/components/QrCode';
import { getJoinTrainCode, startJointTraining, deljointTrainRoom, putJointTrainingExit, putJointTrainingSimulation, putUserRoles, setRealDevice, delRealDevice } from '@/api/chat';
import { getPlcGateway } from '@/api/simulation';
import { getSessionStorage } from '@/utils/auth';
export default {
components : {
@ -163,6 +165,9 @@ export default {
rolesHeight() {
return this.height - 100;
},
isXtyProject() {
return getSessionStorage('project').endsWith('xty');
},
group() {
return this.$route.query.group;
},

View File

@ -246,7 +246,7 @@ export default {
const room = this.room;
await putJointTrainingSimulationEntrance(room.group);
const rest = await getPublishMapInfo(room.mapId);
const query = { lineCode: rest.data.lineCode, mapId: room.mapId, group: room.group };
const query = { lineCode: rest.data.lineCode, mapId: room.mapId, group: room.group, roomId: room.id };
this.$router.replace({ path: `/jointTraining`, query: query });
//
this.$store.dispatch('socket/setJointRoomInfo');