Commit 0d378422 authored by 田翔's avatar 田翔

fix: 台账回填增加配置

parent 25dd15c5
Pipeline #92275 failed with stages
......@@ -104,6 +104,9 @@ const AddModal = props => {
form.validateFields().then(validate => {
if (validate) {
let values = form.getFieldsValue()
if (!values.Fields && !values.presetValue) {
return message.info('请选择源字段或者默认值!')
}
let toData = []
values?.users?.forEach(v => {
let item = v?.nodeName?.split(',')
......@@ -116,7 +119,7 @@ const AddModal = props => {
mapping: [
{
fromData: {
tableName: props.tableName,
tableName: ['下一节点名称'].includes(values.Fields) ? '环境变量' : props.tableName,
filed: values.Fields,
filedShape: '',
defaultValue: values.presetValue,
......@@ -224,19 +227,31 @@ const AddModal = props => {
>
<Input placeholder="请输入规则名称" />
</Form.Item>
<Form.Item label="源字段" name="Fields" rules={[{ required: true }]}>
<Form.Item label="源字段" name="Fields">
<TreeSelect
showSearch
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
allowClear
placeholder="请选择表单源字段"
treeDefaultExpandAll
showCheckedStrategy
>
<TreeNode
value={'环境变量'}
title={
<>
<span style={{ marginRight: '10px' }}>环境变量</span>
</>
}
disabled
>
<TreeNode value={'下一节点名称'} title={'下一节点名称'}></TreeNode>
</TreeNode>
{tableField && tableField.map(i => mapTree(i))}
</TreeSelect>
</Form.Item>
<Form.Item label="默认值" name="presetValue" >
<Input placeholder="请输入默认值" />
<Input placeholder="请输入默认值" allowClear />
</Form.Item>
<Form.List name="users" label='字段映射' style={{ width: '100%' }}>
{(fields, { add, remove }) => (
......
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