| | |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | | this.init() |
| | | this.$refs.textDiagram.init() |
| | | this.$refs.timeDiagramThumbnail.init() |
| | | }, |
| | |
| | | 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, |
| | |
| | | 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', |
| | | { |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs.ProductModelTree.getProductList() |
| | | }) |
| | | this.init() |
| | | // this.init() |
| | | }, |
| | | onTaskSelected(data) { |
| | | console.log(data, ' onProductSelected(data)') |
| | |
| | | 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() |
| | | } |