<template>
  <OnlyOffiece :fileData="fileData" :fileId="fileId" :fileKey="fileKey" />
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRoute } from 'vue-router';
import OnlyOffiece from '@/components/common/onlyOffice/index.vue';

const route: any = useRoute();
const { query } = route;
const data: any = query.fileData || '{}';
const fileId = ref(query.fileId);
const fileKey = ref(query.fileKey);
const fileData = ref(JSON.parse(data));

localStorage.setItem('USER_ID', query.userId);
localStorage.setItem('TOKEN', query.token);
localStorage.setItem('TENANT_ID', query.tenantId);
</script>
