修改赋值机制
This commit is contained in:
@@ -16,8 +16,8 @@ const handleBack = () => {
|
||||
// 定义记录类型
|
||||
interface CDRRecord {
|
||||
id: number;
|
||||
deviceName: string;
|
||||
macAddress: string;
|
||||
clientName: string;
|
||||
clientName: string;
|
||||
trafficUp: string;
|
||||
trafficDown: string;
|
||||
startTime: string;
|
||||
@@ -87,8 +87,8 @@ const { columns, data, loading, getData, mobilePagination, searchParams } = useT
|
||||
columns: () => [
|
||||
{
|
||||
title: t('page.cdrlrecords.devicename'),
|
||||
dataIndex: 'deviceName',
|
||||
key: 'deviceName',
|
||||
dataIndex: 'clientName',
|
||||
key: 'clientName',
|
||||
width: '40%'
|
||||
},
|
||||
{
|
||||
@@ -96,14 +96,23 @@ const { columns, data, loading, getData, mobilePagination, searchParams } = useT
|
||||
dataIndex: 'trafficUp',
|
||||
key: 'trafficUp',
|
||||
width: '30%',
|
||||
align: 'right'
|
||||
align: 'right',
|
||||
customRender(opt) {
|
||||
const record = opt.value;
|
||||
return formatTraffic(record);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t('page.cdrlrecords.downtraffic'),
|
||||
dataIndex: 'trafficDown',
|
||||
key: 'trafficDown',
|
||||
width: '30%',
|
||||
align: 'right'
|
||||
align: 'right',
|
||||
customRender(opt) {
|
||||
console.log(opt)
|
||||
const record = opt.value;
|
||||
return formatTraffic(record);
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -150,9 +159,9 @@ const { columns, data, loading, getData, mobilePagination, searchParams } = useT
|
||||
>
|
||||
<template #expandedRowRender="{ record }">
|
||||
<div class="pl-4">
|
||||
<div>{{ t('page.cdrlrecords.mac') }}: {{ record.macAddress }}</div>
|
||||
<div>{{ t('page.cdrlrecords.uptime') }}: {{ record.startTime }}</div>
|
||||
<div>{{ t('page.cdrlrecords.lasttime') }}: {{ record.endTime }}</div>
|
||||
<div>{{ t('page.cdrlrecords.mac') }}: {{ record.clientName }}</div>
|
||||
<div>{{ t('page.cdrlrecords.uptime') }}: {{ formatTimestamp(record.startTime) }}</div>
|
||||
<div>{{ t('page.cdrlrecords.lasttime') }}: {{ formatTimestamp(record.endTime) }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
Reference in New Issue
Block a user