Newer
Older
BJgas-metering-front / src / views / dashboard / index.vue
<!--
  Description: 首页
  Author: 李亚光
  Date: 2023-04-23
 -->
<script lang="ts" setup name="dashboard">
import guadmap from './map/index.vue'
import useWebsocketStore from '@/store/modules/websocket'
const websocket = useWebsocketStore()
const mainHeight = ref(document.body.clientHeight - 50)
window.addEventListener('resize', () => {
  const bodyHeight = document.body.clientHeight - 50
  mainHeight.value = bodyHeight
})
onMounted(() => {
  // 连接websocket
  // websocket.initWebSocket()
})
</script>

<template>
  <div :style="{ height: `${mainHeight}px` }" class="container-dashboard">
    <!-- 地图 -->
    <guadmap />
  </div>
</template>

 <style lang="scss" scoped>
 .container-dashboard{
  margin-top: -1px;
 }
 </style>