Работа над интерактивным обучением для дежурного и мед. сестры

This commit is contained in:
brusnitsyn
2026-07-15 16:53:38 +09:00
parent e48d38f3a2
commit d9cb1aca28
12 changed files with 377 additions and 209 deletions

View File

@@ -17,6 +17,7 @@ import ActionsColumnDataTable from "../Components/ActionsColumnDataTable.vue";
import {useAppDialog} from "../../../Composables/useAppDialog.js";
import {format} from "date-fns";
import DatePickerQuery from "../../../Components/DatePickerQuery.vue";
import {useOnboardingStore} from "../../../Stores/onboarding.js";
const props = defineProps({
patients: {
@@ -53,6 +54,7 @@ const props = defineProps({
const canEdit = computed(() => props.canSaveReport || props.canEditPastReport)
const onboarding = useOnboardingStore()
const showAddMedicalHistoryModal = shallowRef(false)
const showEditMedicalHistoryModal = shallowRef(false)
const editHistoryId = ref(null)
@@ -210,18 +212,23 @@ const submit = () => {
const reportCreator = computed(() => {
if (props.latestReport === null) return ''
if (props.latestReport.doctor.LPUDoctorID === 0) return 'Отчет создан системой'
if (props.latestReport.doctor?.LPUDoctorID === 0) return 'Отчет создан системой'
else return `Отчет создан: ${props.latestReport.doctor.FAM_V} ${props.latestReport.doctor.IM_V} ${props.latestReport.doctor.OT_V}`
})
const reportCreatorType = computed(() => {
if (props.latestReport === null) return 'warning'
if (props.latestReport.doctor.LPUDoctorID === 0) return 'error'
if (props.latestReport.doctor?.LPUDoctorID === 0) return 'error'
else return 'warning'
})
const formattedLabel = (word, count) => {
return `${word} (${count})`
}
const onShowCreatePatientModal = () => {
showAddMedicalHistoryModal.value = true
onboarding.emit('createNewPatientModal:opened')
}
</script>
<template>
@@ -237,19 +244,19 @@ const formattedLabel = (word, count) => {
{{ reportCreator }}
</NTag>
</NSpace>
<DatePickerQuery :date="dates" :is-head-or-admin="true" class="text-lg!" hint />
<DatePickerQuery id="date-selector" :date="dates" :is-head-or-admin="true" class="text-lg!" hint />
</NFlex>
</AppPanel>
<AppPanel header="Журнал пациентов" header-include-body>
<template v-if="canEdit" #header-extra>
<NButton secondary :loading="loading" @click="showAddMedicalHistoryModal = true">
<NButton id="add-new-patient" secondary :loading="loading" @click="onShowCreatePatientModal">
<template #icon>
<TbCirclePlus />
</template>
Добавить пациента
</NButton>
</template>
<NTabs type="line">
<NTabs id="view-tabs" type="line">
<NTabPane name="all"
:tab="formattedLabel('В отделении', patientsByGroup.in_department.length)"
>