fix(ui): 统一表格筛选分页和用量明细,升级 ESLint
This commit is contained in:
@@ -17,21 +17,23 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { formatUserReference } from '../../helpers/safeDisplay';
|
||||
import {
|
||||
Search as ActionSearch,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import { ConsoleCollectionSearch } from '@/components/console/ConsoleCollection';
|
||||
import {
|
||||
ConsoleFilterField,
|
||||
ConsoleFilterGrid,
|
||||
} from '@/components/console/ConsolePrimitives';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { getQuotaPerUnit } from '../../helpers';
|
||||
import { timestamp2string } from '../../helpers/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Form as AntForm, Tabs as AntTabs } from 'antd';
|
||||
import { Tabs as AntTabs } from 'antd';
|
||||
import { Table, Select, Button, Tag, Tooltip } from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { useOrgAuditLogs } from '../../hooks/org/useOrgData';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import { OrgFilterCard, OrgListCard } from './components/OrgListCard';
|
||||
import { OrgListCard } from './components/OrgListCard';
|
||||
import OrgPromptRecords from './OrgPromptRecords';
|
||||
import {
|
||||
formatQuotaAsCNY,
|
||||
@@ -402,35 +404,20 @@ const OrgAudit = ({ orgId }) => {
|
||||
|
||||
const operations = (
|
||||
<>
|
||||
<OrgFilterCard
|
||||
className='oc-audit-filter'
|
||||
actions={
|
||||
<>
|
||||
{/* 重置 = 选择“全部操作”;搜索 = 以当前筛选重新查询(同“刷新”) */}
|
||||
<Button onClick={() => applyAction('')}>{t('重置')}</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<ActionSearch size={16} />}
|
||||
onClick={refresh}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<AntForm layout='vertical' requiredMark={false} component='div'>
|
||||
<AntForm.Item label={t('操作类型')}>
|
||||
<ConsoleCollectionSearch className='oc-audit-filter'>
|
||||
<ConsoleFilterGrid onReset={() => applyAction('')} onSearch={refresh}>
|
||||
<ConsoleFilterField label={t('操作类型')} id='org-audit-action-type'>
|
||||
<Select
|
||||
id='org-audit-action-type'
|
||||
value={actionFilter}
|
||||
onChange={applyAction}
|
||||
optionList={actionOptions}
|
||||
style={{ width: '100%' }}
|
||||
placeholder={t('全部操作')}
|
||||
filter
|
||||
/>
|
||||
</AntForm.Item>
|
||||
</AntForm>
|
||||
</OrgFilterCard>
|
||||
</ConsoleFilterField>
|
||||
</ConsoleFilterGrid>
|
||||
</ConsoleCollectionSearch>
|
||||
|
||||
<OrgListCard
|
||||
title={t('操作记录')}
|
||||
@@ -453,7 +440,6 @@ const OrgAudit = ({ orgId }) => {
|
||||
pagination={{
|
||||
currentPage: page,
|
||||
pageSize,
|
||||
showSizeChanger: false,
|
||||
total,
|
||||
onPageChange: setPage,
|
||||
onPageSizeChange: (size) => {
|
||||
|
||||
Reference in New Issue
Block a user