|
@@ -19,10 +19,46 @@ import {
|
|
|
import { patientSizes } from '../../states/patientSize';
|
|
|
import { WorkstationTypeLabels } from '../../states/workstation';
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
+import { useSelector, useDispatch } from 'react-redux';
|
|
|
+import { RootState } from '../../states/store';
|
|
|
+import {
|
|
|
+ setAprConfig,
|
|
|
+ setBodysize,
|
|
|
+ setWorkstation,
|
|
|
+ setIsAECEnabled,
|
|
|
+ setCurrentExposureMode,
|
|
|
+} from '../../states/exam/aprSlice';
|
|
|
import BodyPositionList from './components/BodyPositionList';
|
|
|
import BodyPositionDetail from './components/BodyPositionDetail';
|
|
|
|
|
|
const ContentAreaLarge = () => {
|
|
|
+ const dispatch = useDispatch();
|
|
|
+ const aprConfig = useSelector((state: RootState) => state.apr.aprConfig);
|
|
|
+ const bodysize = useSelector((state: RootState) => state.apr.bodysize);
|
|
|
+ const workstation = useSelector((state: RootState) => state.apr.workstation);
|
|
|
+ const isAECEnabled = useSelector(
|
|
|
+ (state: RootState) => state.apr.isAECEnabled
|
|
|
+ );
|
|
|
+ const currentExposureMode = useSelector(
|
|
|
+ (state: RootState) => state.apr.currentExposureMode
|
|
|
+ );
|
|
|
+
|
|
|
+ const handleBodysizeChange = (value: string) => {
|
|
|
+ dispatch(setBodysize(value));
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleWorkstationChange = (value: string) => {
|
|
|
+ dispatch(setWorkstation(value));
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleAECChange = (checked: boolean) => {
|
|
|
+ dispatch(setIsAECEnabled(checked));
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleExposureModeChange = (value: string) => {
|
|
|
+ dispatch(setCurrentExposureMode(value));
|
|
|
+ };
|
|
|
+
|
|
|
return (
|
|
|
<Row>
|
|
|
<Col span={16}>
|
|
@@ -46,6 +82,8 @@ const ContentAreaLarge = () => {
|
|
|
<Select
|
|
|
placeholder="选择体型"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={bodysize}
|
|
|
+ onChange={handleBodysizeChange}
|
|
|
>
|
|
|
{Object.entries(patientSizes).map(
|
|
|
([key, value]: [string, string]) => (
|
|
@@ -60,6 +98,8 @@ const ContentAreaLarge = () => {
|
|
|
<Select
|
|
|
placeholder="选择工作位"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={workstation}
|
|
|
+ onChange={handleWorkstationChange}
|
|
|
>
|
|
|
{Object.entries(WorkstationTypeLabels).map(
|
|
|
([key, value]: [string, string]) => (
|
|
@@ -77,27 +117,52 @@ const ContentAreaLarge = () => {
|
|
|
<InputNumber
|
|
|
placeholder="mA"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={aprConfig.mA ?? undefined}
|
|
|
+ onChange={(value) =>
|
|
|
+ dispatch(setAprConfig({ ...aprConfig, mA: value ?? 0 }))
|
|
|
+ }
|
|
|
/>
|
|
|
<InputNumber
|
|
|
placeholder="ms"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={aprConfig.ms ?? undefined}
|
|
|
+ onChange={(value) =>
|
|
|
+ dispatch(setAprConfig({ ...aprConfig, ms: value ?? 0 }))
|
|
|
+ }
|
|
|
/>
|
|
|
<InputNumber
|
|
|
placeholder="mAs"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={aprConfig.mAs ?? undefined}
|
|
|
+ onChange={(value) =>
|
|
|
+ dispatch(setAprConfig({ ...aprConfig, mAs: value ?? 0 }))
|
|
|
+ }
|
|
|
/>
|
|
|
<InputNumber
|
|
|
placeholder="KV"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={aprConfig.kV ?? undefined}
|
|
|
+ onChange={(value) =>
|
|
|
+ dispatch(setAprConfig({ ...aprConfig, kV: value ?? 0 }))
|
|
|
+ }
|
|
|
/>
|
|
|
<InputNumber
|
|
|
placeholder="density"
|
|
|
style={{ width: '100%', marginBottom: 8 }}
|
|
|
+ value={aprConfig.AECDensity ?? undefined}
|
|
|
+ onChange={(value) =>
|
|
|
+ dispatch(setAprConfig({ ...aprConfig, AECDensity: value ?? 0 }))
|
|
|
+ }
|
|
|
/>
|
|
|
</div>
|
|
|
<Row gutter={16} align="middle">
|
|
|
<Col span={12}>
|
|
|
- <Select placeholder="选择曝光模式" style={{ width: '100%' }}>
|
|
|
+ <Select
|
|
|
+ placeholder="选择曝光模式"
|
|
|
+ style={{ width: '100%' }}
|
|
|
+ value={currentExposureMode}
|
|
|
+ onChange={handleExposureModeChange}
|
|
|
+ >
|
|
|
<Select.Option value="mAs">mAs</Select.Option>
|
|
|
<Select.Option value="time">time</Select.Option>
|
|
|
</Select>
|
|
@@ -106,7 +171,8 @@ const ContentAreaLarge = () => {
|
|
|
<Switch
|
|
|
checkedChildren="开启AEC"
|
|
|
unCheckedChildren="关闭AEC"
|
|
|
- defaultChecked
|
|
|
+ checked={isAECEnabled}
|
|
|
+ onChange={handleAECChange}
|
|
|
/>
|
|
|
</Col>
|
|
|
<Col span={3}>
|