mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 05:09:48 +08:00
Optimize dag
This commit is contained in:
parent
43eb39767a
commit
21eaf51e1b
@ -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 = {}
|
||||
|
@ -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()
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user