Browse Source

yangshi

small-tupu
菅振宇 6 months ago
parent
commit
1764e529f2
  1. 10
      gyxtp/src/view/graphPageCopy0926.vue
  2. 17
      gyxtp/src/view/small.vue

10
gyxtp/src/view/graphPageCopy0926.vue

@ -970,13 +970,13 @@ export default {
const graphInstance = this.$refs.graphRef.getInstance(); const graphInstance = this.$refs.graphRef.getInstance();
let node = graphInstance.getNodeById(nodeObject.id) let node = graphInstance.getNodeById(nodeObject.id)
let relinks = graphInstance.getLinesByNode(node); let relinks = graphInstance.getLinesByNode(node);
let links = graphInstance.getLinks();
for (let i=0;i<links.length;i++){
graphInstance.getLinks()[i].lineWidth = 1
}
for (let i=0;i<relinks.length;i++){ for (let i=0;i<relinks.length;i++){
if (graphInstance.getLinesByNode(node)[i].lineWidth == 10){ graphInstance.getLinesByNode(node)[i].lineWidth = 10
graphInstance.getLinesByNode(node)[i].lineWidth = 1
}else{
graphInstance.getLinesByNode(node)[i].lineWidth = 10
}
} }
} }
}, },

17
gyxtp/src/view/small.vue

@ -447,16 +447,16 @@ export default {
for (let i = 0; i < res.nodes.length; i++) { for (let i = 0; i < res.nodes.length; i++) {
const node = res.nodes[i]; const node = res.nodes[i];
// text // // text
if (node.type === "keyword" && node.text !== this.getpoinName) { // if (node.type === "keyword" && node.text !== this.getpoinName) {
continue; // continue;
} // }
// num // num
const totalNum = totalNumMap[node.id]; const totalNum = totalNumMap[node.id];
// totalNum // totalNum
const baseSize = 120; // const baseSize = 150; //
const sizePerNum = 40; // num const sizePerNum = 40; // num
const maxSize = 300; // const maxSize = 300; //
@ -471,7 +471,7 @@ export default {
height: height, height: height,
color: this.getColor(node.type), color: this.getColor(node.type),
fontColor: '#fff', fontColor: '#fff',
styleClass:"nodeClass" styleClass:node.type=="keyword"?"nodeClassL1":"nodeClass"
}; };
nodes.push(t_data); nodes.push(t_data);
@ -524,7 +524,10 @@ export default {
<style> <style>
.nodeClass{ .nodeClass{
font-size: 30px; font-size: 26px;
}
.nodeClassL1{
font-size: 33px;
} }
/*****页面主要布局样式定义******/ /*****页面主要布局样式定义******/
.graph-nav { .graph-nav {

Loading…
Cancel
Save