<template>
  <div id="large-screen" class="benchWarp">
    <!-- top -->
    <div class="benchTop" style="position: relative;">

      <!-- 合作企业概况 -->
      <div class="bgWhite survey" style="height: calc(100vh - 120px);">
        <i style="position: absolute;right: 10px;top: 10px;color:#fff;" class="el-icon-full-screen"
           @click="changeFullScreen"></i>
        <iframe
          name="iframeMap"
          id="iframeMapViewComponent"
          v-bind:src="getPageUrl"
          width="100%"
          height="100%"
          frameborder="0"
          scrolling="no"
          ref="iframeDom"
        ></iframe>
      </div>
    </div>
  </div>
</template>

<script>
import {getMapData} from '@/api/desk/notice'

export default {
  data() {
    return {
      getPageUrl: process.env.VUE_APP_LARGESCREEN,
      // getPageUrl: "http://39.98.184.58/largescreen/",
      fullScreenFlag: false,
      fullScreenFlagKey: 0,
    };
  },
  created() {
    getMapData({
      date: '2023-09',
      province: '四川省'
    }).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;padding-bottom:0;');
        const screen = document.getElementsByClassName('survey')[0]
        screen.setAttribute('style', 'height: 100vh;width:100vw;margin-right:0;');
        const large = document.getElementById('large-screen');
        large.setAttribute('style', 'padding:0 !important;')
        this.fullScreenFlag = !this.fullScreenFlag
      } else {
        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>

<style scoped>
p {
  margin: 0 !important;
}

/* 底色 */
.bgWhite {
  background: #ffffff;
}

/* 标题 */
.title {
  font-weight: bold;
  height: 30px;
  font-size: 22px;
  color: #333333;
  line-height: 30px;
}

.benchWarp {
  /* padding: 0 20px !important; */
  /* margin-top: 4px; */
}

.benchTop {
  display: flex;
  justify-content: space-between;
  /* margin-bottom: 15px; */
}

.survey,
.pending {
  flex: 1;
  /* padding: 10px; */
  /* border-radius: 4px; */
}

.survey {
  /* margin-right: 10px; */
}

.pending {
  margin-left: 10px;
}

.content {
  display: flex;
  justify-content: space-around;
  padding: 0 30px;
}

.content .box {
  text-align: center;
}

.content .box .surveyTitle,
.pendingTitle {
  height: 25px;
  font-size: 18px;
  font-weight: normal;
  color: #333333;
  line-height: 25px;
  margin-top: 30px !important;
}

.content .box .surveyNum,
.pendingNum {
  height: 42px;
  font-size: 30px;
  font-weight: normal;
  color: #333333;
  line-height: 42px;
  margin: 15px 0 !important;
}

.content .box .lookDetail {
  font-size: 18px;
  font-weight: normal;
  color: #3f9eff;
  line-height: 25px;
  width: 119px;
  height: 39px;
  border-radius: 4px;
  border: 1px solid #3f9eff;
  background: #ffffff;
}

.content .box .goJob {
  width: 80px;
  height: 20px;
  color: #0066ff;
  border: 1px solid #0066ff;
  background: #ffffff;
  border-radius: 10px;
  font-size: 12px;
}

.benchBottom {
  display: flex;
}

.invitationCode {
  width: calc(100% - 550px);
  padding: 18px 30px;
  border-radius: 4px;
}

.tips {
  width: 250px;
  margin-left: 15px;
}

.customerService {
  width: 414px;
  background: #ffffff;
  border-radius: 4px;
  margin-bottom: 20px;
  padding: 18px 30px;
}

.customerService .customerContent {
  display: flex;
  align-items: center;
  height: 100%;
}

.customerService .customerContent .img {
  width: 115px;
  height: 115px;
  background: #d8d8d8;
  margin-right: 15px;
  margin-top: 20px;
  background: url("/manage/img/kefu.jpg") no-repeat;
  background-size: 115px 115px;
}

.customerService .customerContent .font {
  height: 30px;
  font-size: 16px;
  font-weight: 400;
  color: #333333;
}

.tip {
  padding: 18px 30px;
  width: 414px;
  background: #ffffff;
  border-radius: 4px;
}

.tip .tipTop {
  display: flex;
  justify-content: space-between;
}

.tip .tipTop .more {
  cursor: pointer;
  height: 22px;
  font-size: 16px;
  font-weight: normal;
  color: #3f9eff;
  line-height: 22px;
}

.tipListBox {
  height: 276px;
  overflow: auto;
}

.tipListBox div {
  display: flex;
  margin: 11px 0;
}

.tipListBox p {
  width: 400px;
  height: 30px;
  font-size: 16px;
  font-weight: 400;
  color: #333333;
  line-height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tipListBox span {
  color: #3f9eff;
}
</style>
