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 &&