This is an automated email from the ASF dual-hosted git repository.

chenxingchun pushed a commit to branch 1.3.2-release
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.2-release by this push:
     new 21eaf51  Optimize dag
     new c567ed5  Merge pull request #3419 from break60/1.3.2-release
21eaf51 is described below

commit 21eaf51e1b8fccfab478b87478643fb1bbd03b90
Author: break60 <[email protected]>
AuthorDate: Thu Aug 6 09:38:39 2020 +0800

    Optimize dag
---
 dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js       | 4 ++--
 dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue      | 6 +++---
 .../src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js      | 6 +++---
 .../src/js/conf/home/pages/dag/_source/plugIn/util.js               | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
index 5a41091..fef884c 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
@@ -118,8 +118,8 @@ Dag.prototype.toolbarEvent = function ({ item, code, is }) {
 Dag.prototype.backfill = function (arg) {
   if (arg) {
     let locationsValue = store.state.dag.locations
-    const locationsValue1 = store.state.dag.locations
-    const locationsValue2 = store.state.dag.locations
+    const locationsValue1 = _.cloneDeep(store.state.dag.locations)
+    const locationsValue2 = _.cloneDeep(store.state.dag.locations)
     const arr = []
     for (const i in locationsValue1) {
       const objs = {}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
index 25516bf..a73b1cb 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
@@ -522,9 +522,9 @@
         } else {
           rearList = []
         }
-        let targetarr = $(`#${id}`).attr('data-targetarr')
-        if (targetarr) {
-          let nodearr = targetarr.split(',')
+        let target = $(`#${id}`).attr('data-targetarr')
+        if (target) {
+          let nodearr = target.split(',')
           nodearr.forEach(v => {
             let nodeobj = {}
             nodeobj.value = $(`#${v}`).find('.name-p').text()
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
index 3e2d7d9..62fe764 100755
--- 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
+++ 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
@@ -687,14 +687,14 @@ JSP.prototype.saveStore = function () {
 
 JSP.prototype.handleEvent = function () {
   this.JspInstance.bind('beforeDrop', function (info) {
-    const sourceId = info.sourceId// 出
-    const targetId = info.targetId// 入
+    let sourceId = info['sourceId']// 出
+    let targetId = info['targetId']// 入
     /**
      * Recursive search for nodes
      */
     let recursiveVal
     const recursiveTargetarr = (arr, targetId) => {
-      for (const i in arr) {
+      for (let i in arr) {
         if (arr[i] === targetId) {
           recursiveVal = targetId
         } else {
diff --git 
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js 
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
index e4c78d2..d356ff3 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
@@ -32,7 +32,7 @@ const rtTargetarrArr = (id) => {
  */
 const saveTargetarr = (valId, domId) => {
   let $target = $(`#${domId}`)
-  let targetStr = $target.attr('data-targetarr') ? 
$target.attr('data-targetarr') + `,${valId}` : `${valId}`
+  let targetStr = $target.attr('data-targetarr') ? 
$target.attr('data-targetarr') + `,${valId}` : `${valId}`;
   $target.attr('data-targetarr', targetStr)
 }
 

Reply via email to