修复全屏显示问题
parent
f1f31587e6
commit
1971dec0e6
|
@ -30,6 +30,20 @@ body {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 全屏模式下隐藏滚动条 */
|
||||||
|
body:fullscreen {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 全屏模式下的滚动条隐藏 */
|
||||||
|
body:fullscreen::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.scroll::-webkit-scrollbar {
|
.scroll::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
|
|
@ -25,6 +25,21 @@ export default {
|
||||||
mounted(){
|
mounted(){
|
||||||
window.app=this;
|
window.app=this;
|
||||||
this.isMap=location.hash.indexOf("#/map")>=0;
|
this.isMap=location.hash.indexOf("#/map")>=0;
|
||||||
|
|
||||||
|
// 监听全屏事件,控制body的overflow样式
|
||||||
|
this.$bus.$on('fullscreen', (isFullscreen) => {
|
||||||
|
if (isFullscreen) {
|
||||||
|
// 进入全屏时隐藏body滚动条
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
} else {
|
||||||
|
// 退出全屏时恢复body滚动条
|
||||||
|
document.body.style.overflow = 'auto';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
// 清理事件监听
|
||||||
|
this.$bus.$off('fullscreen');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="bim-4d-simulation main-page" style="--plan-color: #00aaff66" :class="{ 'show-plan': showPlan }">
|
<div class="bim-4d-simulation main-page" style="--plan-color: #00aaff66" :class="{ 'show-plan': showPlan }">
|
||||||
<div class="icon-switch-plan" @click="doSwitchPlan">
|
<div class="icon-switch-plan" @click="doSwitchPlan" v-if="!noPlan">
|
||||||
<svg-icon icon-class="swagger" />
|
<svg-icon icon-class="swagger" />
|
||||||
</div>
|
</div>
|
||||||
<div id="bim4D" :key="elId" :class="taskList.length>0?'show-plan':'no-plan'">
|
<div id="bim4D" :key="elId" :class="!noPlan?'show-plan':'no-plan'">
|
||||||
<div id="bim4DContainer" class="bim4DContainer"></div>
|
<div id="bim4DContainer" class="bim4DContainer"></div>
|
||||||
<div class="div-tools" >
|
<div class="div-tools" >
|
||||||
<div class="tool-item" @click="resetScene">
|
<div class="tool-item" @click="resetScene">
|
||||||
|
@ -59,11 +59,14 @@
|
||||||
|
|
||||||
<el-slider v-model="playValue" :max="taskList.length" class="slider" @change="doSliderChange" />
|
<el-slider v-model="playValue" :max="taskList.length" class="slider" @change="doSliderChange" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="hasLoad && taskList.length>0 " class="div-plan" v-show="showPlan">
|
<div v-if="hasLoad && !noPlan " class="div-plan" v-show="showPlan">
|
||||||
<gantt-elastic :options="options" :tasks="taskList" :dynamicStyle="planStyle" ref="gantt">
|
<gantt-elastic :options="options" :tasks="taskList" :dynamicStyle="planStyle" ref="gantt">
|
||||||
<gantt-header slot="header" :options="optionList" v-if="1 == 2"></gantt-header>
|
<gantt-header slot="header" :options="optionList" v-if="1 == 2"></gantt-header>
|
||||||
</gantt-elastic>
|
</gantt-elastic>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!hasLoad" class="div-plan is-loading" v-loading="!hasLoad" style="height: 400px;">
|
||||||
|
<div class="loading-text">计划加载中...</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -100,6 +103,7 @@ export default {
|
||||||
showPlan: true,
|
showPlan: true,
|
||||||
lastFeatureIds: [],
|
lastFeatureIds: [],
|
||||||
planLoaded: false,
|
planLoaded: false,
|
||||||
|
noPlan:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -220,6 +224,8 @@ export default {
|
||||||
});
|
});
|
||||||
this.hasLoad = true;
|
this.hasLoad = true;
|
||||||
this.planLoaded = true;
|
this.planLoaded = true;
|
||||||
|
this.noPlan=this.taskList.length==0;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -305,6 +311,18 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.div-plan {
|
.div-plan {
|
||||||
|
&.is-loading{
|
||||||
|
display: flex;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.loading-text{
|
||||||
|
margin-top: -100px;
|
||||||
|
}
|
||||||
|
.el-loading-spinner{
|
||||||
|
margin-left: -50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.gantt-elastic__main-view {
|
.gantt-elastic__main-view {
|
||||||
.gantt-elastic__task-list-header-column {
|
.gantt-elastic__task-list-header-column {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
|
|
Loading…
Reference in New Issue