From 8267eaf7d7aa6ac058ac0d55778d26a19d3077b3 Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E8=B7=AF=E9=A2=84=E6=B5=8B=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=B4=B4=E6=96=87=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 2 ++ src/service/api/linkPrediction.js | 5 ++++ src/store/linkPrediction/index.js | 24 +++++++++++++++++- .../anchorRecommendation/index.vue | 1 + .../characterInteraction/index.vue | 22 ++++++++++++++-- .../charactersHiddenInteraction/index.vue | 25 ++++++++++++++++--- .../LinkPrediction/components/postList.vue | 6 ++++- .../socialGroups/components/postList.vue | 7 ++++-- .../LinkPrediction/socialGroups/index.vue | 24 +++++++++++++++--- src/views/login/index.vue | 3 +-- 10 files changed, 103 insertions(+), 16 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 57a7dad..2214d01 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -37,6 +37,7 @@ const handleOpenDialog = (isOpen) => (openDialog.value = isOpen) .el-container-inner { padding-left: vw(13); margin-top: vh(10); + .el-aside { color: aliceblue; font-family: Arial, sans-serif; @@ -45,6 +46,7 @@ const handleOpenDialog = (isOpen) => (openDialog.value = isOpen) flex: 1; padding: 0 0; padding: 0 vw(13); + overflow: hidden; } } } diff --git a/src/service/api/linkPrediction.js b/src/service/api/linkPrediction.js index e243c82..99b4b7f 100644 --- a/src/service/api/linkPrediction.js +++ b/src/service/api/linkPrediction.js @@ -112,3 +112,8 @@ export function getCharacterSocialCommunityDetailNodes( export function getInteractionCount(source, target) { return http.get(`/linkPrediction/interactionCount?source=${source}&target=${target}`) } + +//获取贴文详情 +export function getPostDetail(postId) { + return http.get(`/linkPrediction/postDetail?postId=${postId}`) +} diff --git a/src/store/linkPrediction/index.js b/src/store/linkPrediction/index.js index 15ab688..99efdf1 100644 --- a/src/store/linkPrediction/index.js +++ b/src/store/linkPrediction/index.js @@ -14,7 +14,8 @@ import { getCharacterSocialCommunityNodes, getCharacterSocialCommunityStatistics, getCharacterSocialCommunityDetailNodes, - getInteractionCount + getInteractionCount, + getPostDetail } from "@/service/api/linkPrediction" import defaultAvatar from "@/assets/images/avatar/default.png" @@ -220,6 +221,13 @@ export const useCharacterInteractionStore = defineStore("characterInteraction", const res = await getInteractionCount(source, target) if (res.code != 200) return return res.data + }, + //点击贴文list获取任意贴文信息 + async initPostDetail(postId) { + const res = await getPostDetail(postId) + if (res.code == 200) { + return res.data + } } }, persist: true // 开启持久化 @@ -513,6 +521,13 @@ export const useSocialGroupsStore = defineStore("socialGroups", { const res = await getInteractionCount(source, target) if (res.code != 200) return return res.data + }, + //点击贴文list获取任意贴文信息 + async initPostDetail(postId) { + const res = await getPostDetail(postId) + if (res.code == 200) { + return res.data + } } }, persist: true // 开启持久化 @@ -708,6 +723,13 @@ export const useCharacterHiddenStore = defineStore("characterHidden", { const res = await getInteractionCount(source, target) if (res.code != 200) return return res.data + }, + //点击贴文list获取任意贴文信息 + async initPostDetail(postId) { + const res = await getPostDetail(postId) + if (res.code == 200) { + return res.data + } } }, persist: true // 开启持久化 diff --git a/src/views/KeyNodeDiscern/anchorRecommendation/index.vue b/src/views/KeyNodeDiscern/anchorRecommendation/index.vue index 977c3b6..a91a502 100644 --- a/src/views/KeyNodeDiscern/anchorRecommendation/index.vue +++ b/src/views/KeyNodeDiscern/anchorRecommendation/index.vue @@ -489,6 +489,7 @@ watch(topicDialog, (val) => { display: flex; flex-direction: column; gap: vw(10); + .top-container { width: 100%; height: vh(110); diff --git a/src/views/LinkPrediction/characterInteraction/index.vue b/src/views/LinkPrediction/characterInteraction/index.vue index 550343e..e3d5f9f 100644 --- a/src/views/LinkPrediction/characterInteraction/index.vue +++ b/src/views/LinkPrediction/characterInteraction/index.vue @@ -21,7 +21,7 @@ >
- +
@@ -105,6 +105,13 @@
+ + + +
+
{{ currentPostContent }}
+
+
@@ -129,10 +136,13 @@ const { communityNodeList } = storeToRefs(interactionStore) // 控制个人信息弹窗 const userInfoDialog = ref(false) +const postDialog = ref(false) + const curSelectedUser = ref(null) const storeId = "characterInteraction" +const currentPostContent = ref("") //选择某个用户组,更新贴文列表 && 更新关系图二级界面 const handleSelectedUserGroup = async (group) => { interactionStore.timeList = group.timeList //保存从用户列表选择的用户组,为了显示这两个用户交互的时间切片 @@ -149,6 +159,14 @@ const handleOpenUserInfoDialog = (params) => { userInfoDialog.value = params.userInfoDialog curSelectedUser.value = params.curSelectedUser } + +const handlePostDetail = async (post) => { + const res = await interactionStore.initPostDetail(post.postId) + if (res) { + currentPostContent.value = res + postDialog.value = true + } +} onMounted(() => { interactionStore.curComponent = "CommunityNode" interactionStore.initGroupList() //初始化用户组列表 @@ -176,7 +194,7 @@ provide("statisticsList", interactionStore.statisticsList) height: vh(300); } :deep(.custom-dialog) .postTitleImage { - margin-top: vh(-24); + margin-top: vh(-27); margin-left: vw(-2); } :deep(.custom-dialog) .userInfoTitle { diff --git a/src/views/LinkPrediction/charactersHiddenInteraction/index.vue b/src/views/LinkPrediction/charactersHiddenInteraction/index.vue index f8723fc..f678a51 100644 --- a/src/views/LinkPrediction/charactersHiddenInteraction/index.vue +++ b/src/views/LinkPrediction/charactersHiddenInteraction/index.vue @@ -21,7 +21,10 @@ >
- +
@@ -109,6 +112,13 @@
+ + + +
+
{{ currentPostContent }}
+
+
@@ -132,10 +142,11 @@ const characterHiddenStore = useCharacterHiddenStore() const { communityNodeList } = storeToRefs(characterHiddenStore) // 控制个人信息弹窗 const userInfoDialog = ref(false) +const postDialog = ref(false) const curSelectedUser = ref(null) const storeId = "characterHidden" - +const currentPostContent = ref("") const handleOpenUserInfoDialog = (params) => { userInfoDialog.value = params.userInfoDialog curSelectedUser.value = params.curSelectedUser @@ -152,7 +163,13 @@ const handleSelectedUserGroup = (group) => { group.relationId ) } - +const handlePostDetail = async (post) => { + const res = await characterHiddenStore.initPostDetail(post.postId) + if (res) { + currentPostContent.value = res + postDialog.value = true + } +} onMounted(() => { characterHiddenStore.initGroupList() characterHiddenStore.initCharacterSocialHiddenPostList("79") //初始贴文列表 @@ -179,7 +196,7 @@ provide("statisticsList", characterHiddenStore.statisticsList) height: vh(300); } :deep(.custom-dialog) .postTitleImage { - margin-top: vh(-24); + margin-top: vh(-27); margin-left: vw(-2); } :deep(.custom-dialog) .userInfoTitle { diff --git a/src/views/LinkPrediction/components/postList.vue b/src/views/LinkPrediction/components/postList.vue index c99dcca..016bb3f 100644 --- a/src/views/LinkPrediction/components/postList.vue +++ b/src/views/LinkPrediction/components/postList.vue @@ -39,6 +39,7 @@ const props = defineProps({ default: () => [] } }) +const emit = defineEmits(["click:openDialog"]) const listRef = ref(null) let scrollTimer = null let direction = 1 // 1: 向下, -1: 向上 @@ -67,7 +68,9 @@ function pauseScroll() { function resumeScroll() { startScroll() } - +const handleLeaderPost = (post) => { + emit("click:openDialog", post) +} onMounted(() => { startScroll() }) @@ -80,6 +83,7 @@ onBeforeUnmount(() => { .postList-component { width: 100%; height: 100%; + overflow: hidden; //滚动轴隐藏 .ContextoftheincidentTitle { margin-top: vh(-18); margin-left: vw(-11); diff --git a/src/views/LinkPrediction/socialGroups/components/postList.vue b/src/views/LinkPrediction/socialGroups/components/postList.vue index c5068f3..1e98e13 100644 --- a/src/views/LinkPrediction/socialGroups/components/postList.vue +++ b/src/views/LinkPrediction/socialGroups/components/postList.vue @@ -40,7 +40,7 @@ const props = defineProps({ default: () => [] } }) - +const emit = defineEmits(["click:openDialog"]) const listRef = ref(null) let scrollTimer = null let direction = 1 // 1: 向下, -1: 向上 @@ -70,7 +70,9 @@ function pauseScroll() { function resumeScroll() { startScroll() } - +const handleLeaderPost = (post) => { + emit("click:openDialog", post) +} onMounted(() => { startScroll() }) @@ -83,6 +85,7 @@ onBeforeUnmount(() => { .postList-component { width: 100%; height: 100%; + overflow: hidden; //滚动轴隐藏 .ContextoftheincidentTitle { margin-left: vw(-12); margin-top: vh(-17); diff --git a/src/views/LinkPrediction/socialGroups/index.vue b/src/views/LinkPrediction/socialGroups/index.vue index 711bdfb..d39a165 100644 --- a/src/views/LinkPrediction/socialGroups/index.vue +++ b/src/views/LinkPrediction/socialGroups/index.vue @@ -19,7 +19,10 @@ >
- +
@@ -130,6 +133,13 @@
+ + + +
+
{{ currentPostContent }}
+
+
@@ -162,7 +172,7 @@ const curSelectedUser = ref(null) //当前选中的贴文数据 const currentPostPost = ref(null) - +const currentPostContent = ref("") // 列表项的点击事件 const handleSelectedUserGroup = (group) => { socialGroupsStore.curComponent = "detailkNode" @@ -179,7 +189,13 @@ const handleOpenUserInfoDialog = (params) => { userInfoDialog.value = params.userInfoDialog curSelectedUser.value = params.curSelectedUser } - +const handlePostDetail = async (post) => { + const res = await socialGroupsStore.initPostDetail(post.postId) + if (res) { + currentPostContent.value = res + postDialog.value = true + } +} onMounted(() => { socialGroupsStore.curComponent = "CommunityNode" socialGroupsStore.initGroupList() @@ -208,7 +224,7 @@ provide("statisticsList", socialGroupsStore.statisticsList) height: vh(300); } :deep(.custom-dialog) .postTitleImage { - margin-top: vh(-24); + margin-top: vh(-27); margin-left: vw(-2); } :deep(.custom-dialog) .userInfoTitle { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f3c637d..677b2fb 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -10,7 +10,7 @@