From 27bf11e737fa1434d234e39db282ab52f3a32114 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 27 九月 2024 14:22:19 +0800
Subject: [PATCH] 修改

---
 web/src/views/modules/taskReliability/TimeDiagram.vue |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/web/src/views/modules/taskReliability/TimeDiagram.vue b/web/src/views/modules/taskReliability/TimeDiagram.vue
index 666a4e6..ca52c0e 100644
--- a/web/src/views/modules/taskReliability/TimeDiagram.vue
+++ b/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)

--
Gitblit v1.9.1