历史回溯
Showing
1 changed file
with
28 additions
and
4 deletions
| 1 | <template> | 1 | <template> | 
| 2 | <div class="">历史回溯 | 2 | <div class="lshs-content"> | 
| 3 | <div id="mountNode"></div> | 3 | <div class="slot"> | 
| 4 | <div><span class="tip-title">范围属性变更:</span></div> | ||
| 5 | <div><span class="tip-title">宗地分割:</span></div> | ||
| 6 | <div><span class="tip-title">宗地合并:</span></div> | ||
| 7 | </div> | ||
| 8 | <div id="mountNode" ref="containerWidth"></div> | ||
| 4 | </div> | 9 | </div> | 
| 5 | </template> | 10 | </template> | 
| 6 | 11 | ||
| ... | @@ -38,6 +43,8 @@ export default { | ... | @@ -38,6 +43,8 @@ export default { | 
| 38 | methods: { | 43 | methods: { | 
| 39 | initG6() { | 44 | initG6() { | 
| 40 | const data = this.data; | 45 | const data = this.data; | 
| 46 | const eWidth = this.$refs.containerWidth.clientWidth | ||
| 47 | console.log(eWidth+":width") | ||
| 41 | G6.registerNode( | 48 | G6.registerNode( | 
| 42 | 'sql', | 49 | 'sql', | 
| 43 | { | 50 | { | 
| ... | @@ -131,11 +138,11 @@ export default { | ... | @@ -131,11 +138,11 @@ export default { | 
| 131 | }); | 138 | }); | 
| 132 | 139 | ||
| 133 | const container = document.getElementById('mountNode'); | 140 | const container = document.getElementById('mountNode'); | 
| 134 | 141 | console.log(container) | |
| 135 | const graph = new G6.Graph({ | 142 | const graph = new G6.Graph({ | 
| 136 | container: 'mountNode', | 143 | container: 'mountNode', | 
| 137 | width:1000, | 144 | width:1000, | 
| 138 | height:800, | 145 | height:1000, | 
| 139 | layout: { | 146 | layout: { | 
| 140 | type: 'dagre', | 147 | type: 'dagre', | 
| 141 | nodesepFunc: (d) => { | 148 | nodesepFunc: (d) => { | 
| ... | @@ -244,4 +251,21 @@ export default { | ... | @@ -244,4 +251,21 @@ export default { | 
| 244 | </script> | 251 | </script> | 
| 245 | <style scoped lang="less"> | 252 | <style scoped lang="less"> | 
| 246 | 253 | ||
| 254 | .lshs-content{ | ||
| 255 | width: 100%; | ||
| 256 | } | ||
| 257 | |||
| 258 | #mountNode{ | ||
| 259 | width: 100%; | ||
| 260 | } | ||
| 261 | |||
| 262 | .slot{ | ||
| 263 | margin-left: 50px; | ||
| 264 | margin-top: 20px; | ||
| 265 | width: 300px; | ||
| 266 | } | ||
| 267 | |||
| 268 | .tip-title{ | ||
| 269 | font-weight: 700; | ||
| 270 | } | ||
| 247 | </style> | 271 | </style> | 
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... | 
- 
Please register or sign in to post a comment