diff --git a/src/assets/images/linkPrediction/icon/community-count-prefix.png b/src/assets/images/linkPrediction/icon/community-count-prefix.png new file mode 100644 index 0000000..ba9edba Binary files /dev/null and b/src/assets/images/linkPrediction/icon/community-count-prefix.png differ diff --git a/src/assets/images/linkPrediction/icon/hidden-count-prefix.png b/src/assets/images/linkPrediction/icon/hidden-count-prefix.png new file mode 100644 index 0000000..62805cb Binary files /dev/null and b/src/assets/images/linkPrediction/icon/hidden-count-prefix.png differ diff --git a/src/assets/images/linkPrediction/icon/legend-icon.png b/src/assets/images/linkPrediction/icon/legend-icon.png new file mode 100644 index 0000000..d3fb9ca Binary files /dev/null and b/src/assets/images/linkPrediction/icon/legend-icon.png differ diff --git a/src/assets/images/linkPrediction/icon/node-count-prefix.png b/src/assets/images/linkPrediction/icon/node-count-prefix.png new file mode 100644 index 0000000..b8f1e61 Binary files /dev/null and b/src/assets/images/linkPrediction/icon/node-count-prefix.png differ diff --git a/src/service/api/linkPrediction.js b/src/service/api/linkPrediction.js index a1b4f9a..8cb286e 100644 --- a/src/service/api/linkPrediction.js +++ b/src/service/api/linkPrediction.js @@ -14,6 +14,11 @@ export function getInteractionCommunityNodes() { export function getInteractionCommunityDetailNodes(ids) { return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}`) } + +//人物互动隐关系预测的社团统计 +export function getInteractionCommunityStatistics() { + return http.get(`linkPrediction/interaction/community_statistics`) +} //社交紧密团体识别的用户组列表 export function getGroupUserListFromTriangle() { return http.get("/linkPrediction/triangle/group_list") diff --git a/src/store/keyNodeRecognition/index.js b/src/store/keyNodeRecognition/index.js index 104c1ae..cba3207 100644 --- a/src/store/keyNodeRecognition/index.js +++ b/src/store/keyNodeRecognition/index.js @@ -541,7 +541,7 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [12000, 12690, 12108, 10790, 9004, 8006, 7890, 11878], + predictedData: [12000, 12690, 12108, 10790, 9004, 5000, 4890, 3300], realityData: [8959, 7460, 8334, 7902, 5753, 3070, "-", "-"] } } diff --git a/src/store/llinkPrediction/index.js b/src/store/llinkPrediction/index.js index 1e93cc2..0d82ac0 100644 --- a/src/store/llinkPrediction/index.js +++ b/src/store/llinkPrediction/index.js @@ -7,10 +7,14 @@ import { getSocialPostList, getInteractionHiddenPostList, getInteractionCommunityNodes, - getInteractionCommunityDetailNodes + getInteractionCommunityDetailNodes, + getInteractionCommunityStatistics } from "@/service/api/linkPrediction" import defaultAvatar from "@/assets/images/avatar/default.png" +import nodePrefix from "@/assets/images/linkPrediction/icon/node-count-prefix.png" +import communityPrefix from "@/assets/images/linkPrediction/icon/community-count-prefix.png" +import hiddenPrefix from "@/assets/images/linkPrediction/icon/hidden-count-prefix.png" export const useCharacterInteractionStore = defineStore("characterInteraction", { state: () => ({ @@ -128,6 +132,12 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", { text: "领土", top: 57.5, left: 72.5, width: 49, height: 19, fontSize: 12, opacity: 0.6 }, { text: "原则", top: 77.5, left: 264.5, width: 49, height: 19, fontSize: 12, opacity: 0.7 }, { text: "台湾", top: 195.5, left: 287.5, width: 49, height: 19, fontSize: 12, opacity: 0.8 } + ], + + statisticsList: [ + { id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" }, + { id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" }, + { id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" } ] }), actions: { @@ -158,7 +168,15 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", }, async initGraphCommunityDetailNode(ids) { const res = await getInteractionCommunityDetailNodes(ids) - console.log(res) + if (res.code != 200) return + return res.data + }, + async initGraphStatistics() { + const res = await getInteractionCommunityStatistics() + this.statisticsList = this.statisticsList.map((item) => ({ + ...item, + count: res.data[item.key] + })) } }, persist: true // 开启持久化 diff --git a/src/views/LinkPrediction/characterInteraction/index.vue b/src/views/LinkPrediction/characterInteraction/index.vue index 26bd79e..f1f8289 100644 --- a/src/views/LinkPrediction/characterInteraction/index.vue +++ b/src/views/LinkPrediction/characterInteraction/index.vue @@ -99,8 +99,10 @@ onMounted(() => { interactionStore.initGroupList() interactionStore.initInteractionPostList(1) interactionStore.initGraphCommunityNode() + interactionStore.initGraphStatistics() }) provide("communityNodeList", interactionStore.communityNodeList) // 提供数据 +provide("statisticsList", interactionStore.statisticsList) diff --git a/src/views/LinkPrediction/components/detailNode.vue b/src/views/LinkPrediction/components/detailNode.vue index 6c28df4..2241a53 100644 --- a/src/views/LinkPrediction/components/detailNode.vue +++ b/src/views/LinkPrediction/components/detailNode.vue @@ -2,22 +2,232 @@