From d9b3b4b0ad0f4022cbb406a9fb3ad56a5e7f7ff3 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 02 八月 2024 17:31:33 +0800
Subject: [PATCH] 修改仿真

---
 web/src/views/modules/taskReliability/TimeDiagram.vue |   71 ++++++-----------------------------
 1 files changed, 13 insertions(+), 58 deletions(-)

diff --git a/web/src/views/modules/taskReliability/TimeDiagram.vue b/web/src/views/modules/taskReliability/TimeDiagram.vue
index 5d7577f..5275e55 100644
--- a/web/src/views/modules/taskReliability/TimeDiagram.vue
+++ b/web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -118,7 +118,7 @@
     },
     mounted() {
       this.getProductList()
-      this.init()
+
     },
     components: {
       ProductModelTree,
@@ -151,19 +151,6 @@
               })
             }
           },
-          // translating: {
-          //   restrict(view) {
-          //     const cell = view.cell
-          //     if (cell.isNode()) {
-          //       const parent = cell.getParent()
-          //       if (parent) {
-          //         return parent.getBBox()
-          //       }
-          //     }
-          //
-          //     return null
-          //   },
-          // },
           onToolItemCreated({tool}) {
             const handle = tool
             const options = handle.options
@@ -204,7 +191,6 @@
             },
             // anchor: 'center',
             connectionPoint: 'anchor',
-            allowBlank: false,
             snap: {
               radius: 20,
             },
@@ -230,14 +216,6 @@
                       text: ''
                     }
                   },
-                  // position: {
-                  //   distance: 0.5,
-                  //   angle: 180,
-                  //   options: {
-                  //     keepGradient: true,
-                  //     ensureLegibility: true
-                  //   }
-                  // }
                 }],
                 zIndex: 0,
               })
@@ -345,36 +323,11 @@
                 stroke: '#5F95FF',
                 fill: '#EFF4FF',
               },
-              // title:{
-              //   text:'',
-              //   refX: 40,
-              //   refY: 38,
-              //   fontSize: 20,
-              //   fill: '#262626',
-              //   'text-anchor': 'start',
-              // },
               text: {
-                // refX: 40,
-                // refY: 20,
                 fontSize: 20,
                 fill: '#262626',
-                // 'text-anchor': 'start',
               },
             },
-            // markup: [
-            //   {
-            //     tagName: 'polygon',
-            //     selector: 'body',
-            //   },
-            //   {
-            //     tagName: 'text',
-            //     selector: 'title',
-            //   },
-            //   {
-            //     tagName: 'text',
-            //     selector: 'text',
-            //   },
-            // ],
             ports: {
               ...this.ports
               // items: [
@@ -686,7 +639,10 @@
         })
 
         this.graph.on('blank:click', ({cell}) => {
+          // this.reset()
+          // this.type.value = "grid"
           this.type = 'grid'
+          // this.id = cell.id
         })
 
         this.graph.on('cell:click', ({cell}) => {
@@ -713,16 +669,14 @@
         // 鍗曞嚮node鑺傜偣
         this.graph.on('node:click', ({node}) => {
           // this.reset()
-          if (node.getData().dataId) {
-            this.dialogVisible2 = true
-            let param = {
-              id: node.getData().dataId,
-              modelName: node.attr('label/textWrap/text'),
-            }
-            this.$nextTick(() => {
-              this.$refs.rbdEditImg.init(param)
-            })
-          }
+          node.attr('line/stroke', '#5F95FF')
+          node.prop('labels/0', {
+            attrs: {
+              body: {
+                stroke: '#5F95FF',
+              },
+            },
+          })
         })
         // 鎺у埗杩炴帴妗╂樉绀�/闅愯棌
         this.graph.on('node:delete', ({view, e}) => {
@@ -873,6 +827,7 @@
         this.dataForm.simulatFrequency = result.data.simulatFrequency
       },
       async getDiagram() {
+        this.init()
         let params = {
           productId: this.dataForm.productId,
           taskId: this.dataForm.taskModelId,

--
Gitblit v1.9.1