This commit is contained in:
duanhao 2025-08-15 16:59:21 +08:00
parent a195f546a4
commit ce7b1312f8
2 changed files with 19 additions and 9 deletions

View File

@ -41,11 +41,10 @@ const props = defineProps({
}) })
const statisticsList = ref(props.statisticsList) const statisticsList = ref(props.statisticsList)
watch(riskEventIndex, (newIndex) => { watch(riskEventIndex, (newIndex) => {
if (newIndex == 6) { if (newIndex == -1) {
return return
} }
const tooltipList = keyNodeStore.tooltipList const tooltipList = keyNodeStore.tooltipList
const highRiskCount = tooltipList[newIndex].filter((item) => item.riskType == "高风险").length const highRiskCount = tooltipList[newIndex].filter((item) => item.riskType == "高风险").length
keyNodeStore.statisticsList[4].number = highRiskCount keyNodeStore.statisticsList[4].number = highRiskCount
keyNodeStore.statisticsList[3].number = tooltipList[newIndex].length keyNodeStore.statisticsList[3].number = tooltipList[newIndex].length

View File

@ -19,7 +19,6 @@ import predictionNodeImg from "@/assets/images/linkPrediction/icon/prediction-no
import hiddenNodeImg from "@/assets/images/linkPrediction/icon/hidden-node.png" import hiddenNodeImg from "@/assets/images/linkPrediction/icon/hidden-node.png"
import normalGroupNodeImg from "@/assets/images/linkPrediction/icon/normal-group-node.png" import normalGroupNodeImg from "@/assets/images/linkPrediction/icon/normal-group-node.png"
let chart = null let chart = null
let linkList = null let linkList = null
let nodeList = null let nodeList = null
@ -44,8 +43,8 @@ const initChart = async () => {
// //
const nodes = Object.values(communityNodeList).map((item) => ({ const nodes = Object.values(communityNodeList).map((item) => ({
id: (item.id), id: item.id,
nodeName: (item.id), nodeName: item.id,
symbol: imageSelect(item), symbol: imageSelect(item),
symbolSize: 30, symbolSize: 30,
isIncludePredictNodes: item.isIncludePredictNodes, isIncludePredictNodes: item.isIncludePredictNodes,
@ -83,9 +82,21 @@ const initChart = async () => {
const data = { nodes, links } const data = { nodes, links }
const categories = [ 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: "普通社团",
{ name: "紧密团体关系", category: 2, icon: `image://${new URL('@/assets/images/linkPrediction/icon/tight-community-legend-icon.png', import.meta.url)}`} 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 = { const option = {
// //