Реализация onCloseWithoutSave
This commit is contained in:
@@ -24,7 +24,7 @@ const archiveInfo = ref({
|
|||||||
post_in: null,
|
post_in: null,
|
||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
const emits = defineEmits(['historyUpdated'])
|
const emits = defineEmits(['historyUpdated', 'closeWithoutSave'])
|
||||||
|
|
||||||
const onResetData = () => {
|
const onResetData = () => {
|
||||||
archiveInfo.value = {
|
archiveInfo.value = {
|
||||||
@@ -35,6 +35,10 @@ const onResetData = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onCloseWithoutSave = () => {
|
||||||
|
emits('closeWithoutSave')
|
||||||
|
open.value = false
|
||||||
|
}
|
||||||
|
|
||||||
const patientData = ref({
|
const patientData = ref({
|
||||||
...patient.value.info
|
...patient.value.info
|
||||||
@@ -152,7 +156,7 @@ watch(() => props.patientId, async (newId) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NModal v-model:show="open" preset="card" class="max-w-4xl" closable @close="open = false">
|
<NModal v-model:show="open" preset="card" class="max-w-4xl" closable @close="onCloseWithoutSave">
|
||||||
<template #header>
|
<template #header>
|
||||||
{{ patient.info?.medcardnum }} {{ patient.info?.family }} {{ patient.info?.name }} {{ patient.info?.ot }}
|
{{ patient.info?.medcardnum }} {{ patient.info?.family }} {{ patient.info?.name }} {{ patient.info?.ot }}
|
||||||
</template>
|
</template>
|
||||||
@@ -180,7 +184,7 @@ watch(() => props.patientId, async (newId) => {
|
|||||||
<template #action>
|
<template #action>
|
||||||
<NFlex justify="end" align="center">
|
<NFlex justify="end" align="center">
|
||||||
<NSpace align="center" :size="0">
|
<NSpace align="center" :size="0">
|
||||||
<NButton secondary>
|
<NButton secondary @click="onCloseWithoutSave">
|
||||||
Закрыть без сохранения
|
Закрыть без сохранения
|
||||||
</NButton>
|
</NButton>
|
||||||
<NDivider vertical />
|
<NDivider vertical />
|
||||||
|
|||||||
Reference in New Issue
Block a user