-
跳转1
+
+ 跳转1
+
关键字:
-
查询
@@ -102,16 +104,10 @@ export default {
onCreated(editor) {
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
},
- // getInfo(){
- // var data = {}
- // getgraphInfo(data).then((res)=>{
- // this.zhengl(res.data);
- //
- // })
- // },
getInfo() {
+ this.graphData = undefined;
+ this.demoData = {}
- this.data = undefined;
if (this.keywords != '' && this.keywords != undefined) {
this.visGraph.clearAll();
let params = {
@@ -123,7 +119,28 @@ export default {
} else {
let params = {};
+ getgraphInfo(params).then((res) => {
+ this.zhengl(res.data);
+ })
+ }
+
+ },
+ getInfo1() {
+ this.graphData = undefined;
+ this.demoData = {}
+
+ if (this.keywords != '' && this.keywords != undefined) {
+ this.visGraph.clearAll();
+ let params = {
+ nodename: this.keywords,
+ };
+ getgraphInfo(params).then((res) => {
+ this.zhengl(res.data);
+ })
+ } else {
+ this.visGraph.clearAll();
+ let params = {};
getgraphInfo(params).then((res) => {
this.zhengl(res.data);
})
@@ -131,24 +148,20 @@ export default {
},
+
async drawGraphData() {
this.graphData = this.demoData;
if (this.visGraph === null) {
this.createGraph();
// this.genrateGraphData();
this.visGraph.drawData(this.graphData);
- // this.refreshGraphData();
this.visGraph.incremaNodesCodinate(this.graphData.nodes);
this.reLayout();
- // this.goCenter();
} else {
this.createGraph();
-
this.visGraph.drawData(this.graphData);
- // this.refreshGraphData();
this.visGraph.incremaNodesCodinate(this.graphData.nodes);
this.reLayout();
- // this.goCenter();
}
this.loading = false;
@@ -167,8 +180,6 @@ export default {
this.visGraph = new VisGraph(document.getElementById('graph-panel'), configWithEvents);
},
async showPopup(node) {
- console.log("o----------")
- console.log(node)
this.selectedNode = node;
this.newBranchParentId = node.properties.docId;
this.newBranchLevel = parseInt(node.properties.level) + 1;
@@ -344,8 +355,8 @@ export default {
return styles[group] || {};
},
- testInfo(){
- test().then((res)=>{
+ testInfo() {
+ test().then((res) => {
console.log(res);
})
}