Реализация смены статуса
Добавлен move метод Правка в поиске
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import {NDataTable, NEllipsis} from "naive-ui"
|
||||
import {NDataTable, NEllipsis, NTag} from "naive-ui"
|
||||
import {computed, h, reactive, ref} from "vue"
|
||||
import {useMedicalHistoryFilter} from "../../../Composables/useMedicalHistoryFilter.js";
|
||||
import ArchiveHistoryModal from '../ArchiveHistoryModal/Index.vue'
|
||||
@@ -25,6 +25,19 @@ const props = defineProps({
|
||||
|
||||
const { isLoading, handlePageChange, handlePageSizeChange, meta } = useMedicalHistoryFilter(props.filters)
|
||||
|
||||
const archiveStatusColumn = (status) => {
|
||||
const tagType = status?.variant ?? 'error'
|
||||
const tagText = status?.text ?? 'Нет в архиве'
|
||||
console.log(tagType)
|
||||
|
||||
return h(
|
||||
NEllipsis,
|
||||
null,
|
||||
{
|
||||
default: () => h(NTag, {type: tagType, round: true, size: 'small'}, tagText)
|
||||
})
|
||||
}
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '№ карты',
|
||||
@@ -58,9 +71,9 @@ const columns = ref([
|
||||
},
|
||||
{
|
||||
title: '№ архива',
|
||||
key: 'narhiv',
|
||||
key: 'card_num',
|
||||
width: 120,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.narhiv || '-' })
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.card_num || '-' })
|
||||
},
|
||||
{
|
||||
title: 'Дата архива',
|
||||
@@ -72,7 +85,7 @@ const columns = ref([
|
||||
title: 'Статус',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.status || '-' })
|
||||
render: (row) => archiveStatusColumn(row.status)
|
||||
}
|
||||
])
|
||||
const showArchiveHistoryModal = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user