From 976f72f79a7d3c1fa9b0ae5407d8586f4bcf3436 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 7 May 2024 18:39:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4=E5=AD=97=E6=AE=B5=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configManage/license.ts | 2 +- src/i18n/locales/en-US.ts | 6 +++--- src/i18n/locales/zh-CN.ts | 6 +++--- src/views/configManage/license/index.vue | 13 +++++++++---- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/api/configManage/license.ts b/src/api/configManage/license.ts index fba60085..6209f998 100644 --- a/src/api/configManage/license.ts +++ b/src/api/configManage/license.ts @@ -19,7 +19,7 @@ export async function listLicense(query: Record) { // 分页 const pageNum = (query.pageNum - 1) * query.pageSize; - const limtSql = ` order by created_at desc limit ${pageNum},${query.pageSize} `; + const limtSql = ` order by create_time desc limit ${pageNum},${query.pageSize} `; // 发起请求 const result = await request({ diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 47676d17..53ae2496 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -428,9 +428,9 @@ export default { license: { neTypePlease: 'Select network element type', neType: 'NE Type', - fileName: 'File Name', - createTime: 'Uploaded Time', - comment: 'File Description', + serialNum: 'Serial Num', + createTime: 'Time', + comment: 'Description', updateComment: 'License Description', updateCommentPlease: 'Please enter a license description', updateFile: 'License File', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index d7ceeb43..544fdd4a 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -428,9 +428,9 @@ export default { license: { neTypePlease: '选择网元类型', neType: '网元类型', - fileName: '文件名', - createTime: '上传时间', - comment: '文件说明', + serialNum: '序列号', + createTime: '时间', + comment: '说明', updateComment: 'License说明', updateCommentPlease: '请输入License说明', updateFile: 'License文件', diff --git a/src/views/configManage/license/index.vue b/src/views/configManage/license/index.vue index 4509157b..55002fa8 100644 --- a/src/views/configManage/license/index.vue +++ b/src/views/configManage/license/index.vue @@ -11,6 +11,7 @@ import useI18n from '@/hooks/useI18n'; import useNeInfoStore from '@/store/modules/neinfo'; import { FileType } from 'ant-design-vue/lib/upload/interface'; import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface'; +import { parseDateToStr } from '@/utils/date-utils'; const neInfoStore = useNeInfoStore(); const { t } = useI18n(); @@ -74,21 +75,25 @@ let tableColumns: ColumnsType = [ width: 2, }, { - title: t('views.configManage.license.fileName'), - dataIndex: 'fileName', + title: t('views.configManage.license.serialNum'), + dataIndex: 'serialNum', align: 'center', width: 3, }, { title: t('views.configManage.license.comment'), - dataIndex: 'comment', + dataIndex: 'remark', align: 'center', width: 5, }, { title: t('views.configManage.license.createTime'), - dataIndex: 'createdAt', + dataIndex: 'createTime', align: 'center', + customRender(opt) { + if (!opt.value) return ''; + return parseDateToStr(opt.value); + }, width: 2, }, ];