Работа над интерактивным обучением для дежурного и мед. сестры
This commit is contained in:
@@ -27,6 +27,8 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const reportStore = useReportStore()
|
||||
const onboarding = useOnboardingStore()
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
const rawUsers = ref([])
|
||||
@@ -153,10 +155,15 @@ const onSubmit = (e) => {
|
||||
formRef.value?.validate((errors) => {
|
||||
if (!errors) {
|
||||
if (reportExists.value) return
|
||||
|
||||
router.visit(props.targetPath, {
|
||||
data: {
|
||||
userId: reportStore.reportInfo.userId,
|
||||
departmentId: reportStore.reportInfo.departmentId
|
||||
},
|
||||
onSuccess: () => {
|
||||
onboarding.emit('navigate:report')
|
||||
show.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -177,22 +184,11 @@ const onChangeDepartment = (departmentId) => {
|
||||
usersLoaded.value = false
|
||||
fetchUsers(departmentId)
|
||||
}
|
||||
|
||||
const onboarding = useOnboardingStore()
|
||||
const onAfterEnter = async () => {
|
||||
// Если онбординг активен и текущий шаг имеет opensModal, переходим к следующему
|
||||
if (!onboarding.isActive) return
|
||||
|
||||
await nextTick()
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
onboarding.setStep(onboarding.activeStepIndex + 1)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NModal v-model:show="show"
|
||||
id="modal-select-user"
|
||||
preset="card"
|
||||
class="max-w-[420px]"
|
||||
:mask-closable="false"
|
||||
|
||||
@@ -271,10 +271,10 @@ watch(() => props, (newProps) => {
|
||||
{{ reportCreator }}
|
||||
</NTag>
|
||||
</NSpace>
|
||||
<DatePickerQuery :date="dates" :is-head-or-admin="true" class="text-lg!" />
|
||||
<DatePickerQuery id="date-selector" :date="dates" :is-head-or-admin="true" class="text-lg!" />
|
||||
</NFlex>
|
||||
<NDivider dashed class="my-4! mt-3!" />
|
||||
<NRow class="grow space-x-2 h-[82.78px]">
|
||||
<NRow id="statistic-widgets" class="grow space-x-2 h-[82.78px]">
|
||||
<NCol :span="3">
|
||||
<HeaderWidget label="Коек"
|
||||
:counter="stats.duty.beds" />
|
||||
@@ -305,7 +305,7 @@ watch(() => props, (newProps) => {
|
||||
</NRow>
|
||||
</AppPanel>
|
||||
<div class="grid grid-cols-[1fr_auto] gap-x-2">
|
||||
<AppPanel>
|
||||
<AppPanel id="input-widgets">
|
||||
<NFlex align="center" :wrap="false">
|
||||
<NFormItem label="Поступило" :show-feedback="false">
|
||||
<NInputNumber :disabled="!canSaveReport" :min="0" v-model:value="reportForm.recipient" />
|
||||
@@ -335,7 +335,7 @@ watch(() => props, (newProps) => {
|
||||
</NFlex>
|
||||
</div>
|
||||
<AppPanel>
|
||||
<NTabs type="segment">
|
||||
<NTabs id="view-tabs" type="segment">
|
||||
<NTabPane name="mis" tab="МИС" display-directive="show">
|
||||
<DutyPatientsPane :patients="patientCollection" :nurse-patients="nursePatientCollection" @create-observable="addObservablePatient" @remove-observable="removeObservablePatient" />
|
||||
</NTabPane>
|
||||
|
||||
Reference in New Issue
Block a user