Commit ae7e7706 authored by 黄奎's avatar 黄奎

页面修改

parent 2de57df0
<template>
<div>
<div style="height:calc(100vh - 50px);">
<RelationGraph ref="seeksRelationGraph" :options="graphOptions" :on-node-click="onNodeClick"
:on-line-click="onLineClick" />
</div>
<div class="page-body" style="width: calc(100% - 10px);height:calc(100vh - 50px);">
<RelationGraph ref="seeksRelationGraph" :options="graphOptions" :on-node-click="onNodeClick"
:on-line-click="onLineClick" />
</div>
</template>
......@@ -28,9 +26,11 @@
'defaultJunctionPoint': 'border',
'defaultNodeShape': 0,
'defaultLineShape': 1,
'min_per_width': 50,
'max_per_width': 70,
'min_per_height': 200
'min_per_width': 10,
'max_per_width': 60,
'min_per_height': 60,
'centerOffset_x': -180,
'centerOffset_y': -180,
}],
'defaultLineMarker': {
'markerWidth': 12,
......@@ -59,8 +59,16 @@
getOrganizationChart({}).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
this.$refs.seeksRelationGraph.setJsonData(this.DeptList, (seeksRGGraph) => {
})
if (this.DeptList && this.DeptList.nodes && this.DeptList.nodes.length > 0) {
this.DeptList.nodes.forEach(item => {
//判断是否是根节点
if (item.id == this.DeptList.rootId) {
item.width = 120;
item.height = 60;
}
});
}
this.$refs.seeksRelationGraph.setJsonData(this.DeptList, (seeksRGGraph) => {})
}
})
},
......@@ -72,4 +80,5 @@
}
}
}
</script>
\ No newline at end of file
</script>
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