Commit bde8c08a by zhaochengxiang

解决资产id重复的问题

parent 87a376ba
......@@ -262,7 +262,6 @@ class Org extends React.Component {
}
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
}
......
......@@ -261,7 +261,6 @@ class Relation extends React.Component {
}
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
}
......
......@@ -223,7 +223,6 @@ class Tree extends React.Component {
}
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
}
......
......@@ -91,7 +91,7 @@ class MapContent extends React.Component {
})
}
convertRemoteData = (data) => {
convertRemoteData = (data, parentDirId='') => {
data.forEach((item, index) => {
if (item.dbType==='Dir') {
item.text = item.dirName||'';
......@@ -106,11 +106,11 @@ class MapContent extends React.Component {
})
item.text = assetCnName||'';
item.id = `t${item.id||''}`;
item.id = `t${parentDirId}${item.id||''}`;
}
if (item.children) {
this.convertRemoteData(item.children);
this.convertRemoteData(item.children, item.dirId||'');
}
})
}
......@@ -142,7 +142,7 @@ class MapContent extends React.Component {
payload: { dirId: item.dirId },
callback: data => {
this.convertRemoteData(data||[]);
this.convertRemoteData(data||[], item.dirId);
item.children = (data||[]);
this.setSquareGraphState(item);
}
......@@ -167,7 +167,7 @@ class MapContent extends React.Component {
type: 'map.getTableModelByDirIid',
payload: { dirId },
callback: data => {
this.convertRemoteData(data||[]);
this.convertRemoteData(data||[], dirId);
this.setState({
parentNodeId: nodeId,
orgChildData: JSON.parse(JSON.stringify(data||[])),
......
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