12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div id="map">
- <node-map class="node-map" v-if="data" v-bind="one" />
- <node-map
- class="node-map" v-if="data2" v-bind="two"
- id="ùmqsldùml"
- />
- </div>
- </template>
- <script>
- import { toSingleManyData, toManyManyData } from '@/helpers/d3Data'
- import NodeMap from '@/components/NodeMap'
- export default {
- name: 'Home',
- components: {
- NodeMap
- },
- data () {
- return {
- id: 39,
- data: null,
- data2: null,
- one: { nodes: null, links: null },
- two: { nodes: null, links: null }
- }
- },
- created () {
- this.$store.dispatch('GET_TREE', this.id).then((data) => {
- this.data = data
- this.one = toSingleManyData(data)
- })
- this.$store.dispatch('GET_TREE', this.id).then((data) => {
- this.data2 = data
- this.two = toManyManyData(data)
- })
- }
- }
- </script>
- <style lang="scss" scoped>
- #map {
- height: 100%;
- width: 100%;
- display: flex;
- flex-basis: 50%;
- }
- .node-map {
- width: 50vw;
- }
- </style>
|