From 87aeb03cb0550c304025065f38da44555a82b7e6 Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 15 May 2023 14:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BE=E7=8F=AD=E5=B7=A5=E4=BD=9C=E7=AB=99?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=88=9D=E5=A7=8B=E5=8C=96=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/display/terminals/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index 15e7c1c26..07aa8b74c 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -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); } },