fix: 样本管理

This commit is contained in:
2026-02-27 10:34:49 +08:00
parent a5d3342d93
commit 912ab4c321
10 changed files with 47 additions and 57 deletions

View File

@@ -1,7 +1,7 @@
.tag-content {
display: flex;
width: 100%;
background: #fff;
width: 100%;
overflow: auto;
:global {
.ant-pro-table {

View File

@@ -1,5 +1,7 @@
import type { ActionType } from '@ant-design/pro-components';
import type { RowSelectionType } from 'antd/es/table/interface';
import type { UploadFile } from 'antd/es/upload';
import type { UploadProps } from 'antd/lib/upload';
import React, { useRef, useState } from 'react';
import EnhancedProTable from '@/components/EnhancedProTable';
import type { ToolbarAction } from '@/components/EnhancedProTable/types';
@@ -68,9 +70,13 @@ const SampleTag: React.FC = () => {
tableRef.current?.onValuesChange({}, {});
type && setSelectedRows([]);
};
const onChangeVideo = (file: UploadFile[] | UploadFile | null) => {
tableRef.current?.reload();
};
return (
<>
<UploadCard />
<UploadCard onChange={onChangeVideo} />
<div className={styles['tag-content']}>
<EnhancedProTable<AiSampleRespVO>
ref={tableRef}
@@ -80,6 +86,7 @@ const SampleTag: React.FC = () => {
headerTitle="样本列表"
showIndex={false}
enableRowClick={true}
scroll={{ x: 'max-content' }}
rowSelection={{
type: selectTableType,
selectedRowKeys: selectedRows.map((item) => item.id) as React.Key[],
@@ -88,6 +95,7 @@ const SampleTag: React.FC = () => {
},
}}
/>
{selectedRows.length > 0 && (
<div className="detail">
<SampleTagDetail<AiSampleRespVO>