调整角色切换bug&通号界面添加成员管理&仿真按钮offset位置修复
This commit is contained in:
parent
41aadd30cb
commit
594087489a
@ -157,6 +157,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.version = this.$store.state.map.version;
|
this.version = this.$store.state.map.version;
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
|
if (this.$store.state.socket.simulationRoleList && this.$store.state.socket.simulationRoleList.length) {
|
||||||
|
this.checkRoleChange(this.$store.state.socket.simulationRoleList);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
@ -234,13 +237,13 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
EventBus.$emit('closeMenu');
|
EventBus.$emit('closeMenu');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkRoleChange(list) {
|
checkRoleChange(list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
|
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
|
||||||
this.switchShowStation(this.centralizedMap[item.deviceCode]);
|
this.switchShowStation(this.centralizedMap[item.deviceCode]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
|
<el-button v-if="isAdmin" @click="memberManage">成员管理</el-button>
|
||||||
<el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
<el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
@ -14,26 +14,24 @@
|
|||||||
v-show="faultlistshow"
|
v-show="faultlistshow"
|
||||||
:devicelist="devicelist"
|
:devicelist="devicelist"
|
||||||
@selectdevice="selectdevice"
|
@selectdevice="selectdevice"
|
||||||
>
|
/>
|
||||||
</Devicefault-List>
|
|
||||||
<Fault-Device
|
<Fault-Device
|
||||||
v-show="deviceShow"
|
v-show="deviceShow"
|
||||||
ref = "faultdevice"
|
ref="faultdevice"
|
||||||
@closedevice3dview ="devicemodel"
|
@closedevice3dview="devicemodel"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div id="testjlmap3d" class="jlmap3ddraw">
|
<div id="testjlmap3d" class="jlmap3ddraw">
|
||||||
<canvas id="canvastexture" />
|
<canvas id="canvastexture" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="msg" v-show ="msgshow">
|
<div v-show="msgshow" class="msg">
|
||||||
<div class="msgtext">
|
<div class="msgtext">
|
||||||
{{controlmsg}}
|
{{ controlmsg }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="jl3droom" class="roombutton" @click="showroom"></div>
|
<div id="jl3droom" class="roombutton" @click="showroom" />
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -55,7 +53,6 @@ import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js
|
|||||||
import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist';
|
import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist';
|
||||||
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
||||||
|
|
||||||
|
|
||||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||||
|
|
||||||
@ -66,11 +63,19 @@ export default {
|
|||||||
name: 'Jl3dMaintainer',
|
name: 'Jl3dMaintainer',
|
||||||
components: {
|
components: {
|
||||||
DevicefaultList,
|
DevicefaultList,
|
||||||
FaultDevice,
|
FaultDevice
|
||||||
|
|
||||||
// Jlmap3dMsg
|
// Jlmap3dMsg
|
||||||
// ShowProperty
|
// ShowProperty
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
isAdmin: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
training: {
|
training: {
|
||||||
@ -89,7 +94,7 @@ export default {
|
|||||||
devicelist:[],
|
devicelist:[],
|
||||||
deviceShow:true,
|
deviceShow:true,
|
||||||
msgshow:false,
|
msgshow:false,
|
||||||
controlmsg:"",
|
controlmsg:''
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -98,7 +103,7 @@ export default {
|
|||||||
if (this.jlmap3d) {
|
if (this.jlmap3d) {
|
||||||
this.jlmap3d.webwork.postMessage('off');
|
this.jlmap3d.webwork.postMessage('off');
|
||||||
this.jlmap3d.webwork.terminate();
|
this.jlmap3d.webwork.terminate();
|
||||||
console.log("www");
|
console.log('www');
|
||||||
this.jlmap3d.jsonwebworknew.terminate();
|
this.jlmap3d.jsonwebworknew.terminate();
|
||||||
this.jlmap3d.dispose();
|
this.jlmap3d.dispose();
|
||||||
this.jlmap3d = null;
|
this.jlmap3d = null;
|
||||||
@ -137,19 +142,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init: function (skinCode, group) {
|
init: function (skinCode, group) {
|
||||||
const mapdata = this.$store.getters['map/map'];
|
const mapdata = this.$store.getters['map/map'];
|
||||||
const dom = document.getElementById('app');
|
const dom = document.getElementById('app');
|
||||||
const project = this.$route.query.project;
|
const project = this.$route.query.project;
|
||||||
// console.log(project);
|
// console.log(project);
|
||||||
this.deviceShow = false;
|
this.deviceShow = false;
|
||||||
if (project) {
|
if (project) {
|
||||||
|
|
||||||
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, project);
|
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, project);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, '');
|
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, '');
|
||||||
}
|
}
|
||||||
this.jlmap3d.eventon();
|
this.jlmap3d.eventon();
|
||||||
},
|
},
|
||||||
raystand() {
|
raystand() {
|
||||||
this.jlmap3d.rayswitch('stand');
|
this.jlmap3d.rayswitch('stand');
|
||||||
@ -175,53 +180,55 @@ export default {
|
|||||||
showtrainmsg(showtype) {
|
showtrainmsg(showtype) {
|
||||||
this.jlmap3d.showtrainmsg(showtype);
|
this.jlmap3d.showtrainmsg(showtype);
|
||||||
},
|
},
|
||||||
resetfaultlist(){
|
resetfaultlist() {
|
||||||
this.devicelist = [];
|
this.devicelist = [];
|
||||||
},
|
},
|
||||||
updatefault(fault) {
|
updatefault(fault) {
|
||||||
this.devicelist.push(fault);
|
this.devicelist.push(fault);
|
||||||
},
|
},
|
||||||
deletefault(code){
|
deletefault(code) {
|
||||||
console.log(code);
|
console.log(code);
|
||||||
console.log(this.devicelist);
|
console.log(this.devicelist);
|
||||||
for(let i=0,leni=this.devicelist.length;i<leni;i++){
|
for (let i = 0, leni = this.devicelist.length; i < leni; i++) {
|
||||||
if(code == this.devicelist[i].code){
|
if (code == this.devicelist[i].code) {
|
||||||
this.devicelist.splice(i,1);
|
this.devicelist.splice(i, 1);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
devicemodel(){
|
devicemodel() {
|
||||||
if (this.deviceShow == false) {
|
if (this.deviceShow == false) {
|
||||||
this.deviceShow = true;
|
this.deviceShow = true;
|
||||||
} else {
|
} else {
|
||||||
this.deviceShow = false;
|
this.deviceShow = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectdevice(divicedata){
|
selectdevice(divicedata) {
|
||||||
this.deviceShow = true;
|
this.deviceShow = true;
|
||||||
// console.log(divicedata);
|
// console.log(divicedata);
|
||||||
this.$refs.faultdevice.showmodel(divicedata);
|
this.$refs.faultdevice.showmodel(divicedata);
|
||||||
},
|
},
|
||||||
warningmsg(nowmsg){
|
warningmsg(nowmsg) {
|
||||||
console.log(nowmsg);
|
console.log(nowmsg);
|
||||||
this.controlmsg = nowmsg;
|
this.controlmsg = nowmsg;
|
||||||
this.msgshow = true;
|
this.msgshow = true;
|
||||||
setTimeout(this.warningmsgoff,3000);
|
setTimeout(this.warningmsgoff, 3000);
|
||||||
},
|
},
|
||||||
warningmsgoff(){
|
warningmsgoff() {
|
||||||
this.msgshow = false;
|
this.msgshow = false;
|
||||||
|
|
||||||
},
|
},
|
||||||
showroom(){
|
showroom() {
|
||||||
this.deviceShow = true;
|
this.deviceShow = true;
|
||||||
this.$refs.faultdevice.showroom();
|
this.$refs.faultdevice.showroom();
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$emit('back');
|
this.$emit('back');
|
||||||
this.isswitch = false;
|
this.isswitch = false;
|
||||||
},
|
},
|
||||||
|
memberManage() {
|
||||||
|
this.$emit('handlerMemberManage');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -324,5 +331,4 @@ export default {
|
|||||||
z-index: -12;
|
z-index: -12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||||
<Jl3d-Maintainer v-if="jl3dmaintainershow" @back="back" />
|
<Jl3d-Maintainer v-if="jl3dmaintainershow" :is-admin="isAdmin" @back="back" @handlerMemberManage="handlerMemberManage" />
|
||||||
<ibp-plate v-show="ibpShow" ref="ibpPlate" @hideIbp="hideIbp" />
|
<ibp-plate v-show="ibpShow" ref="ibpPlate" @hideIbp="hideIbp" />
|
||||||
<template v-show="panelShow" :panelShow="panelShow">
|
<template v-show="panelShow" :panelShow="panelShow">
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
@ -247,6 +247,8 @@ export default {
|
|||||||
// 设置菜单和工具栏位置
|
// 设置菜单和工具栏位置
|
||||||
setPosition() {
|
setPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.offset = 10;
|
||||||
|
this.offsetBottom = 15;
|
||||||
const menuBar = document.getElementById('menuBar');
|
const menuBar = document.getElementById('menuBar');
|
||||||
const menuTool = document.getElementById('menuTool');
|
const menuTool = document.getElementById('menuTool');
|
||||||
const menuBottom = document.getElementById('menuButton');
|
const menuBottom = document.getElementById('menuButton');
|
||||||
@ -289,12 +291,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initMemberUserInfo() {
|
initMemberUserInfo() {
|
||||||
// 获取仿真成员列表
|
// 获取仿真成员列表
|
||||||
getSimulationMemberList(this.$route.query.group).then(resp => {
|
getSimulationMemberList(this.$route.query.group).then(resp => {
|
||||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
|
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取仿真成员列表失败!');
|
this.$messageBox('获取仿真成员列表失败!');
|
||||||
});
|
});
|
||||||
getAllSimulationUser(this.$route.query.group).then(resp => {
|
getAllSimulationUser(this.$route.query.group).then(resp => {
|
||||||
this.$store.dispatch('training/setSimulationUserList', resp.data);
|
this.$store.dispatch('training/setSimulationUserList', resp.data);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -394,9 +396,10 @@ export default {
|
|||||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||||
this.hideIbp();
|
this.hideIbp();
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
if ((this.lineCode === '07' || this.lineCode === '06') && deviceCode) {
|
if (this.lineCode === '07' || this.lineCode === '06') {
|
||||||
this.mapViewLoadedOver && this.setShowStation('');
|
this.mapViewLoadedOver && this.setShowStation('');
|
||||||
}
|
}
|
||||||
|
this.jl3dmaintainershow = false;
|
||||||
break;
|
break;
|
||||||
case 'STATION_SUPERVISOR':
|
case 'STATION_SUPERVISOR':
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
@ -406,22 +409,27 @@ export default {
|
|||||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||||
}
|
}
|
||||||
|
this.jl3dmaintainershow = false;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
break;
|
break;
|
||||||
case 'AUDIENCE':
|
case 'AUDIENCE':
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||||
|
this.jl3dmaintainershow = false;
|
||||||
|
this.drivingShow = false;
|
||||||
this.hideIbp();
|
this.hideIbp();
|
||||||
break;
|
break;
|
||||||
case 'DRIVER':
|
case 'DRIVER':
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
this.$store.dispatch('training/setRoles', 'DRIVER');
|
this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||||
|
this.jl3dmaintainershow = false;
|
||||||
break;
|
break;
|
||||||
case 'MAINTAINER':
|
case 'MAINTAINER':
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||||
this.hideIbp();
|
this.hideIbp();
|
||||||
this.jl3dmaintainershow = true;
|
this.jl3dmaintainershow = true;
|
||||||
|
this.drivingShow = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -515,13 +523,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setWindowSize() {
|
setWindowSize() {
|
||||||
this.$store.dispatch('config/resize', { width: this.width, height: this.height });
|
this.$store.dispatch('config/resize', { width: this.width, height: this.height });
|
||||||
if (this.prdType == '07') {
|
if (this.prdType == '07') {
|
||||||
this.setBigScreenMode();
|
this.setBigScreenMode();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchStationMode(stationCode) {
|
switchStationMode(stationCode) {
|
||||||
this.showStation = stationCode;
|
this.showStation = stationCode;
|
||||||
this.setShowStation(this.showStation);
|
this.setShowStation(this.showStation);
|
||||||
},
|
},
|
||||||
setShowStation(stationCode) {
|
setShowStation(stationCode) {
|
||||||
@ -536,7 +544,7 @@ export default {
|
|||||||
this.$jlmap.setCenter(stationCode);
|
this.$jlmap.setCenter(stationCode);
|
||||||
},
|
},
|
||||||
setStationList(map) {
|
setStationList(map) {
|
||||||
this.stationList = [];
|
this.stationList = [];
|
||||||
(map.stationList || []).forEach(item => {
|
(map.stationList || []).forEach(item => {
|
||||||
if (item.centralized) {
|
if (item.centralized) {
|
||||||
this.stationList.push({value: item.code, name: item.name});
|
this.stationList.push({value: item.code, name: item.name});
|
||||||
@ -545,9 +553,9 @@ export default {
|
|||||||
this.centralizedStationMap[ele] = item.code;
|
this.centralizedStationMap[ele] = item.code;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.stationList.length) {
|
if (this.stationList.length) {
|
||||||
this.showStation = this.stationList[0].value;
|
this.showStation = this.stationList[0].value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setBigScreenMode() {
|
setBigScreenMode() {
|
||||||
|
Loading…
Reference in New Issue
Block a user