diff --git a/hchyun-ui/src/views/system/top/demo-topology.vue b/hchyun-ui/src/views/system/top/demo-topology.vue index 6aacb23..5dc1759 100644 --- a/hchyun-ui/src/views/system/top/demo-topology.vue +++ b/hchyun-ui/src/views/system/top/demo-topology.vue @@ -27,6 +27,24 @@ export default { return { graphData: { nodes: [ + // { + // id: "job", + // label: "Job", + // type:'base', + // attrs: [{ + // key: "id", + // type: "number(3)" + // }, + // { + // key: "title", + // type: "varchar(255)" + // }, + // { + // key: "level", + // type: "number(3)" + // } + // ] + // }, { id: 'client-01', x: -95, diff --git a/hchyun-ui/src/views/system/top/packages/topology/src/node/er-table.js b/hchyun-ui/src/views/system/top/packages/topology/src/node/er-table.js new file mode 100644 index 0000000..eb7feb1 --- /dev/null +++ b/hchyun-ui/src/views/system/top/packages/topology/src/node/er-table.js @@ -0,0 +1,21 @@ +/** + * @author: clay + * @data: 2021/5/10 + * @description: 节点基础方法 + */ + +import utils from '../utils' + +export default { + setState(name, value, item) { + // 设置节点状态 + utils.node.setState(name, value, item) + // 设置锚点状态 + utils.anchor.setState(name, value, item) + }, + // 绘制后附加锚点 + afterDraw(cfg, group) { + // 绘制锚点 + utils.anchor.draw(cfg, group) + } +} diff --git a/packages/topology.vue b/packages/topology.vue new file mode 100644 index 0000000..0f66c1b --- /dev/null +++ b/packages/topology.vue @@ -0,0 +1,176 @@ + + + + + + +