Форматирование
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user