From c7709f42072d29673144c7b3ea2368e67517a2ee Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:13:19 +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=A1=B5=E9=9D=A2=E4=BA=8C=E7=BA=A7=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E5=9B=BE=E6=97=B6=E9=97=B4=E8=BD=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 9 + package.json | 2 + src/assets/vue.svg | 1 - src/service/api/linkPrediction.js | 4 +- src/store/llinkPrediction/index.js | 21 +- .../characterInteraction/index.vue | 1 + .../LinkPrediction/components/detailNode.vue | 233 ++++++++++++++++-- src/views/LinkPrediction/components/graph.vue | 30 +-- 8 files changed, 247 insertions(+), 54 deletions(-) delete mode 100644 src/assets/vue.svg diff --git a/package-lock.json b/package-lock.json index 973f3a2..3f8f0de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,8 @@ "dayjs": "^1.11.13", "echarts": "^5.6.0", "element-plus": "^2.10.1", + "loadsh": "^0.0.4", + "lodash-es": "^4.17.21", "pinia": "^3.0.3", "pinia-plugin-persistedstate": "^4.3.0", "vue": "^3.5.13", @@ -3131,6 +3133,13 @@ "node": ">=6.11.5" } }, + "node_modules/loadsh": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/loadsh/-/loadsh-0.0.4.tgz", + "integrity": "sha512-U+wLL8InpfRalWrr+0SuhWgGt10M4OyAk6G8xCYo2rwpiHtxZkWiFpjei0vO463ghW8LPCdhqQxXlMy2qicAEw==", + "deprecated": "This is a typosquat on the popular Lodash package. This is not maintained nor is the original Lodash package.", + "license": "MIT" + }, "node_modules/local-pkg": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz", diff --git a/package.json b/package.json index c406a5d..6f258a3 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "dayjs": "^1.11.13", "echarts": "^5.6.0", "element-plus": "^2.10.1", + "loadsh": "^0.0.4", + "lodash-es": "^4.17.21", "pinia": "^3.0.3", "pinia-plugin-persistedstate": "^4.3.0", "vue": "^3.5.13", diff --git a/src/assets/vue.svg b/src/assets/vue.svg deleted file mode 100644 index 770e9d3..0000000 --- a/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/service/api/linkPrediction.js b/src/service/api/linkPrediction.js index 8cb286e..dfe7065 100644 --- a/src/service/api/linkPrediction.js +++ b/src/service/api/linkPrediction.js @@ -11,8 +11,8 @@ export function getInteractionCommunityNodes() { } //人物互动隐关系预测的社团内部节点 -export function getInteractionCommunityDetailNodes(ids) { - return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}`) +export function getInteractionCommunityDetailNodes(ids, time = "2024.05.16 16:56:04") { + return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}&dateTime=${time}`) } //人物互动隐关系预测的社团统计 diff --git a/src/store/llinkPrediction/index.js b/src/store/llinkPrediction/index.js index 0d82ac0..6cfd6ed 100644 --- a/src/store/llinkPrediction/index.js +++ b/src/store/llinkPrediction/index.js @@ -22,9 +22,10 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", userChartList: [], //组相关性 posts: [], communityNodeList: [], - + curComponent: "CommunityNode", + curSelecedGroupIds: [], communityDetailNodeList: [], - + curSelectedGroup: [], anlysisList: [ { id: 1, @@ -138,6 +139,11 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", { id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" }, { id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" }, { id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" } + ], + statisticsDetailList: [ + { id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" }, + { id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" }, + { id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" } ] }), actions: { @@ -166,10 +172,15 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", if (res.code != 200) return this.communityNodeList = res.data }, - async initGraphCommunityDetailNode(ids) { - const res = await getInteractionCommunityDetailNodes(ids) + async initGraphCommunityDetailNode(ids, time = "2024.05.16 16:56:04") { + this.curSelecedGroupIds = ids + const res = await getInteractionCommunityDetailNodes(ids, time) if (res.code != 200) return - return res.data + this.statisticsDetailList = this.statisticsDetailList.map((item) => ({ + ...item, + count: res.data.communityStatistics[item.key] + })) + this.communityDetailNodeList = res.data.userRelation }, async initGraphStatistics() { const res = await getInteractionCommunityStatistics() diff --git a/src/views/LinkPrediction/characterInteraction/index.vue b/src/views/LinkPrediction/characterInteraction/index.vue index f1f8289..b7c7474 100644 --- a/src/views/LinkPrediction/characterInteraction/index.vue +++ b/src/views/LinkPrediction/characterInteraction/index.vue @@ -83,6 +83,7 @@ const postDialog = ref(false) const currentPostPost = ref(null) const handleSelectedUserGroup = (group) => { + interactionStore.curComponent = "detailNode" console.log(group) } diff --git a/src/views/LinkPrediction/components/detailNode.vue b/src/views/LinkPrediction/components/detailNode.vue index 2241a53..9395d6a 100644 --- a/src/views/LinkPrediction/components/detailNode.vue +++ b/src/views/LinkPrediction/components/detailNode.vue @@ -3,51 +3,146 @@
-
+
{{ item.name }}: 
{{ item.count }}
-
+
+
{{ TansTimestamp(startTime, "YYYY.MM.DD HH:mm:ss") }}
+
+
+
+
+
+
+
+
{{ TansTimestamp(endTime, "YYYY.MM.DD HH:mm:ss") }}
+
+
+ 当前时间: {{ TansTimestamp(currentTime, "YYYY.MM.DD HH:mm:ss") }} +