桥梁节点详情弹窗

This commit is contained in:
duanhao 2025-07-25 17:45:05 +08:00
parent 11f1e78dd5
commit eb516ebf59
6 changed files with 94 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -142,7 +142,8 @@
"communityId": "98", "communityId": "98",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "2835451658", "bridgeId": "2835451658",
@ -307,7 +308,8 @@
"communityId": "98", "communityId": "98",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "1976143068", "bridgeId": "1976143068",
@ -440,6 +442,9 @@
"communityId": "98", "communityId": "98",
"usersNum": 120 "usersNum": 120
} }
],
"bridgeNeighbours": [
"1457867047334031360"
] ]
}, },
{ {
@ -593,7 +598,8 @@
"communityId": "93", "communityId": "93",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "3006348240", "bridgeId": "3006348240",
@ -690,7 +696,8 @@
"communityId": "92", "communityId": "92",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "1350150750966603777", "bridgeId": "1350150750966603777",
@ -787,7 +794,8 @@
"communityId": "93", "communityId": "93",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "1151913018936053760", "bridgeId": "1151913018936053760",
@ -892,7 +900,8 @@
"communityId": "84", "communityId": "84",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "818948638890217473", "bridgeId": "818948638890217473",
@ -1041,7 +1050,8 @@
"communityId": "96", "communityId": "96",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
}, },
{ {
"bridgeId": "1457867047334031360", "bridgeId": "1457867047334031360",
@ -1142,6 +1152,9 @@
"communityId": "98", "communityId": "98",
"usersNum": 120 "usersNum": 120
} }
],
"bridgeNeighbours": [
"1976143068"
] ]
}, },
{ {
@ -1231,6 +1244,7 @@
"communityId": "92", "communityId": "92",
"usersNum": 120 "usersNum": 120
} }
] ],
"bridgeNeighbours": []
} }
] ]

View File

@ -0,0 +1,45 @@
import http from "@/utils/http"
// 获取到桥梁节点列表
/* getBridgeNodeList
{
"code": 200,
"message": "操作成功",
"data": {
"id": "President Biden Archived",
"nodeId": "1349149096909668363", // 桥梁节点id
"userName": "President Biden Archived", // 用户名
"chineseName": null, // 中文名
"fans": "3670.7万", // 粉丝数
"following": "718", // 关注数量
"interactionNum": "8", // 互动次数
"firstActiveTime": "2023-10-07 15:08:27", // 首次发布帖文时间
"category": "政府账号", // 账号类型
"postNum": "1万", // 发布的帖文总数
"groups": [], // 连接的社团
// 发布的帖文-
"posts": [
{
"id": "1", // 帖文id
"timestamp": "2023-10-07 15:08:27", // 帖文的发布时间
"userName": "President Biden Archived", // 发布帖文的用户名
"influence": 69304.0, // 互动数量
"highlighted": false, // 是否高亮
"likes": 57400, // 点赞数量
"comment": 2061, // 评论数量
"transmit": 9843, // 被转发数量
"content": "Today, I spoke with @IsraeliPM about the appalling Hamas terrorist attacks in Israel. I offered our support and reiterated my unwavering commitment to Israels security. @FLOTUS and I express our heartfelt condolences to the families who have lost loved ones."
}
]
},
}
*/
export function getBridgeNodeList() {
return http.get("/critical/bridge_list")
}
// 获取到桥梁节点的领居桥梁节点
export function getBridgeNodeNeighbours() {
return http.get("/critical/bridge_relation_list")
}

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog v-model="isVisible" width="640" align-center class="leader-custom-dialog"> <el-dialog v-model="isVisible" width="640" align-center class="leader-custom-dialog">
<template v-if="store.activeLeader"> <template v-if="store.activeLeader">
<img src="@/assets/images/leaderDialogTitle.png" alt="" class="dialogTitleImg" /> <img src="@/assets/images/chuanbo_node_Info.png" alt="" class="dialogTitleImg" />
<div class="dialog-content"> <div class="dialog-content">
<div class="dialog-content-leaderInfo"> <div class="dialog-content-leaderInfo">
<img class="leaderInfo-avatar" :src="store.activeLeader.leaderOriginInfo.avatar" alt="" /> <img class="leaderInfo-avatar" :src="store.activeLeader.leaderOriginInfo.avatar" alt="" />

View File

@ -34,6 +34,8 @@ const processData = async() => {
const nodes = []; const nodes = [];
const links = []; const links = [];
const addedCommunities = new Set(); const addedCommunities = new Set();
// ID
const addedBridgeNodes = new Set();
// store // store
const keyNodeStore2 = useKeyNodeStore2(); const keyNodeStore2 = useKeyNodeStore2();
@ -86,13 +88,15 @@ const processData = async() => {
(isActiveNode ? bridgeNodeInfo.activeImg : bridgeNodeInfo.defImg) : ''; (isActiveNode ? bridgeNodeInfo.activeImg : bridgeNodeInfo.defImg) : '';
// //
const bridgeNodeId = `bridge_${bridgeId}`;
nodes.push({ nodes.push({
id: `bridge_${bridgeId}`, id: bridgeNodeId,
category: 0, category: 0,
symbol: bridgeNodeImg ? `image://${bridgeNodeImg}` : 'circle', symbol: bridgeNodeImg ? `image://${bridgeNodeImg}` : 'circle',
symbolSize: 100, symbolSize: 100,
originalId: bridgeId // ID originalId: bridgeId // ID
}); });
addedBridgeNodes.add(bridgeId);
// //
item.bridgeCommunities.forEach(community => { item.bridgeCommunities.forEach(community => {
@ -117,13 +121,33 @@ const processData = async() => {
// //
links.push({ links.push({
source: `bridge_${bridgeId}`, source: bridgeNodeId,
target: communityKey, target: communityKey,
value: 1 value: 1
}); });
}) })
//
if (item.bridgeNeighbours && item.bridgeNeighbours.length > 0) {
item.bridgeNeighbours.forEach(neighborBridgeId => {
//
if (addedBridgeNodes.has(neighborBridgeId)) {
const neighborBridgeNodeId = `bridge_${neighborBridgeId}`;
//
links.push({
source: bridgeNodeId,
target: neighborBridgeNodeId,
value: 2, // value-
lineStyle: {
color: '#ff7300', // 使
width: 2
}
});
}
});
}
}) })
const result = { nodes, links }; const result = { nodes, links };