diff --git a/src/renderer/src/components/MeasurementPointSetting/MeasurementPointSetting.jsx b/src/renderer/src/components/MeasurementPointSetting/MeasurementPointSetting.jsx new file mode 100644 index 0000000..db4b1e3 --- /dev/null +++ b/src/renderer/src/components/MeasurementPointSetting/MeasurementPointSetting.jsx @@ -0,0 +1,276 @@ +import styles from './MeasurementPointSetting.module.css' +import { Flex, Input, Select, InputNumber, Button, Table } from 'antd' +import { + PlusOutlined, + MinusOutlined, + DeleteOutlined, + ReloadOutlined, + SendOutlined +} from '@ant-design/icons' + +function MeasurementPointSetting() { + // 测点列表数据 + const dataSource = [ + { + key: '1', + 项目: '传感器', + 数值: '', + children: [ + { key: '1-1', 项目: '测点位置', 数值: 1 }, + { + key: '1-2', + 项目: '测点描述', + 数值: '我去年买了个表' + }, + { key: '1-3', 项目: '计算系数', 数值: 0.448 }, + { + key: '1-4', + 项目: '基准标靶', + 数值: 'n', + children: [ + { key: '1-4-1', 项目: 'x', 数值: 349 }, + { key: '1-4-2', 项目: 'y', 数值: 1108 }, + { key: '1-4-3', 项目: 'w', 数值: 125 }, + { key: '1-4-4', 项目: 'h', 数值: 115 } + ] + } + ] + }, + { + key: '2', + 项目: '传感器', + 数值: '' + }, + { + key: '3', + 项目: '传感器', + 数值: '' + }, + { + key: '4', + 项目: '传感器', + 数值: '' + }, + { + key: '5', + 项目: '传感器', + 数值: '' + }, + { + key: '6', + 项目: '传感器', + 数值: '' + }, + { + key: '7', + 项目: '传感器', + 数值: '' + }, + { + key: '8', + 项目: '传感器', + 数值: '' + }, + { + key: '9', + 项目: '传感器', + 数值: '' + } + ] + + // 表格列配置 + const columns = [ + { + title: '项目', + dataIndex: '项目', + key: '项目', + width: 120, + render: (text, record) => { + // 根据层级设置不同的字体大小 + const level = record.key.split('-').length - 1 + const fontSize = level === 0 ? '14px' : level === 1 ? '12px' : '11px' + const fontWeight = level === 0 ? '500' : 'normal' + + return ( + + {text} + + ) + } + }, + { + title: '数值', + dataIndex: '数值', + key: '数值', + render: (value, record) => { + // 根据层级设置不同的字体大小 + const level = record.key.split('-').length - 1 + const fontSize = level === 0 ? '14px' : level === 1 ? '12px' : '11px' + + return ( + + {value || ''} + + ) + } + } + ] + + return ( + + {/* 标题 */} +
+ 测点设置: +
+ + {/* 基本信息 */} +
+
基本信息
+ + + 测点位置: + + + + + 计算系数: + + + + + 基准标靶: + + + + + 测点距离: + + +
+ + {/* 测点列表 */} +
+
测点列表
+ + + + {/* 操作按钮 */} + +
+ + + + + + + + {measurementData.map((item) => ( + + + + + ))} + +
项目数值
{item.type}{item.value || '-'}
+
+ + {/* 操作按钮 */} + +