Commit 84381516 by Your Name

元数据路径

parent b83c107f
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Modal, Form, Input, Radio } from 'antd'; import { Modal, Form, Input, Radio } from 'antd';
import axios from "axios"
import { dispatchLatest } from '../../../../model'; import { dispatchLatest } from '../../../../model';
...@@ -8,7 +9,8 @@ class UpdateTreeItemForm extends React.Component { ...@@ -8,7 +9,8 @@ class UpdateTreeItemForm extends React.Component {
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
radioDisable: false radioDisable: false,
metapath:undefined
} }
} }
...@@ -20,7 +22,15 @@ class UpdateTreeItemForm extends React.Component { ...@@ -20,7 +22,15 @@ class UpdateTreeItemForm extends React.Component {
const { item } = this.props; const { item } = this.props;
if (item!==preProps.item) { if (item!==preProps.item) {
this.radioState(); this.radioState();
if(this.props.type === "update") {
axios.get("/api/datamodeler/easyDataModelerCURD/getEasyDataModelerCatalogExtendInfo", {params:{easyDataModelerCatalogId:this.props.item.id}})
.then((data)=>{
this.setState({metapath: data.data.metadataPath})
});
}
} }
} }
radioState = () => { radioState = () => {
...@@ -30,7 +40,7 @@ class UpdateTreeItemForm extends React.Component { ...@@ -30,7 +40,7 @@ class UpdateTreeItemForm extends React.Component {
render() { render() {
const { type, form } = this.props; const { type, form } = this.props;
const { radioDisable } = this.state; const { radioDisable , metapath} = this.state;
const formItemLayout = { const formItemLayout = {
labelCol: { labelCol: {
...@@ -76,6 +86,12 @@ class UpdateTreeItemForm extends React.Component { ...@@ -76,6 +86,12 @@ class UpdateTreeItemForm extends React.Component {
> >
<Input /> <Input />
</Form.Item> </Form.Item>
{type ==='update' &&<Form.Item
label="元数据路径"
>
{metapath||"暂无"}
</Form.Item>}
</Form> </Form>
); );
} }
......
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