Commit c1b3d28d authored by 田翔's avatar 田翔

fix: 增加图标

parent 57002716
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.4.7", "version": "2.4.8",
"description": "2.4.7: 增加关联选择自动选上第一个监听逻辑", "description": "2.4.8: 设置修改,增加控件类型显示以及优化样式",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"build": "cross-env BUILD_TYPE=lib father-build && cross-env BUILD_TYPE=es father-build", "build": "cross-env BUILD_TYPE=lib father-build && cross-env BUILD_TYPE=es father-build",
"dev": "node examples/server.js", "dev": "node examples/server.js",
"release": "np --no-cleanup --yolo --tag", "release": "np --no-cleanup --yolo --tag",
"prepublishOnly": "yarn build", "preOnly": "yarn build",
"lint": "yarn lint:js && yarn lint:prettier", "lint": "yarn lint:js && yarn lint:prettier",
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
"lint:fix": "yarn lint:js -- --fix", "lint:fix": "yarn lint:js -- --fix",
......
const baseSettings = { const baseSettings = {}
// title: {
// title: '标题',
// type: 'string',
// // widget: 'htmlInput',
// displayType: 'row',
// labelWidth: 80,
// },
}
const commonSettings = { const commonSettings = {
$id: { $id: {
...@@ -99,54 +91,32 @@ const elementSettings = { ...@@ -99,54 +91,32 @@ const elementSettings = {
const globalSettings = { const globalSettings = {
type: 'object', type: 'object',
properties: { properties: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {},
},
tableName: { tableName: {
title: '表名', title: '表名',
type: 'string', type: 'string',
widget: 'TableNames', widget: 'TableNames',
// default: '事件_测试02',
required: true, required: true,
displayType: 'row',
labelWidth: 70,
}, },
alias: { alias: {
title: '别名', title: '别名',
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 70,
}, },
// interfaceName: { interfaceName: {
// title: '接口', title: '接口',
// type: 'string', type: 'string',
// widget: 'htmlInput', widget: 'htmlInput',
// displayType: 'row',
// labelWidth: 70,
// default: '我是接口'
// },
groupStyle: {
title: '表单样式',
type: 'object',
properties: {},
}, },
column: { column: {
title: '整体布局', title: '整体布局',
type: 'number', type: 'number',
// enum: [1, 2, 3, 4, 5],
enum: [3, 4, 5], enum: [3, 4, 5],
default: 3, default: 3,
// enumNames: ['一行一列', '一行两列', '一行三列', '一行四列', '一行五列'],
enumNames: ['一行三列', '一行四列', '一行五列'], enumNames: ['一行三列', '一行四列', '一行五列'],
widget: 'select', widget: 'select',
props: { props: {
placeholder: '默认一行三列', placeholder: '默认一行三列',
}, },
displayType: 'row',
labelWidth: 100,
}, },
displayType: { displayType: {
title: '标签展示模式', title: '标签展示模式',
...@@ -155,8 +125,6 @@ const globalSettings = { ...@@ -155,8 +125,6 @@ const globalSettings = {
enum: ['row', 'column'], enum: ['row', 'column'],
enumNames: ['左右', '上下'], enumNames: ['左右', '上下'],
widget: 'select', widget: 'select',
displayType: 'row',
labelWidth: 100,
}, },
labelWidth: { labelWidth: {
title: '标签宽度', title: '标签宽度',
......
...@@ -9,43 +9,7 @@ import { ...@@ -9,43 +9,7 @@ import {
FieldTimeOutlined, FieldTimeOutlined,
LinkOutlined, LinkOutlined,
} from '@ant-design/icons' } from '@ant-design/icons'
import IconPack from '../../widgets/IconPack'
const base = {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
$id: {
title: '字段名称',
type: 'string',
widget: 'FieldNames',
required: true,
displayType: 'row',
labelWidth: 80,
},
title: {
title: '标题',
required: true,
type: 'string',
widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
},
placeholder: {
title: '提示语',
type: 'string',
displayType: 'row',
labelWidth: 80,
},
presetValue: {
title: '默认值',
type: 'string',
widget: 'InputDefault',
displayType: 'row',
labelWidth: 80,
},
}
const groupStyle = { const groupStyle = {
groupStyle: { groupStyle: {
...@@ -75,20 +39,10 @@ const layoutWidgets = [ ...@@ -75,20 +39,10 @@ const layoutWidgets = [
{ {
text: '分组名称', text: '分组名称',
name: '分组名称', name: '分组名称',
// icon: <GroupOutlined />, icon: <GroupOutlined />,
schema: { schema: {
title: '分组名称', title: '分组名称',
type: 'object', type: 'object',
// theme: 'collapse:pure',
// properties: {
// title: {
// title: '标题',
// type: 'string',
// required: true,
// displayType: 'row',
// labelWidth: 80,
// },
// },
}, },
setting: { setting: {
groupBase: { groupBase: {
...@@ -111,76 +65,55 @@ const textWidgets = [ ...@@ -111,76 +65,55 @@ const textWidgets = [
{ {
text: '文本', text: '文本',
name: '文本', name: '文本',
// icon: <EditOutlined />, icon: <IconPack.TextInput />,
schema: { schema: {
title: '文本', title: '文本',
type: 'string', type: 'string',
widget: 'TextInput', widget: 'TextInput',
placeholder: '请输入内容'
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {},
default: null
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请输入内容'
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
widget: 'InputDefault', widget: 'InputDefault',
displayType: 'row',
labelWidth: 80,
},
groupVerify: {
title: '数据校验',
type: 'object',
properties: {}
}, },
maxLength: { maxLength: {
title: '字节最大长度', title: '最大长度',
type: 'number', type: 'number',
widget: 'number', widget: 'number',
default: 200, default: 200,
displayType: 'row',
labelWidth: 100,
}, },
rules: { rules: {
title: '正则校验', title: '正则校验',
type: 'array', type: 'array',
default: [], default: [],
widget: 'VerifyTextInput', widget: 'VerifyTextInput',
displayType: 'row', // displayType: 'row',
labelWidth: 100, // labelWidth: 100,
}, },
uniqueVerify: { uniqueVerify: {
title: '唯一值校验', title: '唯一值校验',
...@@ -189,8 +122,8 @@ const textWidgets = [ ...@@ -189,8 +122,8 @@ const textWidgets = [
enum: ['表名/字段名'], enum: ['表名/字段名'],
default: null, default: null,
enumNames: ['表名/字段名'], enumNames: ['表名/字段名'],
displayType: 'row', // displayType: 'row',
labelWidth: 100, // labelWidth: 100,
props: { props: {
allowClear: true allowClear: true
} }
...@@ -199,23 +132,14 @@ const textWidgets = [ ...@@ -199,23 +132,14 @@ const textWidgets = [
title: '表名', title: '表名',
type: 'string', type: 'string',
hidden: "{{formData.uniqueVerify !== '表名/字段名'}}", hidden: "{{formData.uniqueVerify !== '表名/字段名'}}",
displayType: 'row',
labelWidth: 100,
dependencies: ['uniqueVerify'], dependencies: ['uniqueVerify'],
}, },
fieldName: { fieldName: {
title: '字段名', title: '字段名',
type: 'string', type: 'string',
hidden: "{{formData.uniqueVerify !== '表名/字段名'}}", hidden: "{{formData.uniqueVerify !== '表名/字段名'}}",
displayType: 'row',
labelWidth: 100,
dependencies: ['uniqueVerify'], dependencies: ['uniqueVerify'],
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -234,13 +158,6 @@ const textWidgets = [ ...@@ -234,13 +158,6 @@ const textWidgets = [
default: false, default: false,
width: '33%', width: '33%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '33%',
},
isStoreID: { isStoreID: {
title: '是否存储ID', title: '是否存储ID',
type: 'boolean', type: 'boolean',
...@@ -260,8 +177,6 @@ const textWidgets = [ ...@@ -260,8 +177,6 @@ const textWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -303,7 +218,7 @@ const textWidgets = [ ...@@ -303,7 +218,7 @@ const textWidgets = [
{ {
text: '多行文本', text: '多行文本',
name: '多行文本', name: '多行文本',
// icon: <FormOutlined />, icon: <IconPack.TextArea />,
schema: { schema: {
title: '多行文本', title: '多行文本',
type: 'string', type: 'string',
...@@ -311,11 +226,6 @@ const textWidgets = [ ...@@ -311,11 +226,6 @@ const textWidgets = [
placeholder: '请输入内容' placeholder: '请输入内容'
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -328,49 +238,29 @@ const textWidgets = [ ...@@ -328,49 +238,29 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
widget: 'Placeholder', widget: 'Placeholder',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupVerify: {
title: '数据校验',
type: 'object',
properties: {}
}, },
maxLength: { maxLength: {
title: '最大长度', title: '最大长度',
type: 'number', type: 'number',
widget: 'number', widget: 'number',
default: 500, default: 500,
displayType: 'row',
labelWidth: 100,
description: '可输入最大字节长度' description: '可输入最大字节长度'
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -389,27 +279,16 @@ const textWidgets = [ ...@@ -389,27 +279,16 @@ const textWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
currentAddress: { currentAddress: {
title: '获取当前地址', title: '获取当前地址',
type: 'boolean', type: 'boolean',
widget: 'BooleanSwitch', widget: 'BooleanSwitch',
default: false, default: false,
displayType: 'row', description: '自动获取当前地址(手持端专用)',
labelWidth: 120,
description: '是否自动获取当前地址(手持端专用)',
}, },
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -451,19 +330,15 @@ const textWidgets = [ ...@@ -451,19 +330,15 @@ const textWidgets = [
{ {
text: '数值', text: '数值',
name: '数值', name: '数值',
// icon: <FieldBinaryOutlined />, icon: <IconPack.NumberInput />,
schema: { schema: {
title: '数值', title: '数值',
type: 'string', type: 'string',
widget: 'NumberInput', widget: 'NumberInput',
presetValue: '0', presetValue: '0',
placeholder: '请输入内容',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -476,36 +351,21 @@ const textWidgets = [ ...@@ -476,36 +351,21 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
// widget: 'Placeholder',
displayType: 'row',
labelWidth: 80,
// dependencies: ['title']
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
widget: 'NumerDefault', widget: 'NumerDefault',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -525,18 +385,9 @@ const textWidgets = [ ...@@ -525,18 +385,9 @@ const textWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -584,7 +435,7 @@ const textWidgets = [ ...@@ -584,7 +435,7 @@ const textWidgets = [
{ {
text: '富文本', text: '富文本',
name: '富文本', name: '富文本',
// icon: <HighlightOutlined />, icon: <IconPack.RichText />,
schema: { schema: {
title: '富文本', title: '富文本',
type: 'string', type: 'string',
...@@ -592,11 +443,6 @@ const textWidgets = [ ...@@ -592,11 +443,6 @@ const textWidgets = [
width: '100%', width: '100%',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -609,22 +455,16 @@ const textWidgets = [ ...@@ -609,22 +455,16 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
}, },
groupSetting: { groupSetting: {
title: '控件设置', title: '控件设置',
...@@ -659,8 +499,6 @@ const textWidgets = [ ...@@ -659,8 +499,6 @@ const textWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -688,6 +526,7 @@ const textWidgets = [ ...@@ -688,6 +526,7 @@ const textWidgets = [
{ {
text: '编码', text: '编码',
name: '编码', name: '编码',
icon: <IconPack.Coding />,
schema: { schema: {
title: '编码', title: '编码',
type: 'string', type: 'string',
...@@ -711,23 +550,13 @@ const textWidgets = [ ...@@ -711,23 +550,13 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
// presetValue: {
// title: '默认值',
// type: 'string',
// displayType: 'row',
// labelWidth: 80,
// },
groupSetting: { groupSetting: {
title: '控件设置', title: '控件设置',
type: 'object', type: 'object',
...@@ -778,8 +607,6 @@ const textWidgets = [ ...@@ -778,8 +607,6 @@ const textWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 90,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -810,57 +637,40 @@ const selectWidgets = [ ...@@ -810,57 +637,40 @@ const selectWidgets = [
{ {
text: '下拉框', text: '下拉框',
name: '下拉框', name: '下拉框',
icon: <IconPack.ComboBox />,
schema: { schema: {
title: '下拉框', title: '下拉框',
type: 'string', type: 'string',
widget: 'ComboBox', widget: 'ComboBox',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击下拉选择内容', default: '点击下拉选择内容',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
...@@ -868,8 +678,6 @@ const selectWidgets = [ ...@@ -868,8 +678,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'SourceType', widget: 'SourceType',
default: '手动输入', default: '手动输入',
displayType: 'row',
labelWidth: 80,
}, },
options: { options: {
title: '', title: '',
...@@ -914,8 +722,6 @@ const selectWidgets = [ ...@@ -914,8 +722,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.sourceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row',
labelWidth: 80,
dependencies: ['sourceType'] dependencies: ['sourceType']
}, },
tableName: { tableName: {
...@@ -925,8 +731,6 @@ const selectWidgets = [ ...@@ -925,8 +731,6 @@ const selectWidgets = [
hidden: '{{formData.sourceType !== "表数据"}}', hidden: '{{formData.sourceType !== "表数据"}}',
type: 'string', type: 'string',
widget: 'TableName', widget: 'TableName',
displayType: 'row',
labelWidth: 80,
dependencies: ['sourceType'], dependencies: ['sourceType'],
}, },
fieldName: { fieldName: {
...@@ -937,8 +741,6 @@ const selectWidgets = [ ...@@ -937,8 +741,6 @@ const selectWidgets = [
hidden: '{{formData.sourceType !== "表数据"}}', hidden: '{{formData.sourceType !== "表数据"}}',
type: 'string', type: 'string',
widget: 'FieldName', widget: 'FieldName',
displayType: 'row',
labelWidth: 80,
dependencies: ['sourceType', 'tableName'], dependencies: ['sourceType', 'tableName'],
}, },
isMySite: { isMySite: {
...@@ -948,18 +750,12 @@ const selectWidgets = [ ...@@ -948,18 +750,12 @@ const selectWidgets = [
hidden: '{{formData.sourceType !== "站点"}}', hidden: '{{formData.sourceType !== "站点"}}',
type: 'boolean', type: 'boolean',
widget: 'checkbox', widget: 'checkbox',
// width: '63%',
props: { props: {
style: { style: {
paddingLeft: '10px' paddingLeft: '10px'
} }
} }
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -973,13 +769,6 @@ const selectWidgets = [ ...@@ -973,13 +769,6 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '40%',
},
isMultiple: { isMultiple: {
title: '多选', title: '多选',
type: 'boolean', type: 'boolean',
...@@ -1017,8 +806,6 @@ const selectWidgets = [ ...@@ -1017,8 +806,6 @@ const selectWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1046,6 +833,7 @@ const selectWidgets = [ ...@@ -1046,6 +833,7 @@ const selectWidgets = [
{ {
text: '单选框', text: '单选框',
name: '单选框', name: '单选框',
icon: <IconPack.RadioButton />,
schema: { schema: {
title: '单选框', title: '单选框',
name: '单选框', name: '单选框',
...@@ -1054,44 +842,28 @@ const selectWidgets = [ ...@@ -1054,44 +842,28 @@ const selectWidgets = [
require: true, require: true,
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 74,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
...@@ -1099,8 +871,6 @@ const selectWidgets = [ ...@@ -1099,8 +871,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'SoruceType', widget: 'SoruceType',
default: '手动输入', default: '手动输入',
displayType: 'row',
labelWidth: 80,
}, },
options: { options: {
title: '', title: '',
...@@ -1133,8 +903,6 @@ const selectWidgets = [ ...@@ -1133,8 +903,6 @@ const selectWidgets = [
// hideMove: true, // hideMove: true,
hideCopy: true, hideCopy: true,
}, },
displayType: 'row',
labelWidth: 80,
}, },
dictionary: { dictionary: {
title: '{{formData.sourceType}}', title: '{{formData.sourceType}}',
...@@ -1144,13 +912,6 @@ const selectWidgets = [ ...@@ -1144,13 +912,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.sourceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -1171,18 +932,9 @@ const selectWidgets = [ ...@@ -1171,18 +932,9 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1210,6 +962,7 @@ const selectWidgets = [ ...@@ -1210,6 +962,7 @@ const selectWidgets = [
{ {
text: '复选框', text: '复选框',
name: '复选框', name: '复选框',
icon: <IconPack.CheckBox />,
schema: { schema: {
title: '复选框', title: '复选框',
name: '复选框', name: '复选框',
...@@ -1218,44 +971,28 @@ const selectWidgets = [ ...@@ -1218,44 +971,28 @@ const selectWidgets = [
require: true, require: true,
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
...@@ -1263,8 +1000,6 @@ const selectWidgets = [ ...@@ -1263,8 +1000,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'SoruceType', widget: 'SoruceType',
default: '手动输入', default: '手动输入',
displayType: 'row',
labelWidth: 80,
props: { props: {
disabled: true disabled: true
} }
...@@ -1300,8 +1035,6 @@ const selectWidgets = [ ...@@ -1300,8 +1035,6 @@ const selectWidgets = [
// hideMove: true, // hideMove: true,
hideCopy: true, hideCopy: true,
}, },
displayType: 'row',
labelWidth: 80,
}, },
dictionary: { dictionary: {
title: '{{formData.sourceType}}', title: '{{formData.sourceType}}',
...@@ -1311,13 +1044,6 @@ const selectWidgets = [ ...@@ -1311,13 +1044,6 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.sourceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -1338,18 +1064,9 @@ const selectWidgets = [ ...@@ -1338,18 +1064,9 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1375,62 +1092,40 @@ const selectWidgets = [ ...@@ -1375,62 +1092,40 @@ const selectWidgets = [
} }
}, },
{ {
text: '开关', text: '开关按钮',
name: '开关', name: '开关按钮',
icon: <IconPack.SwitchSelector />,
schema: { schema: {
title: '开关', title: '开关按钮',
name: '开关', name: '开关按钮',
type: 'string', type: 'string',
widget: 'SwitchSelector', widget: 'SwitchSelector',
default: '0', default: '0',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 74,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'boolean', type: 'boolean',
widget: 'BooleanSwitch', widget: 'BooleanSwitch',
displayType: 'row',
labelWidth: 80,
},
// placeholder: {
// title: '提示语',
// type: 'string',
// displayType: 'row',
// labelWidth: 80,
// default: '请输入位置'
// },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
disabled: { disabled: {
title: '只读', title: '只读',
...@@ -1461,8 +1156,6 @@ const selectWidgets = [ ...@@ -1461,8 +1156,6 @@ const selectWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1490,69 +1183,49 @@ const selectWidgets = [ ...@@ -1490,69 +1183,49 @@ const selectWidgets = [
{ {
text: '关联选择', text: '关联选择',
name: '关联选择', name: '关联选择',
icon: <IconPack.RelevanceSelect />,
schema: { schema: {
title: '关联选择', title: '关联选择',
name: '关联选择', name: '关联选择',
type: 'string', type: 'string',
widget: 'RelevanceSelect', widget: 'RelevanceSelect',
require: true, placeholder: '请选择内容',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请选择内容',
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
widget: 'CascadeDefault', widget: 'CascadeDefault',
labelWidth: 80,
dependencies: ['sourceType'] dependencies: ['sourceType']
}, },
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
},
fieldParent: { fieldParent: {
title: '父字段名', title: '父字段名',
type: 'string', type: 'string',
required: true, required: true,
widget: 'FieldNames', widget: 'FieldNames',
displayType: 'row',
labelWidth: 80,
}, },
dictionary: { dictionary: {
title: '数据字典', title: '数据字典',
...@@ -1560,13 +1233,6 @@ const selectWidgets = [ ...@@ -1560,13 +1233,6 @@ const selectWidgets = [
required: true, required: true,
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -1582,18 +1248,9 @@ const selectWidgets = [ ...@@ -1582,18 +1248,9 @@ const selectWidgets = [
default: false, default: false,
width: '33%', width: '33%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '33%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
...groupStyle, ...groupStyle,
} }
...@@ -1601,61 +1258,42 @@ const selectWidgets = [ ...@@ -1601,61 +1258,42 @@ const selectWidgets = [
{ {
text: '级联选择', text: '级联选择',
name: '级联选择', name: '级联选择',
icon: <IconPack.CascadeSelector />,
schema: { schema: {
title: '级联选择', title: '级联选择',
name: '级联选择', name: '级联选择',
type: 'string', type: 'string',
widget: 'CascadeSelector', widget: 'CascadeSelector',
require: true, placeholder: '点击下拉选择内容',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击下拉选择内容',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
widget: 'CascadeDefault', widget: 'CascadeDefault',
displayType: 'row',
labelWidth: 80,
// dependencies: ['sourceType']
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
...@@ -1665,13 +1303,6 @@ const selectWidgets = [ ...@@ -1665,13 +1303,6 @@ const selectWidgets = [
default: '城市数据', default: '城市数据',
enum: ['城市数据'], enum: ['城市数据'],
enumNames: ['城市数据'], enumNames: ['城市数据'],
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -1692,18 +1323,9 @@ const selectWidgets = [ ...@@ -1692,18 +1323,9 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1732,19 +1354,16 @@ const selectWidgets = [ ...@@ -1732,19 +1354,16 @@ const selectWidgets = [
const businessWidgets = [ const businessWidgets = [
{ {
text: '人员选择器', text: '人员选择',
name: '人员选择器', name: '人员选择',
icon: <IconPack.PersonSelector />,
schema: { schema: {
title: '人员选择', title: '人员选择',
type: 'string', type: 'string',
widget: 'PersonSelector', widget: 'PersonSelector',
placeholder: '点击选择人员',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -1757,41 +1376,24 @@ const businessWidgets = [ ...@@ -1757,41 +1376,24 @@ const businessWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击选择人员',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
role: { role: {
title: '机构角色', title: '机构角色',
type: 'string', type: 'string',
widget: 'GroupAndRole', widget: 'GroupAndRole',
displayType: 'row',
labelWidth: 80,
}, },
isMySite: { isMySite: {
title: '本人站点', title: '本人站点',
...@@ -1806,11 +1408,6 @@ const businessWidgets = [ ...@@ -1806,11 +1408,6 @@ const businessWidgets = [
} }
} }
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -1847,8 +1444,6 @@ const businessWidgets = [ ...@@ -1847,8 +1444,6 @@ const businessWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -1884,19 +1479,16 @@ const businessWidgets = [ ...@@ -1884,19 +1479,16 @@ const businessWidgets = [
} }
}, },
{ {
text: '部门选择器', text: '部门选择',
name: '部门选择器', name: '部门选择',
icon: <IconPack.DeptSelector />,
schema: { schema: {
title: '部门选择', title: '部门选择',
type: 'string', type: 'string',
widget: 'DeptSelector', widget: 'DeptSelector',
placeholder: '点击选择部门',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -1916,27 +1508,14 @@ const businessWidgets = [ ...@@ -1916,27 +1508,14 @@ const businessWidgets = [
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击选择部门',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -1952,13 +1531,6 @@ const businessWidgets = [ ...@@ -1952,13 +1531,6 @@ const businessWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '25%',
},
isMultiple: { isMultiple: {
title: '多选', title: '多选',
type: 'boolean', type: 'boolean',
...@@ -1974,8 +1546,6 @@ const businessWidgets = [ ...@@ -1974,8 +1546,6 @@ const businessWidgets = [
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -2001,70 +1571,47 @@ const businessWidgets = [ ...@@ -2001,70 +1571,47 @@ const businessWidgets = [
} }
}, },
{ {
text: '台账选择器', text: '台账选择',
name: '台账选择器', name: '台账选择',
icon: <IconPack.AccountSelector />,
schema: { schema: {
title: '台账选择', title: '台账选择',
type: 'string', type: 'string',
widget: 'AccountSelector', widget: 'AccountSelector',
require: true, placeholder: '点击输入框弹出选择框',
displayType: 'row',
labelWidth: 120,
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true,
type: 'string', type: 'string',
widget: 'htmlInput', required: true,
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击输入框弹出选择框',
displayType: 'row',
labelWidth: 80,
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
accountName: { accountName: {
title: '台账名称', title: '台账名称',
name: '台账名称', name: '台账名称',
type: 'string', type: 'string',
widget: 'AccountName', widget: 'AccountName',
displayType: 'row',
labelWidth: 100,
required: true, required: true,
}, },
fieldshine: { fieldshine: {
...@@ -2072,8 +1619,6 @@ const businessWidgets = [ ...@@ -2072,8 +1619,6 @@ const businessWidgets = [
name: '映射字段', name: '映射字段',
type: 'array', type: 'array',
widget: 'Fieldshine', widget: 'Fieldshine',
displayType: 'row',
labelWidth: 100,
required: true, required: true,
dependencies: ['accountName', '$id'], dependencies: ['accountName', '$id'],
default: [], default: [],
...@@ -2108,11 +1653,6 @@ const businessWidgets = [ ...@@ -2108,11 +1653,6 @@ const businessWidgets = [
placeholder: '示例:部门="XX部门"' placeholder: '示例:部门="XX部门"'
} }
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -2154,60 +1694,35 @@ const dateWidgets = [ ...@@ -2154,60 +1694,35 @@ const dateWidgets = [
{ {
text: '日期选择', text: '日期选择',
name: '日期选择', name: '日期选择',
icon: <IconPack.DateTime />,
schema: { schema: {
title: '日期选择', title: '日期选择',
type: 'string', type: 'string',
widget: 'DateTime', widget: 'DateTime',
placeholder: '请选择日期',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请选择日期',
},
// presetValue: {
// title: '默认值',
// type: 'string',
// widget: 'DateDefault',
// dateFormat: '{{formData.format}}',
// displayType: 'row',
// labelWidth: 80,
// description: '勾选默认当前日期此处配置无效'
// },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -2228,21 +1743,12 @@ const dateWidgets = [ ...@@ -2228,21 +1743,12 @@ const dateWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
format: { format: {
title: '日期格式', title: '日期格式',
type: 'string', type: 'string',
enum: ['date', 'dateTime', 'year', 'month', 'week', 'quarter'], enum: ['date', 'dateTime', 'year', 'month', 'week', 'quarter'],
default: 'date', default: 'date',
enumNames: ['日期', '日期时间', '日期年份', '日期月份', '日期周', '日期季度'], enumNames: ['日期', '日期时间', '日期年份', '日期月份', '日期周', '日期季度'],
displayType: 'row',
labelWidth: 80,
}, },
options: { options: {
title: '选项', title: '选项',
...@@ -2251,36 +1757,7 @@ const dateWidgets = [ ...@@ -2251,36 +1757,7 @@ const dateWidgets = [
enum: ['默认为空', '默认为当前时间', '不超过当前时间'], enum: ['默认为空', '默认为当前时间', '不超过当前时间'],
default: '默认为空', default: '默认为空',
enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'], enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'],
displayType: 'row', },
labelWidth: 80,
// props: {
// allowClear: true
// }
},
// defaultCurrent: {
// title: '默认当前日期',
// type: 'boolean',
// widget: 'checkbox',
// default: false,
// width: '50%',
// props: {
// style: {
// marginLeft: '10px',
// }
// }
// },
// currentDate: {
// title: '不超过当前日期',
// type: 'boolean',
// widget: 'checkbox',
// default: false,
// width: '50%',
// props: {
// style: {
// marginLeft: '10px',
// }
// }
// },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -2307,71 +1784,44 @@ const dateWidgets = [ ...@@ -2307,71 +1784,44 @@ const dateWidgets = [
{ {
text: '时间选择', text: '时间选择',
name: '时间选择', name: '时间选择',
// icon: <FieldTimeOutlined />, icon: <IconPack.Time />,
schema: { schema: {
title: '时间选择', title: '时间选择',
type: 'string', type: 'string',
widget: 'Time', widget: 'Time',
placeholder: '请选择时间',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请选择时间',
}, },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
widget: 'TimeDefault', widget: 'TimeDefault',
format: '{{formData.format}}', format: '{{formData.format}}',
displayType: 'row',
labelWidth: 80,
description: '勾选默认当前时间此处配置无效' description: '勾选默认当前时间此处配置无效'
}, },
groupSetting: {
title: '控件设置',
type: 'object',
properties: {},
},
// format: {
// title: '日期格式',
// type: 'string',
// enum: ['date', 'dateTime', 'year', 'month', 'week', 'quarter'],
// default: 'date',
// enumNames: ['日期', '日期时间', '日期年份', '日期月份', '日期周', '日期季度'],
// displayType: 'row',
// labelWidth: 80,
// },
options: { options: {
title: '选项', title: '选项',
type: 'string', type: 'string',
...@@ -2379,15 +1829,10 @@ const dateWidgets = [ ...@@ -2379,15 +1829,10 @@ const dateWidgets = [
enum: ['默认为空', '默认为当前时间', '不超过当前时间'], enum: ['默认为空', '默认为当前时间', '不超过当前时间'],
default: '默认为空', default: '默认为空',
enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'], enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'],
displayType: 'row',
labelWidth: 80,
}, },
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
widget: 'input',
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -2415,25 +1860,6 @@ const dateWidgets = [ ...@@ -2415,25 +1860,6 @@ const dateWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
// defaultCurrent: {
// title: '默认当前时间',
// type: 'boolean',
// widget: 'checkbox',
// default: false,
// width: '50%',
// props: {
// style: {
// marginLeft: '10px',
// }
// }
// },
// currentDate: {
// title: '不超过当前时间',
// type: 'boolean',
// widget: 'checkbox',
// default: false,
// width: '50%',
// },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -2463,19 +1889,14 @@ const fileWidgets = [ ...@@ -2463,19 +1889,14 @@ const fileWidgets = [
{ {
text: '附件', text: '附件',
name: '附件', name: '附件',
// icon: <LinkOutlined />, icon: <IconPack.FileUpload />,
schema: { schema: {
title: '附件', title: '附件',
type: 'string', type: 'string',
widget: 'FileUpload', widget: 'FileUpload',
width: '100%' width: '100%',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -2488,27 +1909,15 @@ const fileWidgets = [ ...@@ -2488,27 +1909,15 @@ const fileWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true,
type: 'string', type: 'string',
widget: 'htmlInput', required: true,
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
fileType: { fileType: {
title: '文件类型', title: '文件类型',
...@@ -2518,9 +1927,6 @@ const fileWidgets = [ ...@@ -2518,9 +1927,6 @@ const fileWidgets = [
enum: ['全部', '图片', '文档', '音频', '视频'], enum: ['全部', '图片', '文档', '音频', '视频'],
enumNames: ['全部', '图片', '文档', '音频', '视频'], enumNames: ['全部', '图片', '文档', '音频', '视频'],
default: '全部', default: '全部',
displayType: 'row',
labelWidth: 100,
// description: "{{formData.fileType === '图片' ? '支持bmp、gif、jpeg、tiff、png、svg、jpg格式': (formData.fileType === '文档' ? '支持docx,xlsx,pdf格式':(formData.fileType === '音频' ? '支持mp3格式' : (formData.fileType === '视频' ? '支持mp4格式':null )))}}",
}, },
disabled: { disabled: {
title: '只读', title: '只读',
...@@ -2569,13 +1975,6 @@ const fileWidgets = [ ...@@ -2569,13 +1975,6 @@ const fileWidgets = [
type: 'object', type: 'object',
properties: {} properties: {}
}, },
// showType: {
// title: '显示方式',
// type: 'string',
// default: 'picture',
// enum: ['picture', 'text', 'picture-card'],
// enumNames: ['列表_详细', '列表_省略', '卡片'],
// },
width: { width: {
title: '元素宽度', title: '元素宽度',
type: 'string', type: 'string',
...@@ -2598,66 +1997,43 @@ const fileWidgets = [ ...@@ -2598,66 +1997,43 @@ const fileWidgets = [
const mapWidgets = [ const mapWidgets = [
{ {
text: '坐标控件', text: '地图坐标',
name: '坐标控件', name: '地图坐标',
icon: <IconPack.Coordinate />,
schema: { schema: {
title: '坐标控件', title: '地图坐标',
type: 'string', type: 'string',
widget: 'Coordinate', widget: 'Coordinate',
placeholder: '请选择坐标位置',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true,
type: 'string', type: 'string',
widget: 'htmlInput', required: true,
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请选择坐标位置'
},
groupSource: {
title: '控件设置',
type: 'object',
properties: {}
}, },
currentAddress: { currentAddress: {
title: '自动获取', title: '自动获取',
type: 'Boolean', type: 'Boolean',
widget: 'BooleanSwitch', widget: 'BooleanSwitch',
displayType: 'row', description: '自动获取当前地址(手持端专用)'
labelWidth: 100,
description: '是否自动获取当前地址(手持端专用)'
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -2673,18 +2049,9 @@ const mapWidgets = [ ...@@ -2673,18 +2049,9 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '25%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -2712,51 +2079,35 @@ const mapWidgets = [ ...@@ -2712,51 +2079,35 @@ const mapWidgets = [
{ {
text: '设备选择', text: '设备选择',
name: '设备选择', name: '设备选择',
icon: <IconPack.Device />,
schema: { schema: {
title: '设备选择', title: '设备选择',
type: 'string', type: 'string',
widget: 'Device', widget: 'Device',
placeholder: '请选择设备',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true, required: true,
type: 'string', type: 'string',
widget: 'htmlInput',
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请选择设备'
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -2772,18 +2123,9 @@ const mapWidgets = [ ...@@ -2772,18 +2123,9 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '25%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -2809,53 +2151,37 @@ const mapWidgets = [ ...@@ -2809,53 +2151,37 @@ const mapWidgets = [
}, },
}, },
{ {
text: '位置坐标', text: '地址位置',
name: '位置坐标', name: '地址位置',
icon: <IconPack.SearchLocation />,
schema: { schema: {
title: '位置坐标', title: '地址位置',
type: 'string', type: 'string',
widget: 'SearchLocation', widget: 'SearchLocation',
placeholder: '请输入位置',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
widget: 'WidgetType', widget: 'WidgetType',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 75,
}, },
$id: { $id: {
title: '字段名称', title: '字段名称',
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true,
type: 'string', type: 'string',
widget: 'htmlInput', required: true,
displayType: 'row',
labelWidth: 80,
}, },
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
default: '请输入位置'
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -2871,18 +2197,9 @@ const mapWidgets = [ ...@@ -2871,18 +2197,9 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '25%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
...@@ -2907,35 +2224,13 @@ const mapWidgets = [ ...@@ -2907,35 +2224,13 @@ const mapWidgets = [
}, },
}, },
}, },
// {
// "text": "复杂结构样例",
// "name": "something",
// "schema": {
// "title": "对象",
// "description": "这是一个对象类型",
// // "type": "object",
// type: 'array',
// items: {
// "properties": {
// "GIS编码": {
// "title": "GIS编码",
// "type": "string"
// },
// "GIS图层": {
// "title": "GIS图层",
// "type": "string",
// },
// }
// },
// }
// }
] ]
const advancedWidgets = [ const advancedWidgets = [
{ {
text: '关联表单', text: '关联表单',
name: '关联表单', name: '关联表单',
icon: <IconPack.RelationForm />,
schema: { schema: {
title: '', title: '',
type: 'string', type: 'string',
...@@ -2944,11 +2239,6 @@ const advancedWidgets = [ ...@@ -2944,11 +2239,6 @@ const advancedWidgets = [
controlShow: '', controlShow: '',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -2961,21 +2251,12 @@ const advancedWidgets = [ ...@@ -2961,21 +2251,12 @@ const advancedWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
titleShow: { titleShow: {
title: '标题', title: '标题',
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
default: '关联表单', default: '关联表单',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
disabled: { disabled: {
title: '只读', title: '只读',
...@@ -2989,39 +2270,21 @@ const advancedWidgets = [ ...@@ -2989,39 +2270,21 @@ const advancedWidgets = [
} }
} }
}, },
// hidden: {
// title: '隐藏',
// type: 'boolean',
// widget: 'checkbox',
// default: false,
// width: '33%',
// },
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
displayType: 'row',
labelWidth: 60,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {}
}, },
'台账名称': { '台账名称': {
title: '台账名称', title: '台账名称',
type: 'string', type: 'string',
widget: 'AccountName', widget: 'AccountName',
displayType: 'row',
labelWidth: 80,
required: true required: true
}, },
'映射字段': { '映射字段': {
title: '映射字段', title: '映射字段',
type: 'array', type: 'array',
widget: 'MappedField', widget: 'MappedField',
displayType: 'row',
labelWidth: 80,
required: true, required: true,
default: [], default: [],
dependencies: ['台账名称'], dependencies: ['台账名称'],
...@@ -3067,17 +2330,13 @@ const advancedWidgets = [ ...@@ -3067,17 +2330,13 @@ const advancedWidgets = [
{ {
text: '自动计算', text: '自动计算',
name: '自动计算', name: '自动计算',
icon: <IconPack.AutoCalculate />,
schema: { schema: {
title: '自动计算', title: '自动计算',
type: 'string', type: 'string',
widget: 'AutoCalculate', widget: 'AutoCalculate',
}, },
setting: { setting: {
groupBase: {
title: '基础信息',
type: 'object',
properties: {}
},
widget: { widget: {
title: '控件类型', title: '控件类型',
type: 'string', type: 'string',
...@@ -3090,34 +2349,16 @@ const advancedWidgets = [ ...@@ -3090,34 +2349,16 @@ const advancedWidgets = [
type: 'string', type: 'string',
widget: 'FieldNames', widget: 'FieldNames',
required: true, required: true,
displayType: 'row',
labelWidth: 80,
}, },
title: { title: {
title: '标题', title: '标题',
required: true,
type: 'string', type: 'string',
widget: 'htmlInput', required: true,
displayType: 'row',
labelWidth: 80,
}, },
// placeholder: {
// title: '提示语',
// type: 'string',
// displayType: 'row',
// labelWidth: 80,
// },
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'number', type: 'number',
widget: 'NumerDefault', widget: 'NumerDefault',
displayType: 'row',
labelWidth: 80,
},
groupSetting: {
title: '控件设置',
type: 'object',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -3137,56 +2378,20 @@ const advancedWidgets = [ ...@@ -3137,56 +2378,20 @@ const advancedWidgets = [
default: true, default: true,
width: '30%', width: '30%',
}, },
hidden: {
title: '隐藏',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '30%',
},
description: { description: {
title: '说明', title: '说明',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 55,
},
groupSource: {
title: '数据来源',
type: 'object',
properties: {},
}, },
calculateRule: { calculateRule: {
title: '计算规则', title: '计算规则',
type: 'string', type: 'string',
widget: 'CalculateRule', widget: 'CalculateRule',
displayType: 'row',
labelWidth: 80,
}, },
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
properties: {} properties: {},
}, },
// prefix: {
// title: '前缀',
// type: 'string',
// widget: 'htmlInput',
// displayType: 'row',
// labelWidth: 60,
// },
// formatter: {
// title: '格式化',
// type: 'string',
// displayType: 'row',
// labelWidth: 60,
// widget: 'select',
// enum: ['%', '‰'],
// default: '',
// enumNames: ['%', '‰'],
// props: {
// allowClear: true
// }
// },
width: { width: {
title: '元素宽度', title: '元素宽度',
type: 'string', type: 'string',
...@@ -3210,12 +2415,6 @@ const advancedWidgets = [ ...@@ -3210,12 +2415,6 @@ const advancedWidgets = [
const settings = [ const settings = [
{ {
title: '布局控件', title: '布局控件',
color: 'pink',
props: {
style: {
color: 'red'
}
},
widgets: layoutWidgets widgets: layoutWidgets
}, },
{ {
......
import React, { useRef, useState, useContext, forwardRef, useMemo, useLayoutEffect } from 'react' import React, { useRef, useState, useContext, forwardRef, useImperativeHandle, useMemo, useLayoutEffect } from 'react'
import { ConfigProvider, message, Modal, Button } from 'antd' import { ConfigProvider, message, Modal, Button } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons' import { ExclamationCircleOutlined } from '@ant-design/icons'
import Generator, { defaultSettings } from 'fr-generator' import Generator, { defaultSettings, defaultCommonSettings, defaultGlobalSettings } from 'fr-generator'
import { settings, baseSettings, globalSettings } from './config' import { settings, baseSettings, globalSettings } from './config'
import widgets from '../widgets' import widgets from '../widgets'
import { saveTableConfig, GetTableConfigJson } from '../../apis/process' import { saveTableConfig, GetTableConfigJson } from '../../apis/process'
...@@ -11,6 +11,14 @@ import Drag from '../components/Drag' ...@@ -11,6 +11,14 @@ import Drag from '../components/Drag'
const FormDesigner = (props, ref) => { const FormDesigner = (props, ref) => {
useImperativeHandle(ref, () => (
{
clear,
preview,
submit,
}
))
const { tableName } = props const { tableName } = props
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext) const { getPrefixCls } = useContext(ConfigProvider.ConfigContext)
...@@ -32,6 +40,7 @@ const FormDesigner = (props, ref) => { ...@@ -32,6 +40,7 @@ const FormDesigner = (props, ref) => {
}, [settings, tableName]) }, [settings, tableName])
const getJSON = (json, tableName) => { const getJSON = (json, tableName) => {
json.tableName = tableName
let properties = json?.properties let properties = json?.properties
let parent = {} let parent = {}
let paths = [] let paths = []
...@@ -101,67 +110,73 @@ const FormDesigner = (props, ref) => { ...@@ -101,67 +110,73 @@ const FormDesigner = (props, ref) => {
} }
}, [tableName]) }, [tableName])
const extraButtons = [ const clear = () => {
false, Modal.confirm({
false, title: '确定要清空该表单配置吗?',
true, icon: <ExclamationCircleOutlined />,
true, centered: true,
{ cancelText: '取消',
text: '清空', okText: '确定',
onClick: (e) => { onCancel: () => {
Modal.confirm({ console.log('取消清空')
title: '确定要清空该表单配置吗?',
icon: <ExclamationCircleOutlined />,
centered: true,
cancelText: '取消',
okText: '确定',
onCancel: () => {
console.log('取消清空')
},
onOk: () => {
const schema = designerRef.current.getValue()
let newschema = {}
for (let key in schema) {
if (key !== 'properties') {
newschema[key] = schema[key]
}
}
designerRef.current.setValue(newschema)
}
})
}, },
}, onOk: () => {
{ const schema = designerRef.current.getValue()
text: '预览', let newschema = {}
onClick: (e) => { for (let key in schema) {
const errors = designerRef.current.getErrorFields() if (key !== 'properties') {
if (errors.length) { newschema[key] = schema[key]
return message.error('请按照提示完善表单内容') }
}
setVisible(true)
let json = getJSON(designerRef.current.getValue(), tableName)
setSchema(json)
designerRef.current.setValue(json)
}
},
{
text: '提交',
type: 'primary',
onClick: async (value) => {
const errors = designerRef.current.getErrorFields()
if (errors.length) {
return message.error('请按照提示完善表单内容')
}
let json = getJSON(designerRef.current.getValue(), tableName)
designerRef.current.setValue(json)
const { code, data, msg } = await saveTableConfig(json)
if (code === 0) {
message.info('保存成功')
} else {
message.error(msg)
} }
designerRef.current.setValue(newschema)
} }
})
}
const preview = () => {
const errors = designerRef.current.getErrorFields()
if (errors.length) {
return message.error('请按照提示完善表单内容')
}
setVisible(true)
let json = getJSON(designerRef.current.getValue(), tableName)
setSchema(json)
designerRef.current.setValue(json)
}
const submit = async () => {
const errors = designerRef.current.getErrorFields()
if (errors.length) {
return message.error('请按照提示完善表单内容')
}
let json = getJSON(designerRef.current.getValue(), tableName)
designerRef.current.setValue(json)
const { code, data, msg } = await saveTableConfig(json)
if (code === 0) {
message.info('保存成功')
} else {
message.error(msg)
} }
}
const extraButtons = [
false,
false,
false,
false,
// {
// text: '清空',
// onClick: clear
// },
// {
// text: '预览',
// onClick: preview
// },
// {
// text: '提交',
// type: 'primary',
// onClick: submit
// }
] ]
const getFields = (schema) => { const getFields = (schema) => {
...@@ -192,6 +207,10 @@ const FormDesigner = (props, ref) => { ...@@ -192,6 +207,10 @@ const FormDesigner = (props, ref) => {
} }
} }
if (!tableName) {
return null
}
return ( return (
<div className={prefixCls} style={{ width: '100%', height: '100%', background: 'white' }}> <div className={prefixCls} style={{ width: '100%', height: '100%', background: 'white' }}>
<div style={{ height: '100%' }}> <div style={{ height: '100%' }}>
......
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841976387"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="29926" width="14"
height="14" xmlns:xlink="http://www.w3.org/1999/xlink">
<path
d="M835.96858 63.659046H185.154303c-35.422337 0-64.2529 28.817252-64.2529 64.2529v767.966212c0 35.436671 28.830563 64.2529 64.2529 64.252899h650.814277c35.422337 0 64.2529-28.817252 64.252899-64.252899v-767.965188c0-35.436671-28.830563-64.253924-64.252899-64.253924z m-650.814277 56.720176h650.814277c4.153903 0 7.532724 3.378822 7.532724 7.532724v64.793511H177.620554v-64.793511c0-4.153903 3.378822-7.532724 7.533749-7.532724z m650.814277 783.032684H185.154303c-4.153903 0-7.532724-3.378822-7.532725-7.532724V249.426656h665.88075v646.452526c-0.001024 4.153903-3.379845 7.532724-7.533748 7.532724z"
p-id="29927"></path>
<path
d="M482.187531 318.775433H283.278353c-31.268434 0-56.720175 25.438431-56.720176 56.720175v84.748013c0 31.281744 25.451741 56.720175 56.720176 56.720175h198.908154c31.268434 0 56.720175-25.438431 56.720175-56.720175v-84.748013c0.001024-31.281744-25.451741-56.720175-56.719151-56.720175zM283.278353 460.243621v-84.748013h198.908154l0.027645 84.748013H283.278353zM759.196634 318.775433H621.467676c-15.675684 0-28.3606 12.698226-28.3606 28.3606 0 15.66135 12.684915 28.3606 28.3606 28.360599h137.728958c15.675684 0 28.3606-12.698226 28.3606-28.360599 0-15.662374-12.684915-28.3606-28.3606-28.3606zM759.196634 460.243621h-71.565489c-15.675684 0-28.359576 12.698226-28.359575 28.360599 0 15.66135 12.684915 28.359576 28.359575 28.359576h71.565489c15.675684 0 28.3606-12.698226 28.3606-28.359576 0-15.662374-12.684915-28.3606-28.3606-28.360599zM482.187531 626.94239H283.278353c-31.268434 0-56.720175 25.438431-56.720176 56.720176v84.748012c0 31.281744 25.451741 56.720175 56.720176 56.720175h198.908154c31.268434 0 56.720175-25.438431 56.720175-56.720175v-84.748012c0.001024-31.281744-25.451741-56.720175-56.719151-56.720176zM283.278353 768.410578v-84.748012h198.908154l0.027645 84.748012H283.278353zM759.196634 626.94239H621.467676c-15.675684 0-28.3606 12.698226-28.3606 28.359576 0 15.66135 12.684915 28.359576 28.3606 28.359576h137.728958c15.675684 0 28.3606-12.698226 28.3606-28.359576 0-15.66135-12.684915-28.359576-28.3606-28.359576zM759.196634 768.410578h-71.565489c-15.675684 0-28.359576 12.698226-28.359575 28.359576 0 15.66135 12.684915 28.3606 28.359575 28.360599h71.565489c15.675684 0 28.3606-12.698226 28.3606-28.360599 0-15.66135-12.684915-28.359576-28.3606-28.359576z"
p-id="29928"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842033633" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32334" width="16.078125" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M44.489544 0.010007h923.643357c20.753782 0 38.235391 17.201423 38.23539 38.50557v923.383184c0 21.304147-17.481609 38.515577-38.23539 38.515577H44.489544c-21.304147 0-38.77575-17.211429-38.77575-38.515577V38.525583C5.703788 17.221436 23.185397 0.010007 44.489544 0.010007z m484.491733 76.750967V477.136849h400.375874V76.760974H528.981277z m0 446.526522v400.095688h400.375874V523.287496H528.981277z m-45.880468 400.095688V523.287496H82.724935v400.095688h400.375874z m0-446.246335V76.760974H82.724935V477.136849h400.375874zM329.608881 643.727475l-54.616269 54.626276-54.616268-54.626276c-8.745808-9.005981-23.485596-9.005981-32.231404 0-9.286167 9.286167-9.286167 23.755775 0 32.771763l54.616269 54.616268-54.616269 54.356096a22.755111 22.755111 0 0 0 0 32.771763c8.745808 9.005981 23.485596 9.005981 32.231404 0l54.616268-54.356096 54.616269 54.356096c9.286167 9.005981 23.485596 9.005981 32.771762 0 9.286167-9.015987 9.286167-23.765782 0-32.501583l-54.616268-54.626276 54.616268-55.166634c9.286167-8.475628 9.286167-22.945237 0-32.231403a23.26545 23.26545 0 0 0-32.771762 0.010006z m-77.561506-474.665207v77.561506h-77.01114c-13.108705 0-22.93523 9.836532-22.93523 22.675057s9.826525 23.215416 22.93523 23.215417h77.01114v77.561505c0 12.55834 10.386898 22.665051 22.945237 22.665051 13.108705 0 23.215416-10.106711 23.215417-22.665051V292.514248h77.291326c12.55834 0 22.93523-10.376891 22.93523-23.215417s-10.376891-22.675058-22.93523-22.675057h-77.291326v-77.561506c0-12.838526-10.106711-23.485596-23.215417-23.485596-12.55834 0-22.945237 10.657077-22.945237 23.485596z m584.988469 584.998475H636.582731c-12.568346 0-22.945237 10.376891-22.945237 23.485596 0 12.568346 10.376891 22.675058 22.945237 22.675058h200.453113c13.118712 0 23.495603-10.106711 23.495603-22.675058a23.315483 23.315483 0 0 0-23.495603-23.485596z m0-92.301293H636.582731c-12.568346 0-22.945237 10.376891-22.945237 23.485596 0 12.568346 10.376891 22.675058 22.945237 22.675057h200.453113c13.118712 0 23.495603-10.106711 23.495603-22.675057a23.315483 23.315483 0 0 0-23.495603-23.485596z m0-415.135676H636.582731c-12.568346 0-22.945237 9.836532-22.945237 22.675057s10.376891 23.215416 22.945237 23.215417h200.453113c13.118712 0 23.495603-10.376891 23.495603-23.215417s-10.376891-22.675058-23.495603-22.675057z" p-id="32335"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842171028" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35344" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M759.296 177.066667c24.917333 0 48.810667 9.856 66.474667 27.434666 17.621333 17.536 27.562667 41.386667 27.562666 66.304v482.346667a93.610667 93.610667 0 0 1-93.610666 93.610667H264.277333A93.610667 93.610667 0 0 1 170.666667 753.152V270.677333A93.610667 93.610667 0 0 1 264.277333 177.066667h495.018667zM262.656 225.749333a42.666667 42.666667 0 0 0-42.666667 42.666667v486.997333a42.666667 42.666667 0 0 0 42.666667 42.666667h174.933333V225.706667h-174.933333z m499.029333 572.330667a42.666667 42.666667 0 0 0 42.666667-42.666667V268.373333a42.666667 42.666667 0 0 0-42.666667-42.666666h-275.413333v572.330666h275.413333zM367.274667 363.093333a7.808 7.808 0 0 1 0 11.861334L310.357333 418.773333c-4.864 3.669333-11.861333 0.298667-11.861333-5.76V325.333333c0-6.058667 6.997333-9.386667 11.861333-5.76l56.917334 43.52z m173.184 31.957334a12.202667 12.202667 0 0 1-12.16-12.202667v-24.32c0-6.698667 5.461333-12.202667 12.16-12.202667h211.2c6.698667 0 12.202667 5.205333 12.202666 12.202667v24.32a12.202667 12.202667 0 0 1-12.202666 12.202667h-211.2z m0 134.229333a12.202667 12.202667 0 0 1-12.16-12.202667v-24.32c0-6.698667 5.461333-12.202667 12.16-12.202666h211.2c6.698667 0 12.202667 5.205333 12.202666 12.202666v24.32a12.202667 12.202667 0 0 1-12.202666 12.202667h-211.2z m0 133.888a12.202667 12.202667 0 0 1-12.16-12.16v-24.32c0-6.741333 5.461333-12.202667 12.16-12.202667h211.2c6.698667 0 12.202667 5.162667 12.202666 12.16v24.32a12.202667 12.202667 0 0 1-12.202666 12.202667h-211.2z" p-id="35345"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841761506" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="24563" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M170.666667 128h682.666666a42.666667 42.666667 0 0 1 42.666667 42.666667v682.666666a42.666667 42.666667 0 0 1-42.666667 42.666667H170.666667a42.666667 42.666667 0 0 1-42.666667-42.666667V170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667z m42.666666 85.333333v597.333334h597.333334V213.333333H213.333333z m256.128 469.333334L288.426667 501.632l60.330666-60.330667 120.704 120.704 241.322667-241.365333 60.373333 60.330667L469.461333 682.666667z" p-id="24564" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677838948397"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5756"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M378.1 140h130.5v798.3H378.1zM580.8 140h87v798.3h-87zM953.7 140h65.2v798.3h-65.2zM229.6 140h65.2v798.3h-65.2zM729.2 140h152.2v798.3H729.2zM5.1 140h152.2v798.3H5.1z"
p-id="5757"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842144531" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34885" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M128 128v768h768V128H128z m682.666667 682.666667H213.333333V213.333333h597.333334v597.333334z" p-id="34886" ></path><path d="M682.666667 426.666667H341.333333l170.666667 213.333333z" p-id="34887" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841900223" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="26338" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M511.626335 1024l-33.902944-26.326417c-3.264355-2.528867-80.923759-63.272063-161.454587-165.232775-47.544724-60.178986-86.465102-122.554358-115.662943-185.383114C163.499013 567.232128 142.018752 486.439346 136.749439 406.875735A373.28502 373.28502 0 0 1 135.510193 376.307671v-0.110827c-0.100752-7.475776 0.110827-14.820574 0.634736-21.842966C147.600396 155.601014 312.510766 0.000101 511.817764 0.000101a376.045616 376.045616 0 0 1 376.30757 373.990281c0.87654 15.918767 3.29458 100.106881-33.248058 211.689381-23.062062 70.385132-57.025458 138.029818-100.953196 201.090302-54.405914 78.153088-124.367889 149.344233-207.840666 211.578554zM249.450282 400.991836c10.337124 148.356867 89.155172 277.188056 153.60603 359.270459a1018.740661 1018.740661 0 0 0 111.008214 119.854213c112.368362-92.409452 190.259496-201.332107 231.728892-324.269321 33.540238-99.321018 29.812426-172.144341 29.600848-175.761327l-0.110827-2.266913v-1.894132C775.061785 230.842378 656.869975 112.841996 511.817764 112.841996c-139.672071 0-255.214112 109.104008-263.042519 248.393222l-0.070526 1.138494c-0.302255 3.939391-0.423157 8.170962-0.362706 12.604037v1.329922c0 7.385099 0.302255 14.739973 0.89669 21.842967z m260.856206 197.473317c-105.557548 0-191.428215-85.870667-191.428215-191.428216s85.870667-191.428215 191.428215-191.428215 191.428215 85.870667 191.428215 191.428215-85.870667 191.428215-191.428215 191.428216z m0-270.014536a78.58632 78.58632 0 1 0 78.58632 78.58632 78.676996 78.676996 0 0 0-78.58632-78.58632z" p-id="26339" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839147586"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14103"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path d="M938.666667 235.093333V938.666667H85.333333V235.093333h853.333334m85.333333-85.333333H0V1024h1024V149.76z"
p-id="14104" ></path>
<path
d="M796.373333 565.333333H227.84c-23.466667 0-42.666667-19.2-42.666667-42.666666s19.2-42.666667 42.666667-42.666667h568.533333c23.466667 0 42.666667 19.2 42.666667 42.666667s-19.2 42.666667-42.666667 42.666666zM532.693333 756.266667H227.84c-23.466667 0-42.666667-19.2-42.666667-42.666667s19.2-42.666667 42.666667-42.666667h304.853333a42.666667 42.666667 0 1 1 0 85.333334z"
p-id="14105" ></path>
<path d="M298.453333 0h85.333334v299.52h-85.333334zM640.213333 0h85.333334v299.52h-85.333334z" p-id="14106"
></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841961577" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28599" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.666667 661.333333h-67.413334c-0.426667-0.853333-0.426667-1.706667-0.853333-2.133333l-128.426667-170.666667a20.48 20.48 0 0 0-17.066666-8.533333H533.333333V362.666667H768c35.413333 0 64-28.586667 64-64V213.333333c0-35.413333-28.586667-64-64-64H256c-35.413333 0-64 28.586667-64 64v85.333334c0 35.413333 28.586667 64 64 64h234.666667v117.333333H298.666667a20.48 20.48 0 0 0-17.066667 8.533333l-128 170.666667c-0.426667 0.853333-0.426667 1.28-0.853333 2.133333H85.333333c-11.946667 0-21.333333 9.386667-21.333333 21.333334v170.666666c0 11.946667 9.386667 21.333333 21.333333 21.333334h170.666667c11.946667 0 21.333333-9.386667 21.333333-21.333334v-170.666666c0-11.946667-9.386667-21.333333-21.333333-21.333334H205.226667l104.106666-138.666666h181.333334v138.666666H426.666667c-11.946667 0-21.333333 9.386667-21.333334 21.333334v170.666666c0 11.946667 9.386667 21.333333 21.333334 21.333334h170.666666c11.946667 0 21.333333-9.386667 21.333334-21.333334v-170.666666c0-11.946667-9.386667-21.333333-21.333334-21.333334h-64v-138.666666h180.906667l104.533333 138.666666H768c-11.946667 0-21.333333 9.386667-21.333333 21.333334v170.666666c0 11.946667 9.386667 21.333333 21.333333 21.333334h170.666667c11.946667 0 21.333333-9.386667 21.333333-21.333334v-170.666666c0-11.946667-9.386667-21.333333-21.333333-21.333334zM234.666667 298.666667V213.333333c0-11.946667 9.386667-21.333333 21.333333-21.333333h512c11.946667 0 21.333333 9.386667 21.333333 21.333333v85.333334c0 11.946667-9.386667 21.333333-21.333333 21.333333H256c-11.946667 0-21.333333-9.386667-21.333333-21.333333z m0 533.333333h-128v-128h128v128z m341.333333 0h-128v-128h128v128z m341.333333 0h-128v-128h128v128z" p-id="28600"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842012979" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31068" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M869 119.3H156.8c-36.4 0-66 29.6-66 66v657.9c0 36.4 29.6 66 66 66H869c36.4 0 66-29.6 66-66V185.3c0-36.4-29.6-66-66-66z m-4 70v176.6H160.8V189.3H865z m0 246.6V602H160.8V435.9H865zM160.8 839.2V672H865v167.2H160.8z" p-id="31069" ></path><path d="M723.5 317.8h43c19.3 0 35-15.7 35-35s-15.7-35-35-35h-43c-19.3 0-35 15.7-35 35s15.7 35 35 35zM723.5 553.9h43c19.3 0 35-15.7 35-35s-15.7-35-35-35h-43c-19.3 0-35 15.7-35 35 0 19.4 15.7 35 35 35zM766.5 720.1h-43c-19.3 0-35 15.7-35 35s15.7 35 35 35h43c19.3 0 35-15.7 35-35 0-19.4-15.7-35-35-35z" p-id="31070" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839181340"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15585"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M924.672 126.976q36.864 36.864 54.784 82.432t17.92 93.696-17.92 93.696-54.784 82.432l-392.192 389.12q-36.864 36.864-90.624 61.44t-113.664 28.672-122.368-16.384-115.712-73.728q-52.224-52.224-72.704-113.152t-16.384-121.344 28.16-113.664 60.928-90.112l348.16-345.088q9.216-9.216 27.136-4.608t27.136 13.824q8.192 9.216 13.312 27.136t-4.096 27.136l-347.136 344.064q-27.648 27.648-46.08 64.512t-21.504 78.848 12.288 84.992 55.296 82.944q35.84 35.84 79.36 50.688t86.528 12.288 81.92-18.944 66.56-44.032l391.168-388.096q27.648-27.648 39.424-57.344t11.264-58.88-13.824-56.832-36.864-51.2q-44.032-43.008-98.816-40.448t-110.08 57.856l-353.28 351.232q-23.552 23.552-23.04 52.224t18.944 47.104q22.528 22.528 51.712 18.432t47.616-22.528l320.512-318.464q9.216-9.216 27.136-4.608t27.136 13.824 14.336 27.136-4.096 27.136l-321.536 318.464q-36.864 36.864-70.656 51.2t-63.488 12.8-55.296-15.872-47.104-34.816q-17.408-16.384-31.232-41.984t-15.872-56.32 10.752-65.536 49.664-70.656q18.432-18.432 32.768-33.792 12.288-13.312 23.04-23.552t11.776-11.264l285.696-284.672q36.864-36.864 80.384-57.856t88.576-24.064 88.576 12.288 80.384 52.224z"
p-id="15586" ></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677838851877"
class="icon" viewBox="0 0 1073 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3948"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M191.597683 1024h690.029335A191.850117 191.850117 0 0 0 1072.84605 833.033403V191.597683A191.850117 191.850117 0 0 0 881.627018 0H191.597683A191.850117 191.850117 0 0 0 0 191.597683V833.033403a191.850117 191.850117 0 0 0 191.597683 190.966597zM87.468507 833.033403V191.597683a104.255393 104.255393 0 0 1 104.129176-104.129176h690.029335a104.255393 104.255393 0 0 1 104.129176 104.129176V833.033403a104.255393 104.255393 0 0 1-104.129176 104.129176H191.597683A104.255393 104.255393 0 0 1 87.468507 833.033403z"
p-id="3949"></path>
<path
d="M248.016763 312.008875a160.043387 160.043387 0 0 1-37.865154 45.816837 265.056083 265.056083 0 0 1-63.865895 41.65167l-7.320596 3.407864v70.176753l17.291754-6.058424a329.048194 329.048194 0 0 0 50.486873-25.243437c8.835203-5.174904 16.913102-10.476026 24.233699-15.650931v277.29915h70.807839V304.940712h-50.234439zM492.247011 631.085912c7.320597-7.699248 25.243436-23.097744 51.749045-45.816838a770.682115 770.682115 0 0 0 71.691359-66.642672 181.87896 181.87896 0 0 0 31.80673-49.098484 124.450142 124.450142 0 0 0 10.097375-48.846049 109.556514 109.556514 0 0 0-35.088377-82.546038 130.003698 130.003698 0 0 0-93.400715-33.195119 136.062123 136.062123 0 0 0-92.643412 30.670776 127.353137 127.353137 0 0 0-40.515715 88.352027l-1.135955 12.621719 73.079749 7.573031v-13.883891a62.225071 62.225071 0 0 1 16.282016-45.943054 58.564773 58.564773 0 0 1 43.797363-16.155799 57.428818 57.428818 0 0 1 41.904104 15.146062 48.593615 48.593615 0 0 1 15.524714 36.602983A82.798472 82.798472 0 0 1 566.588931 467.003575a496.538395 496.538395 0 0 1-79.643042 76.487612 487.324541 487.324541 0 0 0-61.34155 57.807469 181.500308 181.500308 0 0 0-32.185382 53.137434 92.390977 92.390977 0 0 0-6.184642 36.602983v12.621718h270.862074v-69.41945H488.460496zM929.841982 513.32528a93.400715 93.400715 0 0 0-32.185381-26.758042 89.614199 89.614199 0 0 0 19.816097-21.709356 90.623937 90.623937 0 0 0 15.019845-50.486873 104.507827 104.507827 0 0 0-15.398496-54.399605 107.537039 107.537039 0 0 0-44.302231-40.389498 133.790213 133.790213 0 0 0-61.720203-14.388759 122.178232 122.178232 0 0 0-81.914951 28.272649 129.877481 129.877481 0 0 0-42.282756 78.38087l-2.271909 12.621718 70.807839 12.621718 2.019475-12.621718a72.322445 72.322445 0 0 1 18.932577-42.913842 49.603353 49.603353 0 0 1 35.719463-13.379021 47.836312 47.836312 0 0 1 35.088377 12.621718 42.913842 42.913842 0 0 1 12.621718 32.437816 39.379761 39.379761 0 0 1-17.544189 36.350548 81.157648 81.157648 0 0 1-45.564402 12.621719h-5.932208l-12.621718-1.388389-8.204117 70.934056 18.175274-4.796253a119.527672 119.527672 0 0 1 28.903735-4.543818 58.69099 58.69099 0 0 1 43.418711 16.660668 57.681252 57.681252 0 0 1 16.786885 42.913842 62.351288 62.351288 0 0 1-18.932577 46.321705 60.710465 60.710465 0 0 1-45.438186 18.680143 53.011217 53.011217 0 0 1-37.865155-13.88389 88.352028 88.352028 0 0 1-22.84531-49.098483l-2.398126-11.485764-69.41945 9.213854 1.262171 12.621718a124.828793 124.828793 0 0 0 40.894367 83.681992 129.246395 129.246395 0 0 0 89.740417 32.437816 137.702946 137.702946 0 0 0 98.449402-37.865155A122.30445 122.30445 0 0 0 950.667817 580.599039a108.546777 108.546777 0 0 0-20.825835-67.273759z"
p-id="3950"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841934214" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27474" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M284.672 899.072c0-178.176 145.408-321.536 323.584-319.488 129.024 2.048 241.664 83.968 292.864 202.752 16.384 40.96 24.576 79.872 24.576 116.736 0 18.432 14.336 34.816 32.768 34.816h4.096c18.432 0 34.816-14.336 34.816-32.768 0-167.936-104.448-309.248-251.904-366.592 61.44-43.008 102.4-114.688 102.4-196.608 2.048-131.072-104.448-241.664-235.52-245.76-141.312-6.144-253.952 104.448-253.952 243.712 0 81.92 40.96 155.648 104.448 198.656-145.408 57.344-249.856 198.656-249.856 364.544v2.048c0 16.384 14.336 30.72 32.768 30.72h8.192c16.384 0 30.72-14.336 30.72-32.768z m147.456-534.528c-20.48-118.784 81.92-219.136 198.656-198.656 71.68 12.288 129.024 69.632 141.312 141.312 20.48 118.784-81.92 219.136-198.656 198.656-71.68-12.288-129.024-69.632-141.312-141.312z" p-id="27475" ></path><path d="M323.584 489.472c-65.536-14.336-112.64-71.68-112.64-141.312 0-69.632 49.152-126.976 114.688-141.312 12.288-2.048 22.528-14.336 22.528-28.672 0-18.432-18.432-32.768-36.864-28.672-92.16 20.48-161.792 102.4-161.792 200.704 0 69.632 34.816 131.072 88.064 167.936-122.88 47.104-208.896 167.936-208.896 307.2 0 10.24 0 18.432 2.048 28.672v2.048c0 16.384 14.336 30.72 30.72 30.72s30.72-14.336 30.72-30.72v-2.048c0-8.192-2.048-18.432-2.048-28.672 0-135.168 100.352-247.808 231.424-266.24 16.384-2.048 30.72-16.384 30.72-34.816-4.096-16.384-14.336-30.72-28.672-34.816z" p-id="27476" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677838975661"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7061"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M957.91 512.93c0 247.03-200.26 447.29-447.29 447.29S63.33 759.97 63.33 512.93 263.59 65.65 510.62 65.65 957.91 265.9 957.91 512.93zM510.62 155.1c-197.62 0-357.83 160.21-357.83 357.83S313 870.77 510.62 870.77s357.83-160.21 357.83-357.83S708.25 155.1 510.62 155.1z"
p-id="7062"></path>
<path d="M510.62 512.93m-178.92 0a178.92 178.92 0 1 0 357.84 0 178.92 178.92 0 1 0-357.84 0Z" p-id="7063"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839445542"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21903"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M225.664 576l-160 0L65.664 192l512 0 0 384-96 0c-17.664 0-32 14.336-32 32S464 640 481.664 640l96 0c35.392 0 64-28.608 64-64L641.664 192c0-35.392-28.608-64-64-64l-512 0c-35.392 0-64 28.608-64 64l0 384c0 35.392 28.608 64 64 64l160 0c17.664 0 32-14.336 32-32S243.392 576 225.664 576zM897.664 384l-160 0c-17.664 0-32 14.336-32 32S720 448 737.664 448l160 0 0 384-512 0L385.664 448l96 0c17.664 0 32-14.336 32-32S499.392 384 481.664 384l-96 0c-35.392 0-64 28.608-64 64l0 384c0 35.392 28.608 64 64 64l512 0c35.392 0 64-28.608 64-64L961.664 448C961.664 412.608 933.056 384 897.664 384z"
p-id="21904" ></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839082650"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10282"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M686.3 630.3V513.2c0-19.9-16.1-36-36-36s-36 16.1-36 36v101.1H136.7V136.7h477.6v98.8c0 19.9 16.1 36 36 36s36-16.1 36-36V120.7c0-30.9-25.1-56-56-56H120.7c-30.9 0-56 25.1-56 56v509.6c0 30.9 25.1 56 56 56h509.6c30.9 0 56-25.1 56-56z"
p-id="10283"></path>
<path
d="M903.8 337.8H394.2c-30.9 0-56 25.1-56 56v118c0 19.9 16.1 36 36 36s36-16.1 36-36v-102h477.6v477.6H410.2V784.6c0-19.9-16.1-36-36-36s-36 16.1-36 36v118.7c0 30.9 25.1 56 56 56h509.6c30.9 0 56-25.1 56-56V393.8c0-30.9-25.1-56-56-56z"
p-id="10284"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677838902567"
class="icon" viewBox="0 0 1126 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4946"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M312.383084 102.454109h506.83626V0.065505h-506.83626z m0-102.388604h506.83626c66.556816 0 66.556816 102.388604 0 102.388604h-506.83626a51.259576 51.259576 0 1 1 0-102.388604z m711.621147 204.784887V102.454109h-921.520472v102.396283z m0-204.784887a102.695777 102.695777 0 0 1 102.388604 102.388604v153.586745A48.379825 48.379825 0 0 1 1075.194694 307.238996H51.285617A48.379825 48.379825 0 0 1 0.087475 256.040854v-153.586745A102.695777 102.695777 0 0 1 102.476079 0.065505h921.520473z"
p-id="4947"></path>
<path
d="M102.476079 307.238996v563.14884A48.379825 48.379825 0 0 0 153.674221 921.585978h819.131869a48.379825 48.379825 0 0 0 51.198141-51.198142V460.825741a51.198142 51.198142 0 0 1 102.388604 0v409.562095a150.845222 150.845222 0 0 1-153.586745 153.586745H153.674221a150.845222 150.845222 0 0 1-153.586746-153.586745v-614.346982a48.379825 48.379825 0 0 1 51.198142-51.198142H1075.194694a48.379825 48.379825 0 0 1 51.198141 51.198142A48.379825 48.379825 0 0 1 1075.194694 307.238996z"
p-id="4948"></path>
<path
d="M256.062825 563.214345a48.379825 48.379825 0 0 1-51.198142-51.198142A48.379825 48.379825 0 0 1 256.062825 460.825741H460.847712a48.379825 48.379825 0 0 1 51.198141 51.198142A48.379825 48.379825 0 0 1 460.847712 563.214345z m0 204.784887a51.198142 51.198142 0 0 1 0-102.388604h409.569774a51.198142 51.198142 0 0 1 0 102.388604H256.062825z"
p-id="4949" data-spm-anchor-id="a313x.7781069.0.i5" class="selected"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839386622"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21686"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M567.68 304c0-30.75072-24.92928-55.68-55.68-55.68s-55.68 24.92928-55.68 55.68S481.24928 359.68 512 359.68s55.68-24.92928 55.68-55.68z m74.24 0c0 71.75168-58.16832 129.92-129.92 129.92S382.08 375.75168 382.08 304 440.24832 174.08 512 174.08s129.92 58.16832 129.92 129.92z"
p-id="21687" ></path>
<path
d="M215.04 315.8784C217.07776 153.79968 349.91616 23.95136 512 25.6c162.08384-1.64864 294.91712 128.19968 296.95488 290.27328A288.78848 288.78848 0 0 1 660.48 566.43072l-117.2992 113.5872a49.00864 49.00864 0 0 1-68.3008 0l-122.496-118.77888A287.68768 287.68768 0 0 1 215.04 315.8784z m296.96 293.61664l105.4208-101.33504 4.4544-2.2272a215.28576 215.28576 0 0 0 111.35488-188.19584c-0.80896-121.15456-99.6864-218.71104-220.84608-217.89696l-0.384 0.00512c-121.14432-1.85856-220.86144 94.83776-222.72 215.98208v0.0512a214.54848 214.54848 0 0 0 106.15808 185.6l3.712 2.2272 3.34336 2.9696L512 609.49504z"
p-id="21688" ></path>
<path
d="M831.60064 656.63488h-96.88576a37.12 37.12 0 0 1 0-74.24h123.61216a37.12 37.12 0 0 1 37.12 25.24672l99.10784 296.95488a37.12 37.12 0 0 1-37.12 48.9984H66.56512a37.12 37.12 0 0 1-37.12-48.9984l99.10784-296.95488a37.12 37.12 0 0 1 37.12-25.24672H289.28a37.12 37.12 0 0 1 0 74.24H192.39936l-74.24 222.72h787.68128l-74.24-222.72z"
p-id="21689" ></path>
<path
d="M400.64 805.11488a37.12 37.12 0 0 1 0-74.24h222.72c20.49536 0 37.12 16.62464 37.12 37.12s-16.62464 37.12-37.12 37.12h-222.72z"
p-id="21690" ></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677841846605" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25135" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M711.15 757.38H311.52c-136.12 0-247.48-111.37-247.48-247.48v-16.23c0-136.12 111.37-247.48 247.48-247.48h399.63c136.12 0 247.48 111.37 247.48 247.48v16.23c0.01 136.11-111.36 247.48-247.48 247.48z m183.58-247.44v-16.32c0-100.95-82.59-183.54-183.54-183.54H311.47c-100.95 0-183.54 82.59-183.54 183.54v16.32c0 100.95 82.59 183.54 183.54 183.54H711.2c100.94 0 183.53-82.59 183.53-183.54z" p-id="25136" ></path><path d="M351.58 507.76m-127.8 0a127.8 127.8 0 1 0 255.6 0 127.8 127.8 0 1 0-255.6 0Z" p-id="25137" ></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842093471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33182" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M760.32 622.08a12.8 12.8 0 0 0-13.824 2.56l-153.6 153.6a12.8 12.8 0 0 0 9.216 22.016h153.6a12.8 12.8 0 0 0 12.8-12.8v-153.6a12.8 12.8 0 0 0-8.192-11.776z" p-id="33183"></path><path d="M768 153.6H256a128 128 0 0 0-128 128v512A128 128 0 0 0 256 921.6h512a128 128 0 0 0 128-128v-512A128 128 0 0 0 768 153.6z m76.8 640A76.8 76.8 0 0 1 768 870.4H256a76.8 76.8 0 0 1-76.8-76.8v-512A76.8 76.8 0 0 1 256 204.8h512a76.8 76.8 0 0 1 76.8 76.8z" p-id="33184"></path><path d="M307.2 398.848h409.6a25.6 25.6 0 0 0 0-51.2H307.2a25.6 25.6 0 0 0 0 51.2zM307.2 567.296h409.6a25.6 25.6 0 0 0 0-51.2H307.2a25.6 25.6 0 0 0 0 51.2zM512 685.056H307.2a25.6 25.6 0 0 0 0 51.2h204.8a25.6 25.6 0 0 0 0-51.2z" p-id="33185"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677842116206" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34307" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M806.88 1002H202.2C90.74 1002 0.07 911.33 0.07 799.85V242.26c0-111.48 90.67-202.15 202.12-202.15h604.69c111.48 0 202.15 90.67 202.15 202.15v557.59c0 111.48-90.67 202.15-202.15 202.15zM202.2 120.61c-67.06 0-121.62 54.56-121.62 121.64v557.59c0 67.09 54.56 121.64 121.62 121.64h604.69c67.09 0 121.64-54.56 121.64-121.64V242.26c0-67.09-54.56-121.64-121.64-121.64l-604.69-0.01z" p-id="34308"></path><path d="M243.31 395.56h522.48v80.5H243.31zM243.31 608.82h292.74v80.5H243.31z" p-id="34309"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839166044"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14568"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M559.542857 256a47.542857 47.542857 0 0 0-95.085714 0v293.083429l191.561143 113.517714a47.542857 47.542857 0 1 0 48.420571-81.773714L559.542857 494.884571V256z"
p-id="14569"></path>
<path
d="M987.428571 512a475.428571 475.428571 0 1 1-950.857142 0 475.428571 475.428571 0 0 1 950.857142 0z m-95.085714 0A380.342857 380.342857 0 1 0 131.657143 512a380.342857 380.342857 0 0 0 760.685714 0z"
p-id="14570"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677839104608"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11278"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M164.445091 330.984727c0-95.604364 79.080727-173.102545 176.64-173.102545 97.605818 0 176.686545 77.498182 176.686545 173.102545s-79.127273 173.102545-176.686545 173.102546-176.64-77.498182-176.64-173.102546zM407.272727 808.354909v-11.962182c0-88.250182 45.986909-165.794909 115.339637-211.502545a230.958545 230.958545 0 0 0-100.491637-23.086546H274.850909c-126.045091 0-228.212364 100.072727-228.212364 223.557819v14.42909c0 50.501818 102.167273 50.501818 228.212364 50.501819H415.650909a101.841455 101.841455 0 0 1-8.378182-41.937455z m313.623273-532.852364c-80.942545 0-146.618182 64.325818-146.618182 143.685819s65.675636 143.685818 146.618182 143.685818c80.989091 0 146.618182-64.325818 146.618182-143.685818s-65.582545-143.685818-146.618182-143.685819z m0 0c-80.942545 0-146.618182 64.325818-146.618182 143.685819s65.675636 143.685818 146.618182 143.685818c80.989091 0 146.618182-64.325818 146.618182-143.685818s-65.582545-143.685818-146.618182-143.685819z m-54.923636 335.313455c-104.634182 0-189.44 83.083636-189.44 185.576727v11.962182c0 41.890909 84.805818 41.890909 189.44 41.890909h122.228363c104.587636 0 189.346909-1.536 189.346909-41.890909v-11.962182c0-102.493091-84.759273-185.576727-189.346909-185.576727h-122.228363z m0 0"
p-id="11279"></path>
</svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1677838991758"
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8035"
xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">
<path
d="M863.8 63.7h-704c-53 0-96 43-96 96v704c0 53 43 96 96 96h704c53 0 96-43 96-96v-704c0-53-42.9-96-96-96z m-54.9 374.1l-332.4 284c-11.7 10-26.3 15.3-41.5 15.3-1.7 0-3.4-0.1-5.1-0.2-17-1.3-32.5-9.2-43.6-22.2L208.8 507c-11.5-13.4-9.9-33.6 3.5-45.1s33.6-9.9 45.1 3.5L434.8 673l332.4-284c13.4-11.5 33.6-9.9 45.1 3.5 11.6 13.6 10 33.8-3.4 45.3z"
p-id="8036"></path>
</svg>
\ No newline at end of file
...@@ -3,7 +3,8 @@ import { ReactSVG } from 'react-svg' ...@@ -3,7 +3,8 @@ import { ReactSVG } from 'react-svg'
const style = { const style = {
width: '14px', width: '14px',
height: '18px' height: '18px',
marginRight: '5px'
} }
function getAll(context) { function getAll(context) {
......
import React, { useMemo, useState, useContext } from 'react' import React, { useMemo, useState, useContext } from 'react'
import { Input, Modal, ConfigProvider } from 'antd' import { Input, Modal, ConfigProvider } from 'antd'
import Icon, { EllipsisOutlined } from '@ant-design/icons' import Icon, { PlusOutlined } from '@ant-design/icons'
import * as icons from '@ant-design/icons' import * as icons from '@ant-design/icons'
import './index.less' import './index.less'
import Drag from '../../../components/Drag' import Drag from '../../../components/Drag'
...@@ -33,7 +33,7 @@ const InputAddon = (props) => { ...@@ -33,7 +33,7 @@ const InputAddon = (props) => {
return ( return (
<div className={`inputAddon`}> <div className={`inputAddon`}>
<Input value={value} onChange={inputChange} addonAfter={<EllipsisOutlined onClick={iconClick} />} /> <Input value={value} onChange={inputChange} addonAfter={<PlusOutlined onClick={iconClick} />} />
<Drag <Drag
width={'50%'} width={'50%'}
getContainer={false} getContainer={false}
......
...@@ -53,7 +53,7 @@ const FieldNames = (props) => { ...@@ -53,7 +53,7 @@ const FieldNames = (props) => {
<Select <Select
onFocus={onFocus} onFocus={onFocus}
onChange={selectChange} onChange={selectChange}
style={{ width: '100%', maxWidth: '222px' }} style={{ width: '100%' }}
showSearch showSearch
optionFilterProp='children' optionFilterProp='children'
value={value} value={value}
......
import React, { useMemo, useState } from 'react' import React, { useMemo, useState } from 'react'
import { Input, Modal, Popover, Select, Dropdown, Menu } from 'antd' import { Input, Modal, Popover, Select, Dropdown, Menu } from 'antd'
import { EllipsisOutlined } from '@ant-design/icons' import { PlusOutlined } from '@ant-design/icons'
const options = [ const options = [
{ label: '本人姓名', key: '【本人姓名】' }, { label: '本人姓名', key: '【本人姓名】' },
...@@ -43,7 +43,7 @@ const InputDefault = (props) => { ...@@ -43,7 +43,7 @@ const InputDefault = (props) => {
/> />
)} )}
> >
<EllipsisOutlined /> <PlusOutlined />
</Dropdown> </Dropdown>
} }
/> />
......
import React, { useMemo, useEffect, useState } from 'react' import React, { useMemo, useEffect, useState } from 'react'
import { Input } from 'antd' import { Input } from 'antd'
import { EllipsisOutlined } from '@ant-design/icons' import { PlusOutlined } from '@ant-design/icons'
import Drag from '../../../../components/Drag' import Drag from '../../../../components/Drag'
const Placeholder = (props) => { const Placeholder = (props) => {
...@@ -37,7 +37,7 @@ const Placeholder = (props) => { ...@@ -37,7 +37,7 @@ const Placeholder = (props) => {
<Input <Input
value={value} value={value}
onChange={inputChange} onChange={inputChange}
addonAfter={<EllipsisOutlined onClick={iconClick} />} addonAfter={<PlusOutlined onClick={iconClick} />}
/> />
<Drag <Drag
width='500px' width='500px'
......
import React from 'react' import React from 'react'
const data = { const data = {
'TextInput': '文本', 'TextInput': { name: '文本', type: '文本控件', },
'TextArea': '多行文本', 'TextArea': { name: '多行文本', type: '文本控件', },
'NumberInput': '数值', 'NumberInput': { name: '数值', type: '文本控件', },
'RichText': '富文本', 'RichText': { name: '富文本', type: '文本控件', },
'Coding': '编码', 'Coding': { name: '编码', type: '文本控件' },
'ComboBox': '下拉框', 'ComboBox': { name: '下拉框', type: '选择器控件' },
'RadioButton': '单选框', 'RadioButton': { name: '单选框', type: '选择器控件' },
'CheckBox': '复选框', 'CheckBox': { name: '复选框', type: '选择器控件' },
'SwitchSelector': '开关', 'SwitchSelector': { name: '开关', type: '选择器控件' },
'RelevanceSelect': '关联选择', 'RelevanceSelect': { name: '关联选择', type: '选择器控件' },
'CascadeSelector': '联级选择', 'CascadeSelector': { name: '联级选择', type: '选择器控件' },
'PersonSelector': '人员选择器', 'PersonSelector': { name: '人员选择', type: '业务控件' },
'DeptSelector': '部门选择器', 'DeptSelector': { name: '部门选择', type: '业务控件' },
'AccountSelector': '台账选择器', 'AccountSelector': { name: '部门选择', type: '业务控件' },
'DateTime': '日期选择', 'DateTime': { name: '日期选择', type: '时间控件' },
'Time': '时间选择', 'Time': { name: '时间选择', type: '时间控件' },
'FileUpload': '附件', 'FileUpload': { name: '附件', type: '附件控件' },
'Coordinate': '坐标控件', 'Coordinate': { name: '坐标控件', type: 'GIS控件' },
'Device': '设备选择', 'Device': { name: '设备选择', type: 'GIS控件' },
'SearchLocation': '位置坐标', 'SearchLocation': { name: '位置坐标', type: 'GIS控件' },
'RelationForm': '关联表单', 'RelationForm': { name: '关联表单', type: '高级控件' },
'AutoCalculate': '自动计算', 'AutoCalculate': { name: '自动计算', type: '高级控件' },
} }
const WidgetType = (props) => { const WidgetType = (props) => {
const { value } = props const { value, onChange } = props
const getStyles = (type) => {
switch (type) {
case '文本控件': return { background: '#DEFED9', color: '#48BC2E' }
case '选择器控件': return { background: '#E1EDFE', color: '#0765F3' }
case '业务控件': return { background: '#FCE2FA', color: '#DD3CC4' }
case '时间控件': return { background: '#E1EDFE', color: '#0765F3' }
case '附件控件': return { background: '#DEFED9', color: '#48BC2E' }
case 'GIS控件': return { background: '#D1F5EB', color: '#0A9C71' }
case '高级控件': return { background: '#D6F1FE', color: '#0195D4' }
default: return {}
}
}
return ( return (
<span style={{ background: '#f1f1f1', borderRadius: '5px', padding: '0 7px' }}>{data[value]}</span> <span
onClick={e => onChange('TextInput')}
style={{
borderRadius: '5px',
padding: '0 7px',
border: '1px solid',
...getStyles(data[value]?.type)
}}>
{data[value]?.name}
</span>
) )
} }
......
...@@ -58,7 +58,7 @@ const Dictionary = (props) => { ...@@ -58,7 +58,7 @@ const Dictionary = (props) => {
<div className='dictionary'> <div className='dictionary'>
<Select <Select
value={value} value={value}
style={{ maxWidth: value ? '180px' : '218px', width: '100%' }} style={{ width: '100%' }}
onChange={selectChange} onChange={selectChange}
onFocus={() => getDictionary()} onFocus={() => getDictionary()}
showSearch showSearch
......
import React, { useState, useEffect, useMemo, useContext } from 'react' import React, { useState, useEffect, useMemo, useContext } from 'react'
import { Input, message, ConfigProvider } from 'antd' import { Input, message, ConfigProvider } from 'antd'
import Icon, { EllipsisOutlined } from '@ant-design/icons' import Icon, { PlusOutlined } from '@ant-design/icons'
import * as icons from '@ant-design/icons' import * as icons from '@ant-design/icons'
import { GetFieldValueFromTable } from '../../../../apis/process' import { GetFieldValueFromTable } from '../../../../apis/process'
import './index.less' import './index.less'
......
...@@ -13,9 +13,15 @@ body #app { ...@@ -13,9 +13,15 @@ body #app {
@pandaXform-prefix-cls: ~'@{ant-prefix}-pandaXform'; @pandaXform-prefix-cls: ~'@{ant-prefix}-pandaXform';
.@{pandaXform-prefix-cls} { .@{pandaXform-prefix-cls} {
background: white; background: white;
padding: 10px 0;
.fr-generator-container .left-layout { .fr-generator-container .left-layout {
.left-item { .left-item {
justify-content: left;
padding-left: 10px;
&:hover {
svg {
fill: #409eff;
}
}
.anticon { .anticon {
margin-right: 5px; margin-right: 5px;
} }
......
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