|
|
@ -1,5 +1,5 @@ |
|
|
import styles from './SystemSettings.module.css' |
|
|
import styles from './SystemSettings.module.css' |
|
|
import { Flex, InputNumber, Select, Button, Input, Checkbox, message } from 'antd' |
|
|
import { Flex, InputNumber, Select, Button, Input, Checkbox, message, Switch } from 'antd' |
|
|
import { |
|
|
import { |
|
|
SettingFilled, |
|
|
SettingFilled, |
|
|
InfoCircleFilled, |
|
|
InfoCircleFilled, |
|
|
@ -22,9 +22,12 @@ function SystemSettings() { |
|
|
const [clearZeroLoading, setClearZeroLoading] = useState(false) |
|
|
const [clearZeroLoading, setClearZeroLoading] = useState(false) |
|
|
const [storagePath, setStoragePath] = useState('') |
|
|
const [storagePath, setStoragePath] = useState('') |
|
|
|
|
|
|
|
|
// 新增:实时数据记录状态 |
|
|
// 实时数据记录状态 |
|
|
const [realtimeDataEnabled, setRealtimeDataEnabled] = useState(false) |
|
|
const [realtimeDataEnabled, setRealtimeDataEnabled] = useState(false) |
|
|
const [alarmDataEnabled, setAlarmDataEnabled] = useState(false) |
|
|
const [alarmDataEnabled, setAlarmDataEnabled] = useState(false) |
|
|
|
|
|
// 算法设置状态 |
|
|
|
|
|
const [medianFilterEnabled, setMedianFilterEnabled] = useState(false) // 默认关闭 |
|
|
|
|
|
const [medianFilterParam, setMedianFilterParam] = useState('') // 默认空字符串 |
|
|
|
|
|
|
|
|
// 获取设备连接状态和重连配置 |
|
|
// 获取设备连接状态和重连配置 |
|
|
const connectedDevice = useDeviceStore((state) => state.connectedDevice) |
|
|
const connectedDevice = useDeviceStore((state) => state.connectedDevice) |
|
|
@ -866,6 +869,28 @@ function SystemSettings() { |
|
|
报警数据 |
|
|
报警数据 |
|
|
</Checkbox> |
|
|
</Checkbox> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
{/* 算法设置 */} |
|
|
|
|
|
<div className={styles.subSection}> |
|
|
|
|
|
<div className={styles.subSectionTitle}>算法设置</div> |
|
|
|
|
|
<Flex vertical gap={8}> |
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
|
|
<div>是否启用中值滤波算法</div> |
|
|
|
|
|
<Switch |
|
|
|
|
|
checked={medianFilterEnabled} |
|
|
|
|
|
onChange={(checked) => setMedianFilterEnabled(checked)} |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<Flex align="center" gap={8}> |
|
|
|
|
|
<Input |
|
|
|
|
|
addonBefore={'算法参数值'} |
|
|
|
|
|
value={medianFilterParam} |
|
|
|
|
|
onChange={(e) => setMedianFilterParam(e.target.value)} |
|
|
|
|
|
placeholder="请输入算法参数值" |
|
|
|
|
|
style={{ width: '100%' }} |
|
|
|
|
|
/> |
|
|
|
|
|
</Flex> |
|
|
|
|
|
</Flex> |
|
|
|
|
|
</div> |
|
|
</Flex> |
|
|
</Flex> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|