社团紧密修复

This commit is contained in:
duanhao 2025-08-18 17:51:58 +08:00
parent e3f8ce8efd
commit 3ade31f0a1
4 changed files with 15 additions and 5 deletions

View File

@ -655,6 +655,7 @@ export const useCharacterHiddenStore = defineStore("characterHidden", {
async initGraphCommunityNode() {
const res = await getCharacterSocialCommunityNodes()
if (res.code !== 200) return
this.communityNodeList = res.data
},

View File

@ -37,10 +37,14 @@ watch(
const initChart = () => {
const imageSelect = (node) => {
if (node.isIncludePredictNodes) {
if (node.selfIncludeImplicitRelationship) {
return `image://${new URL(predictionNodeImg, import.meta.url)}`
} else {
const selfIncludeImplicitRelationship =
node.neighbors.map((nei) => nei.id).includes(node.id) &&
node.neighbors.find((nei) => nei.id == node.id).isHidden
if (selfIncludeImplicitRelationship) {
return `image://${new URL(hiddenNodeImg, import.meta.url)}`
} else {
return `image://${new URL(predictionNodeImg, import.meta.url)}`
}
} else {
return `image://${new URL(normalGroupNodeImg, import.meta.url)}`
@ -255,6 +259,8 @@ const initChart = () => {
const handleClickNode = () => {
chart.on("click", function (params) {
if (params.dataType === "node") {
console.log("点击点params", params)
emit("click:node", params.data)
} else if (params.dataType == "edge") {
const { data } = params

View File

@ -350,8 +350,10 @@ const initChart = async () => {
const edgeSet = new Set()
// 使Map便
const edgeMap = new Map()
if (!Object.keys(socialGroupsStore.communityDetailNodeList).length) return
if (!Object.keys(socialGroupsStore.communityAllNodeList).length) return
//
console.log("301加入节点前")
socialGroupsStore.communityAllNodeList.forEach((item) => {
nodes.push({
id: item.userId,
@ -625,7 +627,6 @@ const highLightUserNodes = (newHiglightUserIdList) => {
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)
}
})

View File

@ -187,6 +187,8 @@ onMounted(() => {
socialGroupsStore.initGroupList()
socialGroupsStore.initPostList("212431")
socialGroupsStore.initGraphCommunityNode()
console.log("社团节点:", socialGroupsStore.communityNodeList)
socialGroupsStore.initGraphStatistics()
})