Commit 26cb3ccb by zhaochengxiang

bug fix

parent 0ad48f01
......@@ -102,7 +102,7 @@ const MetaModelSelect = ({ value = {}, metaModelTreeData = [], onChange, ...rest
}
const AttributeRelationWithSourceModel = (props) => {
const { elements, sourceModel, supportSourceModelsName, metadataModelTreeData, activeKey, onChange } = props;
const { elements, sourceModel, metadataModelTreeData, activeKey, onChange } = props;
console.log('sourceModel', sourceModel)
......@@ -234,21 +234,13 @@ const AttributeRelationWithSourceModel = (props) => {
<Form.Item
label='来源模型名称'
name='sourceModel'
rules={[{ required: true, message: '请输入来源名称'}]}
rules={[{ required: true, message: '请输入来源模型名称'}]}
>
<Select
allowClear
<TreeSelect
placeholder='请选择来源模型名称'
disabled={sourceModel}
>
{
supportSourceModelsName?.map((name, index) => {
return <Select.Option key={index} value={name}>
{ name }
</Select.Option>
})
}
</Select>
treeData={metadataModelTreeData}
allowClear
/>
</Form.Item>
{
(elements||[]).map((element, index) => {
......@@ -273,7 +265,6 @@ const AttributeRelationWithSourceModel = (props) => {
const AttributeRelationModal = (props) => {
const { visible, type = AssetManageReference, onCancel } = props;
const [ supportSourceModelsName, setSupportSourceModelsName ] = useState()
const [ loadingSourceModels, setLoadingSourceModels] = useState(false)
const [ sourceModels, setSourceModels ] = useState()
const [ metadataModelTreeData, setMetadataModelTreeData ] = useState([]);
......@@ -335,7 +326,6 @@ const AttributeRelationModal = (props) => {
recursion(newData);
setSupportSourceModelsName((newData||[]).map(item=>item.nodeName));
setMetadataModelTreeData(newData||[]);
}
})
......@@ -390,7 +380,6 @@ const AttributeRelationModal = (props) => {
return <Tabs.TabPane tab={item} key={item}>
<AttributeRelationWithSourceModel
elements={elements}
supportSourceModelsName={supportSourceModelsName}
metadataModelTreeData={metadataModelTreeData}
sourceModel={item === AddSourceModelName ? undefined: item}
activeKey={activeKey}
......
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