Обновлен стартовый экран

Переписаны запросы для статистики, отчетов
Добавлена интеграция отчета сестры
This commit is contained in:
brusnitsyn
2026-05-28 22:10:00 +09:00
parent 90e0d04dfd
commit 739168d427
96 changed files with 6663 additions and 1465 deletions

View File

@@ -1,7 +1,6 @@
<script setup>
import {NDataTable, NSpace, NInput, NButton, NFlex} from "naive-ui";
import {TbSearch} from 'vue-icons-plus/tb'
import {computed, h, ref} from "vue";
import {NDataTable} from "naive-ui";
import {computed, h, ref, watch} from "vue";
import IndexColumn from "./DataTableColumns/IndexColumn.vue";
const props = defineProps({
@@ -19,6 +18,7 @@ const props = defineProps({
})
const patients = ref([...props.data])
const loading = ref(false)
const tableColumns = computed(() => {
const baseColumns = [...props.columns]
@@ -36,46 +36,39 @@ const tableColumns = computed(() => {
return baseColumns
})
const searchArg = ref(null)
const findPatient = (arg) => {
// TODO: сделать поиск пациента через БДц
}
const rowProps = (row) => {
const style = []
if (row.admitted_today) {
style.push('--n-merged-td-color: #047857')
} else if (row.nurse_changes?.length) {
style.push('--n-merged-td-color: rgba(217, 119, 6, 0.15)')
}
return {
style: style,
style: style.join('; '),
title: row.nurse_changes?.length
? `Медсестра изменила: ${row.nurse_changes_labels.join(', ')}`
: undefined,
}
}
watch(() => props.data, (newData) => {
patients.value = newData
})
</script>
<template>
<NSpace vertical>
<NFlex :wrap="false">
<NInput v-model:value="searchArg" placeholder="Поиск пациента" @input="value => findPatient(value)" />
<NButton secondary @click="findPatient(searchArg)">
<template #icon>
<TbSearch />
</template>
Найти
</NButton>
</NFlex>
<NDataTable :columns="tableColumns"
:data="patients"
table-layout="fixed"
max-height="234"
min-height="234"
:loading="loading"
size="small"
:row-props="rowProps"
/>
</NSpace>
<NDataTable :columns="tableColumns"
:data="patients"
table-layout="fixed"
max-height="234"
min-height="234"
:loading="loading"
size="small"
:row-props="rowProps"
/>
</template>
<style scoped>