社团紧密修复
This commit is contained in:
parent
e3f8ce8efd
commit
3ade31f0a1
|
|
@ -655,6 +655,7 @@ export const useCharacterHiddenStore = defineStore("characterHidden", {
|
|||
|
||||
async initGraphCommunityNode() {
|
||||
const res = await getCharacterSocialCommunityNodes()
|
||||
|
||||
if (res.code !== 200) return
|
||||
this.communityNodeList = res.data
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -187,6 +187,8 @@ onMounted(() => {
|
|||
socialGroupsStore.initGroupList()
|
||||
socialGroupsStore.initPostList("212431")
|
||||
socialGroupsStore.initGraphCommunityNode()
|
||||
console.log("社团节点:", socialGroupsStore.communityNodeList)
|
||||
|
||||
socialGroupsStore.initGraphStatistics()
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user