设备登录调整

This commit is contained in:
fan 2020-07-08 13:11:22 +08:00
parent b3ce617230
commit 1076eb2215
3 changed files with 32 additions and 14 deletions

View File

@ -414,17 +414,17 @@ export default {
if (this.$route.query.type == 'LSW') { if (this.$route.query.type == 'LSW') {
console.log('进入', `/bigSplitScreen/${resp.data.map.id}`); console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query }); this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
} else if (this.$route.query.type === 'ISCS_LW') { } else if (this.$route.query.type === 'ISCS_LW' || this.$route.query.type === 'ISCS_CW') {
this.$router.push({ path: `/displayIscs/system`, query: query }); this.$router.push({ path: `/displayIscs/system`, query: {
group: res.data.group,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type} });
} else if (this.$route.query.type == 'CCTV') { } else if (this.$route.query.type == 'CCTV') {
this.$router.push({ path: `/jlmap3d/passengerflow`, query:{ this.$router.push({ path: `/jlmap3d/passengerflow`, query:{
mapid:resp.data.map.id, mapid:resp.data.map.id,
group:res.data.group, group:res.data.group,
project: getSessionStorage('project') project: getSessionStorage('project')
} }); } });
} else if (this.$route.query.type == 'VR_PSD') {
//
// this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
} else { } else {
this.$router.push({ path: `/jointTrainingNew`, query: query }); this.$router.push({ path: `/jointTrainingNew`, query: query });
} }

View File

@ -47,6 +47,12 @@
<js-question v-if="project==='jsxt'" :offset="offset" :question-list="questionList" /> <js-question v-if="project==='jsxt'" :offset="offset" :question-list="questionList" />
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" />
<add-member ref="addMember" /> <add-member ref="addMember" />
<Jl3d-Device
v-if="deviceShow"
ref="Jl3dDevice"
:panel-show="deviceShow"
@closedevice3dview="devicemodel"
/>
</div> </div>
</div> </div>
@ -69,8 +75,9 @@ import { checkLoginLine } from '@/api/login';
import { loadNewMapDataByGroup } from '@/utils/loaddata'; import { loadNewMapDataByGroup } from '@/utils/loaddata';
import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo, getSimulationMemberList, getAllSimulationUser } from '@/api/simulation'; import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo, getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
import {getRaceUserById, getTestPaperDatail} from '@/api/competition'; import {getRaceUserById, getTestPaperDatail} from '@/api/competition';
import { getSessionStorage, getToken } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive'; import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer'; import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
@ -79,7 +86,6 @@ import Vue from 'vue';
import localStore from 'storejs'; import localStore from 'storejs';
import MembersManage from './memberManage/membersManage'; import MembersManage from './memberManage/membersManage';
import AddMember from './memberManage/addMember'; import AddMember from './memberManage/addMember';
import { getLoginInfo } from '@/api/login';
export default { export default {
name: 'JointTrainingDraft', name: 'JointTrainingDraft',
@ -97,7 +103,8 @@ export default {
IbpPlate, IbpPlate,
JsQuestion, JsQuestion,
MembersManage, MembersManage,
AddMember AddMember,
Jl3dDevice
}, },
data() { data() {
return { return {
@ -131,7 +138,8 @@ export default {
questionList: [], questionList: [],
practicalExamTime: 0, practicalExamTime: 0,
isAdmin: false, isAdmin: false,
adminMode: true adminMode: true,
deviceShow: false
}; };
}, },
computed: { computed: {
@ -195,6 +203,9 @@ export default {
this.mapViewLoadedOver = true; this.mapViewLoadedOver = true;
this.showSelectStation && this.setShowStation(this.showStation); this.showSelectStation && this.setShowStation(this.showStation);
this.initMemberUserInfo(); this.initMemberUserInfo();
if (this.$route.query.type === 'VR_PSD') {
this.deviceShow = true;
}
}, },
'$store.state.socket.memberChangeCount': function () { '$store.state.socket.memberChangeCount': function () {
this.initMemberUserInfo(); this.initMemberUserInfo();
@ -365,6 +376,13 @@ export default {
this.$messageBox('获取所有仿真用户失败!'); this.$messageBox('获取所有仿真用户失败!');
}); });
}, },
devicemodel() {
if (this.deviceShow == false) {
this.deviceShow = true;
} else {
this.deviceShow = false;
}
},
async loadSimulationInfo() { async loadSimulationInfo() {
const resp = await getSimulationInfoNew(this.group); const resp = await getSimulationInfoNew(this.group);
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) { if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {