refactor: reorganize files
This commit is contained in:
@@ -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: () => '查看' },
|
||||
|
||||
Reference in New Issue
Block a user