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

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

<script setup>
import bus from '@/bus';

import MainPage from '@/views/sponeScreen/HaiMianScreen/index.vue'; //1920
import MainPageFive from '@/views/sponeScreen/chengguanweiScreen/mainIndex.vue'; //3800

const ifCGW = ref(false);

// 兼容城管委15楼大屏3800*866和1920*1080
function setScreenType() {
  let widths = window.innerWidth;
  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>