<template>
  <HistoryTable class="w-100% h-100% mt-100px" :device-code="code" :dict-code="`${code}_dict`" />
</template>
<script lang="ts" setup>
  import { onBeforeMount, ref } from 'vue';
  import HistoryTable from './HistoryTable.vue';
  import { useRoute } from 'vue-router';

  const route = useRoute();

  const code = ref('forcFan');

  onBeforeMount(() => {
    if (route.query.code) {
      code.value = route.query.code as string;
    }
  });
</script>
