refactor: reorganize files

This commit is contained in:
yangsy
2025-11-20 10:58:19 +08:00
parent cbb51aa501
commit c5c363d32c
120 changed files with 606 additions and 690 deletions

View File

@@ -1,8 +1,6 @@
<script setup lang="ts">
import type { NdmSwitchDiagInfo, NdmSwitchPortInfo } from '@/apis/domains';
import type { NdmSwitchResultVO, PageParams } from '@/apis/models';
import { postSnmpLogPage } from '@/apis/requests';
import { getPortStatusVal, transformPortSpeed } from '@/components/helper';
import { postSnmpLogPage, type NdmSwitchDiagInfo, type NdmSwitchPortInfo, type NdmSwitchResultVO, type PageParams } from '@/apis';
import { getPortStatusVal, transformPortSpeed } from '@/components';
import { useMutation } from '@tanstack/vue-query';
import dayjs from 'dayjs';
import destr from 'destr';
@@ -66,8 +64,8 @@ const tableColumns: DataTableColumns<SwitchPortRowData> = [
render(rowData) {
const { diagInfo } = rowData;
const { info } = diagInfo;
const { overFlowPorts } = info;
return h('pre', {}, { default: () => overFlowPorts.join('\n') });
const { overFlowPorts } = info ?? {};
return h('pre', {}, { default: () => overFlowPorts?.join('\n') ?? '' });
},
},
{
@@ -84,7 +82,7 @@ const tableColumns: DataTableColumns<SwitchPortRowData> = [
if (!diagInfo) return;
modalShow.value = true;
console.log('查看', diagInfo);
modalTableData.value = diagInfo.info.portInfoList;
modalTableData.value = diagInfo.info?.portInfoList ?? [];
},
},
{ default: () => '查看' },