From 111a9f347755ae791d3d88373a18a5dfeff4c53c Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期三, 30 十月 2024 17:17:58 +0800 Subject: [PATCH] x6 尝试 --- src/views/project/yw/systemManage/agentGraph/AgentGraph.vue | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/project/yw/systemManage/agentGraph/AgentGraph.vue b/src/views/project/yw/systemManage/agentGraph/AgentGraph.vue index d407b53..f521df7 100644 --- a/src/views/project/yw/systemManage/agentGraph/AgentGraph.vue +++ b/src/views/project/yw/systemManage/agentGraph/AgentGraph.vue @@ -1,11 +1,11 @@ <template> - <div v-loading="firstLoading" class="h-full bg-white relative"> + <div v-loading="firstLoading" class="h-full w-full bg-white relative"> <!-- <div class="absolute right-4 top-4 z-10"> <span class="ywifont ywicon-zishiying cursor-pointer" title="鑷�傚簲" @click="selfAdaptClick"></span> </div> --> - <div class="h-full" ref="graphRef"></div> + <div class="h-full w-full" ref="graphRef"></div> <div class="absolute left-4 top-4 z-10 w-16 divide-y-[1.5px] divide-solid divide-gray-100 rounded-lg" @@ -191,7 +191,7 @@ children: metricsList.map((curVal) => { const metricsTreeId = `${agentTreeId}-metrics-${curVal.id}`; const metrics = { - treeId:metricsTreeId, + treeId: metricsTreeId, logicId: curVal.id, type: 'metrics', @@ -200,7 +200,7 @@ return this.model.title; }, children: (curVal.dimensions ?? []).map((item) => { - const dimensionTreeId = `${metricsTreeId}-dimension-${item.id}` + const dimensionTreeId = `${metricsTreeId}-dimension-${item.id}`; return { treeId: dimensionTreeId, logicId: item.id, @@ -216,13 +216,13 @@ }, []), }, ]; - console.log('馃殌 ~ logicTree:', logicTree); const resData = logicTree; return resData; }; const selfAdapt = () => { - graph.zoomToFit(); - graph.zoom(-0.05); + setTimeout(() => { + graph.zoomToFit(); + }, 100); }; //#region ====================== 宸ュ叿鏍� ====================== -- Gitblit v1.9.3