仿真聊天代码调整

This commit is contained in:
joylink_cuiweidong 2020-07-24 10:35:05 +08:00
parent 5d413dba8c
commit 196a611d70
4 changed files with 18 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;
}
},