Исправление вывода дат для модальных окон

This commit is contained in:
brusnitsyn
2026-07-13 16:45:35 +09:00
parent 6b3a4bfceb
commit 69d2bd8ce1
5 changed files with 19 additions and 46 deletions

View File

@@ -9,22 +9,17 @@ import { computed, h, ref, watch } from 'vue'
import TooltipColumn from '../../Report/Components/DataTableColumns/TooltipColumn.vue'
import {usePage} from "@inertiajs/vue3";
const props = defineProps({
startAt: { required: false },
endAt: { required: false },
})
const open = defineModel('open')
const loading = ref(true)
const deadPatients = ref([])
const currentPatient = ref(null)
const showDrawer = ref(false)
const startAt = computed(() => {
const urlParams = new URLSearchParams(window.location.search)
return urlParams.get('startAt')
})
const endAt = computed(() => {
const urlParams = new URLSearchParams(window.location.search)
return urlParams.get('endAt')
})
// Получаем уникальные отделения для фильтра
const departmentOptions = computed(() => {
const departments = new Set()
@@ -115,7 +110,7 @@ const fetch = (startAt, endAt) => {
watch(open, (open) => {
if (open) {
fetch(startAt.value, endAt.value)
fetch(props.startAt, props.endAt)
}
})
</script>