综合演练页面行值刷新显示错误调整

This commit is contained in:
fan 2022-08-11 11:17:14 +08:00
parent 7096511b46
commit 61e517e317

View File

@ -233,6 +233,12 @@ export default {
this.cancelBigScreenMode(); this.cancelBigScreenMode();
} }
}, },
'$store.state.map.mapDataLoadedCount':function(val) {
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT'];
if (roleList.includes(this.$store.state.training.roles)) {
this.stationRoleShow(this.showStation);
}
},
'$store.state.map.mapViewLoadedCount': function () { // '$store.state.map.mapViewLoadedCount': function () { //
this.mapViewLoadedOver = true; this.mapViewLoadedOver = true;
this.showSelectStation && this.setShowStation(this.showStation); this.showSelectStation && this.setShowStation(this.showStation);
@ -420,7 +426,6 @@ export default {
// 仿 // 仿
async initLoadDemonData() { async initLoadDemonData() {
if (this.lineCode) { if (this.lineCode) {
// 01 02 ''
let resp = {data: {}}; let resp = {data: {}};
resp = await this.getUserRole(); resp = await this.getUserRole();
if (resp && resp.code == 200) { if (resp && resp.code == 200) {
@ -434,11 +439,45 @@ export default {
handleDialogShow(type) { handleDialogShow(type) {
this.$refs[type].doShow(); this.$refs[type].doShow();
}, },
stationRoleShow(deviceCode) {
const pictureLineCodeList = ['16'];
if (this.lineCode === '14') {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
}
if (pictureLineCodeList.includes(this.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === deviceCode && picture.type === 'chainStation');
if (picture) {
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
const deviceList = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
deviceList.push(key);
}
this.$jlmap.updateShowStation(list, '');
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]);
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
}
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
}
},
// prdTyperole // prdTyperole
setSimulationPrdType(deviceCode) { setSimulationPrdType(deviceCode) {
// Dispatcher STATION_SUPERVISOR Audience Driver MAINTAINER // Dispatcher STATION_SUPERVISOR Audience Driver MAINTAINER
this.showStation = ''; this.showStation = '';
const pictureLineCodeList = ['16'];
let tempData; let tempData;
let dataZoom; let dataZoom;
switch (this.userRole) { switch (this.userRole) {
@ -459,38 +498,7 @@ export default {
this.$refs.menuSchema.chiShowStation = deviceCode; this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode; this.showStation = deviceCode;
// this.changePrdType('01'); // this.changePrdType('01');
if (this.lineCode === '14') { this.stationRoleShow(deviceCode);
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
}
if (pictureLineCodeList.includes(this.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === deviceCode && picture.type === 'chainStation');
if (picture) {
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
const deviceList = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
deviceList.push(key);
}
this.$jlmap.updateShowStation(list, '');
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]);
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
}
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
}
this.jl3dmaintainershow = false; this.jl3dmaintainershow = false;
this.drivingShow = false; this.drivingShow = false;
break; break;
@ -500,17 +508,7 @@ export default {
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT'); this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
this.$refs.menuSchema.chiShowStation = deviceCode; this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode; this.showStation = deviceCode;
if (this.lineCode === '14') { this.stationRoleShow(deviceCode);
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeDate: this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
}
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
this.jl3dmaintainershow = false; this.jl3dmaintainershow = false;
this.drivingShow = false; this.drivingShow = false;
break; break;