Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
1fcf553e
Commit
1fcf553e
authored
Dec 04, 2024
by
冷玲鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调度执行:修改页面bug
parent
8c4e2041
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
413 additions
and
316 deletions
+413
-316
index.vue
src/views/taskScheduling/taskFlow/index.vue
+4
-4
mock.ts
src/views/taskScheduling/taskFlow/mock.ts
+9
-9
defineEvent.vue
src/views/taskScheduling/taskFlowDesign/defineEvent.vue
+177
-229
design.data.ts
src/views/taskScheduling/taskFlowDesign/design.data.ts
+206
-42
taskConfigModel.vue
src/views/taskScheduling/taskFlowDesign/taskConfigModel.vue
+17
-32
No files found.
src/views/taskScheduling/taskFlow/index.vue
View file @
1fcf553e
...
...
@@ -91,7 +91,7 @@
tooltip:'详情',
onClick: handleConsanguinity.bind(null, record),
ifShow: () => {
return record.releaseStatus !== '
父级
'; // 这里只是实现树文件夹按钮
return record.releaseStatus !== ''; // 这里只是实现树文件夹按钮
},
},
{
...
...
@@ -107,7 +107,7 @@
tooltip:'下线',
onClick: handleOnline.bind(null, record),
ifShow: () => {
return record.releaseStatus !== '
父级
'; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
},
},
{
...
...
@@ -115,7 +115,7 @@
tooltip:'发布',
onClick: apiDetail.bind(null, record),
ifShow: () => {
return record.releaseStatus !== '
父级
'; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
},
},
{
...
...
@@ -123,7 +123,7 @@
tooltip:'检查?',
onClick: handleOffline.bind(null, record),
ifShow: () => {
return record.releaseStatus !== '
父级
'; // 这里只是实现树文件夹按钮
return record.releaseStatus !== ''; // 这里只是实现树文件夹按钮
},
},
]"
...
...
src/views/taskScheduling/taskFlow/mock.ts
View file @
1fcf553e
...
...
@@ -122,7 +122,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'theme'
,
...
...
@@ -136,7 +136,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'theme'
,
...
...
@@ -150,7 +150,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -164,7 +164,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -178,7 +178,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -192,7 +192,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -206,7 +206,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -220,7 +220,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
@@ -234,7 +234,7 @@ export const tableList: any[] = [
updateDate
:
'2023/07/10 10:49:38'
,
businessTag
:
'_'
,
owner
:
'admin'
,
releaseStatus
:
'
父级
'
,
releaseStatus
:
''
,
task
:
null
,
type
:
'twoLevel'
,
...
...
src/views/taskScheduling/taskFlowDesign/defineEvent.vue
View file @
1fcf553e
...
...
@@ -7,268 +7,216 @@
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
checkFrequency=
"
{ field, model }">
<Input
style=
"width: 180px"
v-model:value=
"model[field]"
placeholder=
"请输入"
/>
<Select
style=
"width: 180px; margin-left: 20px"
placeholder=
"请选择"
v-model:value=
"model['checkFrequencys']"
:options=
"timeList"
/>
<template
#
checkFrequency=
"
{ field,model,}">
<Input
style=
"width: 180px;"
v-model:value=
"model[field]"
placeholder=
"请输入"
/>
<Select
style=
"width: 180px;margin-left: 20px"
placeholder=
"请选择"
v-model:value=
"model['checkFrequencys']"
:options=
"timeList"
/>
</
template
>
<
template
#
triggerType=
"{ field, fields, model }"
>
<RadioGroup
v-model:value=
"model[field]"
:options=
"triggerTypeOptions"
style=
"margin: 5px 15px 0 0"
/>
<
template
#
triggerType=
"{ field,fields,model }"
>
<RadioGroup
v-model:value=
"model[field]"
:options=
"triggerTypeOptions"
style=
"margin: 5px 15px 0 0"
/>
<div
v-if=
"model[field] === '文件到达'"
style=
"margin: 25px 0 0 0"
>
<Alert
type=
"info"
:message=
"
'①任务流发布后,监听程序将按照检查频率一直监听文件系统的文件夹路径下的' +
'所有的资源的变化(新增、更新),每次变动均会触发任务流的执行\n'
"
'所有的资源的变化(新增、更新),每次变动均会触发任务流的执行\n'"
:style=
"
{ whiteSpace: 'pre-line' }"
/>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
文件系统源
</div>
<Select
:options=
"fileSystemSourceOptions"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
文件路径
</div>
<Input
.
Group
>
<FormItemRest>
<Input
style=
"width: 400px"
/>
</FormItemRest>
<FormItemRest>
<a-button
style=
"width: 85px"
>
浏览
</a-button>
</FormItemRest>
</Input
.Group
>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
目标对象
</div>
<Input
.
Group
>
<FormItemRest>
<Select
style=
"width: 200px"
:options=
"targetObject"
/>
</FormItemRest>
<FormItemRest>
<Input
style=
"width: 285px"
/>
</FormItemRest>
</Input
.Group
>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
超时设置
</div>
<Checkbox
style=
"margin-left: -15px"
>
超时失败
</Checkbox>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
报存结果
</div>
<div>
<Checkbox
v-model:checked=
"model[fields]"
style=
"width: 60px"
>
保存
</Checkbox>
</div>
<Select
v-if=
"model[fields]"
style=
"width: 160px"
:options=
"saveResultName"
/>
<Select
v-if=
"model[fields]"
style=
"width: 160px"
:options=
"saveResultObject"
/>
</div>
</div>
<div
v-if=
"model[field] === 'SQL结果检查'"
style=
"margin: 25px 0 0 0"
>
<Alert
type=
"info"
:message=
"
'①任务流发布后,监听程序将按照检查频率定期执行SQL判断结果是否符合预' +
'期,若在当时时间窗口已满足,则当前窗口内将不再监听\n'
"
'期,若在当时时间窗口已满足,则当前窗口内将不再监听\n'"
:style=
"
{ whiteSpace: 'pre-line' }"
/>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
开始时间
</div>
<TimePicker
style=
"width: 100%"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
滚动时间窗口
</div>
<Input
style=
"width: 320px"
/>
<Select
style=
"width: 180px"
:options=
"timeList"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
超时设置
</div>
<Checkbox
style=
"margin-left: -15px"
>
超时失败
</Checkbox>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
连接
</div>
<Select
:options=
"JDBCData"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
SQL
</div>
<Textarea
rows=
"6"
placeholder=
"事件满足取决于当前sql返回结果是否为空,若无返回结果则判断事件条件未达成:此处支持引用任务流参数、工作区参数、全局参数"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
报存结果
</div>
<div>
<Checkbox
v-model:checked=
"model[fields]"
style=
"width: 60px"
>
保存
</Checkbox>
</div>
<Select
v-if=
"model[fields]"
style=
"width: 160px"
:options=
"saveResultName"
/>
<Select
v-if=
"model[fields]"
style=
"width: 160px"
:options=
"saveResultObject"
/>
</div>
</div>
<div
v-if=
"model[field] === '脚本自定义'"
style=
"margin: 25px 0 0 0"
>
<Alert
type=
"info"
:message=
"
'①任务流发布后,监听程序将按照检查频率定期执行脚本判断结果是否复合预' +
'期,若在当前时间窗口已满足,则当前窗口内将不在监听\n'
"
'期,若在当前时间窗口已满足,则当前窗口内将不在监听\n'"
:style=
"
{ whiteSpace: 'pre-line' }"
/>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
开始时间
</div>
<TimePicker
style=
"width: 100%"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
滚动时间窗口
</div>
<Input
style=
"width: 320px"
/>
<Select
style=
"width: 180px"
:options=
"timeList"
/>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
超时设置
</div>
<Checkbox
style=
"margin-left: -15px"
>
超时失败
</Checkbox>
</div>
<div
style=
"display: flex; margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
脚本内容
</div>
<Textarea
rows=
"6"
placeholder=
"脚本运行成功,即满足,因此判断逻辑由用户确定"
/>
</div>
</div>
</
template
>
<
template
#
fileSystemSource=
"{ field,model }"
>
<Select
v-model:value=
"model[field]"
:options=
"fileSystemSourceOptions"
placeholder=
"请选择"
/>
</
template
>
<
template
#
filePath=
"{ field,model }"
>
<Input
.
Group
>
<FormItemRest>
<Input
v-model:value=
"model[field]"
style=
"width: 400px"
/>
</FormItemRest>
<FormItemRest>
<a-button
style=
"width: 85px"
>
浏览
</a-button>
</FormItemRest>
</Input
.Group
>
</
template
>
<
template
#
targetObject=
"{ field,model }"
>
<Input
.
Group
>
<FormItemRest>
<Select
v-model:value=
"model['targetObject']"
style=
"width: 200px"
:options=
"targetObject"
/>
</FormItemRest>
<FormItemRest>
<Input
v-model:value=
"model[field]"
style=
"width: 285px"
/>
</FormItemRest>
</Input
.Group
>
</
template
>
<
template
#
saveResults=
"{ field,model }"
>
<div
style=
"display: flex;"
>
<Checkbox
v-model:checked=
"model[field]"
style=
"width: 60px"
>
<span>
保存
</span>
</Checkbox>
<Select
v-if=
"model[field]"
style=
"width: 160px"
:options=
"saveResultName"
/>
<Select
v-if=
"model[field]"
style=
"width: 160px"
:options=
"saveResultObject"
/>
</div>
</
template
>
<
template
#
rollingTimeWindow=
"{ field,model }"
>
<Input
style=
"width: 50%;"
v-model:value=
"model[field]"
/>
<Select
style=
"width: 50%;"
v-model:value=
"model['timeList']"
:options=
"timeList"
/>
</
template
>
<
template
#
saveResultsT=
"{ field,model }"
>
<div
style=
"display: flex;"
>
<Checkbox
v-model:checked=
"model[field]"
style=
"width: 60px"
>
<span>
保存
</span>
</Checkbox>
<Select
v-if=
"model[field]"
style=
"width: 160px"
:options=
"saveResultName"
/>
<Select
v-if=
"model[field]"
style=
"width: 160px"
:options=
"saveResultObject"
/>
</div>
</
template
>
<
template
#
rollingTimeWindowT=
"{ field,model }"
>
<Input
style=
"width: 50%;"
v-model:value=
"model[field]"
/>
<Select
style=
"width: 50%;"
v-model:value=
"model['timeList']"
:options=
"timeList"
/>
</
template
>
</BasicForm>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
defineEvent
}
from
'@/views/taskScheduling/taskFlowDesign/design.data'
;
import
{
FormItemRest
,
Input
,
Select
,
RadioGroup
,
Alert
,
Textarea
,
Checkbox
,
CheckboxGroup
,
TimePicker
,
}
from
'ant-design-vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
ref
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
"@/components/Form"
;
import
{
defineEvent
}
from
"@/views/taskScheduling/taskFlowDesign/design.data"
;
import
{
FormItemRest
,
Input
,
Select
,
RadioGroup
,
Alert
,
Textarea
,
Checkbox
,
CheckboxGroup
,
TimePicker
}
from
"ant-design-vue"
;
import
Icon
from
"@/components/Icon/Icon.vue"
;
const
getTitle
=
'定义事件'
;
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
okText
:
'确定'
,
});
await
resetFields
();
});
//初始化列表
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
120
,
schemas
:
defineEvent
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
okText
:
'确定'
,
});
await
resetFields
();
});
//初始化列表
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
120
,
schemas
:
defineEvent
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
triggerTypeOptions
=
[
{
label
:
'文件到达'
,
value
:
'文件到达'
,
},
{
label
:
'SQL结果检查'
,
value
:
'SQL结果检查'
,
},
{
label
:
'脚本自定义'
,
value
:
'脚本自定义'
,
},
];
const
fileSystemSourceOptions
=
[
{
label
:
'HDFS'
,
value
:
'HDFS'
,
},
{
label
:
'FTP'
,
value
:
'FTP'
,
},
{
label
:
'SFTP'
,
value
:
'SFTP'
,
},
];
const
targetObject
=
[
{
label
:
'资源名称'
,
value
:
'资源名称'
,
},
{
label
:
'文件全称'
,
value
:
'文件全称'
,
},
];
const
saveResult
=
[
{
label
:
'保存'
,
value
:
'保存'
,
},
{
label
:
'不保存'
,
value
:
'不保存'
,
},
];
const
saveResultName
=
[
{
label
:
'任务流参数'
,
value
:
'任务流参数'
,
},
{
label
:
'全局参数'
,
value
:
'全局参数'
,
},
{
label
:
'工作区参数'
,
value
:
'工作区参数'
,
},
];
const
saveResultObject
=
[
{
label
:
'test1'
,
value
:
'test1'
,
},
{
label
:
'test2'
,
value
:
'test2'
,
},
];
const
timeList
=
[
{
value
:
'1'
,
label
:
'小时'
},
{
value
:
'2'
,
label
:
'分钟'
},
{
value
:
'3'
,
label
:
'秒'
},
];
const
triggerTypeOptions
=
[
{
label
:
'文件到达'
,
value
:
'文件到达'
,
},
{
label
:
'SQL结果检查'
,
value
:
'SQL结果检查'
,
},
{
label
:
'脚本自定义'
,
value
:
'脚本自定义'
,
},
];
const
fileSystemSourceOptions
=
[
{
label
:
'HDFS'
,
value
:
'HDFS'
,
},
{
label
:
'FTP'
,
value
:
'FTP'
,
},
{
label
:
'SFTP'
,
value
:
'SFTP'
,
},
];
const
targetObject
=
[
{
label
:
'资源名称'
,
value
:
'资源名称'
,
},
{
label
:
'文件全称'
,
value
:
'文件全称'
,
},
];
const
saveResult
=
[
{
label
:
'保存'
,
value
:
'保存'
,
},
{
label
:
'不保存'
,
value
:
'不保存'
,
},
];
const
saveResultName
=
[
{
label
:
'任务流参数'
,
value
:
'任务流参数'
,
},
{
label
:
'全局参数'
,
value
:
'全局参数'
,
},
{
label
:
'工作区参数'
,
value
:
'工作区参数'
,
},
];
const
saveResultObject
=
[
{
label
:
'test1'
,
value
:
'test1'
,
},
{
label
:
'test2'
,
value
:
'test2'
,
},
];
const
timeList
=
[
{
value
:
'1'
,
label
:
'小时'
},
{
value
:
'2'
,
label
:
'分钟'
},
{
value
:
'3'
,
label
:
'秒'
},
];
const
JDBCData
=
[
{
value
:
'1'
,
label
:
'192.168.11.3'
},
{
value
:
'2'
,
label
:
'192.168.96.3'
},
{
value
:
'3'
,
label
:
'192.168.1.32'
},
];
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
</
script
>
src/views/taskScheduling/taskFlowDesign/design.data.ts
View file @
1fcf553e
import
{
FormSchema
}
from
'@/components/Form'
;
import
{
BasicColumn
}
from
'@/components/Table'
;
import
{
TableColumn
}
from
'ant-design-vue'
;
import
{
InputProps
,
TableColumn
}
from
'ant-design-vue'
;
import
{
TreeItem
}
from
'@/components/Tree'
;
export
const
designFormSchema
:
FormSchema
[]
=
[
...
...
@@ -853,12 +853,38 @@ export const taskOverallConfig: FormSchema[] = [
slot
:
'cycle'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
/*
{
{
label
:
'Cron表达式'
,
helpMessage
:
'0 0 0 ? * * *'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'0 0 0 ? * * *'
,
}
as
InputProps
,
field
:
'cron'
,
slot: 'cron',
colProps
:
{
lg
:
24
,
md
:
24
},
},*/
show
:
({
model
})
=>
{
return
model
.
cycle
===
'Cron表达式'
;
},
},
{
label
:
'调度时间'
,
field
:
'scheduleTime'
,
fields
:[
'scheduleTime'
],
slot
:
'scheduleTime'
,
colProps
:
{
lg
:
24
,
md
:
24
},
show
:
({
model
})
=>
{
return
model
.
cycle
===
'每天一次'
;
},
},
{
label
:
'事件触发器'
,
field
:
'eventTrigger'
,
slot
:
'eventTrigger'
,
colProps
:
{
lg
:
24
,
md
:
24
},
show
:
({
model
})
=>
{
return
model
.
cycle
===
'事件触发器'
;
},
},
{
label
:
'自定义日历'
,
field
:
'calendar'
,
...
...
@@ -1057,81 +1083,219 @@ export const defineEvent: FormSchema[] = [
label
:
'触发类型'
,
field
:
'triggerType'
,
fields
:
[
'saveResult'
],
/*componentProps: {
options: [
{
label: '文件到达',
value: '文件到达',
},
{
label: 'SQL结果检查',
value: 'SQL结果检查',
},
{
label: '脚本自定义',
value: '脚本自定义',
},
],
},*/
defaultValue
:
'文件到达'
,
colProps
:
{
span
:
20
,
},
slot
:
'triggerType'
,
},
/*
{
{
label
:
'文件系统源'
,
field
:
'fileSystemSource'
,
component: 'Select',
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'文件到达'
;
},
slot
:
'fileSystemSource'
,
colProps
:
{
span
:
20
,
},
},
{
label
:
'文件路径'
,
field
:
'filePath'
,
slot
:
'filePath'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'文件到达'
;
},
colProps
:
{
span
:
20
,
},
},
{
label
:
'目标对象'
,
field
:
'targetObject'
,
fields
:
[
'targetObject'
],
slot
:
'targetObject'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'文件到达'
;
},
colProps
:
{
span
:
20
,
},
},
{
label
:
'超时设置'
,
field
:
'timeoutSettings'
,
component
:
'CheckboxGroup'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'文件到达'
;
},
colProps
:
{
span
:
20
,
},
componentProps
:
{
options
:
[
{
label: 'HDFS',
value: 'HDFS',
},
{
label: 'FTP',
value: 'FTP',
label
:
'超时失败'
,
value
:
'超时失败'
,
},
],
},
},
{
label
:
'保存结果'
,
field
:
'saveResults'
,
fields
:
[
'saveResults'
,
'saveResultName'
,
'saveResultObject'
],
colProps
:
{
span
:
20
,
},
slot
:
'saveResults'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'文件到达'
;
},
},
{
label
:
'开始时间'
,
field
:
'startTime'
,
colProps
:
{
span
:
20
,
},
component
:
'TimePicker'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
},
{
label
:
'滚动时间窗口'
,
field
:
'rollingTimeWindow'
,
fields
:
[
'timeList'
],
colProps
:
{
span
:
20
,
},
slot
:
'rollingTimeWindow'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
},
{
label
:
'超时设置'
,
field
:
'timeoutSettingsT'
,
component
:
'CheckboxGroup'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
colProps
:
{
span
:
20
,
},
componentProps
:
{
options
:
[
{
label: '
SFTP
',
value: '
SFTP
',
label
:
'
超时失败
'
,
value
:
'
超时失败
'
,
},
],
},
},
{
label
:
'连接'
,
field
:
'connection'
,
component
:
'Select'
,
colProps
:
{
span
:
20
,
},
componentProps
:
{
options
:
[
{
value
:
'1'
,
label
:
'192.168.11.3'
},
{
value
:
'2'
,
label
:
'192.168.96.3'
},
{
value
:
'3'
,
label
:
'192.168.1.32'
},
],
},
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
},
{
label: '文件路径',
field: 'filePath',
component: 'Input',
label
:
'SQL'
,
field
:
'sql'
,
component
:
'InputTextArea'
,
componentProps
:
{
placeholder
:
'事件满足取决于当前sql返回结果是否为空,'
+
'若无返回结果则判断事件条件未达成:此处支持引用任务流参数、工作区参数、全局参数'
,
}
as
InputProps
,
colProps
:
{
span
:
20
,
},
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
},
{
label: '目标对象',
field: 'targetObject',
component: 'Input',
label
:
'保存结果'
,
field
:
'saveResultsT'
,
fields
:
[
'saveResults'
,
'saveResultName'
,
'saveResultObject'
],
colProps
:
{
span
:
20
,
},
slot
:
'saveResults'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'SQL结果检查'
;
},
},
{
label
:
'开始时间'
,
field
:
'startTimeT'
,
colProps
:
{
span
:
20
,
},
component
:
'TimePicker'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'脚本自定义'
;
},
},
{
label
:
'滚动时间窗口'
,
field
:
'rollingTimeWindowT'
,
fields
:
[
'timeListT'
],
colProps
:
{
span
:
20
,
},
slot
:
'rollingTimeWindowT'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'脚本自定义'
;
},
},
{
label
:
'超时设置'
,
field: 'targetObject',
component: 'Input',
field
:
'timeoutSettingsTh'
,
component
:
'CheckboxGroup'
,
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'脚本自定义'
;
},
colProps
:
{
span
:
20
,
},
componentProps
:
{
options
:
[
{
label
:
'超时失败'
,
value
:
'超时失败'
,
},
],
},
},
{
label: '保存结果',
field: 'saveResults',
component: 'Input',
label
:
'脚本内容'
,
field
:
'scriptContent'
,
component
:
'InputTextArea'
,
componentProps
:
{
placeholder
:
'脚本运行成功,即满足,因此判断逻辑由用户确定'
,
}
as
InputProps
,
colProps
:
{
span
:
20
,
},
},*/
show
:
({
model
})
=>
{
return
model
.
triggerType
===
'脚本自定义'
;
},
},
];
src/views/taskScheduling/taskFlowDesign/taskConfigModel.vue
View file @
1fcf553e
...
...
@@ -9,24 +9,6 @@
<BasicForm
@
register=
"registerForm"
>
<template
#
cycle=
"
{ field, model }">
<Select
v-model:value=
"model[field]"
:options=
"cycleOptions"
placeholder=
"请选择"
/>
<div
v-if=
"model[field] === '每天一次'"
>
<div
style=
"display: flex;margin: 25px 0 0 -65px"
>
<div
style=
"width: 100px"
>
调度时间
</div>
<div
style=
"display: flex;margin-left: -35px"
>
<Input/>
时
<Input/>
分
</div>
</div>
</div>
<div
v-if=
"model[field] === 'Cron表达式'"
style=
"margin-bottom: -15px"
>
<div
style=
"display: flex;margin: 25px 0 0 -80px"
>
<div
style=
"width: 100px"
>
Cron表达式
</div>
<div
style=
"display: flex;margin-left: -5px;width: 100%"
>
<Input/>
</div>
</div>
<a-button
style=
"padding: 0"
type=
"link"
>
Cron表达式
</a-button>
</div>
<a-button
type=
"link"
v-if=
"model[field] === '事件触发器'"
...
...
@@ -34,23 +16,25 @@
style=
"margin-left: -15px"
>
批量调整直接下游配置
</a-button>
<div
v-if=
"model[field] === '事件触发器'"
style=
"margin-bottom: -15px"
>
<div
style=
"display: flex;margin: 15px 0 0 -65px"
>
<div
style=
"width: 100px"
>
事件定义
</div>
<a-button
@
click=
"handleSetConfig"
style=
"color: red;border-color: red;margin-left: -30px"
>
定义事件
</a-button>
<a-button
@
click=
"viewLogs"
style=
"margin-left: 20px"
>
查看日志
</a-button>
</div>
<a-button
type=
"link"
style=
"color: red;margin-left: -10px"
>
<Icon
icon=
"ant-design:exclamation-circle-outlined"
/>
请定义触发事件详情
</
template
>
<
template
#
scheduleTime=
"{ field, model }"
>
<div
style=
"display: flex"
>
<Input
v-model:value=
"model[field]"
style=
"width: 45%"
/>
时
<Input
v-model:value=
"model['scheduleTime']"
style=
"width: 45%"
/>
分
</div>
</
template
>
<
template
#
eventTrigger=
"{ field, model }"
>
<div
style=
"display: flex;"
>
<a-button
@
click=
"handleSetConfig"
style=
"color: red;border-color: red;"
>
定义事件
</a-button>
<a-button
@
click=
"viewLogs"
style=
"margin-left: 20px"
>
查看日志
</a-button>
</div>
<a-button
type=
"link"
style=
"color: red;margin-left: -10px"
>
<Icon
icon=
"ant-design:exclamation-circle-outlined"
/>
请定义触发事件详情
</a-button>
</
template
>
<!-- <template #cron="{ field, model }">
<Input v-model:value="model[field]"/>
<a-button style="padding: 0" type="link">Cron表达式</a-button>
</template>-->
<
template
#
overTime=
"{ field, model }"
>
<CheckboxGroup
:options=
"overTimeOptions"
v-model:value=
"model[field]"
/>
<div
v-if=
"model[field]"
style=
"display: flex; width: 30%"
>
...
...
@@ -103,6 +87,7 @@ function viewLogs() {
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
});
});
/**调度周期*/
const
cycleOptions
=
[
{
label
:
'每天一次'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment