大铁项目 根据车站值班员 显示绘图

This commit is contained in:
joylink_cuiweidong 2021-05-13 13:55:02 +08:00
parent d52a5837b4
commit f4cd046f1a
2 changed files with 34 additions and 0 deletions

View File

@ -131,6 +131,18 @@ export default class SignalButton extends Group {
setShowMode() {
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {
item.show();
});
this.isShowShape = true;
this.setState(this.model);
} else {
this.eachChild(item => {
item.hide();
});
this.isShowShape = false;
}
}
getAnchorPoint() {
}

View File

@ -188,6 +188,28 @@ export default {
methods: {
async initLoadPage() {
try {
const memberData = Object.values(this.$store.state.training.memberData);
const member = memberData.find(eachMember=>{
return eachMember.userId == this.$store.state.user.id;
});
const deviceId = member ? member.deviceId : '';
if (deviceId) {
const nameList = Object.keys(this.$store.state.map.map || {});
let list = [];
nameList.forEach(item => {
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
if (item === 'trainList') {
this.$store.state.map.map[item].forEach(elem => {
elem && list.push(elem);
});
} else {
list = [...list, ...this.$store.state.map.map[item]];
}
}
});
this.$jlmap.updateShowStation(list, deviceId);
}
// 'Station83189';
if (this.try != '0') {
this.loadInitData();
}