|
|
@@ -8,325 +8,9 @@ import { WorkFilter } from '@/states/patient/worklist/types/workfilter';
|
|
|
import { useTouchDoubleClick } from '@/hooks/useTouchDoubleClick';
|
|
|
import { useMultiSelection } from '@/hooks/useMultiSelection';
|
|
|
import { ColumnConfig } from '@/config/tableColumns/types/columnConfig';
|
|
|
+import { ExposureProgress } from '@/domain/patient/getExposureProgress';
|
|
|
+
|
|
|
|
|
|
-// 生成列定义的辅助函数
|
|
|
-const generateColumnsDef = (productName?: string) => [
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyInstanceUID"
|
|
|
- defaultMessage="worklistTable.StudyInstanceUID"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyInstanceUID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyID"
|
|
|
- defaultMessage="worklistTable.StudyID"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.SpecificCharacterSet"
|
|
|
- defaultMessage="worklistTable.SpecificCharacterSet"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'SpecificCharacterSet',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.AccessionNumber"
|
|
|
- defaultMessage="worklistTable.AccessionNumber"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'AccessionNumber',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id={productName === 'VETDROS' ? 'animal.worklistTable.PatientID' : 'worklistTable.PatientID'}
|
|
|
- defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientID' : 'worklistTable.PatientID'}
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id={productName === 'VETDROS' ? 'animal.worklistTable.PatientName' : 'worklistTable.PatientName'}
|
|
|
- defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientName' : 'worklistTable.PatientName'}
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.DisplayPatientName"
|
|
|
- defaultMessage="worklistTable.DisplayPatientName"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'DisplayPatientName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.PatientSize"
|
|
|
- defaultMessage="worklistTable.PatientSize"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientSize',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id={productName === 'VETDROS' ? 'animal.worklistTable.PatientAge' : 'worklistTable.PatientAge'}
|
|
|
- defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientAge' : 'worklistTable.PatientAge'}
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientAge',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id={productName === 'VETDROS' ? 'animal.worklistTable.PatientSex' : 'worklistTable.PatientSex'}
|
|
|
- defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientSex' : 'worklistTable.PatientSex'}
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientSex',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.AdmittingTime"
|
|
|
- defaultMessage="worklistTable.AdmittingTime"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'AdmittingTime',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.RegSource"
|
|
|
- defaultMessage="worklistTable.RegSource"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'RegSource',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyStatus"
|
|
|
- defaultMessage="worklistTable.StudyStatus"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyStatus',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.RequestedProcedureID"
|
|
|
- defaultMessage="worklistTable.RequestedProcedureID"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'RequestedProcedureID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.PerformedProtocolCodeValue"
|
|
|
- defaultMessage="worklistTable.PerformedProtocolCodeValue"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PerformedProtocolCodeValue',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.PerformedProtocolCodeMeaning"
|
|
|
- defaultMessage="worklistTable.PerformedProtocolCodeMeaning"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PerformedProtocolCodeMeaning',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.PerformedProcedureStepID"
|
|
|
- defaultMessage="worklistTable.PerformedProcedureStepID"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PerformedProcedureStepID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyDescription"
|
|
|
- defaultMessage="worklistTable.StudyDescription"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyDescription',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyStartDatetime"
|
|
|
- defaultMessage="worklistTable.StudyStartDatetime"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyStartDatetime',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.ScheduledProcedureStepStartDate"
|
|
|
- defaultMessage="worklistTable.ScheduledProcedureStepStartDate"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'ScheduledProcedureStepStartDate',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyLock"
|
|
|
- defaultMessage="worklistTable.StudyLock"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyLock',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.OperatorID"
|
|
|
- defaultMessage="worklistTable.OperatorID"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'OperatorID',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.Modality"
|
|
|
- defaultMessage="worklistTable.Modality"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'Modality',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.Views"
|
|
|
- defaultMessage="worklistTable.Views"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'Views',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.Thickness"
|
|
|
- defaultMessage="worklistTable.Thickness"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'Thickness',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.PatientType"
|
|
|
- defaultMessage="worklistTable.PatientType"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'PatientType',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.StudyType"
|
|
|
- defaultMessage="worklistTable.StudyType"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'StudyType',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.QRCode"
|
|
|
- defaultMessage="worklistTable.QRCode"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'QRCode',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.IsExported"
|
|
|
- defaultMessage="worklistTable.IsExported"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'IsExported',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.IsEdited"
|
|
|
- defaultMessage="worklistTable.IsEdited"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'IsEdited',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.WorkRef"
|
|
|
- defaultMessage="worklistTable.WorkRef"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'WorkRef',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.IsAppended"
|
|
|
- defaultMessage="worklistTable.IsAppended"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'IsAppended',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.CreationTime"
|
|
|
- defaultMessage="worklistTable.CreationTime"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'CreationTime',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.MappedStatus"
|
|
|
- defaultMessage="worklistTable.MappedStatus"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'MappedStatus',
|
|
|
- },
|
|
|
- {
|
|
|
- title: (
|
|
|
- <FormattedMessage
|
|
|
- id="worklistTable.IsDelete"
|
|
|
- defaultMessage="worklistTable.IsDelete"
|
|
|
- />
|
|
|
- ),
|
|
|
- dataIndex: 'IsDelete',
|
|
|
- },
|
|
|
-];
|
|
|
|
|
|
interface TitlePropsType {
|
|
|
width: number;
|
|
|
@@ -378,6 +62,7 @@ const ResizableTitle: React.FC<
|
|
|
interface WorklistTableProps {
|
|
|
productName?: string; // 新增:产品名称(用于区分人医/宠物医)
|
|
|
columnConfig?: ColumnConfig[]; // 列配置(可选)
|
|
|
+ exposureProgressMap?: Record<string, ExposureProgress>; // 新增:曝光进度映射
|
|
|
worklistData: Task[];
|
|
|
filters?: WorkFilter;
|
|
|
page?: number;
|
|
|
@@ -392,6 +77,7 @@ interface WorklistTableProps {
|
|
|
const WorklistTable: React.FC<WorklistTableProps> = ({
|
|
|
productName, // 新增
|
|
|
columnConfig = [], // 接收配置,默认为空数组
|
|
|
+ exposureProgressMap = {}, // 新增:曝光进度映射
|
|
|
worklistData,
|
|
|
// filters,
|
|
|
// page,
|
|
|
@@ -402,9 +88,353 @@ const WorklistTable: React.FC<WorklistTableProps> = ({
|
|
|
handleRowDoubleClick,
|
|
|
className,
|
|
|
}) => {
|
|
|
- // 根据 productName 生成列定义
|
|
|
- const columnsDef = useMemo(() => generateColumnsDef(productName), [productName]);
|
|
|
-
|
|
|
+ // 生成列定义的辅助函数
|
|
|
+ const generateColumnsDef = (productName?: string): any[] => [
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyInstanceUID"
|
|
|
+ defaultMessage="worklistTable.StudyInstanceUID"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyInstanceUID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyID"
|
|
|
+ defaultMessage="worklistTable.StudyID"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.SpecificCharacterSet"
|
|
|
+ defaultMessage="worklistTable.SpecificCharacterSet"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'SpecificCharacterSet',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.AccessionNumber"
|
|
|
+ defaultMessage="worklistTable.AccessionNumber"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'AccessionNumber',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id={productName === 'VETDROS' ? 'animal.worklistTable.PatientID' : 'worklistTable.PatientID'}
|
|
|
+ defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientID' : 'worklistTable.PatientID'}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id={productName === 'VETDROS' ? 'animal.worklistTable.PatientName' : 'worklistTable.PatientName'}
|
|
|
+ defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientName' : 'worklistTable.PatientName'}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.DisplayPatientName"
|
|
|
+ defaultMessage="worklistTable.DisplayPatientName"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'DisplayPatientName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.PatientSize"
|
|
|
+ defaultMessage="worklistTable.PatientSize"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientSize',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id={productName === 'VETDROS' ? 'animal.worklistTable.PatientAge' : 'worklistTable.PatientAge'}
|
|
|
+ defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientAge' : 'worklistTable.PatientAge'}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientAge',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id={productName === 'VETDROS' ? 'animal.worklistTable.PatientSex' : 'worklistTable.PatientSex'}
|
|
|
+ defaultMessage={productName === 'VETDROS' ? 'animal.worklistTable.PatientSex' : 'worklistTable.PatientSex'}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientSex',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.AdmittingTime"
|
|
|
+ defaultMessage="worklistTable.AdmittingTime"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'AdmittingTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.RegSource"
|
|
|
+ defaultMessage="worklistTable.RegSource"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'RegSource',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyStatus"
|
|
|
+ defaultMessage="worklistTable.StudyStatus"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyStatus',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.RequestedProcedureID"
|
|
|
+ defaultMessage="worklistTable.RequestedProcedureID"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'RequestedProcedureID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.PerformedProtocolCodeValue"
|
|
|
+ defaultMessage="worklistTable.PerformedProtocolCodeValue"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PerformedProtocolCodeValue',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.PerformedProtocolCodeMeaning"
|
|
|
+ defaultMessage="worklistTable.PerformedProtocolCodeMeaning"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PerformedProtocolCodeMeaning',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.PerformedProcedureStepID"
|
|
|
+ defaultMessage="worklistTable.PerformedProcedureStepID"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PerformedProcedureStepID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyDescription"
|
|
|
+ defaultMessage="worklistTable.StudyDescription"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyDescription',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyStartDatetime"
|
|
|
+ defaultMessage="worklistTable.StudyStartDatetime"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyStartDatetime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.ScheduledProcedureStepStartDate"
|
|
|
+ defaultMessage="worklistTable.ScheduledProcedureStepStartDate"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'ScheduledProcedureStepStartDate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyLock"
|
|
|
+ defaultMessage="worklistTable.StudyLock"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyLock',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.OperatorID"
|
|
|
+ defaultMessage="worklistTable.OperatorID"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'OperatorID',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.Modality"
|
|
|
+ defaultMessage="worklistTable.Modality"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'Modality',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.Views"
|
|
|
+ defaultMessage="worklistTable.Views"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'Views',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.Thickness"
|
|
|
+ defaultMessage="worklistTable.Thickness"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'Thickness',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.PatientType"
|
|
|
+ defaultMessage="worklistTable.PatientType"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'PatientType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.StudyType"
|
|
|
+ defaultMessage="worklistTable.StudyType"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'StudyType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.QRCode"
|
|
|
+ defaultMessage="worklistTable.QRCode"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'QRCode',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.IsExported"
|
|
|
+ defaultMessage="worklistTable.IsExported"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'IsExported',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.IsEdited"
|
|
|
+ defaultMessage="worklistTable.IsEdited"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'IsEdited',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.WorkRef"
|
|
|
+ defaultMessage="worklistTable.WorkRef"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'WorkRef',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.IsAppended"
|
|
|
+ defaultMessage="worklistTable.IsAppended"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'IsAppended',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.CreationTime"
|
|
|
+ defaultMessage="worklistTable.CreationTime"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'CreationTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.MappedStatus"
|
|
|
+ defaultMessage="worklistTable.MappedStatus"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'MappedStatus',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.IsDelete"
|
|
|
+ defaultMessage="worklistTable.IsDelete"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'IsDelete',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: (
|
|
|
+ <FormattedMessage
|
|
|
+ id="worklistTable.ExposureProgress"
|
|
|
+ defaultMessage="曝光进度"
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ dataIndex: 'ExposureProgress',
|
|
|
+ render: (_: any, record: Task) => {
|
|
|
+ // 如果没有 StudyID,说明是 RIS 数据,不需要显示曝光进度
|
|
|
+ if (!record.StudyID || record.StudyID.trim() === '') {
|
|
|
+ return '-'; // RIS 数据显示 "-"
|
|
|
+ }
|
|
|
+
|
|
|
+ const progress = exposureProgressMap?.[record.StudyID];
|
|
|
+ if (!progress) {
|
|
|
+ return '加载中...'; // 数据还未加载完成
|
|
|
+ }
|
|
|
+
|
|
|
+ return `${progress.exposedCount}/${progress.totalCount}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 根据 productName 和 exposureProgressMap 生成列定义
|
|
|
+ const columnsDef = useMemo(() => {
|
|
|
+ const cols = generateColumnsDef(productName);
|
|
|
+ return cols;
|
|
|
+ }, [productName, exposureProgressMap]); // 依赖 productName 和 exposureProgressMap 的变化
|
|
|
+
|
|
|
// 判断是否使用双ID模式
|
|
|
const useDualIdMode = selectedSecondaryIds !== undefined;
|
|
|
// 生成 rowKey
|
|
|
@@ -469,7 +499,7 @@ const WorklistTable: React.FC<WorklistTableProps> = ({
|
|
|
columnConfig.find((c) => c.key === b.dataIndex)?.order ?? 999;
|
|
|
return orderA - orderB;
|
|
|
});
|
|
|
- }, [columnConfig]);
|
|
|
+ }, [columnConfig, columnsDef]);
|
|
|
|
|
|
// 列可调整大小的逻辑
|
|
|
const [columns, setColumns] =
|
|
|
@@ -477,7 +507,7 @@ const WorklistTable: React.FC<WorklistTableProps> = ({
|
|
|
|
|
|
useEffect(() => {
|
|
|
setColumns(visibleColumns);
|
|
|
- }, [visibleColumns]);
|
|
|
+ }, [visibleColumns, exposureProgressMap]);
|
|
|
|
|
|
const handleResize =
|
|
|
(index: number) =>
|