diff --git a/src/assets/images/linkPrediction/icon/user-info-group-icon.png b/src/assets/images/linkPrediction/icon/user-info-group-icon.png new file mode 100644 index 0000000..455be1e Binary files /dev/null and b/src/assets/images/linkPrediction/icon/user-info-group-icon.png differ diff --git a/src/assets/images/linkPrediction/title/user-info-title.png b/src/assets/images/linkPrediction/title/user-info-title.png new file mode 100644 index 0000000..73bdf1a Binary files /dev/null and b/src/assets/images/linkPrediction/title/user-info-title.png differ diff --git a/src/store/llinkPrediction/index.js b/src/store/llinkPrediction/index.js index ae439be..2ffd87b 100644 --- a/src/store/llinkPrediction/index.js +++ b/src/store/llinkPrediction/index.js @@ -469,6 +469,7 @@ export const useSocialGroupsStore = defineStore("socialGroups", { customStatisticsObj.hiddenInteractionCount == null ) { customStatisticsObj.hiddenInteractionCount = 1 + customStatisticsObj.groupCount = ids[0] === ids[1] ? 1 : 3 } diff --git a/src/views/LinkPrediction/socialGroups/components/communityNode.vue b/src/views/LinkPrediction/socialGroups/components/communityNode.vue index 0a1d8c4..a0f8184 100644 --- a/src/views/LinkPrediction/socialGroups/components/communityNode.vue +++ b/src/views/LinkPrediction/socialGroups/components/communityNode.vue @@ -18,6 +18,7 @@ import nodeHoverImg from "@/assets/images/nodeHover.png" let chart = null let linkList = null +let nodeList = null const emit = defineEmits(["click:node", "click:edge"]) const statisticsList = inject("statisticsList"); const communityNodeList = inject("communityNodeList"); @@ -34,7 +35,7 @@ const initChart = async () => { neighbors: item.neighbors.map((nei) => ({ ...nei, name: parseInt(nei.id) })), category: item.isIncludePredictNodes ? 1 : 0, selfIncludeImplicitRelationship: - item.neighbors.map((nei) => nei.id).includes(item.id) && //若该社团的id在该社团邻居中可以找到,说明自己这个社团中有互动隐关系 + item.neighbors.map((nei) => nei.id).includes(item.id) && //若该社团的id在该社团邻居中可以找到,说明自己这个社团中有社交紧密关系 item.neighbors.find((nei) => nei.id == item.id).isHidden })) @@ -60,6 +61,7 @@ const initChart = async () => { }) }) linkList = links + nodeList = nodes const data = { nodes, links } const categories = [ @@ -211,7 +213,7 @@ const initChart = async () => { shadowBlur: 20, shadowColor: "#c4a651", borderColor: "#fcd267", - borderWidth: node.isIncludePredictNodes == false ? 1 : 5, + borderWidth: 5, borderType: "solid" } } @@ -280,6 +282,7 @@ const handleClickNode = () => { onMounted(async () => { await initChart() handleClickNode() + console.log("nodeList", nodeList); }) onUnmounted(() => { diff --git a/src/views/LinkPrediction/socialGroups/components/detailNode.vue b/src/views/LinkPrediction/socialGroups/components/detailNode.vue index eb5e05f..853e0d8 100644 --- a/src/views/LinkPrediction/socialGroups/components/detailNode.vue +++ b/src/views/LinkPrediction/socialGroups/components/detailNode.vue @@ -85,7 +85,7 @@ const { clickEvent } = storeToRefs(socialGroupsStore) const chartsData = ref({}) -const emit = defineEmits(["click:goback"]) +const emit = defineEmits(["click:goback", "click:openDialog"]) const handleGoback = () => { pause() emit("click:goback", "CommunityNode") @@ -318,9 +318,23 @@ const initChart = async () => { nodes.push({ id: item.userId, name: item.userName, + // 头像 + avatarData: item.avatarData, + // 粉丝量 + fans: item.fans, symbolSize: 40, + // 发帖数 postNum: item.postNum, - fancy: item.fans + // 发帖频率 + postFreqPerDay: item.postFreqPerDay, + // 参与互动次数 + interactionNum: item.interactionNum, + // 参与互动频率 + interactionFreqPerDay: item.interactionFreqPerDay, + // 帖文被互动次数 + interactedNum: item.interactedNum, + // 最近活跃时间 + recentActiveTime: item.recentActiveTime, }) }) Object.entries(socialGroupsStore.communityDetailNodeList).forEach(([parentId, children]) => { @@ -597,6 +611,15 @@ const highLightUserNodes = (newHiglightUserIdList) => { }, 1000) } +const handleClickNode = () => { + chart.on("click", function (params) { + if (params.dataType == "node" && curHighlightUserIdList.value.includes(params.data.id)) { + console.log("detail点击点:",params.data) + emit("click:openDialog", params.data) + } + }) +} + onMounted(() => { initChart() chart.on("legendselectchanged", function (params) { @@ -607,6 +630,7 @@ onMounted(() => { }) highLightUserNodes() play() + handleClickNode() }) diff --git a/src/views/LinkPrediction/socialGroups/components/graph.vue b/src/views/LinkPrediction/socialGroups/components/graph.vue index 4f85ccd..818f4d9 100644 --- a/src/views/LinkPrediction/socialGroups/components/graph.vue +++ b/src/views/LinkPrediction/socialGroups/components/graph.vue @@ -10,12 +10,13 @@