Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
老大叔也想要天天的爱情
DolphinScheduler
提交
be4fa728
DolphinScheduler
项目概览
老大叔也想要天天的爱情
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
be4fa728
编写于
1月 15, 2020
作者:
Z
zhukai
提交者:
qiaozhanwei
1月 15, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the bug #1816 (#1834)
上级
d02422d0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
22 deletion
+28
-22
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
...es/dag/_source/formModel/tasks/_source/dependItemList.vue
+28
-22
未找到文件。
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
浏览文件 @
be4fa728
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</x-option>
</x-option>
</x-select>
</x-select>
<x-select
filterable
:style=
"
{width:isInstance ? '450px' : '450px'}" :disabled="isDetails" v-model="el.definitionId" @on-change="_onChangeDefinitionId">
<x-select
filterable
:style=
"
{width:isInstance ? '450px' : '450px'}" :disabled="isDetails" v-model="el.definitionId" @on-change="_onChangeDefinitionId">
<x-option
v-for=
"item in definitionList"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
>
<x-option
v-for=
"item in
el.
definitionList"
:key=
"item.value"
:value=
"item.value"
:label=
"item.label"
>
</x-option>
</x-option>
</x-select>
</x-select>
<x-select
filterable
:style=
"
{width:isInstance ? '450px' : '450px'}" :disabled="isDetails" v-model="el.depTasks">
<x-select
filterable
:style=
"
{width:isInstance ? '450px' : '450px'}" :disabled="isDetails" v-model="el.depTasks">
...
@@ -64,7 +64,6 @@
...
@@ -64,7 +64,6 @@
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:
[],
definitionList
:
[],
projectList
:
[],
projectList
:
[],
cycleList
:
cycleList
,
cycleList
:
cycleList
,
isInstance
:
false
,
isInstance
:
false
,
...
@@ -88,16 +87,19 @@
...
@@ -88,16 +87,19 @@
_add
()
{
_add
()
{
// btn loading
// btn loading
this
.
isLoading
=
true
this
.
isLoading
=
true
// dependItemList index
let
is
=
(
value
)
=>
_
.
some
(
this
.
dependItemList
,
{
definitionId
:
value
})
let
noArr
=
_
.
filter
(
this
.
definitionList
,
v
=>
!
is
(
v
.
value
))
let
value
=
noArr
[
0
]
&&
noArr
[
0
].
value
||
null
let
val
=
value
||
this
.
definitionList
[
0
].
value
// add task list
// add task list
let
projectId
=
this
.
projectList
[
0
].
value
let
projectId
=
this
.
projectList
[
0
].
value
this
.
_getDependItemList
(
val
).
then
(
depTasksList
=>
{
this
.
_getProcessByProjectId
(
projectId
).
then
(
definitionList
=>
{
this
.
$nextTick
(()
=>
{
// dependItemList index
this
.
$emit
(
'
dependItemListEvent
'
,
_
.
concat
(
this
.
dependItemList
,
this
.
_rtNewParams
(
val
,
depTasksList
,
projectId
)))
let
is
=
(
value
)
=>
_
.
some
(
this
.
dependItemList
,
{
definitionId
:
value
})
let
noArr
=
_
.
filter
(
definitionList
,
v
=>
!
is
(
v
.
value
))
let
value
=
noArr
[
0
]
&&
noArr
[
0
].
value
||
null
let
val
=
value
||
definitionList
[
0
].
value
this
.
_getDependItemList
(
val
).
then
(
depTasksList
=>
{
this
.
$nextTick
(()
=>
{
this
.
$emit
(
'
dependItemListEvent
'
,
_
.
concat
(
this
.
dependItemList
,
this
.
_rtNewParams
(
val
,
definitionList
,
depTasksList
,
projectId
)))
})
})
})
})
})
// remove tooltip
// remove tooltip
...
@@ -131,25 +133,25 @@
...
@@ -131,25 +133,25 @@
*/
*/
_getProcessList
()
{
_getProcessList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
definitionList
=
_
.
map
(
_
.
cloneDeep
(
this
.
store
.
state
.
dag
.
processListS
),
v
=>
{
let
definitionList
=
_
.
map
(
_
.
cloneDeep
(
this
.
store
.
state
.
dag
.
processListS
),
v
=>
{
return
{
return
{
value
:
v
.
id
,
value
:
v
.
id
,
label
:
v
.
name
label
:
v
.
name
}
}
})
})
resolve
()
resolve
(
definitionList
)
})
})
},
},
_getProcessByProjectId
(
id
)
{
_getProcessByProjectId
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProjectId
'
,
{
projectId
:
id
}).
then
(
res
=>
{
this
.
store
.
dispatch
(
'
dag/getProcessByProjectId
'
,
{
projectId
:
id
}).
then
(
res
=>
{
this
.
definitionList
=
_
.
map
(
_
.
cloneDeep
(
res
),
v
=>
{
let
definitionList
=
_
.
map
(
_
.
cloneDeep
(
res
),
v
=>
{
return
{
return
{
value
:
v
.
id
,
value
:
v
.
id
,
label
:
v
.
name
label
:
v
.
name
}
}
})
})
resolve
(
res
)
resolve
(
definitionList
)
})
})
})
})
},
},
...
@@ -175,7 +177,7 @@
...
@@ -175,7 +177,7 @@
_onChangeProjectId
({
value
})
{
_onChangeProjectId
({
value
})
{
this
.
_getProcessByProjectId
(
value
).
then
(
definitionList
=>
{
this
.
_getProcessByProjectId
(
value
).
then
(
definitionList
=>
{
/*this.$set(this.dependItemList, this.itemIndex, this._dlOldParams(value, definitionList, item))*/
/*this.$set(this.dependItemList, this.itemIndex, this._dlOldParams(value, definitionList, item))*/
let
definitionId
=
definitionList
[
0
].
id
let
definitionId
=
definitionList
[
0
].
value
this
.
_getDependItemList
(
definitionId
).
then
(
depTasksList
=>
{
this
.
_getDependItemList
(
definitionId
).
then
(
depTasksList
=>
{
let
item
=
this
.
dependItemList
[
this
.
itemIndex
]
let
item
=
this
.
dependItemList
[
this
.
itemIndex
]
// init set depTasks All
// init set depTasks All
...
@@ -192,7 +194,7 @@
...
@@ -192,7 +194,7 @@
// init set depTasks All
// init set depTasks All
item
.
depTasks
=
'
ALL
'
item
.
depTasks
=
'
ALL
'
// set dependItemList item data
// set dependItemList item data
this
.
$set
(
this
.
dependItemList
,
this
.
itemIndex
,
this
.
_rtOldParams
(
value
,
depTasksList
,
item
))
this
.
$set
(
this
.
dependItemList
,
this
.
itemIndex
,
this
.
_rtOldParams
(
value
,
item
.
definitionList
,
depTasksList
,
item
))
})
})
},
},
_onChangeCycle
({
value
})
{
_onChangeCycle
({
value
})
{
...
@@ -200,10 +202,12 @@
...
@@ -200,10 +202,12 @@
this
.
$set
(
this
.
dependItemList
[
this
.
itemIndex
],
'
dateValue
'
,
list
[
0
].
value
)
this
.
$set
(
this
.
dependItemList
[
this
.
itemIndex
],
'
dateValue
'
,
list
[
0
].
value
)
this
.
$set
(
this
.
dependItemList
[
this
.
itemIndex
],
'
dateValueList
'
,
list
)
this
.
$set
(
this
.
dependItemList
[
this
.
itemIndex
],
'
dateValueList
'
,
list
)
},
},
_rtNewParams
(
value
,
de
pTasksList
,
projectId
)
{
_rtNewParams
(
value
,
de
finitionList
,
depTasksList
,
projectId
)
{
return
{
return
{
projectId
:
projectId
,
projectId
:
projectId
,
definitionId
:
value
,
definitionId
:
value
,
// dependItem need private definitionList
definitionList
:
definitionList
,
depTasks
:
'
ALL
'
,
depTasks
:
'
ALL
'
,
depTasksList
:
depTasksList
,
depTasksList
:
depTasksList
,
cycle
:
'
day
'
,
cycle
:
'
day
'
,
...
@@ -212,10 +216,12 @@
...
@@ -212,10 +216,12 @@
state
:
''
state
:
''
}
}
},
},
_rtOldParams
(
value
,
depTasksList
,
item
)
{
_rtOldParams
(
value
,
definitionList
,
depTasksList
,
item
)
{
return
{
return
{
projectId
:
item
.
projectId
,
projectId
:
item
.
projectId
,
definitionId
:
value
,
definitionId
:
value
,
// dependItem need private definitionList
definitionList
:
definitionList
,
depTasks
:
item
.
depTasks
||
'
ALL
'
,
depTasks
:
item
.
depTasks
||
'
ALL
'
,
depTasksList
:
depTasksList
,
depTasksList
:
depTasksList
,
cycle
:
item
.
cycle
,
cycle
:
item
.
cycle
,
...
@@ -254,12 +260,12 @@
...
@@ -254,12 +260,12 @@
this
.
isInstance
=
this
.
router
.
history
.
current
.
name
===
'
projects-instance-details
'
this
.
isInstance
=
this
.
router
.
history
.
current
.
name
===
'
projects-instance-details
'
// get processlist
// get processlist
this
.
_getProjectList
().
then
(()
=>
{
this
.
_getProjectList
().
then
(()
=>
{
let
projectId
=
this
.
projectList
[
0
].
value
if
(
!
this
.
dependItemList
.
length
)
{
if
(
!
this
.
dependItemList
.
length
)
{
let
projectId
=
this
.
projectList
[
0
].
value
this
.
_getProcessByProjectId
(
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProjectId
(
projectId
).
then
(
definitionList
=>
{
let
value
=
this
.
definitionList
[
0
].
value
let
value
=
definitionList
[
0
].
value
this
.
_getDependItemList
(
value
).
then
(
depTasksList
=>
{
this
.
_getDependItemList
(
value
).
then
(
depTasksList
=>
{
this
.
$emit
(
'
dependItemListEvent
'
,
_
.
concat
(
this
.
dependItemList
,
this
.
_rtNewParams
(
value
,
de
pTasksList
,
projectId
)))
this
.
$emit
(
'
dependItemListEvent
'
,
_
.
concat
(
this
.
dependItemList
,
this
.
_rtNewParams
(
value
,
de
finitionList
,
depTasksList
,
projectId
)))
})
})
})
})
}
else
{
}
else
{
...
@@ -269,7 +275,7 @@
...
@@ -269,7 +275,7 @@
this
.
_getDependItemList
(
ids
,
false
).
then
(
res
=>
{
this
.
_getDependItemList
(
ids
,
false
).
then
(
res
=>
{
_
.
map
(
this
.
dependItemList
,
(
v
,
i
)
=>
{
_
.
map
(
this
.
dependItemList
,
(
v
,
i
)
=>
{
this
.
_getProcessByProjectId
(
v
.
projectId
).
then
(
definitionList
=>
{
this
.
_getProcessByProjectId
(
v
.
projectId
).
then
(
definitionList
=>
{
this
.
$set
(
this
.
dependItemList
,
i
,
this
.
_rtOldParams
(
v
.
definitionId
,
[
'
ALL
'
].
concat
(
_
.
map
(
res
[
v
.
definitionId
]
||
[],
v
=>
v
.
name
)),
v
))
this
.
$set
(
this
.
dependItemList
,
i
,
this
.
_rtOldParams
(
v
.
definitionId
,
definitionList
,
[
'
ALL
'
].
concat
(
_
.
map
(
res
[
v
.
definitionId
]
||
[],
v
=>
v
.
name
)),
v
))
})
})
})
})
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录