|
|
|
@ -23,7 +23,7 @@ import store from '@/conf/home/store'
|
|
|
|
|
* Node, to array |
|
|
|
|
*/ |
|
|
|
|
const rtTargetarrArr = (id) => { |
|
|
|
|
const ids = $(`#${id}`).attr('data-targetarr') |
|
|
|
|
let ids = $(`#${id}`).attr('data-targetarr') |
|
|
|
|
return ids ? ids.split(',') : [] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -31,8 +31,8 @@ const rtTargetarrArr = (id) => {
|
|
|
|
|
* Store node id to targetarr |
|
|
|
|
*/ |
|
|
|
|
const saveTargetarr = (valId, domId) => { |
|
|
|
|
const $target = $(`#${domId}`) |
|
|
|
|
const targetStr = $target.attr('data-targetarr') ? $target.attr('data-targetarr') + `,${valId}` : `${valId}` |
|
|
|
|
let $target = $(`#${domId}`) |
|
|
|
|
let targetStr = $target.attr('data-targetarr') ? $target.attr('data-targetarr') + `,${valId}` : `${valId}` |
|
|
|
|
$target.attr('data-targetarr', targetStr) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -66,9 +66,9 @@ const rtTasksTpl = ({ id, name, x, y, targetarr, isAttachment, taskType, runFlag
|
|
|
|
|
* Get all tasks nodes |
|
|
|
|
*/ |
|
|
|
|
const tasksAll = () => { |
|
|
|
|
const a = [] |
|
|
|
|
let a = [] |
|
|
|
|
$('#canvas .w').each(function (idx, elem) { |
|
|
|
|
const e = $(elem) |
|
|
|
|
let e = $(elem) |
|
|
|
|
a.push({ |
|
|
|
|
id: e.attr('id'), |
|
|
|
|
name: e.find('.name-p').text(), |
|
|
|
@ -117,10 +117,10 @@ const setSvgColor = (e, color) => {
|
|
|
|
|
* Get all node ids |
|
|
|
|
*/ |
|
|
|
|
const allNodesId = () => { |
|
|
|
|
const idArr = [] |
|
|
|
|
let idArr = [] |
|
|
|
|
$('.w').each((i, o) => { |
|
|
|
|
const $obj = $(o) |
|
|
|
|
const $span = $obj.find('.name-p').text() |
|
|
|
|
let $obj = $(o) |
|
|
|
|
let $span = $obj.find('.name-p').text() |
|
|
|
|
if ($span) { |
|
|
|
|
idArr.push({ |
|
|
|
|
id: $obj.attr('id'), |
|
|
|
|