桥梁节点详情弹窗
This commit is contained in:
parent
11f1e78dd5
commit
eb516ebf59
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
BIN
src/assets/images/chuanbo_node_Info.png
Normal file
BIN
src/assets/images/chuanbo_node_Info.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -142,7 +142,8 @@
|
|||
"communityId": "98",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "2835451658",
|
||||
|
|
@ -307,7 +308,8 @@
|
|||
"communityId": "98",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "1976143068",
|
||||
|
|
@ -440,6 +442,9 @@
|
|||
"communityId": "98",
|
||||
"usersNum": 120
|
||||
}
|
||||
],
|
||||
"bridgeNeighbours": [
|
||||
"1457867047334031360"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -593,7 +598,8 @@
|
|||
"communityId": "93",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "3006348240",
|
||||
|
|
@ -690,7 +696,8 @@
|
|||
"communityId": "92",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "1350150750966603777",
|
||||
|
|
@ -787,7 +794,8 @@
|
|||
"communityId": "93",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "1151913018936053760",
|
||||
|
|
@ -892,7 +900,8 @@
|
|||
"communityId": "84",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "818948638890217473",
|
||||
|
|
@ -1041,7 +1050,8 @@
|
|||
"communityId": "96",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
},
|
||||
{
|
||||
"bridgeId": "1457867047334031360",
|
||||
|
|
@ -1142,6 +1152,9 @@
|
|||
"communityId": "98",
|
||||
"usersNum": 120
|
||||
}
|
||||
],
|
||||
"bridgeNeighbours": [
|
||||
"1976143068"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1231,6 +1244,7 @@
|
|||
"communityId": "92",
|
||||
"usersNum": 120
|
||||
}
|
||||
]
|
||||
],
|
||||
"bridgeNeighbours": []
|
||||
}
|
||||
]
|
||||
45
src/service/api/bridgeNode.js
Normal file
45
src/service/api/bridgeNode.js
Normal 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 Israel’s 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")
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-dialog v-model="isVisible" width="640" align-center class="leader-custom-dialog">
|
||||
<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-leaderInfo">
|
||||
<img class="leaderInfo-avatar" :src="store.activeLeader.leaderOriginInfo.avatar" alt="" />
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ const processData = async() => {
|
|||
const nodes = [];
|
||||
const links = [];
|
||||
const addedCommunities = new Set();
|
||||
// 新增:存储已处理的桥梁节点ID
|
||||
const addedBridgeNodes = new Set();
|
||||
// 获取store实例
|
||||
const keyNodeStore2 = useKeyNodeStore2();
|
||||
|
||||
|
|
@ -86,13 +88,15 @@ const processData = async() => {
|
|||
(isActiveNode ? bridgeNodeInfo.activeImg : bridgeNodeInfo.defImg) : '';
|
||||
|
||||
// 添加桥梁节点
|
||||
const bridgeNodeId = `bridge_${bridgeId}`;
|
||||
nodes.push({
|
||||
id: `bridge_${bridgeId}`,
|
||||
id: bridgeNodeId,
|
||||
category: 0,
|
||||
symbol: bridgeNodeImg ? `image://${bridgeNodeImg}` : 'circle',
|
||||
symbolSize: 100,
|
||||
originalId: bridgeId // 存储原始ID用于识别
|
||||
});
|
||||
addedBridgeNodes.add(bridgeId);
|
||||
|
||||
// 添加社团节点和边
|
||||
item.bridgeCommunities.forEach(community => {
|
||||
|
|
@ -117,13 +121,33 @@ const processData = async() => {
|
|||
|
||||
// 添加社团与桥梁的边
|
||||
links.push({
|
||||
source: `bridge_${bridgeId}`,
|
||||
source: bridgeNodeId,
|
||||
target: communityKey,
|
||||
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 };
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user