Revert "Export system"

This reverts commit a79c4ec5ee.
This commit is contained in:
Darko Gjorgjijoski
2026-06-11 08:36:05 +02:00
parent ed5103e54d
commit c9d623a0dd
59 changed files with 715 additions and 4883 deletions

View File

@@ -1,30 +0,0 @@
import http from '@/scripts/http/index.js'
export async function downloadCsvExport(url, params = {}) {
const response = await http.get(url, {
params,
responseType: 'blob',
})
const contentDisposition = response.headers['content-disposition']
let filename = 'export.csv'
if (contentDisposition) {
const match = contentDisposition.match(/filename="?([^";]+)"?/)
if (match) {
filename = match[1]
}
}
const blobUrl = window.URL.createObjectURL(
new Blob([response.data], { type: 'text/csv;charset=utf-8' }),
)
const link = document.createElement('a')
link.href = blobUrl
link.setAttribute('download', filename)
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
window.URL.revokeObjectURL(blobUrl)
}