From 38c0e3d08d61857444049890b3fbcdf70c3756da Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 16 Jun 2025 18:40:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4=EF=BC=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/logManage/neFile/index.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/logManage/neFile/index.vue b/src/views/logManage/neFile/index.vue index becbff2e..2336f0f1 100644 --- a/src/views/logManage/neFile/index.vue +++ b/src/views/logManage/neFile/index.vue @@ -5,6 +5,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider'; import { ColumnsType } from 'ant-design-vue/es/table'; import { Modal, message } from 'ant-design-vue/es'; import { parseDateToStr } from '@/utils/date-utils'; +import { parseSizeFromFile } from '@/utils/parse-utils'; import { getNeFile, listNeFiles } from '@/api/tool/neFile'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useNeInfoStore from '@/store/modules/neinfo'; @@ -79,16 +80,19 @@ let tableColumns: ColumnsType = [ dataIndex: 'size', align: 'left', width: 100, + customRender(opt) { + return parseSizeFromFile(opt.value); + }, }, { title: t('views.logManage.neFile.modifiedTime'), dataIndex: 'modifiedTime', align: 'left', + width: 200, customRender(opt) { if (!opt.value) return ''; return parseDateToStr(opt.value * 1000); }, - width: 250, }, { title: t('views.logManage.neFile.fileName'), @@ -238,9 +242,10 @@ function fnGetList(pageNum?: number) { } queryParams.path = nePathArr.value.join('/'); listNeFiles(toRaw(queryParams)).then(res => { - if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { - tablePagination.total = res.total; - tableState.data = res.rows; + if (res.code === RESULT_CODE_SUCCESS) { + const { total, rows } = res.data; + tablePagination.total = total; + tableState.data = rows; if ( tablePagination.total <= (queryParams.pageNum - 1) * tablePagination.pageSize &&