diff --git a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
index 72099f239..dd97cec0b 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
@@ -157,6 +157,9 @@ export default {
mounted() {
this.version = this.$store.state.map.version;
this.initMenu();
+ if (this.$store.state.socket.simulationRoleList && this.$store.state.socket.simulationRoleList.length) {
+ this.checkRoleChange(this.$store.state.socket.simulationRoleList);
+ }
},
methods: {
initMenu() {
@@ -234,13 +237,13 @@ export default {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
- },
- checkRoleChange(list) {
- list.forEach(item => {
- if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
- this.switchShowStation(this.centralizedMap[item.deviceCode]);
- }
- });
+ },
+ checkRoleChange(list) {
+ list.forEach(item => {
+ if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
+ this.switchShowStation(this.centralizedMap[item.deviceCode]);
+ }
+ });
}
}
};
diff --git a/src/views/jlmap3d/maintainer/jl3dmaintainer.vue b/src/views/jlmap3d/maintainer/jl3dmaintainer.vue
index 45b095191..e30fbb18a 100644
--- a/src/views/jlmap3d/maintainer/jl3dmaintainer.vue
+++ b/src/views/jlmap3d/maintainer/jl3dmaintainer.vue
@@ -4,7 +4,7 @@
-
+ 成员管理
{{ $t('global.back') }}
@@ -14,26 +14,24 @@
v-show="faultlistshow"
:devicelist="devicelist"
@selectdevice="selectdevice"
- >
-
+ />
-
+
- {{controlmsg}}
+ {{ controlmsg }}
-
-
+
@@ -55,7 +53,6 @@ import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js
import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist';
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
-
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
import { ProjectIcon } from '@/scripts/ProjectConfig';
@@ -66,11 +63,19 @@ export default {
name: 'Jl3dMaintainer',
components: {
DevicefaultList,
- FaultDevice,
+ FaultDevice
// Jlmap3dMsg
// ShowProperty
},
+ props: {
+ isAdmin: {
+ type: Boolean,
+ default() {
+ return false;
+ }
+ }
+ },
data() {
return {
training: {
@@ -89,7 +94,7 @@ export default {
devicelist:[],
deviceShow:true,
msgshow:false,
- controlmsg:"",
+ controlmsg:''
};
},
@@ -98,7 +103,7 @@ export default {
if (this.jlmap3d) {
this.jlmap3d.webwork.postMessage('off');
this.jlmap3d.webwork.terminate();
- console.log("www");
+ console.log('www');
this.jlmap3d.jsonwebworknew.terminate();
this.jlmap3d.dispose();
this.jlmap3d = null;
@@ -137,19 +142,19 @@ export default {
}
},
init: function (skinCode, group) {
- const mapdata = this.$store.getters['map/map'];
- const dom = document.getElementById('app');
- const project = this.$route.query.project;
- // console.log(project);
- this.deviceShow = false;
- if (project) {
+ const mapdata = this.$store.getters['map/map'];
+ const dom = document.getElementById('app');
+ const project = this.$route.query.project;
+ // console.log(project);
+ this.deviceShow = false;
+ if (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.eventon();
+ this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, '');
+ }
+ this.jlmap3d.eventon();
},
raystand() {
this.jlmap3d.rayswitch('stand');
@@ -175,53 +180,55 @@ export default {
showtrainmsg(showtype) {
this.jlmap3d.showtrainmsg(showtype);
},
- resetfaultlist(){
- this.devicelist = [];
+ resetfaultlist() {
+ this.devicelist = [];
},
updatefault(fault) {
- this.devicelist.push(fault);
+ this.devicelist.push(fault);
},
- deletefault(code){
- console.log(code);
- console.log(this.devicelist);
- for(let i=0,leni=this.devicelist.length;i
@@ -324,5 +331,4 @@ export default {
z-index: -12;
}
-
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index b2cfd76b6..90cdd426f 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -247,6 +247,8 @@ export default {
// 设置菜单和工具栏位置
setPosition() {
this.$nextTick(() => {
+ this.offset = 10;
+ this.offsetBottom = 15;
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
const menuBottom = document.getElementById('menuButton');
@@ -289,12 +291,12 @@ export default {
}
},
initMemberUserInfo() {
- // 获取仿真成员列表
+ // 获取仿真成员列表
getSimulationMemberList(this.$route.query.group).then(resp => {
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
- });
+ });
getAllSimulationUser(this.$route.query.group).then(resp => {
this.$store.dispatch('training/setSimulationUserList', resp.data);
}).catch(() => {
@@ -394,9 +396,10 @@ export default {
this.$store.dispatch('training/setRoles', 'DISPATCHER');
this.hideIbp();
this.drivingShow = false;
- if ((this.lineCode === '07' || this.lineCode === '06') && deviceCode) {
+ if (this.lineCode === '07' || this.lineCode === '06') {
this.mapViewLoadedOver && this.setShowStation('');
}
+ this.jl3dmaintainershow = false;
break;
case 'STATION_SUPERVISOR':
this.$store.dispatch('training/setPrdType', '01');
@@ -406,22 +409,27 @@ export default {
this.$refs.menuSchema.chiShowStation = deviceCode;
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
}
+ this.jl3dmaintainershow = false;
this.drivingShow = false;
break;
case 'AUDIENCE':
this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'AUDIENCE');
+ this.jl3dmaintainershow = false;
+ this.drivingShow = false;
this.hideIbp();
break;
case 'DRIVER':
this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'DRIVER');
+ this.jl3dmaintainershow = false;
break;
case 'MAINTAINER':
this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'MAINTAINER');
this.hideIbp();
this.jl3dmaintainershow = true;
+ this.drivingShow = false;
break;
}
},
@@ -515,13 +523,13 @@ export default {
});
},
setWindowSize() {
- this.$store.dispatch('config/resize', { width: this.width, height: this.height });
- if (this.prdType == '07') {
- this.setBigScreenMode();
- }
+ this.$store.dispatch('config/resize', { width: this.width, height: this.height });
+ if (this.prdType == '07') {
+ this.setBigScreenMode();
+ }
},
switchStationMode(stationCode) {
- this.showStation = stationCode;
+ this.showStation = stationCode;
this.setShowStation(this.showStation);
},
setShowStation(stationCode) {
@@ -536,7 +544,7 @@ export default {
this.$jlmap.setCenter(stationCode);
},
setStationList(map) {
- this.stationList = [];
+ this.stationList = [];
(map.stationList || []).forEach(item => {
if (item.centralized) {
this.stationList.push({value: item.code, name: item.name});
@@ -545,9 +553,9 @@ export default {
this.centralizedStationMap[ele] = item.code;
});
}
- });
+ });
if (this.stationList.length) {
- this.showStation = this.stationList[0].value;
+ this.showStation = this.stationList[0].value;
}
},
setBigScreenMode() {