|
@ -92,7 +92,7 @@ const LatestMetadata = (props) => { |
|
|
const renderTreeNode = (ds, dataSource) => { |
|
|
const renderTreeNode = (ds, dataSource) => { |
|
|
return <div className={theStyle.icon} style={{ width: 180 }}> |
|
|
return <div className={theStyle.icon} style={{ width: 180 }}> |
|
|
{setTreeNodeTitle(ds.name)} |
|
|
{setTreeNodeTitle(ds.name)} |
|
|
<EditOutlined title='修改' style={{ marginLeft: 10 }} className={theStyle.tip} onClick={() => { |
|
|
<EditOutlined title='修改' className={theStyle.tip} onClick={() => { |
|
|
let record = JSON.parse(JSON.stringify(ds)); |
|
|
let record = JSON.parse(JSON.stringify(ds)); |
|
|
let parentData = dataSource.filter(rc => rc.id === record.parent); |
|
|
let parentData = dataSource.filter(rc => rc.id === record.parent); |
|
|
record.parentName = parentData.length ? parentData[0].name : ''; |
|
|
record.parentName = parentData.length ? parentData[0].name : ''; |
|
@ -107,9 +107,9 @@ const LatestMetadata = (props) => { |
|
|
setModalVisible(false); |
|
|
setModalVisible(false); |
|
|
}); |
|
|
}); |
|
|
}} okText="确定" cancelText="取消"> |
|
|
}} okText="确定" cancelText="取消"> |
|
|
<MinusCircleOutlined title='删除' style={{ marginLeft: 10 }} className={theStyle.tip} /> |
|
|
<MinusCircleOutlined title='删除' className={theStyle.tip} /> |
|
|
</Popconfirm> |
|
|
</Popconfirm> |
|
|
<PlusCircleOutlined title='新建' style={{ marginLeft: 10 }} className={theStyle.tip} onClick={() => { |
|
|
<PlusCircleOutlined title='新建' className={theStyle.tip} onClick={() => { |
|
|
setEditData({ record: { parent: ds.id, parentName: ds.name }, title: '新建子类', child: true, add: true }); |
|
|
setEditData({ record: { parent: ds.id, parentName: ds.name }, title: '新建子类', child: true, add: true }); |
|
|
setModalVisible(true); |
|
|
setModalVisible(true); |
|
|
}} /> |
|
|
}} /> |
|
|