* восстановление окна наблюдения

* добавил получение выбывших
* фильтрация выбывших по результатам лечения
* добавил подсказку при наведении на операции
* добавил вывод причины наблюдения
* добавил вкладки для выбывших
* изменил связь и сохранение пациентов на контроле
* добавил возможность редактирования причины контроля
* полное изменение окна с нежелательными событиями
* исправил просмотр причины контроля
* работа над окном редактирования причины контроля в таблице
* визуальное выделение умерших и проведенных операций
* добавил выбор даты для роли врач
* центрирование блоков статистики
* разделение выполненных операций на срочность
* поправил метод определения текущего дня для роли врач
* функция блокировки при выборе другой даты для роли врач
This commit is contained in:
brusnitsyn
2026-01-29 16:42:42 +09:00
parent cb43c74a72
commit 87e21f0e08
24 changed files with 2065 additions and 501 deletions

View File

@@ -1,10 +1,11 @@
<script setup>
import {NIcon, NText, NDataTable, NButton} from "naive-ui";
import {NIcon, NText, NDataTable, NButton, NTabs, NTabPane} from "naive-ui";
import {useReportStore} from "../../../Stores/report.js";
import {computed, h, onMounted, ref, watch} from "vue";
import { VueDraggableNext } from 'vue-draggable-next'
import {storeToRefs} from "pinia";
import {TbGripVertical} from "vue-icons-plus/tb";
import MoveModalComment from "./MoveModalComment.vue";
const props = defineProps({
mode: {
@@ -30,7 +31,7 @@ const props = defineProps({
accentIds: {
type: Array,
default: []
}
},
})
const isFillableMode = computed(() => props.mode.toLowerCase() === 'fillable')
@@ -46,10 +47,12 @@ const {patientsData} = storeToRefs(reportStore)
const baseColumns = reportStore.getColumnsByKey(props.keys)
const data = ref([])
const isLoading = ref(true)
const showMoveModal = ref(false)
const latestDropItem = ref(null)
// Добавляем drag колонку если режим fillable
const columns = computed(() => {
if (!isFillableMode.value) return baseColumns
// if (!isFillableMode.value) return baseColumns
const newColumns = []
@@ -83,7 +86,11 @@ const columns = computed(() => {
{
text: true,
onClick: () => {
alert('message')
axios.post('/api/report/observation/remove', {
id: row.id
}).then(async () => {
await fetchPatients()
})
}
},
[
@@ -92,11 +99,30 @@ const columns = computed(() => {
)
}
const expandColumn = {
type: 'expand',
renderExpand: (rowData) => {
return h(
NText,
{
class: 'max-w-full break-words whitespace-normal'
},
{
default: rowData.comment ?? 'Причина наблюдения не указана'
}
)
}
}
if (props.status === 'observation') {
newColumns.push(expandColumn)
}
if (props.isDraggable) newColumns.push(dragColumn)
newColumns.push(...baseColumns)
if (props.isRemovable) newColumns.push(removeColumn)
if (props.status === 'emergency') {
if (props.status === 'emergency' || props.status === 'plan') {
const operationColumn = {
title: 'Операции',
key: 'operations',
@@ -109,11 +135,25 @@ const columns = computed(() => {
return `${itm.code}; `
})
]
) : h('div', {}, '-')
) : h('div', {}, '-'),
ellipsis: {
tooltip: true
}
}
newColumns.push(operationColumn)
}
if (props.status === 'outcome') {
const typeColumn = {
title: 'Причина',
key: 'outcome_type',
ellipsis: {
tooltip: true
}
}
newColumns.push(typeColumn)
}
return newColumns
})
@@ -156,6 +196,9 @@ const handleDrop = (e) => {
fromStatus: dragData.fromStatus,
toStatus: props.status
})
latestDropItem.value = dragData.row
showMoveModal.value = true
} catch (error) {
console.error('Drop error:', error)
}
@@ -216,24 +259,21 @@ onMounted(async () => {
</script>
<template>
<NDataTable :columns="columns"
ref="tableRef"
:data="patientsData[status]"
size="small"
@drop="handleDrop"
@dragover="handleDragOver"
:loading="isLoading"
max-height="200"
min-height="200"
:row-props="rowProps"
class="text-sm!">
</NDataTable>
<!-- <NDataTable :columns="columns"-->
<!-- :data="data"-->
<!-- size="small"-->
<!-- max-height="200"-->
<!-- class="text-sm!">-->
<!-- </NDataTable>-->
<NDataTable :columns="columns"
ref="tableRef"
:data="patientsData[status]"
size="small"
@drop="handleDrop"
@dragover="handleDragOver"
:loading="isLoading"
max-height="200"
min-height="200"
:row-props="rowProps"
:row-key="(row) => row.id"
class="text-sm!">
</NDataTable>
<MoveModalComment v-model:show="showMoveModal" :patient-id="latestDropItem?.id" />
</template>
<style scoped>