Browse Source

Merge branch 'small-tupu' of http://124.70.32.114:3100/jianzhenyu/Changsha_tupu into hanyuqing

small-tupu
hanyuqing 6 months ago
parent
commit
a5161a7b06
  1. 32
      gyxtp/src/view/graphPageCopy0926.vue
  2. 17
      gyxtp/src/view/small.vue

32
gyxtp/src/view/graphPageCopy0926.vue

@ -437,7 +437,8 @@ export default {
docLevel: 'docLevel',
},
heightlightTable:[],
currentShowLeve:1,
currentShowLeve:2,
lastNodeL:"",
}
},
@ -973,13 +974,34 @@ export default {
let node = graphInstance.getNodeById(nodeObject.id)
let relinks = graphInstance.getLinesByNode(node);
// let links = graphInstance.getLinks();
//
// for (let i=0;i<links.length;i++){
// graphInstance.getLinks()[i].lineWidth = 1
// }
if (this.lastNodeL.id==node.id){
console.log("ss11111111")
for (let i=0;i<relinks.length;i++){
console.log(graphInstance.getLinesByNode(node)[i].lineWidth)
if (graphInstance.getLinesByNode(node)[i].lineWidth == 10){
graphInstance.getLinesByNode(node)[i].lineWidth = 1
}else {
graphInstance.getLinesByNode(node)[i].lineWidth = 10
}
}
return
}
if (this.lastNodeL!=""){
let a = graphInstance.getLinesByNode(this.lastNodeL);
for (let i=0;i<a.length;i++){
graphInstance.getLinesByNode(this.lastNodeL)[i].lineWidth = 1
}
}
for (let i=0;i<relinks.length;i++){
if (graphInstance.getLinesByNode(node)[i].lineWidth == 10){
graphInstance.getLinesByNode(node)[i].lineWidth = 1
}else{
graphInstance.getLinesByNode(node)[i].lineWidth = 10
}
}
this.lastNodeL = node
}
},
created() {

17
gyxtp/src/view/small.vue

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

Loading…
Cancel
Save