Commit 39195280 authored by 田翔's avatar 田翔

fix: 设备选择器配置修改

parent 78607ee9
{
"name": "panda-xform",
"version": "4.9.1",
"description": "4.9.1 节点不显示的字段不参与隐藏计算",
"version": "4.9.2",
"description": "4.9.2 设备选择器配置修改",
"keywords": [
"panda-xform"
],
......
......@@ -74,6 +74,12 @@ const DeviceFieldshine = (props) => {
}
}
const fromFieldChange = (value) => {
const { field, service, layerName } = form.getFieldsValue()
let values = field.map(v => ({ ...v, layerName: v.fromField === value ? layerName : v.layerName }))
form.setFieldsValue({ field: values, service, layerName })
}
return (
<div className={styles.fieldshine}>
<Input
......@@ -161,6 +167,7 @@ const DeviceFieldshine = (props) => {
treeDefaultExpandAll
showCheckedStrategy
onFocus={fromFieldFocus}
onChange={fromFieldChange}
>
{fromField.map(s => <TreeNode value={s.field} title={s.fieldAlias} key={s.field} />)}
</TreeSelect>
......@@ -200,6 +207,13 @@ const DeviceFieldshine = (props) => {
</TreeNode>
</TreeSelect>
</Form.Item>
<Form.Item
hidden={true}
{...restField}
name={[name, 'layerName']}
>
<Input />
</Form.Item>
{index !== 0 ? <MinusCircleOutlined onClick={() => remove(name)} /> : null}
</Space>
))}
......
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