引入导出原始数据接口
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user