From 79eab76ac1b4b77696c92d72cfbde1e122c4c28f Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期一, 28 十月 2024 17:58:44 +0800
Subject: [PATCH] 关于修改可靠性产品重复

---
 web/src/views/modules/taskReliability/RBD-edit-img.vue |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/web/src/views/modules/taskReliability/RBD-edit-img.vue b/web/src/views/modules/taskReliability/RBD-edit-img.vue
index b818414..74bf82b 100644
--- a/web/src/views/modules/taskReliability/RBD-edit-img.vue
+++ b/web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -1026,7 +1026,7 @@
           this.graph.createNode({
             shape: 'image',
             //imageUrl: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=${item.imgPath}`,
-            width: 100,
+            width: 60,
             height: 70,
             //id: item.dataId, // 鎵嬪姩璁剧疆鑺傜偣鐨� ID
             data: {
@@ -1057,11 +1057,11 @@
             },
             attrs: {
               image: {
-                'xlink:href': `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getSvgImage?token=${Cookies.get('token')}&id=${item.imgPath}`,
+                'xlink:href': `${window.SITE_CONFIG['apiURL']}/basicInfo/XhProductModel/getImg?token=${Cookies.get('token')}&id=${item.dataId}&t=${new Date().getTime()}`,
                 //'xlink:href': urlObject.createObjectURL(new Blob([item.svgContent])),
               },
               title: {
-                text: item.basicUnitNum>=1?item.basicUnitNum:'',
+                text: item.basicUnitNum>1?item.basicUnitNum:'',
                 refX: 15,
                 refY: 10,
                 fill: '#748be7',
@@ -1739,7 +1739,7 @@
         let dragNodeType = dragNode.getData().nodeType
         let offHeight = 50
         if (dragNodeType === 'node') {
-          offHeight = 60
+          offHeight = 70
         } else if (dragNodeType === 'bridgeConnection') {
           offHeight = 175
         } else {
@@ -1797,13 +1797,13 @@
           this.getYRange(inEdges, graphNodeStartNode, pointXY)
           console.log(pointXY, 'new')
 
-          let minX = graphNodeStartNode.position().x + graphNode.getBBox().width + 15
-          let maxX = graphNode.position().x
+          let minX = graphNodeStartNode.position().x + graphNode.getBBox().width
+          let maxX = graphNode.position().x - dragNode.getBBox().width / 2
           let centerX = minX + (maxX - minX) / 2
           let centerY = graphNodeY + graphNode.getBBox().height / 2 - pointXY.minY > pointXY.maxY - (graphNodeY + graphNode.getBBox().height / 2) ?
             pointXY.maxY + offHeight / 2 + 30 : pointXY.minY - offHeight / 2 - 30
 
-          let result = this.addNodeAndConnect(null, dragNode, minX, centerY)
+          let result = this.addNodeAndConnect(null, dragNode, centerX, centerY)
           console.log(result, 'result111')
           this.graph.addEdge({
             source: {cell: graphNodeStartNode},
@@ -1844,8 +1844,8 @@
           leftTopY = centerY
         let dragNodeType = dragNode.getData().nodeType
         if (dragNodeType === 'node') {
-          width = 60
-          height = 60
+          width = 100
+          height = 70
         } else if (dragNodeType === 'dashedBox') {
           width = 60
           height = 40
@@ -1854,7 +1854,7 @@
           height = 175
         } else {
           width = 270
-          height = 60
+          height = 70
         }
         leftTopX = centerX - width / 2
         leftTopY = centerY - height / 2

--
Gitblit v1.9.1