feat: 拓扑信息简览

This commit is contained in:
TsMask
2023-12-21 15:41:14 +08:00
parent fa1bb05548
commit eae2dd5d30
2 changed files with 98 additions and 84 deletions

View File

@@ -317,7 +317,7 @@ registerNode(
if (cfg.info) { if (cfg.info) {
const neInfo: any = cfg.info; const neInfo: any = cfg.info;
const hasNeState = neInfo.serverState.neId; const hasNeState = neInfo.serverState.neId;
group.addShape('circle', { const neStateShape = group.addShape('circle', {
attrs: { attrs: {
x: r - 3, x: r - 3,
y: -r + 3, y: -r + 3,
@@ -329,6 +329,21 @@ registerNode(
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type // must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type
name: 'ne-state', name: 'ne-state',
}); });
// 添加动画
neStateShape.animate(
{
// Magnifying and disappearing
r: 5,
opacity: 0.3,
},
{
duration: 1000,
easing: 'easeCubic',
delay: 0,
repeat: true, // repeat
}
);
} }
if (cfg.label) { if (cfg.label) {
@@ -1468,9 +1483,6 @@ export function randerGroph(graphG6Dom: HTMLElement | undefined, data: any) {
<div id="hide" style="cursor: pointer; margin-bottom: 2px"> <div id="hide" style="cursor: pointer; margin-bottom: 2px">
2. 隐藏节点 2. 隐藏节点
</div> </div>
<div id="restart" style="cursor: pointer; margin-bottom: 2px">
3. 重启
</div>
</div> </div>
`; `;
} }

View File

@@ -169,7 +169,7 @@ onMounted(() => {
size="small" size="small"
> >
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title v-if="false">
<div class="button-container" style="margin-bottom: -12px"> <div class="button-container" style="margin-bottom: -12px">
<a-button type="primary" @click.prevent="fnAdd"> <a-button type="primary" @click.prevent="fnAdd">
<template #icon> <template #icon>
@@ -219,7 +219,7 @@ onMounted(() => {
</div> </div>
</template> </template>
<!-- 插槽-卡片右侧 --> <!-- 插槽-卡片右侧 -->
<template #extra> <template #extra v-if="false">
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.reloadText') }}</template> <template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList()"> <a-button type="text" @click.prevent="fnGetList()">
@@ -230,6 +230,7 @@ onMounted(() => {
<div ref="graphG6Dom" class="chart"></div> <div ref="graphG6Dom" class="chart"></div>
<template v-if="false">
<div <div
style=" style="
display: flex; display: flex;
@@ -314,6 +315,7 @@ onMounted(() => {
<div class="charts"> <div class="charts">
<ChartGraphG6></ChartGraphG6> <ChartGraphG6></ChartGraphG6>
</div> </div>
</template>
</a-card> </a-card>
</PageContainer> </PageContainer>
</template> </template>