This commit is contained in:
zyy 2020-07-24 11:01:33 +08:00
commit 584f65d285
5 changed files with 35 additions and 10 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -1,6 +1,6 @@
<template>
<div>
<demon-chat ref="chatbox" :group="group" :user-role="userRole" :offset-bottom="offsetBottom" />
<demon-chat ref="chatbox" :group="group" :user-role="userRole" />
<div class="display-card" :style="{top: offset+'px'}">
<el-row>
<span v-if="countTime" class="display-score">{{ $t('display.demon.trialTime') }} {{ countTime }}</span>

View File

@ -122,11 +122,11 @@ export default {
// 线
clearAllTimer() {
if (this.ierval) {
clearTimeout(this.ierval);
clearInterval(this.ierval);
this.ierval = null;
}
if (this.checkLine) {
clearTimeout(this.checkLine);
clearInterval(this.checkLine);
this.checkLine = null;
}
},

View File

@ -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) {