引入导出原始数据接口

This commit is contained in:
caozehui
2025-01-21 14:52:44 +08:00
parent cce3e6861a
commit 400328d5fa
3 changed files with 33 additions and 13 deletions

View File

@@ -21,15 +21,15 @@
<script lang="tsx" setup>
import {CheckData} from "@/api/check/interface";
import { computed } from "vue";
import {useDownload} from "@/hooks/useDownload";
import {exportRawData} from "@/api/check/test"
import {computed} from "vue";
const {tableData,currentScriptTypeName} = defineProps<{
const {tableData, currentScriptTypeName} = defineProps<{
tableData: CheckData.RawDataItem[]
currentScriptTypeName: string
}>()
const emit = defineEmits(['exportRawDataHandler'])
const unit = computed(() => {
return tableData.length > 0 ? tableData[0].unit : '';
})
@@ -39,7 +39,7 @@ const phaseT = computed(() => {
})
const tableHeader = computed(() => {
if (phaseT.value === 1){
if (phaseT.value === 1) {
let index = currentScriptTypeName.indexOf('=');
return currentScriptTypeName.substring(0, index);
}
@@ -47,7 +47,7 @@ const tableHeader = computed(() => {
})
const exportData = () => {
useDownload(exportRawData, '原始数据.xlsx', {}, false, '.xlsx')
emit('exportRawDataHandler')
}
</script>