From 33a8eba1c7485068139332fd0ab4a56106702c97 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 24 Jul 2020 10:14:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/trainingPlatform/demonList.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index dbe299a84..e8e6261b9 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -111,6 +111,7 @@ export default { break; } data = data.parent; + if (!data) { break; } } if ( obj.type === 'Map') { this.mapId = obj.id; @@ -181,6 +182,8 @@ export default { this.$nextTick(() => { const checkId = localStore.get('trainingPlatformCheckId' + filterSelect + this.userId + this.project) || null; this.$refs.tree && this.$refs.tree.setCurrentKey(checkId); + checkId && this.findTree(this.treeList, checkId); + !checkId && this.treeList && this.treeList.length && this.clickEvent(this.treeList[0], {data: this.treeList[0]}); this.loading = false; }); } catch (error) { @@ -188,6 +191,19 @@ export default { this.$message.error(this.$t('error.refreshFailed')); } }, + /* 根据localstorage缓存的trainingPlatformCheckId跳转右侧显示页面 */ + findTree(treeList, checkId, data) { + treeList && treeList.length && treeList.forEach(item =>{ + if (item.type === 'Map') { + data = item; + } + if (checkId === item.key) { + this.clickEvent(item, {data: data}); + } else { + this.findTree(item.children, checkId, data); + } + }); + }, nodeExpand(obj, node, ele) { const key = obj.id + obj.type; this.expandList = this.expandList.filter(item => item !== key); @@ -200,6 +216,7 @@ export default { localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId + this.project, this.expandList); }, getExpandList(filterSelect) { + this.expandList = []; let expand = localStore.get('trainIngPlatformExpandList' + filterSelect + this.userId + this.project); expand = expand ? (expand + '').split(',') : ''; if (expand instanceof Array) { From 196a611d70299343621ae2df7012e03c1c04ae52 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 24 Jul 2020 10:35:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=BF=E7=9C=9F=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/StationStand/ETrainDepart.js | 8 ++++++-- src/views/newMap/displayNew/demonChat.vue | 14 +++++++++----- src/views/newMap/displayNew/menuDemon.vue | 2 +- src/views/newMap/mapsystemNew/index.vue | 4 ++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/jmapNew/shape/StationStand/ETrainDepart.js b/src/jmapNew/shape/StationStand/ETrainDepart.js index 3ac4b9e2b..27fddccd9 100644 --- a/src/jmapNew/shape/StationStand/ETrainDepart.js +++ b/src/jmapNew/shape/StationStand/ETrainDepart.js @@ -44,11 +44,14 @@ class ETrainDepart extends Group { hideMode() { this.trainDepart && this.trainDepart.hide(); - this.time && clearInterval(this.time); + // if (this.time) { + // clearInterval(this.time); + // this.timeStart = 30; + // } } showMode() { - this.timeStart = 30; + // this.timeStart = 30; this.create(`0${this.timeStart}`); this.trainDepart.show(); setTimeout(() => { @@ -67,6 +70,7 @@ class ETrainDepart extends Group { } } else { clearInterval(this.time); + this.timeStart = 30; } }, 1000); } diff --git a/src/views/newMap/displayNew/demonChat.vue b/src/views/newMap/displayNew/demonChat.vue index 66c46067a..7a661a649 100644 --- a/src/views/newMap/displayNew/demonChat.vue +++ b/src/views/newMap/displayNew/demonChat.vue @@ -36,14 +36,11 @@ export default { userRole: { type: String, required: true - }, - offsetBottom:{ - type: Number, - required: true } }, data() { return { + offsetBottom:15, scriptTip:'', isHasCoversition:false, conversitionId:'', @@ -67,7 +64,14 @@ export default { } }, watch:{ - '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态 + '$store.state.config.menuBarLoadedCount': function (val) { + this.$nextTick(() => { + this.offsetBottom = 15; + const menuBottom = document.getElementById('menuButton'); + this.offsetBottom = this.offsetBottom + (menuBottom ? menuBottom.offsetHeight || 0 : 0); + }); + }, + '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始获取仿真成员 getSimulationMemberList(this.group).then(resp => { let lastData = JSON.stringify(resp.data); const roleTypeList = ConstConfig.ConstSelect.roleTypeNew; diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 93ef57b8b..61aeb0041 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -1,6 +1,6 @@