Newer
Older
KaiFengPC / src / views / sponeScreen / chengguanweiScreen / index.vue
@zhangdeliang zhangdeliang on 19 Jun 1 KB udpate
<template>
  <!-- 海绵综合一张图首页 -->
  <div class="hmzhOnemap">
    <!-- 3800*866 -->
    <MainPageFive v-if="ifCGW"></MainPageFive>

    <!-- 1920*1080 -->
    <MainPage v-if="!ifCGW"></MainPage>

    <!-- 地图 -->
    <GisMapMF></GisMapMF>
  </div>
</template>

<script setup>
import bus from '@/bus';
import GisMapMF from '@/views/sponeScreen/gisMF/cesiumMap.vue';
import MainPage from '@/views/sponeScreen/HaiMianScreen/index.vue'; //1920
import MainPageFive from '@/views/sponeScreen/chengguanweiScreen/mainIndex.vue'; //3800

const router = useRouter();
const ifCGW = ref(false);
function zxt() {
  router.push({ path: '/index' });
}

// 兼容城管委15楼大屏3800*866和1920*1080
function setScreenType() {
  let widths = window.innerWidth;
  console.log('widths---', widths);
  if (widths > 3500) {
    ifCGW.value = true;
  } else {
    ifCGW.value = false;
  }
}

onMounted(() => {
  setScreenType(); //兼容城管委15楼大屏3800*866和1920*1080
});
</script>

<style scoped lang="scss">
.hmzhOnemap {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
</style>