UPDATE: VERSION-20260327
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { getTeleport } from '@antv/x6-vue-shape';
|
||||
import { Graph, Node, type NodeProperties } from '@antv/x6';
|
||||
@@ -68,7 +69,7 @@ import { createGraphTaskElement, createLineOptions, type GraphContainer, type Gr
|
||||
import { registerNodeElement } from './register';
|
||||
import { findAllBasicPlatforms } from '../api';
|
||||
import type { Platform } from '../types';
|
||||
import { createTree, findOneTreeById, updateTree } from './api';
|
||||
import { createTree, findOneTreeById, updateTree, findOneTreeByPlatformId } from './api';
|
||||
import TressCard from './trees-card.vue';
|
||||
import NodesCard from './nodes-card.vue';
|
||||
|
||||
@@ -90,6 +91,7 @@ export default defineComponent({
|
||||
TeleportContainer,
|
||||
},
|
||||
setup() {
|
||||
const currentRoute = useRoute();
|
||||
const canvas = ref<HTMLDivElement | null>(null);
|
||||
const graph = ref<Graph | null>(null);
|
||||
const currentZoom = ref<number>(1);
|
||||
@@ -350,6 +352,14 @@ export default defineComponent({
|
||||
initGraph();
|
||||
window.addEventListener('resize', handleResize);
|
||||
console.log('节点挂载完成');
|
||||
|
||||
if(currentRoute.query.platform){
|
||||
findOneTreeByPlatformId(currentRoute.query.platform as number).then(r=> {
|
||||
if(r.data){
|
||||
handleSelectTree(r.data);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user