<template>

</template>

<script setup>
  import { ref, inject, onMounted, computed, watch, onBeforeUnmount } from 'vue';
  import { ElMessage } from 'element-plus'
  import { House } from '@element-plus/icons-vue'
  import qs from 'qs'
  import dayjs from 'dayjs'

  const $http = inject('$http')
  const checkLoginStatus = inject('checkLoginStatus');
  const isMobile = inject('isMobile');

 


  // 格式化时间方法
  const formatTime = (timestamp) => {
    return dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss');
  };
  // 新增方法：格式化时长（分钟）
  const formatDuration = (ms) => {
    const sss = Math.floor(ms / 1000);
    return `${sss}秒`;
  };
  onMounted(() => {
    localStorage.setItem('url', '/radarlog')
    checkLoginStatus()
    setFaultRecognition()
    pickerDate.value = dayjs().format('YYYY-MM-DD');
    Promise.all([getRooms(), getHostRooms()])
      .then(() => {
        //getAllLog();
      });
  })

</script>

<style scoped>
  .container {
    padding: 10px;
  }

</style>
