Добавил подсказку и открытие окна в колонке умерших

This commit is contained in:
brusnitsyn
2026-06-10 11:17:11 +09:00
parent 64d2bc0509
commit 99495f88a9
2 changed files with 46 additions and 11 deletions

View File

@@ -0,0 +1,34 @@
<script setup>
import { NTooltip } from 'naive-ui'
import {TbClick} from 'vue-icons-plus/tb'
const props = defineProps({
isTotalRow: Boolean,
value: Number
})
const emits = defineEmits(['openModal'])
const handleClick = () => {
if (props.isTotalRow) {
emits('openModal')
}
}
</script>
<template>
<NTooltip v-if="isTotalRow" placement="top" :arrow="false">
<template #trigger>
<div class="relative inset-0 flex items-center justify-center cursor-pointer" @click="handleClick">
{{ value }}
<NIcon class="absolute -right-1 -top-1">
<TbClick size="14" />
</NIcon>
</div>
</template>
Кликните на ячейку для просмотра
</NTooltip>
<span v-else>{{ value }}</span>
</template>
<style scoped>
</style>

View File

@@ -24,6 +24,7 @@ import StatisticRecipientPlanOfYear from "../../Layouts/Components/Statistic/Sta
import {percentType} from "../../Utils/numbers.js";
import OutcomeColumn from "./Components/OutcomeColumn.vue";
import ModalDeathPatients from "./Components/ModalDeathPatients.vue";
import DeceasedColumn from "./Components/DeceasedColumn.vue";
const props = defineProps({
data: {
@@ -249,19 +250,19 @@ const columns = ref([
width: 48,
titleAlign: 'center',
align: 'center',
cellProps: (row) => ({
class: 'relative'
}),
render: (row) => {
if (row.isTotalRow) {
return h(
'span',
DeceasedColumn,
{
onClick: () => onShowDeathPatientsModal()
isTotalRow: row.isTotalRow,
value: row.deceased,
onOpenModal: () => onShowDeathPatientsModal()
},
row.deceased
)
}
return row.deceased
}
},
{
title: 'Мед. персонал',