This commit is contained in:
2025-09-30 09:42:43 +08:00
parent 9719228d6d
commit c5ac27cdec
15 changed files with 222 additions and 139 deletions

View File

@@ -2,6 +2,7 @@
import { ref, computed, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import { amazonApi } from '../../api/amazon'
import { handlePlatformFileExport } from '../../utils/settings'
// 响应式状态
const loading = ref(false) // 主加载状态
@@ -196,11 +197,9 @@ async function exportToExcel() {
html += '</table>'
const blob = new Blob([html], { type: 'application/vnd.ms-excel' })
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = `Amazon产品数据_${new Date().toISOString().slice(0, 10)}.xls`
link.click()
URL.revokeObjectURL(link.href)
const fileName = `Amazon产品数据_${new Date().toISOString().slice(0, 10)}.xls`
await handlePlatformFileExport('amazon', blob, fileName)
clearInterval(progressInterval)
exportProgress.value = 100