Форматирование

This commit is contained in:
brusnitsyn
2026-04-24 16:46:10 +09:00
parent fd0e6ee817
commit 63daa62888
87 changed files with 1380 additions and 791 deletions

View File

@@ -50,6 +50,19 @@ const currentDate = computed(() => {
return formatted.charAt(0).toUpperCase() + formatted.slice(1)
})
const exportUrl = computed(() => {
const [startAt, endAt] = reportStore.timestampCurrentRange || []
const departmentId = reportStore.reportInfo?.department?.department_id
const params = new URLSearchParams()
if (startAt) params.set('startAt', String(startAt))
if (endAt) params.set('endAt', String(endAt))
if (departmentId) params.set('departmentId', String(departmentId))
const query = params.toString()
return query ? `/report/export?${query}` : '/report/export'
})
</script>
<template>
@@ -128,6 +141,9 @@ const currentDate = computed(() => {
</template>
Нежелательные события ({{ reportStore.unwantedEvents.length }})
</NButton>
<NButton type="info" secondary tag="a" :href="exportUrl">
Скачать Excel
</NButton>
</NFlex>
</NFlex>
</NCard>