Browse Source

重构,删除无用的field

sw 1 week ago
parent
commit
b9fc3523dd

+ 1 - 5
src/pages/patient/components/RegisterAvailableFilterBar.tsx

@@ -3,10 +3,7 @@ import { Row, Col, Segmented, Select } from 'antd';
 import { useSelector, useDispatch } from 'react-redux';
 import { AppDispatch } from '@/states/store';
 import { setCurrentPatientType } from '@/states/patientTypeSlice';
-import {
-  SelectionState,
-  setSelected,
-} from '@/states/patient/register/SelectionTypeSlice';
+import { setSelected } from '@/states/patient/register/SelectionTypeSlice';
 import { RootState } from '@/states/store';
 import { PatientType } from '@/API/patientType';
 // import { BodyPart } from '@/API/bodyPart';
@@ -14,7 +11,6 @@ import { PatientType } from '@/API/patientType';
 import { fetchViewsOrProtocols } from '@/states/patient/viewSelection';
 
 interface Props {
-  selected: SelectionState;
   // setSelected: (val: 'protocol' | 'view') => void;
   bodyPart: string | undefined;
   setBodyPart: (val: string | undefined) => void;

+ 0 - 4
src/pages/patient/components/bodyPositionFilter.tsx

@@ -9,9 +9,6 @@ import { setCurrentBodyPart } from '@/states/bodyPartSlice';
 import { fetchViewsOrProtocols } from '@/states/patient/viewSelection';
 
 const BodyPositionFilter: React.FC = () => {
-  const selected = useSelector(
-    (state: RootState) => state.viewSelection.currentSelectionType
-  );
   const [bodyPart, setBodyPart] = useState<string | undefined>(undefined);
   const [patientType, setPatientType] = useState<string | undefined>(undefined);
   const [enabled, setEnabled] = useState<string | undefined>(undefined);
@@ -36,7 +33,6 @@ const BodyPositionFilter: React.FC = () => {
     <Flex vertical style={{ height: '100%' }} className="w-full">
       {/* 过滤区域 */}
       <RegisterAvailableFilterBar
-        selected={selected}
         bodyPart={bodyPart}
         setBodyPart={setBodyPart}
         patientType={patientType}