Commit d818d58b authored by 田翔's avatar 田翔

命名规范问题

parent af60a167
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.0.8", "version": "2.0.9",
"description": "2.0.8: 解决下拉框组件以及时间类组件弹出层不随组件滚动问题", "description": "2.0.9: 命名规范问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -565,7 +565,6 @@ const textWidgets = [ ...@@ -565,7 +565,6 @@ const textWidgets = [
icon: <HighlightOutlined />, icon: <HighlightOutlined />,
schema: { schema: {
title: '富文本', title: '富文本',
name: '富文本',
type: 'string', type: 'string',
widget: 'RichText', widget: 'RichText',
width: '100%', width: '100%',
...@@ -777,7 +776,6 @@ const selectWidgets = [ ...@@ -777,7 +776,6 @@ const selectWidgets = [
name: '下拉框', name: '下拉框',
schema: { schema: {
title: '下拉框', title: '下拉框',
name: '下拉框',
type: 'string', type: 'string',
widget: 'ComboBox', widget: 'ComboBox',
}, },
...@@ -816,16 +814,16 @@ const selectWidgets = [ ...@@ -816,16 +814,16 @@ const selectWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
}, },
soruceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '下拉框', name: '下拉框',
type: 'string', type: 'string',
widget: 'SoruceType', widget: 'SourceType',
default: '手动输入', default: '手动输入',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
...@@ -834,8 +832,8 @@ const selectWidgets = [ ...@@ -834,8 +832,8 @@ const selectWidgets = [
title: '', title: '',
name: '选项', name: '选项',
type: 'array', type: 'array',
required: '{{formData.soruceType === "手动输入"}}', required: '{{formData.sourceType === "手动输入"}}',
hidden: '{{formData.soruceType !== "手动输入"}}', hidden: '{{formData.sourceType !== "手动输入"}}',
default: [], default: [],
widget: 'simpleList', widget: 'simpleList',
items: { items: {
...@@ -863,42 +861,42 @@ const selectWidgets = [ ...@@ -863,42 +861,42 @@ const selectWidgets = [
}, },
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
dependencies: ['soruceType'] dependencies: ['sourceType']
}, },
dictionary: { dictionary: {
title: '{{formData.soruceType}}', title: '{{formData.sourceType}}',
name: '{{formData.soruceType}}', name: '{{formData.sourceType}}',
required: '{{formData.soruceType === "数据字典"}}', required: '{{formData.sourceType === "数据字典"}}',
hidden: '{{formData.soruceType !== "数据字典"}}', hidden: '{{formData.sourceType !== "数据字典"}}',
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.soruceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
dependencies: ['soruceType'] dependencies: ['sourceType']
}, },
tableName: { tableName: {
title: '表名', title: '表名',
name: '表名', name: '表名',
required: '{{formData.soruceType === "表数据"}}', required: '{{formData.sourceType === "表数据"}}',
hidden: '{{formData.soruceType !== "表数据"}}', hidden: '{{formData.sourceType !== "表数据"}}',
type: 'string', type: 'string',
widget: 'TableName', widget: 'TableName',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
dependencies: ['soruceType'], dependencies: ['sourceType'],
}, },
fieldName: { fieldName: {
title: '字段名', title: '字段名',
name: '字段名', name: '字段名',
required: true, required: true,
required: '{{formData.soruceType === "表数据"}}', required: '{{formData.sourceType === "表数据"}}',
hidden: '{{formData.soruceType !== "表数据"}}', hidden: '{{formData.sourceType !== "表数据"}}',
type: 'string', type: 'string',
widget: 'FieldName', widget: 'FieldName',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
dependencies: ['soruceType', 'tableName'], dependencies: ['sourceType', 'tableName'],
}, },
isMySite: { isMySite: {
title: '仅显示本人所属的站点', title: '仅显示本人所属的站点',
...@@ -906,7 +904,7 @@ const selectWidgets = [ ...@@ -906,7 +904,7 @@ const selectWidgets = [
required: true, required: true,
default: false, default: false,
// description: '勾选后仅显示本人所属的站点', // description: '勾选后仅显示本人所属的站点',
hidden: '{{formData.soruceType !== "站点"}}', hidden: '{{formData.sourceType !== "站点"}}',
type: 'boolean', type: 'boolean',
widget: 'checkbox', widget: 'checkbox',
props: { props: {
...@@ -963,7 +961,7 @@ const selectWidgets = [ ...@@ -963,7 +961,7 @@ const selectWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 120, labelWidth: 120,
description: '勾选后可直接输入选项,可编辑选择仅支持多选', description: '勾选后可直接输入选项,可编辑选择仅支持多选',
hidden: '{{formData.soruceType !== "手动输入"}}' hidden: '{{formData.sourceType !== "手动输入"}}'
}, },
description: { description: {
title: '说明', title: '说明',
...@@ -1032,12 +1030,12 @@ const selectWidgets = [ ...@@ -1032,12 +1030,12 @@ const selectWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
}, },
soruceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '单选框', name: '单选框',
type: 'string', type: 'string',
...@@ -1050,8 +1048,8 @@ const selectWidgets = [ ...@@ -1050,8 +1048,8 @@ const selectWidgets = [
title: '', title: '',
name: '选项', name: '选项',
type: 'array', type: 'array',
required: '{{formData.soruceType === "手动输入"}}', required: '{{formData.sourceType === "手动输入"}}',
hidden: '{{formData.soruceType !== "手动输入"}}', hidden: '{{formData.sourceType !== "手动输入"}}',
default: [], default: [],
widget: 'simpleList', widget: 'simpleList',
items: { items: {
...@@ -1081,13 +1079,13 @@ const selectWidgets = [ ...@@ -1081,13 +1079,13 @@ const selectWidgets = [
labelWidth: 80, labelWidth: 80,
}, },
dictionary: { dictionary: {
title: '{{formData.soruceType}}', title: '{{formData.sourceType}}',
name: '{{formData.soruceType}}', name: '{{formData.sourceType}}',
required: '{{formData.soruceType === "数据字典"}}', required: '{{formData.sourceType === "数据字典"}}',
hidden: '{{formData.soruceType !== "数据字典"}}', hidden: '{{formData.sourceType !== "数据字典"}}',
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.soruceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
...@@ -1189,12 +1187,12 @@ const selectWidgets = [ ...@@ -1189,12 +1187,12 @@ const selectWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
}, },
soruceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '复选框', name: '复选框',
type: 'string', type: 'string',
...@@ -1210,8 +1208,8 @@ const selectWidgets = [ ...@@ -1210,8 +1208,8 @@ const selectWidgets = [
title: '', title: '',
name: '选项', name: '选项',
type: 'array', type: 'array',
required: '{{formData.soruceType === "手动输入"}}', required: '{{formData.sourceType === "手动输入"}}',
hidden: '{{formData.soruceType !== "手动输入"}}', hidden: '{{formData.sourceType !== "手动输入"}}',
default: [], default: [],
widget: 'simpleList', widget: 'simpleList',
items: { items: {
...@@ -1241,13 +1239,13 @@ const selectWidgets = [ ...@@ -1241,13 +1239,13 @@ const selectWidgets = [
labelWidth: 80, labelWidth: 80,
}, },
dictionary: { dictionary: {
title: '{{formData.soruceType}}', title: '{{formData.sourceType}}',
name: '{{formData.soruceType}}', name: '{{formData.sourceType}}',
required: '{{formData.soruceType === "数据字典"}}', required: '{{formData.sourceType === "数据字典"}}',
hidden: '{{formData.soruceType !== "数据字典"}}', hidden: '{{formData.sourceType !== "数据字典"}}',
type: 'string', type: 'string',
widget: 'Dictionary', widget: 'Dictionary',
value: '{{formData.soruceType !== "数据字典" ? null : ""}}', value: '{{formData.sourceType !== "数据字典" ? null : ""}}',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
...@@ -1461,9 +1459,9 @@ const selectWidgets = [ ...@@ -1461,9 +1459,9 @@ const selectWidgets = [
displayType: 'row', displayType: 'row',
widget: 'CascadeDefault', widget: 'CascadeDefault',
labelWidth: 80, labelWidth: 80,
dependencies: ['soruceType'] dependencies: ['sourceType']
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
...@@ -1565,14 +1563,14 @@ const selectWidgets = [ ...@@ -1565,14 +1563,14 @@ const selectWidgets = [
widget: 'CascadeDefault', widget: 'CascadeDefault',
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
// dependencies: ['soruceType'] // dependencies: ['sourceType']
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
}, },
soruceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '来源方式', name: '来源方式',
type: 'string', type: 'string',
...@@ -1651,7 +1649,6 @@ const businessWidgets = [ ...@@ -1651,7 +1649,6 @@ const businessWidgets = [
name: '人员选择器', name: '人员选择器',
schema: { schema: {
title: '人员选择器', title: '人员选择器',
name: '人员选择器',
type: 'string', type: 'string',
widget: 'PersonSelector', widget: 'PersonSelector',
}, },
...@@ -1690,7 +1687,7 @@ const businessWidgets = [ ...@@ -1690,7 +1687,7 @@ const businessWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
...@@ -1796,7 +1793,6 @@ const businessWidgets = [ ...@@ -1796,7 +1793,6 @@ const businessWidgets = [
name: '部门选择器', name: '部门选择器',
schema: { schema: {
title: '部门选择器', title: '部门选择器',
name: '部门选择器',
type: 'string', type: 'string',
widget: 'DeptSelector', widget: 'DeptSelector',
}, },
...@@ -1907,7 +1903,6 @@ const businessWidgets = [ ...@@ -1907,7 +1903,6 @@ const businessWidgets = [
name: '台账选择器', name: '台账选择器',
schema: { schema: {
title: '台账选择器', title: '台账选择器',
name: '台账选择器',
type: 'string', type: 'string',
widget: 'AccountSelector', widget: 'AccountSelector',
require: true, require: true,
...@@ -1949,7 +1944,7 @@ const businessWidgets = [ ...@@ -1949,7 +1944,7 @@ const businessWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 80, labelWidth: 80,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
...@@ -2052,7 +2047,6 @@ const dateWidgets = [ ...@@ -2052,7 +2047,6 @@ const dateWidgets = [
name: '日期选择', name: '日期选择',
schema: { schema: {
title: '日期选择', title: '日期选择',
name: '日期选择',
type: 'string', type: 'string',
widget: 'DateTime', widget: 'DateTime',
}, },
...@@ -2200,7 +2194,6 @@ const dateWidgets = [ ...@@ -2200,7 +2194,6 @@ const dateWidgets = [
icon: <FieldTimeOutlined />, icon: <FieldTimeOutlined />,
schema: { schema: {
title: '时间选择', title: '时间选择',
name: '时间选择',
type: 'string', type: 'string',
widget: 'Time', widget: 'Time',
}, },
...@@ -2760,7 +2753,6 @@ const advancedWidgets = [ ...@@ -2760,7 +2753,6 @@ const advancedWidgets = [
name: '关联表单', name: '关联表单',
schema: { schema: {
title: '', title: '',
name: '关联表单',
type: 'string', type: 'string',
widget: 'RelationForm', widget: 'RelationForm',
width: '100%', width: '100%',
...@@ -2819,7 +2811,7 @@ const advancedWidgets = [ ...@@ -2819,7 +2811,7 @@ const advancedWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 60, labelWidth: 60,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {} properties: {}
...@@ -2885,7 +2877,6 @@ const advancedWidgets = [ ...@@ -2885,7 +2877,6 @@ const advancedWidgets = [
name: '自动计算', name: '自动计算',
schema: { schema: {
title: '自动计算', title: '自动计算',
name: '自动计算',
type: 'string', type: 'string',
widget: 'AutoCalculate', widget: 'AutoCalculate',
}, },
...@@ -2961,7 +2952,7 @@ const advancedWidgets = [ ...@@ -2961,7 +2952,7 @@ const advancedWidgets = [
displayType: 'row', displayType: 'row',
labelWidth: 55, labelWidth: 55,
}, },
gorupSoruce: { groupSource: {
title: '数据来源', title: '数据来源',
type: 'object', type: 'object',
properties: {}, properties: {},
......
...@@ -5,14 +5,14 @@ import city from '../../../../constant/city' ...@@ -5,14 +5,14 @@ import city from '../../../../constant/city'
const CascadeSelector = (props) => { const CascadeSelector = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { presetValue, disabled, placeholder, soruceType, } = schema const { presetValue, disabled, placeholder, sourceType, } = schema
const enums = useMemo(() => { const enums = useMemo(() => {
if (soruceType === '城市数据') { if (sourceType === '城市数据') {
return city return city
} }
return [] return []
}, [soruceType]) }, [sourceType])
const getDefaultValue = selectedValues => { const getDefaultValue = selectedValues => {
if (!selectedValues || !selectedValues.length) { if (!selectedValues || !selectedValues.length) {
......
...@@ -5,11 +5,11 @@ import { GetSelectItemList } from '../../../../apis/process' ...@@ -5,11 +5,11 @@ import { GetSelectItemList } from '../../../../apis/process'
const CheckBox = (props) => { const CheckBox = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { presetValue, disabled, soruceType, options, dictionary } = schema const { presetValue, disabled, sourceType, options, dictionary } = schema
const [dictionaryList, setDictionaryList] = useState([]) const [dictionaryList, setDictionaryList] = useState([])
const enums = useMemo(() => { const enums = useMemo(() => {
switch (soruceType) { switch (sourceType) {
case '手动输入': case '手动输入':
return Array.isArray(options) ? options.map(v => v.value) : [] return Array.isArray(options) ? options.map(v => v.value) : []
case '数据字典': case '数据字典':
...@@ -17,7 +17,7 @@ const CheckBox = (props) => { ...@@ -17,7 +17,7 @@ const CheckBox = (props) => {
default: default:
return [] return []
} }
}, [soruceType, options, dictionaryList]) }, [sourceType, options, dictionaryList])
useEffect(() => { useEffect(() => {
if (addons) { if (addons) {
...@@ -41,10 +41,10 @@ const CheckBox = (props) => { ...@@ -41,10 +41,10 @@ const CheckBox = (props) => {
} }
useEffect(() => { useEffect(() => {
if (soruceType === '数据字典' && dictionary) { if (sourceType === '数据字典' && dictionary) {
onFocus() onFocus()
} }
}, [soruceType, dictionary]) }, [sourceType, dictionary])
return ( return (
<Checkbox.Group <Checkbox.Group
......
...@@ -8,7 +8,7 @@ const ComboBox = (props) => { ...@@ -8,7 +8,7 @@ const ComboBox = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1 const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { placeholder, disabled, soruceType, options, dictionary, tableName, fieldName, presetValue, isMultiple, isEdit, isMySite, isSearch } = schema const { placeholder, disabled, sourceType, options, dictionary, tableName, fieldName, presetValue, isMultiple, isEdit, isMySite, isSearch } = schema
const [dictionaryList, setDictionaryList] = useState([]) const [dictionaryList, setDictionaryList] = useState([])
const [tableData, setTableData] = useState([]) const [tableData, setTableData] = useState([])
const [site, setSite] = useState([]) const [site, setSite] = useState([])
...@@ -30,7 +30,7 @@ const ComboBox = (props) => { ...@@ -30,7 +30,7 @@ const ComboBox = (props) => {
}, [isEdit, isMultiple, value]) }, [isEdit, isMultiple, value])
const enums = useMemo(() => { const enums = useMemo(() => {
switch (soruceType) { switch (sourceType) {
case '手动输入': case '手动输入':
return Array.isArray(options) ? options.map(v => v.value) : [] return Array.isArray(options) ? options.map(v => v.value) : []
case '数据字典': case '数据字典':
...@@ -42,7 +42,7 @@ const ComboBox = (props) => { ...@@ -42,7 +42,7 @@ const ComboBox = (props) => {
default: default:
return [] return []
} }
}, [soruceType, options, dictionaryList, tableData, site]) }, [sourceType, options, dictionaryList, tableData, site])
const children = useMemo(() => { const children = useMemo(() => {
let children = [] let children = []
...@@ -64,7 +64,7 @@ const ComboBox = (props) => { ...@@ -64,7 +64,7 @@ const ComboBox = (props) => {
const onFocus = async () => { const onFocus = async () => {
if (addons) { if (addons) {
if (soruceType === '数据字典') { if (sourceType === '数据字典') {
if (!dictionary) { if (!dictionary) {
return message.error('请选择数据字典!') return message.error('请选择数据字典!')
} }
...@@ -73,7 +73,7 @@ const ComboBox = (props) => { ...@@ -73,7 +73,7 @@ const ComboBox = (props) => {
setDictionaryList(data) setDictionaryList(data)
} }
} }
if (soruceType === '表数据') { if (sourceType === '表数据') {
if (!tableName) { if (!tableName) {
return message.info('请选择表名!') return message.info('请选择表名!')
} }
...@@ -91,7 +91,7 @@ const ComboBox = (props) => { ...@@ -91,7 +91,7 @@ const ComboBox = (props) => {
message.error(msg) message.error(msg)
} }
} }
if (soruceType === '站点') { if (sourceType === '站点') {
const { code, data, msg } = await getStationListByUserID(userID, !isMySite) const { code, data, msg } = await getStationListByUserID(userID, !isMySite)
if (code === 0) { if (code === 0) {
if (Array.isArray(data)) { if (Array.isArray(data)) {
......
...@@ -5,7 +5,7 @@ import { GetSelectItemList } from '../../../../apis/process' ...@@ -5,7 +5,7 @@ import { GetSelectItemList } from '../../../../apis/process'
const RadioButton = (props) => { const RadioButton = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { presetValue, disabled, soruceType, options, dictionary } = schema const { presetValue, disabled, sourceType, options, dictionary } = schema
const [dictionaryList, setDictionaryList] = useState([]) const [dictionaryList, setDictionaryList] = useState([])
useEffect(() => { useEffect(() => {
...@@ -28,13 +28,13 @@ const RadioButton = (props) => { ...@@ -28,13 +28,13 @@ const RadioButton = (props) => {
} }
useEffect(() => { useEffect(() => {
if (soruceType === '数据字典' && dictionary) { if (sourceType === '数据字典' && dictionary) {
onFocus() onFocus()
} }
}, [soruceType, dictionary]) }, [sourceType, dictionary])
const enums = useMemo(() => { const enums = useMemo(() => {
switch (soruceType) { switch (sourceType) {
case '手动输入': case '手动输入':
return Array.isArray(options) ? options.map(v => v.value) : [] return Array.isArray(options) ? options.map(v => v.value) : []
case '数据字典': case '数据字典':
...@@ -42,7 +42,7 @@ const RadioButton = (props) => { ...@@ -42,7 +42,7 @@ const RadioButton = (props) => {
default: default:
return [] return []
} }
}, [soruceType, options, dictionaryList]) }, [sourceType, options, dictionaryList])
return ( return (
<Radio.Group onChange={radioChange} value={value} disabled={disabled}> <Radio.Group onChange={radioChange} value={value} disabled={disabled}>
......
...@@ -4,14 +4,14 @@ import { Switch } from 'antd' ...@@ -4,14 +4,14 @@ import { Switch } from 'antd'
const BooleanSwitch = (props) => { const BooleanSwitch = (props) => {
const { value, onChange, addons, schema, disabled } = props const { value, onChange, addons, schema, disabled } = props
const { name } = addons.formData const { widget } = addons.formData
const switchChange = (checked) => { const switchChange = (checked) => {
onChange(checked) onChange(checked)
} }
useEffect(() => { useEffect(() => {
if (name === '下拉框') { if (widget === 'ComboBox') {
if (value) { if (value) {
addons.setValue('isMultiple', false) addons.setValue('isMultiple', false)
} }
......
...@@ -5,14 +5,14 @@ import city from '../../../../../constant/city' ...@@ -5,14 +5,14 @@ import city from '../../../../../constant/city'
const CascadeDefault = (props) => { const CascadeDefault = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { soruceType } = addons.formData const { sourceType } = addons.formData
const enums = useMemo(() => { const enums = useMemo(() => {
if (soruceType === '城市数据') { if (sourceType === '城市数据') {
return city return city
} }
return [] return []
}, [soruceType]) }, [sourceType])
const getDefaultValue = selectedValues => { const getDefaultValue = selectedValues => {
......
...@@ -7,18 +7,18 @@ const FieldNames = (props) => { ...@@ -7,18 +7,18 @@ const FieldNames = (props) => {
let fieldsStr = window.sessionStorage.getItem('designerRef') || '' let fieldsStr = window.sessionStorage.getItem('designerRef') || ''
let fields = fieldsStr.split(',') || [] let fields = fieldsStr.split(',') || []
const { value, onChange, addons } = props const { value, onChange, addons } = props
const { tableNameParent, name } = addons.formData const { tableNameParent, widget } = addons.formData
const [fieldName, setFieldName] = useState([]) const [fieldName, setFieldName] = useState([])
const options = useMemo(() => { const options = useMemo(() => {
if (name === '关联选择' && addons.dataPath === 'fieldParent') { if (widget === 'RelevanceSelect' && addons.dataPath === 'fieldParent') {
return fieldName return fieldName
} }
return fieldName.filter(v => !fields.includes(v.name)) return fieldName.filter(v => !fields.includes(v.name))
}, [fieldName, addons]) }, [fieldName, addons])
const selectChange = (value) => { const selectChange = (value) => {
if (name !== '关联表单') { if (widget !== 'RelationForm') {
addons.setValueByPath('title', value) addons.setValueByPath('title', value)
} else { } else {
addons.setValueByPath('titleShow', value) addons.setValueByPath('titleShow', value)
......
...@@ -5,7 +5,7 @@ import { LoadLedgers } from '../../../../../apis/process' ...@@ -5,7 +5,7 @@ import { LoadLedgers } from '../../../../../apis/process'
const AccountName = (props) => { const AccountName = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, schema, addons } = props
const { name } = addons.formData const { widget } = addons.formData
const [options, setOptions] = useState([]) const [options, setOptions] = useState([])
const onFocus = async () => { const onFocus = async () => {
...@@ -22,9 +22,9 @@ const AccountName = (props) => { ...@@ -22,9 +22,9 @@ const AccountName = (props) => {
} }
const selectChange = (value) => { const selectChange = (value) => {
if (name === '台账选择器') { if (widget === 'AccountSelector') {
addons.setValueByPath('fieldshine', []) addons.setValueByPath('fieldshine', [])
} else if (name === '关联表单') { } else if (widget === 'RelationForm') {
addons.setValueByPath('mappedField', []) addons.setValueByPath('mappedField', [])
} }
onChange(value) onChange(value)
......
...@@ -21,7 +21,7 @@ const fnList = [ ...@@ -21,7 +21,7 @@ const fnList = [
const CalculateRule = (props) => { const CalculateRule = (props) => {
const { value, onChange, addons } = props const { value, onChange, addons } = props
const { tableNameParent, name } = addons.formData const { tableNameParent } = addons.formData
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)
const [fieldList, setFieldList] = useState([]) const [fieldList, setFieldList] = useState([])
const [rule, setRule] = useState([]) const [rule, setRule] = useState([])
......
...@@ -14,7 +14,7 @@ const fnList = [ ...@@ -14,7 +14,7 @@ const fnList = [
const ControlRules = (props) => { const ControlRules = (props) => {
const { value, onChange, addons } = props const { value, onChange, addons } = props
const { tableNameParent, name } = addons.formData const { tableNameParent } = addons.formData
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)
const [fieldList, setFieldList] = useState([]) const [fieldList, setFieldList] = useState([])
const [rule, setRule] = useState([]) const [rule, setRule] = useState([])
......
...@@ -8,20 +8,20 @@ const initOptions = [ ...@@ -8,20 +8,20 @@ const initOptions = [
{ label: '站点', value: '站点' } { label: '站点', value: '站点' }
] ]
const SoruceType = (props) => { const SourceType = (props) => {
const { value, onChange, schema, addons } = props const { value, onChange, addons } = props
const { name } = schema const { widget } = addons.formData
const options = useMemo(() => { const options = useMemo(() => {
if ('下拉框' === name) { if (widget === 'ComboBox') {
return initOptions return initOptions
} }
return [ return [
{ label: '手动输入', value: '手动输入' }, { label: '手动输入', value: '手动输入' },
{ label: '数据字典', value: '数据字典' }, { label: '数据字典', value: '数据字典' },
] ]
}, [name]) }, [widget])
const selectChange = (e) => { const selectChange = (e) => {
if (value === '手动输入') { if (value === '手动输入') {
...@@ -49,4 +49,4 @@ const SoruceType = (props) => { ...@@ -49,4 +49,4 @@ const SoruceType = (props) => {
} }
export default SoruceType export default SourceType
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ import AccountName from './AccountName' ...@@ -3,7 +3,7 @@ import AccountName from './AccountName'
import Fieldshine from './Fieldshine' import Fieldshine from './Fieldshine'
import MappedField from './MappedField' import MappedField from './MappedField'
import ControlRules from './ControlRules' import ControlRules from './ControlRules'
import SoruceType from './SoruceType' import SourceType from './SourceType'
import TableName from './TableName' import TableName from './TableName'
import FieldName from './FieldName' import FieldName from './FieldName'
import CalculateRule from './CalculateRule' import CalculateRule from './CalculateRule'
...@@ -14,7 +14,7 @@ const groupSource = { ...@@ -14,7 +14,7 @@ const groupSource = {
Fieldshine, Fieldshine,
MappedField, MappedField,
ControlRules, ControlRules,
SoruceType, SourceType,
TableName, TableName,
FieldName, FieldName,
CalculateRule, CalculateRule,
......
import React from 'react'
import { Form, Input } from 'antd'
const UniqueVerify = (props) => {
return (
<Form
layout='inline'
>
<Form.Item
label='表名'
name='表名'
>
<Input />
</Form.Item>
<Form.Item
label='字段名'
name='字段名'
>
<Input />
</Form.Item>
</Form>
)
}
export default UniqueVerify
\ No newline at end of file
import VerifyTextInput from './VerifyTextInput' import VerifyTextInput from './VerifyTextInput'
import UniqueVerify from './UniqueVerify'
const groupVerify = { const groupVerify = {
VerifyTextInput, VerifyTextInput,
UniqueVerify,
} }
export default groupVerify export default groupVerify
\ No newline at end of file
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