From 7acc9ddf4e0ee4211c38d56dbf1e0c3cddffdad4 Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期一, 28 十月 2024 17:45:44 +0800 Subject: [PATCH] 修改 --- web/src/views/modules/taskReliability/TimeDiagram.vue | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/src/views/modules/taskReliability/TimeDiagram.vue b/web/src/views/modules/taskReliability/TimeDiagram.vue index 1361558..0d654f8 100644 --- a/web/src/views/modules/taskReliability/TimeDiagram.vue +++ b/web/src/views/modules/taskReliability/TimeDiagram.vue @@ -141,7 +141,9 @@ window.removeEventListener('scroll', this.handleScroll,true); }, mounted() { + // alert(`mounted鎵ц浜哷) this.getProductList() + this.init() this.$refs.textDiagram.init() this.$refs.timeDiagramThumbnail.init() }, @@ -162,8 +164,6 @@ this.$refs.timeDiagramThumbnail.getNodePointX(left,this.bigWidth) }, init() { - console.log(document.documentElement.clientWidth, 'document.documentElement.clientWidth') - console.log(document.documentElement.clientHeight, 'document.documentElement.clientHeight') this.graph = new Graph({ container: document.getElementById('timeDiagram'), // width: document.documentElement.clientWidth - 100, @@ -231,8 +231,7 @@ line: { stroke: '#A2B1C3', strokeWidth: 2, - sourceMarker: 'none', - targetMarker: 'none' + targetMarker: null, } }, tools: { @@ -246,8 +245,8 @@ this.knob = document.createElement('div',false) this.knob.style.position = 'absolute' document.getElementById('timeDiagram').appendChild(this.knob) - this.graph.centerContent() - + this.graph.positionContent('left',{ padding: { left: 0 }}) + // this.graph.centerContent() Graph.registerNode( 'custom-rect', { @@ -582,7 +581,7 @@ this.$nextTick(() => { this.$refs.ProductModelTree.getProductList() }) - this.init() + // this.init() }, onTaskSelected(data) { console.log(data, ' onProductSelected(data)') @@ -632,7 +631,8 @@ this.$refs.timeDiagramThumbnail.getThumbnail(smallDiagramJson) } else { this.graph.fromJSON(this.emptyJson) - this.graph.centerContent() + this.graph.positionContent('left',{ padding: { left: 0 }}) + // this.graph.centerContent() //this.graph.zoomToFit() this.graph.freeze() } -- Gitblit v1.9.1