Преглед изворни кода

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/components/business/process/node-modal/node-modal.vue
sh4wmoo пре 2 година
родитељ
комит
8a76d64749
2 измењених фајлова са 25 додато и 4 уклоњено
  1. 7 1
      src/view/mst/product-view/config/ProductView.js
  2. 18 3
      src/view/mst/product-view/form.vue

+ 7 - 1
src/view/mst/product-view/config/ProductView.js

@@ -33,13 +33,14 @@ export default class Product {
   static graphJson = null //图形对象
   static deleteNodeList = null//被删除节点
   static nodeClickValue = null//点击节点
+  static nodeChangeMethod = null//节点改变
   static graph = null //图形对象
   static embedPadding = 30 // 触发群组动态调整大小的padding
   ctrlPressed = false//ctrl键是是否按下
 
 
   // region 初始化图形
-  static init(dom, graphJson, deleteNodeList, nodeClickValue, readonly = false) {
+  static init(dom, graphJson, deleteNodeList, nodeClickValue, nodeChange, readonly = false) {
     if (this.graph){
       //销毁画布
       this.graph.dispose()
@@ -48,6 +49,7 @@ export default class Product {
     this.graphJson = graphJson
     this.deleteNodeList = deleteNodeList
     this.nodeClickValue = nodeClickValue
+    this.nodeChangeMethod = nodeChange
     // region 画布配置
     this.graph = new Graph({
       container: dom,//获取节点
@@ -486,6 +488,8 @@ export default class Product {
       if (children && children.length) {
         node.prop('originSize', node.getSize())
       }
+
+      this.nodeChangeMethod(node)
     })
 
     this.graph.on('node:change:position', ({ node, options }) => {
@@ -555,6 +559,8 @@ export default class Product {
           )
         }
       }
+
+      this.nodeChangeMethod(node)
     })
     // endregion
 

+ 18 - 3
src/view/mst/product-view/form.vue

@@ -56,7 +56,7 @@
 
       <!--画布-->
       <DkPanel id="name3" prop="productGraph">
-        <DkRow slot="content" style=" height: 550px;overflow: auto">
+        <DkRow slot="content" style="width:1680px;height: 550px;overflow: auto;">
           <Layout>
             <!--   左侧工具栏   -->
             <Sider :width="180">
@@ -65,7 +65,7 @@
             <Layout>
               <!--   中间流程图  -->
               <Content>
-                <div id="container" ref="container" style="width:100%;height:100%"/>
+                <div id="container" ref="container" style="width:1500px;height:500px"/>
               </Content>
             </Layout>
           </Layout>
@@ -202,6 +202,9 @@
         },
         (val) => {
           this.getNodeClick(val)
+        },
+        (val) => {
+          this.changeNode(val)
         }
       )
     },
@@ -256,6 +259,14 @@
         this.$refs.imageColumnTable.$refs.xTable.setCurrentRow(this.imageColumnList.filter(f => f.placeRangeId == val.id)[0])
       },
       /**
+       * @desc   : 节点改变
+       * @author : 洪旭东
+       * @date   : 2023-07-17 10:24
+       */
+      changeNode(val){
+        this.imageColumnList.filter(f => f.placeRangeId == val.id)[0].placeRange = val
+      },
+      /**
        *   @desc   : 打开文件上传
        *   @date   : 2023/2/8 10:08
        *   @author : 寇珊珊
@@ -321,7 +332,11 @@
               this.getDeleteNodeList(val)
             }, (val) => {
               this.getNodeClick(val)
-            })
+            },
+              (val) => {
+                this.changeNode(val)
+              }
+            )
             this.graph.fromJSON(this.fileList[index].placeRange)
           }
           //清空图片表单