From 55034ec34f3460cb2fafc35abc068b6d444979a2 Mon Sep 17 00:00:00 2001 From: ZLY Date: Thu, 11 Sep 2025 16:45:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(instance):=20=E5=AE=9E=E7=8E=B0=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=AE=9E=E4=BE=8B=E5=88=97=E8=A1=A8=E7=9A=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=A0=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/instance/index.tsx | 66 +++++++++++++++++++++++++++--------- src/utils/common.ts | 4 ++- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/pages/instance/index.tsx b/src/pages/instance/index.tsx index 7ee9b99..d5baef6 100644 --- a/src/pages/instance/index.tsx +++ b/src/pages/instance/index.tsx @@ -12,7 +12,7 @@ import { IconExclamationCircle, IconEye } from '@arco-design/web-react/icon'; -import { formatInstanceStatus, formatInstanceType, formatTimestamp } from '@/utils/common'; +import { formatInstanceStatus, formatInstanceType, formatTimestamp, formatSeconds } from '@/utils/common'; import { getInstances } from '@/api/appIns'; import { getOverviewApp } from '@/api/overview'; import { getMyAppList } from '@/api/apps'; @@ -48,7 +48,7 @@ const columns: TableColumnProps[] = [ dataIndex: 'duration', render: (col, record, index) => ( - {record.duration}毫秒 + {record.duration > 1000 ? formatSeconds(`${record.duration / 1000}`) : `${record.duration} 毫秒`} ) }, @@ -124,9 +124,17 @@ const Instance = () => { const Selector = () => { return ( - option.props.children.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0} + onChange={(value) => handleSearchParamChange('appId', value || '')} + > + {searchOptions.map((option: any, index) => ( + ))} @@ -162,7 +170,13 @@ const Instance = () => { } ]; return ( - handleSearchParamChange('state', value || '')} + > {stateList.map((option, index) => (