Commit dce4bc47 by zhaochengxiang

优化关系图

parent a06a1b59
......@@ -260,7 +260,7 @@ class Org extends React.Component {
if (!children && loadMoreData) {
loadMoreData(model.dirId||'', nodeId);
}
} else {
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
......
......@@ -155,17 +155,11 @@ class Relation extends React.Component {
],
},
layout: {
type: 'compactBox',
type: 'dendrogram',
direction: 'RL',
getId: function getId(d) {
return d.id;
},
getHeight: () => {
return 26;
},
getWidth: () => {
return 26;
},
getVGap: () => {
return 20;
},
......@@ -185,13 +179,6 @@ class Relation extends React.Component {
type: 'cubic-horizontal',
size: 2,
color: '#e2e2e2',
// style: {
// endArrow: {
// path: 'M 0,0 L 12, 6 L 9,0 L 12, -6 Z',
// fill: '#91d5ff',
// d: -40,
// },
// }
},
});
......@@ -230,12 +217,13 @@ class Relation extends React.Component {
const nodeId = node.get('id');
const model = node.getModel();
console.log('model', model);
if (model.dbType==='Dir') {
const children = model.children;
if (!children && loadMoreData) {
loadMoreData(model.dirId||'', nodeId);
}
} else {
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
......
......@@ -221,7 +221,7 @@ class Tree extends React.Component {
if (!children && loadMoreData) {
loadMoreData(model.dirId||'', nodeId);
}
} else {
} else if (model.dbType !== 'Root') {
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
......
......@@ -79,7 +79,7 @@ class MapContent extends React.Component {
return {
text: topic.name||'',
id: `t${topic.id}`,
dbType: 'Dir',
dbType: 'Root',
children: 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