format: column params of VimpLogPage
This commit is contained in:
@@ -25,35 +25,6 @@ const vimpOperationTypeOptions: SelectOption[] = [
|
|||||||
{ label: '确认报警', value: 50002 },
|
{ label: '确认报警', value: 50002 },
|
||||||
{ label: '删除报警', value: 50004 },
|
{ label: '删除报警', value: 50004 },
|
||||||
];
|
];
|
||||||
|
|
||||||
const tableColumns: DataTableColumns<NdmVimpLogResultVO> = [
|
|
||||||
{ title: '时间', key: 'createdTime' },
|
|
||||||
{ title: '操作类型', key: 'description' },
|
|
||||||
{ title: '请求IP', key: 'requestIp' },
|
|
||||||
{ title: '操作参数', key: 'params' },
|
|
||||||
{
|
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -108,6 +79,42 @@ const resetSearchFields = () => {
|
|||||||
searchFields.logType_in = [];
|
searchFields.logType_in = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const tableColumns: DataTableColumns<NdmVimpLogResultVO> = [
|
||||||
|
{ title: '时间', key: 'createdTime' },
|
||||||
|
{ title: '操作类型', key: 'description' },
|
||||||
|
{ title: '请求IP', key: 'requestIp' },
|
||||||
|
{
|
||||||
|
title: '操作参数',
|
||||||
|
key: 'params',
|
||||||
|
render(rowData) {
|
||||||
|
const result = JSON.stringify(destr(rowData.params), null, 2);
|
||||||
|
return h('pre', {}, { default: () => 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 }),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const tableData = ref<DataTableRowData[]>([]);
|
const tableData = ref<DataTableRowData[]>([]);
|
||||||
|
|
||||||
const tablePagination = reactive<PaginationProps>({
|
const tablePagination = reactive<PaginationProps>({
|
||||||
|
|||||||
Reference in New Issue
Block a user