Обновление 1.0
This commit is contained in:
@@ -3,6 +3,7 @@ import {NDataTable, NEllipsis, NTag} from "naive-ui"
|
||||
import {computed, h, reactive, ref, watch} from "vue"
|
||||
import {useMedicalHistoryFilter} from "../../../Composables/useMedicalHistoryFilter.js";
|
||||
import ArchiveHistoryModal from '../ArchiveHistoryModal/Index.vue'
|
||||
import {useArchiveCard} from "../../../Stores/ArchiveCard.js";
|
||||
|
||||
const props = defineProps({
|
||||
filters: {
|
||||
@@ -24,6 +25,7 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const { isLoading, handlePageChange, handlePageSizeChange, meta, filtersRef } = useMedicalHistoryFilter(props.filters)
|
||||
const archiveCardStore = useArchiveCard()
|
||||
const dataTable = ref(props.data ?? [])
|
||||
|
||||
const archiveStatusColumn = (status) => {
|
||||
@@ -132,6 +134,14 @@ const onUpdateHistory = ({data, patientId}) => {
|
||||
watch(() => props.data, (newData) => {
|
||||
dataTable.value = newData
|
||||
})
|
||||
|
||||
watch(() => archiveCardStore.isOpenArchiveCard, (isOpen) => {
|
||||
if (isOpen) {
|
||||
selectedPatientInfo.value = Object.assign(archiveCardStore.preOpenCard)
|
||||
showArchiveHistoryModal.value = true
|
||||
archiveCardStore.setPreOpenCard(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user