节点字体消除

This commit is contained in:
duanhao 2025-08-12 15:54:05 +08:00
parent 03393edb22
commit a3fe33d53c
5 changed files with 13 additions and 13 deletions

View File

@ -86,7 +86,7 @@ const initChart = async () => {
// 绿 // 绿
const includeAnchorCommunity = Object.entries(anchorCommunityInfo).map( const includeAnchorCommunity = Object.entries(anchorCommunityInfo).map(
([communityId, anchorList]) => ({ ([communityId, anchorList]) => ({
name: parseInt(communityId), // id nodeName: parseInt(communityId), // id
anchorCount: anchorList.length, // anchorCount: anchorList.length, //
anchorList: anchorList, // id anchorList: anchorList, // id
symbol: `image://${new URL(predictionNodeImg, import.meta.url)}` 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) const uncontainedAnchorCommunity = Object.keys(community)
.filter((node) => !includedCommunityId.includes(node)) .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)}` }))
//ididecharts, //ididecharts,
const nodes = includeAnchorCommunity.concat(uncontainedAnchorCommunity).map((node, index) => ({ const nodes = includeAnchorCommunity.concat(uncontainedAnchorCommunity).map((node, index) => ({
id: index, id: index,
fixed: false, fixed: false,
total: Object.values(community)[node.name].length, total: Object.values(community)[node.nodeName].length,
category: node.anchorCount > 0 ? 1 : 0, //(1:0) category: node.anchorCount > 0 ? 1 : 0, //(1:0)
...node ...node
})) }))
@ -278,7 +278,7 @@ const initChart = async () => {
shadowBlur: 20, shadowBlur: 20,
shadowColor: "#c4a651", shadowColor: "#c4a651",
borderColor: "#fcd267", borderColor: "#fcd267",
borderWidth: node.category == 0 ? 1 : 5, borderWidth: node.category == 0 ? 50 : 100,
borderType: "solid" borderType: "solid"
} }
} }

View File

@ -62,7 +62,7 @@ const initChart = () => {
// //
const nodes = Object.values(inject("communityNodeList") ?? []).map((item) => ({ const nodes = Object.values(inject("communityNodeList") ?? []).map((item) => ({
id: item.id, id: item.id,
name: item.id, nodeName: item.id,
isIncludePredictNodes: item.isIncludePredictNodes, isIncludePredictNodes: item.isIncludePredictNodes,
nodesNum: item.nodesNum, nodesNum: item.nodesNum,
neighbors: item.neighbors, neighbors: item.neighbors,

View File

@ -129,7 +129,7 @@ const initChart = async () => {
// //
nodes = props.interactionStore.communityDetailNodeList.map((item) => ({ nodes = props.interactionStore.communityDetailNodeList.map((item) => ({
id: item.userId, id: item.userId,
name: item.userName, nodeName: item.userName,
// //
avatarData: item.avatarData, avatarData: item.avatarData,
// //
@ -256,7 +256,7 @@ const initChart = async () => {
"> ">
<div style="color:#fff;letter-spacing: 0.14px;"> <div style="color:#fff;letter-spacing: 0.14px;">
<div >用户ID${params.data.id}</div> <div >用户ID${params.data.id}</div>
<div >用户名${params.data.name}</div> <div >用户名${params.data.nodeName}</div>
</div> </div>
</div>` </div>`
} }

View File

@ -45,12 +45,12 @@ const initChart = async () => {
// //
const nodes = Object.values(communityNodeList).map((item) => ({ const nodes = Object.values(communityNodeList).map((item) => ({
id: (item.id), id: (item.id),
name: (item.id), nodeName: (item.id),
symbol: imageSelect(item), symbol: imageSelect(item),
symbolSize: 30, symbolSize: 30,
isIncludePredictNodes: item.isIncludePredictNodes, isIncludePredictNodes: item.isIncludePredictNodes,
nodesNum: item.nodesNum, nodesNum: item.nodesNum,
neighbors: item.neighbors.map((nei) => ({ ...nei, name: parseInt(nei.id) })), neighbors: item.neighbors.map((nei) => ({ ...nei, nodeName: parseInt(nei.id) })),
category: item.isIncludePredictNodes ? 1 : 0, category: item.isIncludePredictNodes ? 1 : 0,
selfIncludeImplicitRelationship: selfIncludeImplicitRelationship:
item.neighbors.map((nei) => nei.id).includes(item.id) && //id item.neighbors.map((nei) => nei.id).includes(item.id) && //id
@ -62,7 +62,7 @@ const initChart = async () => {
const edgeSet = new Set() // const edgeSet = new Set() //
nodes.forEach((communityNode) => { nodes.forEach((communityNode) => {
communityNode.neighbors.forEach((communityNei) => { communityNode.neighbors.forEach((communityNei) => {
const key = [communityNode.name, communityNei.name].sort().join("-") const key = [communityNode.nodeName, communityNei.nodeName].sort().join("-")
if (edgeSet.has(key)) return if (edgeSet.has(key)) return
links.push({ links.push({
source: communityNode.id, source: communityNode.id,

View File

@ -350,7 +350,7 @@ const initChart = async () => {
socialGroupsStore.communityAllNodeList.forEach((item) => { socialGroupsStore.communityAllNodeList.forEach((item) => {
nodes.push({ nodes.push({
id: item.userId, id: item.userId,
name: item.userName, nodeName: item.userName,
// //
avatarData: item.avatarData, avatarData: item.avatarData,
// //
@ -500,7 +500,7 @@ const initChart = async () => {
"> ">
<div style="color:#fff;letter-spacing: 0.14px;"> <div style="color:#fff;letter-spacing: 0.14px;">
<div >用户ID${params.data.id}</div> <div >用户ID${params.data.id}</div>
<div >用户名${params.data.name}</div> <div >用户名${params.data.nodeName}</div>
</div> </div>
</div>` </div>`
} }