Исправление вывода дат для модальных окон
This commit is contained in:
@@ -10,6 +10,8 @@ import TooltipColumn from '../../Report/Components/DataTableColumns/TooltipColum
|
||||
|
||||
const props = defineProps({
|
||||
departmentId: { required: true },
|
||||
startAt: { required: false },
|
||||
endAt: { required: false },
|
||||
})
|
||||
|
||||
const open = defineModel('open')
|
||||
@@ -82,16 +84,6 @@ const columns = [
|
||||
},
|
||||
]
|
||||
|
||||
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 fetch = (startAt, endAt) => {
|
||||
loading.value = true
|
||||
axios.get('/api/statistics/reports/observable-patients', {
|
||||
@@ -104,7 +96,7 @@ const fetch = (startAt, endAt) => {
|
||||
}
|
||||
|
||||
watch([open, () => props.departmentId], ([open, departmentId]) => {
|
||||
if (open && departmentId) fetch(startAt.value, endAt.value)
|
||||
if (open && departmentId) fetch(props.startAt, props.endAt)
|
||||
}, { immediate: true, deep: true })
|
||||
</script>
|
||||
|
||||
@@ -160,15 +152,6 @@ watch([open, () => props.departmentId], ([open, departmentId]) => {
|
||||
:value="currentPatient?.observable_reason"
|
||||
placeholder="Причина не указана"
|
||||
/>
|
||||
<template v-if="currentPatient?.comment">
|
||||
<NText depth="3" style="font-size:12px;">Комментарий:</NText>
|
||||
<NInput
|
||||
type="textarea"
|
||||
readonly
|
||||
:rows="4"
|
||||
:value="currentPatient?.comment"
|
||||
/>
|
||||
</template>
|
||||
</NFlex>
|
||||
</NDrawerContent>
|
||||
</NDrawer>
|
||||
|
||||
Reference in New Issue
Block a user