| | |
| | | </el-input> |
| | | </zt-form-item> |
| | | <zt-form-item > |
| | | <zt-button @click="getDiagram()">查看时序图</zt-button> |
| | | <zt-button @click="getDiagram(null)">查看时序图</zt-button> |
| | | </zt-form-item> |
| | | </el-form> |
| | | <div> |
| | |
| | | console.log(res.data) |
| | | this.simulatList = res.data |
| | | }, |
| | | async onTreeSelected(data) { |
| | | this.graph.unfreeze() |
| | | if (!this.dataForm.taskModelId) { |
| | | this.$alert("请先选择具体任务") |
| | | return |
| | | } |
| | | if (!this.dataForm.id) { |
| | | this.$alert("请先选择具体仿真记录") |
| | | return |
| | | } |
| | | let params = { |
| | | productId: data.id, |
| | | taskId: this.dataForm.taskModelId, |
| | | fzId: this.dataForm.id |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getStatus', {params: params}) |
| | | if (res.data !== null) { |
| | | this.diagramJson = JSON.parse(res.data) |
| | | console.log(this.diagramJson, 'this.Diagram json') |
| | | this.graph.fromJSON(this.diagramJson) |
| | | this.graph.positionContent('left') |
| | | //this.graph.zoomToFit() |
| | | this.graph.freeze() |
| | | } else { |
| | | this.graph.fromJSON(this.emptyJson) |
| | | //this.graph.centerContent() |
| | | //this.graph.zoomToFit() |
| | | this.graph.freeze() |
| | | } |
| | | console.log(res.data) |
| | | }, |
| | | |
| | | // 获取信息 |
| | | onProductSelected(data) { |
| | | this.isSelect = true |
| | |
| | | this.dataForm.samplPeriod = result.data.samplPeriod |
| | | this.dataForm.simulatFrequency = result.data.simulatFrequency |
| | | }, |
| | | async getDiagram() { |
| | | async onTreeSelected(data) { |
| | | this.getDiagram(data.id) |
| | | }, |
| | | async getDiagram(productId) { |
| | | this.graph.unfreeze() |
| | | let params = { |
| | | productId: this.dataForm.productId, |
| | | productId: productId ? productId : this.dataForm.productId, |
| | | taskId: this.dataForm.taskModelId, |
| | | fzId: this.dataForm.id, |
| | | smallWidth:1000, |
| | |
| | | console.log(this.diagramJson, 'this.Diagram json') |
| | | this.graph.fromJSON(this.diagramJson) |
| | | this.graph.centerContent() |
| | | this.graph.zoomToFit() |
| | | //this.graph.zoomToFit() |
| | | this.graph.freeze() |
| | | } else { |
| | | this.graph.fromJSON(this.emptyJson) |
| | | this.graph.centerContent() |
| | | this.graph.zoomToFit() |
| | | //this.graph.zoomToFit() |
| | | this.graph.freeze() |
| | | } |
| | | console.log(res.data) |
| | |
| | | border: 1px solid #dfe3e8; |
| | | width: 100% !important; |
| | | } |
| | | |
| | | #timeDiagram .x6-cell.x6-node { |
| | | cursor: inherit; |
| | | } |
| | | |
| | | .x6-graph-scroller.x6-graph-scroller-pannable { |
| | | width: 100% !important; |
| | | } |