Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yanghaoyuan.sh
DolphinScheduler
提交
a3788448
DolphinScheduler
项目概览
yanghaoyuan.sh
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
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,发现更多精彩内容 >>
未验证
提交
a3788448
编写于
4月 20, 2022
作者:
A
Amy0104
提交者:
GitHub
4月 20, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Fix][UI][V1.0.0-Beta] Fix the task name cleared after switching the task type. (#9623)
上级
93ee2e45
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
3 deletion
+17
-3
dolphinscheduler-ui-next/src/store/project/task-node.ts
dolphinscheduler-ui-next/src/store/project/task-node.ts
+9
-1
dolphinscheduler-ui-next/src/store/project/types.ts
dolphinscheduler-ui-next/src/store/project/types.ts
+1
-0
dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx
.../src/views/projects/task/components/node/detail-modal.tsx
+5
-1
dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx
...i-next/src/views/projects/task/components/node/detail.tsx
+1
-1
dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts
...-next/src/views/projects/task/components/node/use-task.ts
+1
-0
未找到文件。
dolphinscheduler-ui-next/src/store/project/task-node.ts
浏览文件 @
a3788448
...
...
@@ -32,7 +32,8 @@ export const useTaskNodeStore = defineStore({
postTaskOptions
:
[],
preTasks
:
[],
resources
:
[],
mainJars
:
{}
mainJars
:
{},
name
:
''
}),
persist
:
true
,
getters
:
{
...
...
@@ -50,6 +51,9 @@ export const useTaskNodeStore = defineStore({
},
getMainJar
(
state
)
{
return
(
type
:
ProgramType
):
IMainJar
[]
|
undefined
=>
state
.
mainJars
[
type
]
},
getName
():
string
{
return
this
.
name
}
},
actions
:
{
...
...
@@ -116,12 +120,16 @@ export const useTaskNodeStore = defineStore({
updateMainJar
(
type
:
ProgramType
,
mainJar
:
IMainJar
[])
{
this
.
mainJars
[
type
]
=
mainJar
},
updateName
(
name
:
string
)
{
this
.
name
=
name
},
init
()
{
this
.
preTaskOptions
=
[]
this
.
postTaskOptions
=
[]
this
.
preTasks
=
[]
this
.
resources
=
[]
this
.
mainJars
=
{}
this
.
name
=
''
}
}
})
dolphinscheduler-ui-next/src/store/project/types.ts
浏览文件 @
a3788448
...
...
@@ -36,6 +36,7 @@ interface TaskNodeState {
preTasks
:
number
[]
resources
:
IResource
[]
mainJars
:
{
[
key
in
ProgramType
]?:
IMainJar
[]
}
name
:
string
}
export
{
TaskNodeState
,
...
...
dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx
浏览文件 @
a3788448
...
...
@@ -39,6 +39,8 @@ import {
import
{
NIcon
}
from
'
naive-ui
'
import
{
TASK_TYPES_MAP
}
from
'
../../constants/task-type
'
import
{
Router
,
useRouter
}
from
'
vue-router
'
import
{
querySubProcessInstanceByTaskCode
}
from
'
@/service/modules/process-instances
'
import
{
useTaskNodeStore
}
from
'
@/store/project/task-node
'
import
type
{
ITaskData
,
ITaskType
,
...
...
@@ -46,7 +48,6 @@ import type {
IWorkflowTaskInstance
,
WorkflowInstance
}
from
'
./types
'
import
{
querySubProcessInstanceByTaskCode
}
from
'
@/service/modules/process-instances
'
const
props
=
{
show
:
{
...
...
@@ -92,6 +93,8 @@ const NodeDetailModal = defineComponent({
setup
(
props
,
{
emit
})
{
const
{
t
,
locale
}
=
useI18n
()
const
router
:
Router
=
useRouter
()
const
taskStore
=
useTaskNodeStore
()
const
renderIcon
=
(
icon
:
any
)
=>
{
return
()
=>
h
(
NIcon
,
null
,
{
default
:
()
=>
h
(
icon
)
})
}
...
...
@@ -203,6 +206,7 @@ const NodeDetailModal = defineComponent({
async
()
=>
{
if
(
!
props
.
show
)
return
initHeaderLinks
(
props
.
processInstance
,
props
.
data
.
taskType
)
taskStore
.
init
()
await
nextTick
()
detailRef
.
value
.
value
.
setValues
(
formatModel
(
props
.
data
))
}
...
...
dolphinscheduler-ui-next/src/views/projects/task/components/node/detail.tsx
浏览文件 @
a3788448
...
...
@@ -35,7 +35,6 @@ const NodeDetail = defineComponent({
emits
:
[
'
taskTypeChange
'
],
setup
(
props
,
{
expose
,
emit
})
{
const
taskStore
=
useTaskNodeStore
()
taskStore
.
init
()
const
formRef
=
ref
()
const
detailData
:
IDetailPanel
=
inject
(
'
data
'
)
||
{
...
...
@@ -58,6 +57,7 @@ const NodeDetail = defineComponent({
watch
(
()
=>
model
.
taskType
,
async
(
taskType
)
=>
{
taskStore
.
updateName
(
model
.
name
||
''
)
emit
(
'
taskTypeChange
'
,
taskType
)
}
)
...
...
dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts
浏览文件 @
a3788448
...
...
@@ -65,6 +65,7 @@ export function useTask({
const
{
model
,
json
}
=
nodes
[
data
.
taskType
||
'
SHELL
'
](
params
)
jsonRef
.
value
=
json
model
.
preTasks
=
taskStore
.
getPreTasks
model
.
name
=
taskStore
.
getName
const
getElements
=
()
=>
{
const
{
rules
,
elements
}
=
getElementByJson
(
jsonRef
.
value
,
model
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录