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
a67e1751
Commit
a67e1751
authored
Nov 28, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周期调度任务流
parent
44b00f0f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
277 additions
and
23 deletions
+277
-23
RunAgainModal.vue
.../taskFlowMaintenance/periodicScheduling/RunAgainModal.vue
+82
-0
executionDetails.vue
...skFlowMaintenance/periodicScheduling/executionDetails.vue
+2
-2
index.vue
...heduling/taskFlowMaintenance/periodicScheduling/index.vue
+97
-12
taskFlowMaintenance.data.ts
...aintenance/periodicScheduling/taskFlowMaintenance.data.ts
+88
-8
addTask.vue
...skScheduling/taskFlowMaintenance/supplyNumber/addTask.vue
+2
-0
supplyNumber.data.ts
...ing/taskFlowMaintenance/supplyNumber/supplyNumber.data.ts
+6
-1
No files found.
src/views/taskScheduling/taskFlowMaintenance/periodicScheduling/RunAgainModal.vue
0 → 100644
View file @
a67e1751
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
slot=
"
{ model, field }">
<div
class=
"textClass1"
v-if=
"model.scopeAction === '当前任务流'"
>
<div
style=
"font-weight: bold;margin-bottom: 10px;"
>
重跑当前注意事项
</div>
<div>
1. 按照当前任务流最新的版本重跑;
<br>
2. 任务流是否可以重跑成功取决于任务流条件是否达成,例如依赖的上游的状态, 是否存在依赖上次执行结果等条件;;
<br>
3. 若包含外部任务,workflow不保证外部任务的数据幂等性,按照要求重跑当前任务,例如任务包含数据加载任务,当最后一步数据插入已经发送到引擎端,则重试会出现重复数据。
</div>
</div>
<div
class=
"textClass2"
v-else
>
<div
style=
"font-weight: bold;margin-bottom: 10px;"
>
重跑当前注意事项
</div>
<div>
1. 重跑的是当前任务流和依赖关系的最新版本,新增的依赖关系的下游执行相关的最新执行记录可能会被覆盖;
<br>
2. 任务流是否可以重跑成功取决于任务流条件是否达成,例如依赖的上游的状态,是否存在依赖上次执行结果等条件;
<br>
3. 若包含外部任务,workflow不保证外部任务的数据幂等性,按照要求重跑当前任务,例如任务包含数据加载任务,当最后一步数据插入已经发送到引擎端,则重试会出现重复数据;
<br>
4. 重跑当前及下游,若下游的任务流除了当前任务流还有其他的依赖,则下游是否运行还依赖其他分支依赖的上游任务流的状态;
<br>
5. 重跑影响的执行记录按照批次重跑,若下游任务流还在运行中,会等待运行结束后进行重跑。
</div>
</div>
</
template
>
</BasicForm>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
,
onMounted
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
mainFormSchema4
,
runAgainSchema
}
from
"./taskFlowMaintenance.data"
;
import
{
TreeData
}
from
"@/views/taskScheduling/taskFlowMaintenance/periodicScheduling/taskFlowMaintenanceData"
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
getTitle
=
computed
(()
=>
(
'重跑'
));
const
[
registerForm
,
{
updateSchema
:
updateSchema1
,
getFieldsValue
}]
=
useForm
({
labelAlign
:
'left'
,
labelWidth
:
100
,
schemas
:
runAgainSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
});
});
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'重跑成功!'
);
closeModal
()
}
onMounted
(()
=>
{
});
</
script
>
<
style
lang=
"less"
scoped
>
.textClass1{
width: 100%;
height:200px;
font-size: 15px;
padding-left: 10px;
padding-top: 10px;
background-color: rgb(253, 246, 236)
}
.textClass2{
width: 100%;
height:300px;
font-size: 15px;
padding-left: 10px;
padding-top: 10px;
background-color: rgb(253, 246, 236)
}
</
style
>
src/views/taskScheduling/taskFlowMaintenance/periodicScheduling/executionDetails.vue
View file @
a67e1751
...
...
@@ -48,7 +48,7 @@
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
router
}
from
'@/router'
;
import
{
columns
,
topFormSchema2
,
topFormSchema1
,
mainFormSchema3
}
from
'./taskFlowMaintenance.data'
;
import
{
columns
,
topFormSchema2
,
topFormSchema1
,
mainFormSchema3
,
detailFormSchema
}
from
'./taskFlowMaintenance.data'
;
import
{
tableData
,
TreeData
,
treeData2
}
from
'./taskFlowMaintenanceData'
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
useECharts
}
from
'@/hooks/web/useECharts'
;
...
...
@@ -103,7 +103,7 @@
});
const
[
registerForm1
,
{
updateSchema
:
updateSchema2
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
topFormSchema2
,
schemas
:
detailFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
...
...
src/views/taskScheduling/taskFlowMaintenance/periodicScheduling/index.vue
View file @
a67e1751
...
...
@@ -242,33 +242,46 @@
<Divider/>
<BasicTable
@
register=
"registerTable"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
handleDeleteIds
"
>
置成功
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
handleCreateFile
"
>
重跑
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
handleCreateModel
"
>
错误恢复
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
handleCreateModel
"
>
取消执行
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
batchSettingSuccessfulButton
"
>
置成功
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
batchRunAgainButton
"
>
重跑
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
batchErrorRecoveryButton
"
>
错误恢复
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"
batchCancelExecuteButton
"
>
取消执行
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
//查看详情
icon:'ant-design:file-search-outlined',
onClick: detailButton.bind(null, record),
},
{
//重跑
icon:'material-symbols-light:not-started-outline',
onClick:
lookLog
Button.bind(null, record),
onClick:
runAgain
Button.bind(null, record),
// ifShow: record.eventType === '系统异常',
},
{
//错误恢复
icon:'ix:error',
onClick: toTaskMaintenanceButton.bind(null, record),
popConfirm: {
title: '是否确认恢复',
placement: 'left',
confirm: errorRecoveryButton.bind(null, record),
},
},
{
//取消执行
icon:'jam:stop-sign',
onClick: toTaskMaintenanceButton.bind(null, record),
popConfirm: {
title: '是否取消执行',
placement: 'left',
confirm: cancelExecuteButton.bind(null, record),
},
},
{
//查看日志
icon:'ix:log',
onClick: lookLogButton.bind(null, record),
},
...
...
@@ -281,6 +294,8 @@
</div>
<!-- 查看日志 弹窗-->
<LookLogModal
@
register=
"registerLookLogModal"
@
success=
"handleSuccess"
/>
<!-- 重跑 弹窗-->
<RunAgainModal
@
register=
"registerRunAgainModal"
@
success=
"handleSuccess"
/>
<!-- 置成功 弹窗-->
<SuccessfullySettingModal
@
register=
"registerSuccessfullySettingModal"
@
success=
"handleSuccess"
/>
</div>
...
...
@@ -307,6 +322,7 @@
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
SuccessfullySettingModal
from
'./SuccessfullySettingModal.vue'
import
RunAgainModal
from
'./RunAgainModal.vue'
defineOptions
({
name
:
'AccountManagement'
});
const
chartRef1
=
ref
<
HTMLDivElement
|
null
>
(
null
);
...
...
@@ -431,6 +447,8 @@
],
});
}
const
[
registerRunAgainModal
,
{
openModal
:
openRunAgainModal
}]
=
useModal
();
const
[
registerSuccessfullySettingModal
,
{
openModal
:
openSuccessfullySettingModal
}]
=
useModal
();
const
[
registerLookLogModal
,
{
openModal
:
openLookLogModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getForm
,
getRowSelection
}]
=
useTable
({
...
...
@@ -485,7 +503,8 @@
span
:
23
,
},
});
/**跳转任务运维 按钮*/
/**跳转任务运维 按钮*/
function
toTaskMaintenanceButton
(
record
){
router
.
push
({
path
:
'/realTimeSync/taskOperationsMaintenance/index'
,
...
...
@@ -501,7 +520,22 @@
});
}
/**查看日志 按钮*/
/**重跑 按钮*/
function
runAgainButton
(
record
){
openRunAgainModal
(
true
,{})
}
/**取消执行 按钮*/
function
cancelExecuteButton
(
record
){
createMessage
.
success
(
'取消成功!'
);
}
/**错误恢复 按钮*/
function
errorRecoveryButton
(
record
){
createMessage
.
success
(
'恢复成功!'
);
}
/**查看日志 按钮*/
function
lookLogButton
(
record
){
openLookLogModal
(
true
,{})
}
...
...
@@ -513,6 +547,43 @@
}
/**批量置成功 按钮*/
function
batchSettingSuccessfulButton
(
record
){
openSuccessfullySettingModal
(
true
,{})
}
/**批量重跑 按钮*/
function
batchRunAgainButton
(
record
){
openRunAgainModal
(
true
,{})
}
/**批量错误恢复 按钮*/
function
batchErrorRecoveryButton
(
record
){
createConfirm
({
iconType
:
'warning'
,
title
:
'错误恢复'
,
content
:
'确认恢复选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'恢复成功!'
);
},
});
}
/**批量取消执行 按钮*/
function
batchCancelExecuteButton
(
record
){
createConfirm
({
iconType
:
'warning'
,
title
:
'取消执行'
,
content
:
'确认取消选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'取消成功!'
);
},
});
}
/** 转成树 */
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
...
...
@@ -562,13 +633,20 @@
{
label
:
'重跑'
,
handler
:
()
=>
{
handleOpe
n
(
node
)
runAgainButto
n
(
node
)
},
},
{
label
:
'错误恢复'
,
handler
:
()
=>
{
handleOpen
(
node
)
createConfirm
({
iconType
:
'warning'
,
title
:
'错误恢复'
,
content
:
'确认恢复选中数据吗?'
,
onOk
()
{
errorRecoveryButton
()
},
});
},
},
{
...
...
@@ -600,7 +678,14 @@
/**取消 按钮*/
function
cancelButton
(){
createMessage
.
success
(
'取消成功!'
)
createConfirm
({
iconType
:
'warning'
,
title
:
'确认取消'
,
content
:
'确认取消执行选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'取消成功!'
);
},
});
}
...
...
src/views/taskScheduling/taskFlowMaintenance/periodicScheduling/taskFlowMaintenance.data.ts
View file @
a67e1751
...
...
@@ -138,12 +138,6 @@ export const topFormSchema2: FormSchema[] = [
],
},
},
{
field
:
'switch'
,
component
:
''
,
label
:
'展示切换'
,
slot
:
'switch'
},
];
/**首页-表单3*/
export
const
mainFormSchema3
:
FormSchema
[]
=
[
...
...
@@ -220,7 +214,42 @@ export const mainFormSchema4: FormSchema[] = [
},
},
];
/**重跑 表单*/
export
const
runAgainSchema
:
FormSchema
[]
=
[
{
field
:
'scopeAction'
,
label
:
'作用范围'
,
component
:
'RadioGroup'
,
defaultValue
:
'当前任务流'
,
componentProps
:
{
options
:
[
{
label
:
'当前任务流'
,
value
:
'当前任务流'
},
{
label
:
'当前及其下游'
,
value
:
'当前及其下游'
},
],
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'operationPriority'
,
label
:
'操作优先级'
,
component
:
'RadioGroup'
,
defaultValue
:
'高'
,
componentProps
:
{
options
:
[
{
label
:
'高'
,
value
:
'高'
},
{
label
:
'中'
,
value
:
'中'
},
{
label
:
'低'
,
value
:
'低'
},
],
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'slot'
,
label
:
''
,
component
:
''
,
slot
:
'slot'
}
];
/**详情页-任务列表*/
export
const
tableListColumns
:
BasicColumn
[]
=
[
{
...
...
@@ -264,4 +293,55 @@ export const tableListColumns: BasicColumn[] = [
width
:
120
}
];
/**详情页-表单*/
export
const
detailFormSchema
:
FormSchema
[]
=
[
{
field
:
'agreement'
,
component
:
'RadioButtonGroup'
,
label
:
''
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[
{
label
:
'调度时间'
,
value
:
'1'
,
},
{
label
:
'执行时间'
,
value
:
'2'
,
},
],
},
},
{
field
:
'[startDate, endDate]'
,
label
:
' '
,
labelWidth
:
20
,
component
:
'RangePicker'
,
componentProps
:
{
format
:
'YYYY-MM-DD'
,
placeholder
:
[
'开始日期'
,
'结束日期'
],
},
},
{
field
:
'eventType'
,
label
:
' '
,
labelWidth
:
20
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'类型'
,
options
:
[
{
label
:
'调度'
,
value
:
'全部'
,
},
],
},
},
{
field
:
'switch'
,
component
:
''
,
label
:
'展示切换'
,
slot
:
'switch'
},
];
src/views/taskScheduling/taskFlowMaintenance/supplyNumber/addTask.vue
View file @
a67e1751
...
...
@@ -149,6 +149,7 @@
});
//初始化表单
const
[
registerForm1
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelAlign
:
'right'
,
labelWidth
:
80
,
schemas
:
addTaskFormSchema1
,
showActionButtonGroup
:
false
,
...
...
@@ -219,6 +220,7 @@
<
style
lang=
"less"
scoped
>
.selectCss{
margin-left:10px;
::v-deep(.ant-select-selector){
width:200px!important;
}
...
...
src/views/taskScheduling/taskFlowMaintenance/supplyNumber/supplyNumber.data.ts
View file @
a67e1751
...
...
@@ -105,19 +105,24 @@ export const addTaskFormSchema1: FormSchema[] = [
{
field
:
'supplyNumberName'
,
label
:
'补数名称'
,
labelWidth
:
80
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请输入补数名称'
,
},
colProps
:
{
lg
:
12
,
md
:
24
}
},
{
field
:
'rangeTime'
,
label
:
'
补数时间范围'
,
label
:
' 补数时间范围'
,
labelWidth
:
120
,
component
:
'RangePicker'
,
required
:
true
,
componentProps
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
colProps
:
{
lg
:
12
,
md
:
24
}
},
];
/**新建任务页-表单2*/
...
...
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