* добавлены операции и услуги операций

* добавлена выборка и подсчет по датам для роли зав.
* переключатель ролей
* выбор отделений для роли зав.
This commit is contained in:
brusnitsyn
2026-01-22 17:58:27 +09:00
parent 8a0fdf9470
commit cb43c74a72
28 changed files with 961 additions and 143 deletions

View File

@@ -1,6 +1,7 @@
<script setup>
import {computed, onMounted, ref} from "vue";
import {computed, onMounted, ref, watch} from "vue";
import {NSkeleton, NText} from 'naive-ui'
import {useReportStore} from "../../../Stores/report.js";
const props = defineProps({
title: {
@@ -13,14 +14,19 @@ const props = defineProps({
}
})
const reportStore = useReportStore()
const isLoading = ref(true)
const countPatient = ref(null)
const fetchPatientCount = async () => {
if (props.status === 'plan' || props.status === 'emergency') {
isLoading.value = true
await axios.post('/api/mis/patients/count', {
status: props.status
}).then((res) => {
const data = {
status: props.status,
startAt: reportStore.timestampCurrentRange[0],
endAt: reportStore.timestampCurrentRange[1]
}
await axios.post('/api/mis/patients/count', data).then((res) => {
countPatient.value = res.data
}).finally(() => {
isLoading.value = false
@@ -41,6 +47,10 @@ const computedHeader = computed(() => {
onMounted(async () => {
await fetchPatientCount()
})
watch(() => reportStore.timestampCurrentRange, (newRange) => {
if (newRange) fetchPatientCount()
})
</script>
<template>