From 159966c580a2f77c058111bdef5bc3af7699ca7b Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Mon, 28 Jul 2025 15:59:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E7=89=A9=E4=BA=92=E5=8A=A8=E9=9A=90?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E9=A2=84=E6=B5=8B=E5=9B=BE=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E4=BA=8C=E7=BA=A7=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icon/community-count-prefix.png | Bin 0 -> 347 bytes .../icon/hidden-count-prefix.png | Bin 0 -> 318 bytes .../linkPrediction/icon/legend-icon.png | Bin 0 -> 147 bytes .../linkPrediction/icon/node-count-prefix.png | Bin 0 -> 228 bytes src/service/api/linkPrediction.js | 5 + src/store/keyNodeRecognition/index.js | 2 +- src/store/llinkPrediction/index.js | 22 +- .../characterInteraction/index.vue | 2 + .../components/communityNode.vue | 66 ++++- .../LinkPrediction/components/detailNode.vue | 271 +++++++++++++++++- src/views/LinkPrediction/components/graph.vue | 41 ++- src/views/keyNodeRecognition3/index.vue | 132 ++++----- 12 files changed, 440 insertions(+), 101 deletions(-) create mode 100644 src/assets/images/linkPrediction/icon/community-count-prefix.png create mode 100644 src/assets/images/linkPrediction/icon/hidden-count-prefix.png create mode 100644 src/assets/images/linkPrediction/icon/legend-icon.png create mode 100644 src/assets/images/linkPrediction/icon/node-count-prefix.png 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 0000000000000000000000000000000000000000..ba9edba90f54a4478224a715c971783a2841ef7b GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngd!3HEhbh*6;Qk(@Ik;M!Q+`=Ht$S`Y;1W=H% zILO_JVcj{Imp~3nx}&cn1H;CC?mvmFAdQ|bjv*C{YbO~B9dr1)3pT_vm*vHRghX2-b}%+H+9 zR`0l#lza1832aF-SIsFdKPa#_GFYs3gTe~DWM4fTCt3s literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..62805cbe8eb5c118e5d309047407f5e0af703444 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngd!3HEhbh*6;Qk(@Ik;M!Q+`=Ht$S`Y;1W=H% zILO_JVcj{Imp~3nx}&cn1H;CC?mvmFK>lS<7srqa#|e)h3CXz{x&bhs7tx}jhM&w2)hElMD}Ehmm;NCZNdfH6ThAe_1>&uw7%pHqpodTy ({ @@ -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 @@
+
+
+ +
{{ item.name }}: 
+
{{ item.count }}
+
+
+
diff --git a/src/views/LinkPrediction/components/graph.vue b/src/views/LinkPrediction/components/graph.vue index 05f9636..3fd6134 100644 --- a/src/views/LinkPrediction/components/graph.vue +++ b/src/views/LinkPrediction/components/graph.vue @@ -7,19 +7,22 @@ @click:node="handleClickNode" @click:edge="handleClickEdge" > - - -
+ @@ -55,18 +63,5 @@ const handleClickGoBack = (currentComponentName) => { width: 100%; height: 93%; } - .time-axis { - width: 95%; - height: 42px; - border: 1px solid #3aa1f8; - background: linear-gradient(270deg, rgba(0, 82, 125, 0.48) 0%, rgba(0, 200, 255, 0.23) 100%); - backdrop-filter: blur(3px); - position: absolute; - bottom: 0; - left: 20px; - bottom: 20px; - border-radius: 4px; - z-index: 1; - } } diff --git a/src/views/keyNodeRecognition3/index.vue b/src/views/keyNodeRecognition3/index.vue index 0cd44f5..1351f7d 100644 --- a/src/views/keyNodeRecognition3/index.vue +++ b/src/views/keyNodeRecognition3/index.vue @@ -203,111 +203,111 @@