From 26ebef24f023a80f5be5ff27c93585f70688f6ee Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期二, 22 十月 2024 14:45:39 +0800
Subject: [PATCH] 关于修改可靠性产品重复
---
web/src/views/modules/taskReliability/textDiagram.vue | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/web/src/views/modules/taskReliability/textDiagram.vue b/web/src/views/modules/taskReliability/textDiagram.vue
index 3c1f530..2fb3627 100644
--- a/web/src/views/modules/taskReliability/textDiagram.vue
+++ b/web/src/views/modules/taskReliability/textDiagram.vue
@@ -9,14 +9,12 @@
name: "textDiagram",
data(){
return{
- graph:null,
+ textGraph:null,
}
},
methods:{
init() {
- console.log(document.documentElement.clientWidth, 'document.documentElement.clientWidth')
- console.log(document.documentElement.clientHeight, 'document.documentElement.clientHeight')
- this.graph = new Graph({
+ this.textGraph = new Graph({
container: document.getElementById('textDiagram'),
// width:250,
height: document.documentElement.clientHeight - 440,
@@ -75,7 +73,7 @@
},
keyboard: true,
})
- this.graph.centerContent()
+ this.textGraph.centerContent()
Graph.registerNode(
'custom-rect',
@@ -276,15 +274,15 @@
)
},
getTextDiagram(diagramJson){
- this.graph.unfreeze()
- this.graph.fromJSON(diagramJson)
- this.graph.positionContent('left',{ padding: { left: 0 }})
- this.graph.freeze()
- // this.graph.centerContent()
- // this.graph.zoomToFit()
+ this.textGraph.unfreeze()
+ this.textGraph.fromJSON(diagramJson)
+ this.textGraph.positionContent('left',{ padding: { left: 0 }})
+ this.textGraph.freeze()
+ // this.textGraph.centerContent()
+ // this.textGraph.zoomToFit()
},
setScroll(top){
- this.graph.setScrollbarPosition(null, top)
+ this.textGraph.setScrollbarPosition(null, top)
}
},
}
--
Gitblit v1.9.1