diff --git a/gyxtp/src/view/graphPageCopy0926.vue b/gyxtp/src/view/graphPageCopy0926.vue index 08e06a0..89c3db5 100644 --- a/gyxtp/src/view/graphPageCopy0926.vue +++ b/gyxtp/src/view/graphPageCopy0926.vue @@ -295,7 +295,7 @@ export default { defaultExpandHolderSize: 16, defaultExpandHolderColor: '#fff', defaultExpandHolderBorder: '1px solid #00d7e0', - + isMoveByParentNode: true, allowSwitchLineShape: true, allowSwitchJunctionPoint: true, defaultLineColor: '#2E74B5', @@ -318,13 +318,14 @@ export default { layout: { layoutName: 'center', // 关键:使用 center 布局 from: 'center', // 从中心向外扩展 - levelDistance: '3000,3000,3000,3000,3000,3000,3000,3000', // 每一层的半径(可动态修改) - nodeDistance: 10, // 同一层节点间的最小角度间距(影响密度) - min_per_width: 200, // 最小水平间隔(角度相关) - max_per_width: 100, + levelDistance: '700,700,900,900,1000,1000,1000,1000', // 每一层的半径(可动态修改) + nodeDistance: 20, // 同一层节点间的最小角度间距(影响密度) + min_per_width: 300, // 最小水平间隔(角度相关) + max_per_width: 500, clockwise: true, // 是否顺时针排列 startAngle: -Math.PI / 2, // 起始角度(-90°,顶部开始) - preventOverlap: true // 防止重叠 + preventOverlap: true, // 防止重叠 + distance_coefficient: 5, } }, currentNode: {}, // 选中的节点对象 @@ -636,10 +637,10 @@ export default { const nodes = this.heightLight.nodes; const nodes1 = this.heightLight.nodes1; if (nodes==undefined){ - return ""; + return "nodeclassnormal"; } if (nodes.length === 0&&nodes1.length === 0) { - return ""; + return "nodeclassnormal"; } // 将传入的 id 转为字符串 const targetId = String(name).trim(); @@ -657,7 +658,7 @@ export default { found = found || found2 // 找到了返回 'nodeclass',否则返回 '' - return found ? 'nodeclass' : ''; + return found ? 'nodeclass' : 'nodeclassnormal'; }, getLinesClass(mergedDbIds) { console.log("44444444444444") @@ -824,42 +825,42 @@ export default { switch (levelNum) { case 0: color = 'rgb(227,203,0)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; break; case 1: color = 'rgb(47,47,230)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; break; case 2: color = 'rgb(255,138,0)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; break; case 3: color = 'rgb(30,255,0)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(0,0,0)'; break; case 4: color = 'rgb(248,143,248)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; break; case 5: color = 'rgb(65,154,255)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; break; case 6: color = 'rgb(0,228,255)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(0,0,0)'; break; default: color = 'rgb(200,200,200)'; - fontSize = '200px'; + fontSize = '30px'; fontColor = 'rgb(255,255,255)'; } @@ -871,6 +872,7 @@ export default { if (node.groupId==this.currentGroup || node.docLeve=="0"){ // 添加节点 nodes.push({ + fontSize:100, id: node.id, text: node.name, data: { @@ -881,10 +883,11 @@ export default { // x: x, // y: y, // fixed: true, - width: 150, - height: 150, + width: 220, + height: 220, color: color, font: `normal ${fontSize} Arial`, + // html:"