Commit 9a95c61b authored by 李纪文's avatar 李纪文

fix: 台账解析文档编写

parent 4e3e07f1
Pipeline #25076 failed with stages
in 5 minutes 23 seconds
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
"highcharts": "^9.0.1", "highcharts": "^9.0.1",
"highcharts-react-official": "^3.0.0", "highcharts-react-official": "^3.0.0",
"mqtt-client": "^1.0.11", "mqtt-client": "^1.0.11",
"parseForm": "0.0.4" "parseForm": "0.0.6"
}, },
"size-limit": [ "size-limit": [
{ {
......
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
}, },
"dependencies": { "dependencies": {
"form-render": "^0.9.12", "form-render": "^0.9.12",
"parseForm": "^0.0.4" "parseForm": "^0.0.6"
} }
} }
...@@ -7,17 +7,15 @@ group: ...@@ -7,17 +7,15 @@ group:
path: / path: /
--- ---
# QuotaSelect 指标选择 # ParseForm 台账解析
基础业务组件 基础业务组件
- 允许对分类指标进行选择 - 允许台账解析,根据台账对 JSON 进行解析
- 允许限制选择最大指标数
- 允许搜索指标
## 何时使用 ## 何时使用
-指标选择时。 -实现台账解析时。
## 代码演示 ## 代码演示
...@@ -25,25 +23,50 @@ group: ...@@ -25,25 +23,50 @@ group:
## API ## API
指标选择按钮 props 参考 https://ant.design/components/button-cn/#API | 参数 | 说明 | 类型 | 默认值 |
| ------------ | ------------------------------- | ------------------ | ------------- |
已选指标树 props 参考 https://ant.design/components/tree-cn/#API | tablesSchema | 台账数据集合,台账数据格式 JSON | object | { } |
| onSubmit | 台账解析数据提交 | function(value){ } | function(){ } |
| 参数 | 说明 | 类型 | 默认值 | | onBack | 台账解析数据退出 | function(){ } | function(){ } |
| --- | --- | --- | --- |
| buttonProps | 指标选择按钮 | object | { } | ## 台账字段形态
| width | 模态框宽度 | number | 900 |
| title | 模态框标题 | string | 选择显示字段 | | 形态 | 说明 |
| cancelText | 模态框取消文本 | string | 取消选择 | | -------------- | ------------------------------------------------------------------ |
| placeholder | 搜索框占位符 | string | 搜索关键词 | | 文本 | 文本展示 |
| searchPrefix | 搜索框前置图标 | ReactNode | SearchOutlined | | 数值 | 只允许数值展示 |
| targetValue | 指标类型 | string | 重要指标 | | 唯一值文本 | -- |
| maximum | 最多可选择指标数量 | number | 0 | | 多行文本 | 多行文本编辑 |
| dataSource | 指标列表数据源 | array | [ ] | | 编码 | -- |
| selectData | 已选指标数据 | array | [ ] | | 地址 | -- |
| treeProps | 已选指标树 props | object | { } | | 本人部门 | 自动获取本人部门 |
| onModalCancel | 点击模态框取消按钮的回调 | function(value){ } | - | | 本人姓名 | 自动获取本人姓名 |
| onModalOk | 模态框点击确定回调 | function(value){ } | - | | 本人 ID | -- |
| onSearch | 搜索框输入事件的回调,会返回搜索框输入信息 | function(value){ } | - | | 选择器 | ConfigInfo 对'.'进行拆分,不存在为搜索选择器,存在为多级联动选择器 |
| onRadioChange | 指标类型切换的回调 | function(value){ } | - | | 搜索选择器 | 根据 ConfigInfo 查询数据字典 |
| onCancelSelect | 点击已选指标树的删除按钮的回调 | function(value){ } | - | | 值选择器 | 根据 ConfigInfo 内容','进行拆分展示 |
| 业务选择器 | 根据 ConfigInfo 内容'.'进行拆分,第一个表示表名,第二个表字段 |
| 可编辑值选择器 | 根据 ConfigInfo 内容','进行拆分展示,可新增其它 |
| 平铺值选择器 | 根据 ConfigInfo 内容','进行拆分平铺展示 |
| 站点选择器 | 根据 ConfigInfo 内容'.'进行拆分,取第 1 个进行站点查询 |
| 人员选择器 | 获取所有人员进行选择 |
| 城市选择器 | 进行城市选择 |
| 台账选择器 | 根据 ConfigInfo 内容'.'进行拆分,第一个表示台账名,第二个表字段 |
| 附件 | 附件上传 |
| 可预览附件 | -- |
| 图片 | 图片上传 |
| 可预览图片 | -- |
| 录音 | -- |
| 视频 | -- |
| 日期时间 | 日期时间 YYYY-MM-DD HH:mm:ss |
| 日期 | 日期 YYYY-MM-DD |
| 日期年份 | 日期年份 YYYY |
| 日期月份 | 日期月份 YYYY-MM |
| 日期周 | 日期周 YYYY-MM-DD |
| 设备选择 | -- |
| 坐标控件 | -- |
| 区域控件 | -- |
| 智能抄表 | -- |
| 二维码识别 | -- |
| 设备二维码 | -- |
| 位置坐标 | -- |
// @ts-ignore // @ts-ignore
import React from 'react'; import React from 'react';
import ParseForm from 'parseForm'; import ParseForm from 'parseForm';
import './main.less';
window._config = { window._config = {
userInfo: { userInfo: {
fullName: 'admin', fullName: 'admin',
...@@ -9,12 +10,20 @@ window._config = { ...@@ -9,12 +10,20 @@ window._config = {
}, },
}, },
}; };
const _options = const options =
'{"Groups":[{"GroupName":"基本信息","Schema":[{"Alias":"数值","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"数值","IsSync":0,"Order":1,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"数值","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"m","ValidateRule":"number","Visible":1},{"Alias":"日期时间","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期时间","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期时间","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期年份","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期年份","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期年份","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期月份","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期月份","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期月份","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期周","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期周","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期周","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"城市选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"城市选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"城市选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"值选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"值选择器","IsSync":0,"Order":2,"PresetValue":"123","ReadOnly":0,"RowSpan":1,"Shape":"值选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"值复选器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"值复选器","IsSync":0,"Order":2,"PresetValue":"123","ReadOnly":0,"RowSpan":1,"Shape":"值复选器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"可编辑值选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"可编辑值选择器","IsSync":0,"Order":2,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"可编辑值选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"搜索选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项内容.选项","FieldName":"搜索选择器","IsSync":0,"Order":4,"PresetValue":"选项2_2","ReadOnly":0,"RowSpan":1,"Shape":"搜索选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项","FieldName":"选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"多级联动选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"多级联动选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"台账选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"二供泵房.设备名称","FieldName":"台账选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"台账选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"人员选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"人员选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"人员选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"供水方式","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"供水方式","IsSync":0,"Order":5,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"多行文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:10","Visible":1},{"Alias":"站点选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"站点选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"站点选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"供水方式","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"供水方式","IsSync":0,"Order":5,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"多行文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:10","Visible":1},{"Alias":"画板名称","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"画板名称","IsSync":0,"Order":6,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"位置坐标","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"设备简称","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置","FieldName":"设备简称","IsSync":0,"Order":7,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"位置坐标","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"图片","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"图片","IsSync":0,"Order":8,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"图片","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"附件","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"附件","IsSync":0,"Order":8,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"附件","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"本人姓名","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"本人姓名","IsSync":0,"Order":9,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"本人姓名","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"本人部门","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"本人部门","IsSync":0,"Order":9,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"本人部门","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"顺序","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"顺序","IsSync":0,"Order":10,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1}],"Visible":1},{"GroupName":"坐标信息","Schema":[{"Alias":"所属分区","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"所属分区","IsSync":0,"Order":11,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"详细地址","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"详细地址","IsSync":0,"Order":12,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:127","Visible":1},{"Alias":"GIS编码","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"GIS编码","IsSync":0,"Order":13,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"城市选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"坐标位置","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"坐标位置","IsSync":0,"Order":14,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"坐标控件","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:100","Visible":1}],"Visible":1}],"Modules":[],"Values":[{"FieldName":"采集频率","FieldValue":""},{"FieldName":"存储频率","FieldValue":""},{"FieldName":"地址方案版本","FieldValue":""},{"FieldName":"地址方案名","FieldValue":""},{"FieldName":"供水方式","FieldValue":""},{"FieldName":"画板名称","FieldValue":""},{"FieldName":"设备简称","FieldValue":"武汉市第一医院门诊楼"},{"FieldName":"设备类型","FieldValue":""},{"FieldName":"水箱个数","FieldValue":""},{"FieldName":"顺序","FieldValue":""},{"FieldName":"所属分区","FieldValue":""},{"FieldName":"详细地址","FieldValue":""},{"FieldName":"GIS编码","FieldValue":"北京市/市辖区/东城区"},{"FieldName":"坐标位置","FieldValue":"12720649.754511954,3577341.9326459174"}]}'; '{"Groups":[{"GroupName":"基本信息","Schema":[{"Alias":"数值","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"数值","IsSync":0,"Order":1,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"数值","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"m","ValidateRule":"number","Visible":1},{"Alias":"日期时间","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期时间","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期时间","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期年份","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期年份","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期年份","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期月份","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期月份","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期月份","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"日期周","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"不可选择","FieldName":"日期周","IsSync":0,"Order":3,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"日期周","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"城市选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"城市选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"城市选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"值选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"值选择器","IsSync":0,"Order":2,"PresetValue":"123","ReadOnly":0,"RowSpan":1,"Shape":"值选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"值复选器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"值复选器","IsSync":0,"Order":2,"PresetValue":"123","ReadOnly":0,"RowSpan":1,"Shape":"值复选器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"可编辑值选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置,坐标地点","FieldName":"可编辑值选择器","IsSync":0,"Order":2,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"可编辑值选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"搜索选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项内容.选项","FieldName":"搜索选择器","IsSync":0,"Order":4,"PresetValue":"选项2_2","ReadOnly":0,"RowSpan":1,"Shape":"搜索选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项","FieldName":"选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"多级联动选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"多级联动选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"台账选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"二供泵房.设备名称","FieldName":"台账选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"台账选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"人员选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"人员选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"人员选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"供水方式","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"供水方式","IsSync":0,"Order":5,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"多行文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:10","Visible":1},{"Alias":"站点选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"选项.选项","FieldName":"站点选择器","IsSync":0,"Order":4,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"站点选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"平铺值选择器","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"1,2,3","FieldName":"平铺值选择器","IsSync":0,"Order":5,"PresetValue":"1","ReadOnly":0,"RowSpan":1,"Shape":"平铺值选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:10","Visible":1},{"Alias":"画板名称","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"画板名称","IsSync":0,"Order":6,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"位置坐标","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"设备简称","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"坐标位置","FieldName":"设备简称","IsSync":0,"Order":7,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"位置坐标","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:50","Visible":1},{"Alias":"图片","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"图片","IsSync":0,"Order":8,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"图片","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"附件","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"附件","IsSync":0,"Order":8,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"附件","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"基本信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"本人姓名","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"本人姓名","IsSync":0,"Order":9,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"本人姓名","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"本人部门","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"本人部门","IsSync":0,"Order":9,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"本人部门","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1},{"Alias":"顺序","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"顺序","IsSync":0,"Order":10,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"数值","UIGroup":"基本信息","Unit":"","ValidateRule":"number","Visible":1}],"Visible":1},{"GroupName":"坐标信息","Schema":[{"Alias":"所属分区","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"所属分区","IsSync":0,"Order":11,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"详细地址","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"详细地址","IsSync":0,"Order":12,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"文本","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:127","Visible":1},{"Alias":"GIS编码","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"GIS编码","IsSync":0,"Order":13,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"城市选择器","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:25","Visible":1},{"Alias":"坐标位置","AllowCorrect":0,"ColSpan":1,"ConfigInfo":"","FieldName":"坐标位置","IsSync":0,"Order":14,"PresetValue":"","ReadOnly":0,"RowSpan":1,"Shape":"坐标控件","ShowCss":"","TableGroup":null,"TableName":"设备_台账_二供泵房2","TriggerEvent":"(无)","TriggerEventFields":"","TriggerProblemValue":"","Type":"文本","UIGroup":"坐标信息","Unit":"","ValidateRule":"maxlength:100","Visible":1}],"Visible":1}],"Modules":[],"Values":[{"FieldName":"采集频率","FieldValue":""},{"FieldName":"存储频率","FieldValue":""},{"FieldName":"地址方案版本","FieldValue":""},{"FieldName":"地址方案名","FieldValue":""},{"FieldName":"供水方式","FieldValue":""},{"FieldName":"画板名称","FieldValue":""},{"FieldName":"设备简称","FieldValue":"武汉市第一医院门诊楼"},{"FieldName":"设备类型","FieldValue":""},{"FieldName":"水箱个数","FieldValue":""},{"FieldName":"顺序","FieldValue":""},{"FieldName":"所属分区","FieldValue":""},{"FieldName":"详细地址","FieldValue":""},{"FieldName":"GIS编码","FieldValue":"北京市/市辖区/东城区"},{"FieldName":"坐标位置","FieldValue":"12720649.754511954,3577341.9326459174"}]}';
const Demo = (props) => { const Demo = (props) => {
return ( return (
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
<ParseForm tablesSchema={JSON.parse(_options)} /> <ParseForm
tablesSchema={JSON.parse(options)}
onSubmit={(formData) => {
console.log(formData);
}}
onBack={() => {
console.log('返回');
}}
/>
</div> </div>
); );
}; };
......
::-webkit-scrollbar,
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
background-color: #ffffff;
border-radius: 10px;
}
::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment