全屏开发

This commit is contained in:
zxy
2024-02-20 12:05:45 +08:00
parent ec97837674
commit dee682dd6a
3 changed files with 58 additions and 7 deletions

View File

@@ -1,7 +1,9 @@
<template>
<div class="benchWarp">
<!-- top -->
<div class="benchTop">
<div class="benchTop" style="position: relative;">
<!-- <span style="position: absolute;right: 0;top: 0;">最大化</span> -->
<i style="position: absolute;right: 10px;top: 0;" class="el-icon-full-screen" @click="changeFullScreen"></i>
<!-- 合作企业概况 -->
<div class="bgWhite survey" style="height: calc(100vh - 120px);">
<!-- <img src="./index.jpeg" width="100%" height="100%"> -->
@@ -28,7 +30,9 @@ import { getMapData } from '@/api/desk/notice'
export default {
data() {
return {
getPageUrl: "/chengdu/index.html"
getPageUrl: "/chengdu/index.html",
fullScreenFlag: false,
fullScreenFlagKey: 0,
};
},
created() {
@@ -38,6 +42,53 @@ export default {
}).then(res => {
console.log(res)
})
},
methods: {
// toFullScreen() {
// this.showFullScreen = true
// },
changeFullScreen() {
// this.fullScreenFlagKey +=1
if (!this.fullScreenFlag) {
const element = document.getElementsByClassName('avue-header')[0];
element.setAttribute('style', 'display: none');
const nav = document.getElementsByClassName('avue-tags')[0]
nav.setAttribute('style', 'display: none');
const tags = document.getElementsByClassName('avue-left')[0]
tags.setAttribute('style', 'display: none');
const el = document.getElementsByClassName('avue-main')[0]
el.setAttribute('style', 'left: 0;height: 100vh;width:100vw;');
const screen = document.getElementsByClassName('survey')[0]
screen.setAttribute('style', 'height: 100vh;width:100vw;');
// this.leftTableHeight += 30
this.fullScreenFlag = !this.fullScreenFlag
} else {
// this.leftTableHeight -= 30
// const element = document.getElementsByClassName('sidebar-container')[0];
// element.setAttribute('style', 'display: block');
// const nav = document.getElementsByClassName('navbar')[0]
// nav.setAttribute('style', 'display: block');
// const tags = document.getElementById('tags-view-container')
// tags.setAttribute('style', 'display: block');
// const el = document.getElementsByClassName('main-container')[0]
// el.setAttribute('style', 'height: calc(100vh-84px)');
// el.removeAttribute('margin-left')
// const screen = document.getElementsByClassName('screen-home')[0]
// screen.setAttribute('style', 'height: calc(100vh-84px)');
// this.fullScreenFlag = !this.fullScreenFlag
const element = document.getElementsByClassName('avue-header')[0];
element.setAttribute('style', 'display: block');
const nav = document.getElementsByClassName('avue-tags')[0]
nav.setAttribute('style', 'display: block');
const tags = document.getElementsByClassName('avue-left')[0]
tags.setAttribute('style', 'display: block');
const el = document.getElementsByClassName('avue-main')[0]
el.setAttribute('style', 'left: 240px;height:100vh;');
const screen = document.getElementsByClassName('survey')[0]
screen.setAttribute('style', 'height: 100vh;');
this.fullScreenFlag = !this.fullScreenFlag
}
},
}
};
</script>