From ce7b1312f8d8ea2f421e77e1ffd66e629ac6da8d Mon Sep 17 00:00:00 2001 From: duanhao Date: Fri, 15 Aug 2025 16:59:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/anchorGraph.vue | 3 +-- .../socialGroups/components/communityNode.vue | 25 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/views/KeyNodeDiscern/anchorRecommendation/components/anchorGraph.vue b/src/views/KeyNodeDiscern/anchorRecommendation/components/anchorGraph.vue index b94e014..c2fa8e6 100644 --- a/src/views/KeyNodeDiscern/anchorRecommendation/components/anchorGraph.vue +++ b/src/views/KeyNodeDiscern/anchorRecommendation/components/anchorGraph.vue @@ -41,11 +41,10 @@ const props = defineProps({ }) const statisticsList = ref(props.statisticsList) watch(riskEventIndex, (newIndex) => { - if (newIndex == 6) { + if (newIndex == -1) { return } const tooltipList = keyNodeStore.tooltipList - const highRiskCount = tooltipList[newIndex].filter((item) => item.riskType == "高风险").length keyNodeStore.statisticsList[4].number = highRiskCount keyNodeStore.statisticsList[3].number = tooltipList[newIndex].length diff --git a/src/views/LinkPrediction/socialGroups/components/communityNode.vue b/src/views/LinkPrediction/socialGroups/components/communityNode.vue index 4c09f9e..205d09b 100644 --- a/src/views/LinkPrediction/socialGroups/components/communityNode.vue +++ b/src/views/LinkPrediction/socialGroups/components/communityNode.vue @@ -19,7 +19,6 @@ import predictionNodeImg from "@/assets/images/linkPrediction/icon/prediction-no import hiddenNodeImg from "@/assets/images/linkPrediction/icon/hidden-node.png" import normalGroupNodeImg from "@/assets/images/linkPrediction/icon/normal-group-node.png" - let chart = null let linkList = null let nodeList = null @@ -44,9 +43,9 @@ const initChart = async () => { //处理社团节点 const nodes = Object.values(communityNodeList).map((item) => ({ - id: (item.id), - nodeName: (item.id), - symbol: imageSelect(item), + id: item.id, + nodeName: item.id, + symbol: imageSelect(item), symbolSize: 30, isIncludePredictNodes: item.isIncludePredictNodes, nodesNum: item.nodesNum, @@ -83,9 +82,21 @@ const initChart = async () => { const data = { nodes, links } const categories = [ - { name: "普通社团", category: 0, icon: `image://${new URL(normalGroupNodeImg, import.meta.url)}`}, - { name: "含预测节点社团", category: 1, icon: `image://${new URL(predictionNodeImg, import.meta.url)}`}, - { name: "紧密团体关系", category: 2, icon: `image://${new URL('@/assets/images/linkPrediction/icon/tight-community-legend-icon.png', import.meta.url)}`} + { + name: "普通社团", + category: 0, + icon: `image://${new URL(normalGroupNodeImg, import.meta.url)}` + }, + { + name: "含预测节点社团", + category: 1, + icon: `image://${new URL(predictionNodeImg, import.meta.url)}` + }, + { + name: "紧密团体关系", + category: 2, + icon: `image://${new URL("@/assets/images/linkPrediction/icon/tight-community-legend-icon.png", import.meta.url)}` + } ] const option = { //图例配置