правки
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-06-03 20:22:15 +10:00
parent bf83ed8770
commit 01b30d0b9d

View File

@@ -3,12 +3,14 @@
<div class="flex flex-col lg:flex-row items-center gap-2 flex-grow"> <div class="flex flex-col lg:flex-row items-center gap-2 flex-grow">
<div class="flex items-center gap-2 w-full lg:w-auto"> <div class="flex items-center gap-2 w-full lg:w-auto">
<span class="dark:text-neutral-300 whitespace-nowrap">с</span> <span class="dark:text-neutral-300 whitespace-nowrap">с</span>
<DatePicker v-model="dateStart" /> <DatePicker v-model="dateStart" inputId="date-start" name="date_start" />
<span class="dark:text-neutral-300 whitespace-nowrap">по</span> <span class="dark:text-neutral-300 whitespace-nowrap">по</span>
<DatePicker v-model="dateFinish" /> <DatePicker v-model="dateFinish" inputId="date-finish" name="date_finish" />
</div> </div>
<select <select
v-model="selectedFilter" v-model="selectedFilter"
id="filter-select"
name="filter"
class="dark:bg-gray-900 border-slate-100 shadow rounded-xl h-12 p-3 mt-3 lg:mt-0 lg:ml-4 w-full lg:w-auto flex-shrink-0 cursor-pointer" class="dark:bg-gray-900 border-slate-100 shadow rounded-xl h-12 p-3 mt-3 lg:mt-0 lg:ml-4 w-full lg:w-auto flex-shrink-0 cursor-pointer"
> >
<option value="status">Избранные</option> <option value="status">Избранные</option>
@@ -17,6 +19,17 @@
<option value="donesenie">Донесение</option> <option value="donesenie">Донесение</option>
<option value="bilutene">Билутень</option> <option value="bilutene">Билутень</option>
</select> </select>
<select
v-model="selectedFiltercountry"
id="filter-country-select"
name="filter_country"
class="dark:bg-gray-900 border-slate-100 shadow rounded-xl h-12 p-3 mt-3 lg:mt-0 lg:ml-4 w-full lg:w-auto flex-shrink-0 cursor-pointer"
>
<option value="Все">Все страны</option>
<option value="Китай">Китай</option>
<option value="Корея">Корея</option>
<option value="Япония">Япония</option>
</select>
</div> </div>
<button <button
@@ -39,6 +52,7 @@ import DatePicker from "./DatePicker.vue";
const dateStart = ref(getYesterdayDate()); const dateStart = ref(getYesterdayDate());
const dateFinish = ref(getTodayDate()); const dateFinish = ref(getTodayDate());
const selectedFilter = ref("status"); const selectedFilter = ref("status");
const selectedFiltercountry = ref("all");
async function handleDownload() { async function handleDownload() {
try { try {
@@ -46,8 +60,9 @@ async function handleDownload() {
dateStart.value, dateStart.value,
dateFinish.value, dateFinish.value,
selectedFilter.value, selectedFilter.value,
selectedFiltercountry.value,
); );
const filename = `${selectedFilter.value}_${dateStart.value}_${dateFinish.value}.zip`; const filename = `страна_${selectedFiltercountry.value}_${selectedFilter.value}_${dateStart.value}_${dateFinish.value}.zip`;
downloadBlob(response.data, filename); downloadBlob(response.data, filename);
} catch (error) { } catch (error) {
console.error("Ошибка при выгрузке:", error); console.error("Ошибка при выгрузке:", error);