diff --git a/src/views/KeyNodeDiscern/anchorRecommendation/components/communityNode.vue b/src/views/KeyNodeDiscern/anchorRecommendation/components/communityNode.vue index f4f5f43..16a3d05 100644 --- a/src/views/KeyNodeDiscern/anchorRecommendation/components/communityNode.vue +++ b/src/views/KeyNodeDiscern/anchorRecommendation/components/communityNode.vue @@ -86,7 +86,7 @@ const initChart = async () => { //包含锚点的社团 (绿色闪烁的节点) const includeAnchorCommunity = Object.entries(anchorCommunityInfo).map( ([communityId, anchorList]) => ({ - name: parseInt(communityId), // 社团id + nodeName: parseInt(communityId), // 社团id anchorCount: anchorList.length, // 该社团包含锚点的个数 anchorList: anchorList, // 该社团包含的锚点id数组 symbol: `image://${new URL(predictionNodeImg, import.meta.url)}` @@ -94,19 +94,19 @@ const initChart = async () => { ) // 创建包含锚点的社团名称集合(提高查找效率) - const includedCommunityId = includeAnchorCommunity.map((node) => node.name.toString()) + const includedCommunityId = includeAnchorCommunity.map((node) => node.nodeName.toString()) //筛选出不包含锚点的社团(不闪烁的蓝色节点) const uncontainedAnchorCommunity = Object.keys(community) .filter((node) => !includedCommunityId.includes(node)) - .map((node) => ({ name: parseInt(node), anchorCount: 0, symbol: `image://${new URL(normalGroupNodeImg, import.meta.url)}` })) + .map((node) => ({ nodeName: parseInt(node), anchorCount: 0, symbol: `image://${new URL(normalGroupNodeImg, import.meta.url)}` })) //合并成功后,统一设置id,避免重复id出现导致echarts渲染失败,并且取出每个社团中有多少个节点 const nodes = includeAnchorCommunity.concat(uncontainedAnchorCommunity).map((node, index) => ({ id: index, fixed: false, - total: Object.values(community)[node.name].length, + total: Object.values(community)[node.nodeName].length, category: node.anchorCount > 0 ? 1 : 0, //(1:含有锚点的社团分类,0:不含锚点的社团) ...node })) @@ -278,7 +278,7 @@ const initChart = async () => { shadowBlur: 20, shadowColor: "#c4a651", borderColor: "#fcd267", - borderWidth: node.category == 0 ? 1 : 5, + borderWidth: node.category == 0 ? 50 : 100, borderType: "solid" } } diff --git a/src/views/LinkPrediction/components/communityNode.vue b/src/views/LinkPrediction/components/communityNode.vue index 2af4190..c8f5cf1 100644 --- a/src/views/LinkPrediction/components/communityNode.vue +++ b/src/views/LinkPrediction/components/communityNode.vue @@ -62,7 +62,7 @@ const initChart = () => { //处理社团节点 const nodes = Object.values(inject("communityNodeList") ?? []).map((item) => ({ id: item.id, - name: item.id, + nodeName: item.id, isIncludePredictNodes: item.isIncludePredictNodes, nodesNum: item.nodesNum, neighbors: item.neighbors, diff --git a/src/views/LinkPrediction/components/detailNode.vue b/src/views/LinkPrediction/components/detailNode.vue index 2b5e3ef..b202411 100644 --- a/src/views/LinkPrediction/components/detailNode.vue +++ b/src/views/LinkPrediction/components/detailNode.vue @@ -129,7 +129,7 @@ const initChart = async () => { //先处理节点 nodes = props.interactionStore.communityDetailNodeList.map((item) => ({ id: item.userId, - name: item.userName, + nodeName: item.userName, // 头像 avatarData: item.avatarData, //默认圆形头像 @@ -256,7 +256,7 @@ const initChart = async () => { ">