Добавил подсказку и открытие окна в колонке умерших
This commit is contained in:
34
resources/js/Pages/Statistic/Components/DeceasedColumn.vue
Normal file
34
resources/js/Pages/Statistic/Components/DeceasedColumn.vue
Normal 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>
|
||||||
@@ -24,6 +24,7 @@ import StatisticRecipientPlanOfYear from "../../Layouts/Components/Statistic/Sta
|
|||||||
import {percentType} from "../../Utils/numbers.js";
|
import {percentType} from "../../Utils/numbers.js";
|
||||||
import OutcomeColumn from "./Components/OutcomeColumn.vue";
|
import OutcomeColumn from "./Components/OutcomeColumn.vue";
|
||||||
import ModalDeathPatients from "./Components/ModalDeathPatients.vue";
|
import ModalDeathPatients from "./Components/ModalDeathPatients.vue";
|
||||||
|
import DeceasedColumn from "./Components/DeceasedColumn.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@@ -249,19 +250,19 @@ const columns = ref([
|
|||||||
width: 48,
|
width: 48,
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
cellProps: (row) => ({
|
||||||
|
class: 'relative'
|
||||||
|
}),
|
||||||
render: (row) => {
|
render: (row) => {
|
||||||
if (row.isTotalRow) {
|
|
||||||
return h(
|
return h(
|
||||||
'span',
|
DeceasedColumn,
|
||||||
{
|
{
|
||||||
onClick: () => onShowDeathPatientsModal()
|
isTotalRow: row.isTotalRow,
|
||||||
|
value: row.deceased,
|
||||||
|
onOpenModal: () => onShowDeathPatientsModal()
|
||||||
},
|
},
|
||||||
row.deceased
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return row.deceased
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Мед. персонал',
|
title: 'Мед. персонал',
|
||||||
|
|||||||
Reference in New Issue
Block a user