* блокировка изменения отчета для врача

* вывод данных из отчетов для ролей адм и зав
* поправил ширину стобцов ввода
* добавил календарь на страницу статистики
* переделал календарь у заведующего на странице отчета
* добавил и привязал метрики в статистику
This commit is contained in:
brusnitsyn
2026-02-03 17:03:37 +09:00
parent 2805e5e4bc
commit 9ee33bc517
20 changed files with 889 additions and 159 deletions

View File

@@ -54,7 +54,7 @@ const reportButtonType = computed(() => authStore.isDoctor ? 'button' : Link)
/>
<StartButton title="Статистика моего отделения"
:description="`Ваше отделение в системе: ${authStore.userDepartment.name_short}`"
:href="`/statistic?sent_at=${reportStore.timestampCurrentRange}&groupId=1`"
:href="`/statistic`"
:icon="TbChartTreemap"
/>
<StartButton title="Выйти из системы"

View File

@@ -1,5 +1,5 @@
<script setup>
import { NFlex, NButton } from 'naive-ui'
import { NFlex, NAlert, NButton } from 'naive-ui'
import ReportHeader from "./ReportHeader.vue";
import ReportFormInput from "./ReportFormInput.vue";
import ReportSection from "./ReportSection.vue";
@@ -28,6 +28,9 @@ const onSubmit = () => {
<template>
<NFlex vertical class="max-w-6xl mx-auto mt-6 mb-4 w-full">
<NAlert type="warning" v-if="reportStore.reportInfo.report?.message">
{{ reportStore.reportInfo.report.message }}
</NAlert>
<ReportHeader :mode="mode" />
<ReportFormInput />

View File

@@ -5,6 +5,7 @@ import {useAuthStore} from "../../../Stores/auth.js";
const reportStore = useReportStore()
const authStore = useAuthStore()
</script>
<template>
@@ -66,4 +67,8 @@ const authStore = useAuthStore()
:deep(.n-statistic-value) {
@apply flex justify-center items-center;
}
:deep(.n-input-wrapper) {
width: 120px;
}
</style>

View File

@@ -66,7 +66,7 @@ const currentDate = computed(() => {
</NSpace>
<div class="col-3 w-full">
<ReportSelectDate />
<ReportSelectDate :is-one-day="reportStore.reportInfo.report?.isOneDay"/>
</div>
</div>

View File

@@ -41,7 +41,7 @@ const isReadonlyMode = computed(() => props.mode.toLowerCase() === 'readonly')
<template>
<NCard>
<NCollapse>
<NCollapse v-model:expanded-names="reportStore.openedCollapsible">
<NCollapseItem name="1">
<template #header>
<ReportSectionHeader title="Планово" status="plan" />

View File

@@ -1,12 +1,22 @@
<script setup>
import {NDataTable} from 'naive-ui'
import {NDataTable, NFlex, NText, NDatePicker} from 'naive-ui'
import AppLayout from "../../Layouts/AppLayout.vue";
import {ref} from "vue";
import {h, ref} from "vue";
import DatePickerQuery from "../../Components/DatePickerQuery.vue";
const props = defineProps({
data: {
type: Object,
default: []
},
isHeadOrAdmin: {
type: Boolean
},
date: {
type: [Number, Array]
},
isOneDay: {
type: Boolean
}
})
@@ -15,7 +25,17 @@ const columns = ref([
title: 'Отделение',
key: 'department',
width: 240,
titleAlign: 'center'
titleAlign: 'center',
colSpan: (row) => row.colspan,
render(row) {
if (row.isGroupHeader) {
return h(NFlex, {
align: "center",
justify: "center"
}, h(NText, { style: 'font-weight: 600;' }, row.groupName))
}
return row.department
}
},
{
title: 'Кол-во коек',
@@ -24,42 +44,35 @@ const columns = ref([
titleAlign: 'center',
align: 'center'
},
{
title: 'Состояло',
key: '',
width: 84,
titleAlign: 'center',
align: 'center'
},
{
title: 'Поступило',
key: 'received',
key: 'recipients',
titleAlign: 'center',
children: [
{
title: 'Всего',
key: 'all',
key: 'recipients.all',
width: 60,
titleAlign: 'center',
align: 'center'
},
{
title: 'План',
key: 'plan',
key: 'recipients.plan',
width: 60,
titleAlign: 'center',
align: 'center'
},
{
title: 'Экстр',
key: 'emergency',
key: 'recipients.emergency',
width: 60,
titleAlign: 'center',
align: 'center'
},
{
title: 'Перевод',
key: '',
key: 'recipients.transferred',
width: 84,
titleAlign: 'center',
align: 'center'
@@ -68,7 +81,7 @@ const columns = ref([
},
{
title: 'Выбыло',
key: 'leave',
key: 'outcome',
width: 84,
titleAlign: 'center',
align: 'center'
@@ -89,30 +102,46 @@ const columns = ref([
},
{
title: 'Операции',
key: '',
key: 'surgical',
titleAlign: 'center',
children: [
{
title: 'Э',
key: '',
key: 'surgical.emergency',
width: 60,
titleAlign: 'center',
align: 'center'
},
{
title: 'П',
key: '',
key: 'surgical.plan',
width: 60,
titleAlign: 'center',
align: 'center'
},
]
},
{
title: 'Умерло',
key: 'deceased',
width: 84,
titleAlign: 'center',
align: 'center'
},
])
const rowProps = (row) => {
if (row.isGroupHeader) return {
style: `--n-merged-td-color: var(--n-merged-th-color)`
}
}
</script>
<template>
<AppLayout>
<template #headerExtra>
<DatePickerQuery :is-head-or-admin="isHeadOrAdmin" :date="date" :is-one-day="isOneDay" />
</template>
<NDataTable :columns="columns"
:data="data"
size="small"
@@ -120,6 +149,7 @@ const columns = ref([
striped
min-height="calc(100vh - 48px - 70px)"
max-height="calc(100vh - 48px - 70px)"
:row-props="rowProps"
>
</NDataTable>