<template>
  <ExcelOperate v-if="loading"  />
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { getOrderFileById } from '@/api/order'
import { useCommentExcel } from '@/stores/commentExcel'
import ExcelOperate from './components/ExcelOperate/ExcelOperate.vue'


const loading = ref(false)
const route = useRoute()
const { setFileInfo } = useCommentExcel()

// 获取文件信息及客户信息
const queryFileInfo = async () => {
  const { data } = await getOrderFileById(route.query.fileId as string)
  setFileInfo(data.result)
  loading.value = true
}

onMounted(() => {
  
  route.query?.fileId && queryFileInfo()
})
</script>
<style lang="scss" scoped></style>
