Commit 3929e6ce authored by 田翔's avatar 田翔

fix: 未知原因出现关联表单配置后无法操作问题

parent de0e8cd0
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.0.4", "version": "4.0.5",
"description": "4.0.4: 配置SQL问题", "description": "4.0.5: 未知原因出现关联表单配置后无法操作问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -195,6 +195,11 @@ const TableRender = (props) => { ...@@ -195,6 +195,11 @@ const TableRender = (props) => {
setDetailShow(true) setDetailShow(true)
} }
const back = () => {
setDetailShow(false)
getDataSource()
}
const submit = async () => { const submit = async () => {
const { formValue, relationForm, errors } = await formRenderRef.current.getValues() const { formValue, relationForm, errors } = await formRenderRef.current.getValues()
if (errors.length) { if (errors.length) {
...@@ -305,7 +310,7 @@ const TableRender = (props) => { ...@@ -305,7 +310,7 @@ const TableRender = (props) => {
</div> </div>
<div className={styles.formBtns}> <div className={styles.formBtns}>
<Button <Button
onClick={() => setDetailShow(false)} onClick={back}
> >
返回 返回
</Button> </Button>
......
...@@ -2425,23 +2425,18 @@ const advancedWidgets = [ ...@@ -2425,23 +2425,18 @@ const advancedWidgets = [
widget: 'checkbox', widget: 'checkbox',
default: false, default: false,
width: '33%', width: '33%',
props: {
style: {
marginLeft: '10px'
}
}
}, },
'台账名称': { '台账名称': {
title: '台账名称', title: '台账名称',
type: 'string', type: 'string',
widget: 'AccountName', widget: 'AccountName',
required: true // required: true
}, },
'映射字段': { '映射字段': {
title: '映射字段', title: '映射字段',
type: 'array', type: 'array',
widget: 'MappedField', widget: 'MappedField',
required: true, // required: true,
default: [], default: [],
dependencies: ['台账名称'], dependencies: ['台账名称'],
}, },
...@@ -2456,8 +2451,6 @@ const advancedWidgets = [ ...@@ -2456,8 +2451,6 @@ const advancedWidgets = [
'控制规则': { '控制规则': {
title: '控制规则', title: '控制规则',
type: 'string', type: 'string',
displayType: 'row',
labelWidth: 80,
widget: 'ControlRules', widget: 'ControlRules',
}, },
groupStyle: { groupStyle: {
......
...@@ -157,7 +157,12 @@ export const getVerify = (json) => { ...@@ -157,7 +157,12 @@ export const getVerify = (json) => {
return message.error(`字段【${s}】配置,数据字典必填!`) return message.error(`字段【${s}】配置,数据字典必填!`)
} }
if (sourceType === '表数据' && !tableName && !fieldName) { if (sourceType === '表数据' && !tableName && !fieldName) {
return message.error(`字段【${s}】配置,表名与字段名!`) return message.error(`字段【${s}】配置,表名与字段名必填!`)
}
}
if (['RelationForm'].includes(widget)) {
if (!child[s]['映射字段'].length || !child[s]['台账名称']) {
return message.error(`字段【${s}】配置,台账名称与映射字段必填!`)
} }
} }
} }
......
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