From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 21 二月 2025 11:13:51 +0800
Subject: [PATCH] 新增可忽略的维修时间
---
web/src/views/modules/taskReliability/textDiagram.vue | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/web/src/views/modules/taskReliability/textDiagram.vue b/web/src/views/modules/taskReliability/textDiagram.vue
index 3c1f530..da0954d 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,
@@ -63,8 +61,7 @@
line: {
stroke: '#A2B1C3',
strokeWidth: 2,
- sourceMarker: 'none',
- targetMarker: 'none'
+ targetMarker: null,
}
},
tools: {
@@ -75,7 +72,7 @@
},
keyboard: true,
})
- this.graph.centerContent()
+ this.textGraph.centerContent()
Graph.registerNode(
'custom-rect',
@@ -276,15 +273,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