jinlin
2024-09-27 27bf11e737fa1434d234e39db282ab52f3a32114
web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -42,7 +42,7 @@
        </div>
      </div>
    </el-row>
    <el-dialog v-dialogDrag title="模型设计" top="1vh" width='95%' :visible.sync="dialogVisible2" v-if="dialogVisible2">
    <el-dialog v-dialogDrag :title="title" top="1vh" width='95%' :visible.sync="dialogVisible2" v-if="dialogVisible2">
      <model-view ref="modelView"></model-view>
    </el-dialog>
  </div>
@@ -58,6 +58,7 @@
  export default {
    data() {
      return {
        title:'',
        knob:HTMLDivElement,
        dialogVisible2: false,
        timers: '',
@@ -136,7 +137,7 @@
          height: document.documentElement.clientHeight - 220,
          // async: true,
          grid: {
            visible: true,
            visible: false,
          },
          embedding: {
            enabled: true,
@@ -443,8 +444,9 @@
            this.dialogVisible2 = true
            let param = {
              id: node.getData().dataId,
              modelName: node.attr('label/textWrap/text'),
              modelName: node.attr('label/textWrap/modelName'),
            }
            this.title=node.attr('label/textWrap/modelName') + "模型设计"
            this.$nextTick(() => {
              this.$refs.modelView.init(param)
            })
@@ -536,13 +538,13 @@
          this.diagramJson = JSON.parse(res.data)
          console.log(this.diagramJson, 'this.Diagram json')
          this.graph.fromJSON(this.diagramJson)
          this.graph.centerContent()
          this.graph.zoomToFit()
          this.graph.positionContent('left')
          //this.graph.zoomToFit()
          this.graph.freeze()
        } else {
          this.graph.fromJSON(this.emptyJson)
          this.graph.centerContent()
          this.graph.zoomToFit()
          //this.graph.centerContent()
          //this.graph.zoomToFit()
          this.graph.freeze()
        }
        console.log(res.data)