feat: add button to vimp-log result column
This commit is contained in:
@@ -31,7 +31,28 @@ const tableColumns: DataTableColumns<NdmVimpLogResultVO> = [
|
||||
{ title: '操作类型', key: 'description' },
|
||||
{ title: '请求IP', key: 'requestIp' },
|
||||
{ title: '操作参数', key: 'params' },
|
||||
{ title: '操作结果', key: 'result' },
|
||||
{
|
||||
title: '操作结果',
|
||||
key: 'result',
|
||||
render: (rowData) => {
|
||||
const result = JSON.stringify(destr(rowData.result), null, 2);
|
||||
return h(
|
||||
NPopover,
|
||||
{ trigger: 'click' },
|
||||
{
|
||||
trigger: () => h(NButton, { size: 'tiny', text: true, type: 'primary' }, { default: () => '查看' }),
|
||||
default: () =>
|
||||
h(
|
||||
NScrollbar,
|
||||
{ style: { maxHeight: '40vh' } },
|
||||
{
|
||||
default: () => h('pre', {}, { default: () => result }),
|
||||
},
|
||||
),
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
@@ -43,6 +64,7 @@ import { useStationStore } from '@/stores/station';
|
||||
import { downloadByData } from '@/utils/download';
|
||||
import { useMutation } from '@tanstack/vue-query';
|
||||
import dayjs from 'dayjs';
|
||||
import destr from 'destr';
|
||||
import {
|
||||
NButton,
|
||||
NDataTable,
|
||||
@@ -51,6 +73,8 @@ import {
|
||||
NFormItemGi,
|
||||
NGrid,
|
||||
NGridItem,
|
||||
NPopover,
|
||||
NScrollbar,
|
||||
NSelect,
|
||||
NSpace,
|
||||
NTag,
|
||||
|
||||
Reference in New Issue
Block a user