派班工作站客户端初始化异常调整

This commit is contained in:
fan 2023-05-15 14:05:01 +08:00
parent ee04af801a
commit 87aeb03cb0

View File

@ -224,13 +224,18 @@ export default {
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
return mapClientList.find(item => item.type === type && (!item.deviceCode || item.deviceCode === this.roleDeviceCode));
},
findTerminalFromMapById(id) {
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
return mapClientList.find(item => item.id === id);
},
initTerminalIfNoDefault() {
if (!this.$store.state.training.roles && !this.$route.query.client) {
let client = this.findTerminalFromMap('dispatchWork');
if (!client) { client = this.findTerminalFromMap('troDetailWork'); }
this.pictureChange(client);
} else if (!this.$store.state.training.roles) {
const client = this.findTerminalFromMap(this.$route.query.client);
const client = this.findTerminalFromMapById(this.$route.query.client);
this.pictureChange(client);
}
},