| | |
| | | <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" |
| | |
| | | children: metricsList.map((curVal) => { |
| | | const metricsTreeId = `${agentTreeId}-metrics-${curVal.id}`; |
| | | const metrics = { |
| | | treeId:metricsTreeId, |
| | | treeId: metricsTreeId, |
| | | logicId: curVal.id, |
| | | type: 'metrics', |
| | | |
| | |
| | | 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, |
| | |
| | | }, []), |
| | | }, |
| | | ]; |
| | | console.log('🚀 ~ logicTree:', logicTree); |
| | | const resData = logicTree; |
| | | return resData; |
| | | }; |
| | | const selfAdapt = () => { |
| | | graph.zoomToFit(); |
| | | graph.zoom(-0.05); |
| | | setTimeout(() => { |
| | | graph.zoomToFit(); |
| | | }, 100); |
| | | }; |
| | | |
| | | //#region ====================== 工具栏 ====================== |