Commit c26f9af0 authored by LiXuyang's avatar LiXuyang

任务流设计-任务配置

parent b61221c6
......@@ -82,22 +82,21 @@ export const infoFormSchema: FormSchema[] = [
label: '超时设置',
field: 'overTime',
labelWidth: 150,
component: 'Checkbox',
renderComponentContent: '超时失败',
slot: 'overTime',
colProps: { lg: 24, md: 24 },
},
{
label: '错误重试',
field: 'errorAgain',
labelWidth: 150,
component: 'Checkbox',
renderComponentContent: '开启',
slot: 'errorAgain',
colProps: { lg: 24, md: 24 },
},
{
label: '是否跳过',
field: 'skip',
labelWidth: 150,
slot: 'skip',
component: 'Checkbox',
renderComponentContent: '开启',
colProps: { lg: 24, md: 24 },
......@@ -117,6 +116,42 @@ export const infoFormSchema: FormSchema[] = [
renderComponentContent: '开启',
colProps: { lg: 24, md: 24 },
},
{
label: '调度周期',
field: 'cycle',
labelWidth: 150,
show: ({ model }) => {
return model.dispatch;
},
component: 'Select',
componentProps: {
options: [
{
label: '每天一次',
value: '每天一次',
},
{
label: '每周一次',
value: '每周一次',
},
{
label: '每月一次',
value: '每月一次',
},
],
},
colProps: { lg: 24, md: 24 },
},
{
label: '调度时间',
labelWidth: 150,
field: 'time',
slot: 'time',
show: ({ model }) => {
return model.dispatch;
},
colProps: { lg: 24, md: 24 },
},
{
label: '当前任务执行前置条件',
field: 'txt',
......@@ -791,15 +826,6 @@ export const taskOverallConfig: FormSchema[] = [
label: '调度周期',
field: 'cycle',
slot: 'cycle',
component: 'Select',
componentProps: {
options: [
{
label: 'Cron表达式',
value: 'Cron表达式',
},
],
},
colProps: { lg: 24, md: 24 },
},
{
......
......@@ -9,10 +9,86 @@
<Tabs v-model:activeKey="activeKey">
<TabPane key="1" tab="基本信息">
<BasicForm @register="infoForm">
<template #overTime="{ field, model }">
<div>
<Checkbox v-model:checked="model[field]">超时失败</Checkbox>
</div>
<div v-if="model[field]" style="display: flex; width: 60%">
<InputNumber v-model:value="model.timeNum" :min="0" :step="1" />
<Select v-model:value="model.timeType" :options="timeTypeOptions" />
</div>
</template>
<template #errorAgain="{ field, model }">
<div>
<Checkbox v-model:checked="model[field]">开启</Checkbox>
</div>
<div v-if="model[field]" style="width: 100%">
<div style="display: flex">
重试次数<InputNumber
style="width: 30%"
v-model:value="model.againNum"
:min="0"
:step="1"
/>
</div>
<div style="display: flex">
重试间隔<InputNumber
style="width: 30%"
v-model:value="model.timeNum"
:min="0"
:step="1"
/>
<Select
style="width: 30%"
v-model:value="model.timeType"
:options="timeTypeOptions"
/>
</div>
</div>
</template>
<template #skip="{ field, model }">
<Checkbox v-model:checked="model[field]" @click="handleSkip(model[field])">开启</Checkbox>
</template>
<template #group="{ field, model }">
<Select :options="groupOptions" v-model:value="model[field]" />
<a-button style="margin-top: 20px">配置执行器</a-button>
</template>
<template #time="{ field, model }">
<div v-if="model.cycle === '每天一次'">
<InputNumber
style="width: 30%"
:min="0"
:step="1"
:max="23"
v-model:value="model.hour"
/>
<InputNumber
style="width: 30%"
:min="0"
:step="1"
:max="60"
v-model:value="model.min"
/>
</div>
<div v-if="model.cycle === '每周一次'">
星期<InputNumber
style="width: 30%"
:min="1"
:step="1"
:max="7"
v-model:value="model.hour"
/>
</div>
<div v-if="model.cycle === '每月一次'">
<InputNumber
style="width: 30%"
:min="1"
:step="1"
:max="31"
v-model:value="model.hour"
/>
</div>
</template>
</BasicForm>
</TabPane>
<TabPane v-if="type === '1'" key="2" tab="Script任务">
......@@ -221,7 +297,9 @@
dataIndexFormSchema,
dataLoadConfigColumn,
dataLoadFormSchema,
dataQualityFormSchema, dataSyncFormSchema, delayFormSchema,
dataQualityFormSchema,
dataSyncFormSchema,
delayFormSchema,
embedFlowFormSchema,
infoFormSchema,
javaFormSchema,
......@@ -239,6 +317,7 @@
import { tableListtab1 } from '@/views/auditLog/mock';
import { columns, searchFormSchema } from '@/views/auditLog/audi.data';
import { dataLoadConfigData } from '@/views/taskScheduling/taskFlowDesign/designData';
import { useMessage } from '@/hooks/web/useMessage';
const isUpdate = ref(false);
const isMove = ref(false);
......@@ -282,6 +361,41 @@
rowId.value = data.record.businessId;
}
});
const timeTypeOptions = [
{
label: '分',
value: '分',
},
{
label: '小时',
value: '小时',
},
{
label: '天',
value: '天',
},
{
label: '周',
value: '周',
},
{
label: '月',
value: '月',
},
];
const { createMessage, createConfirm } = useMessage();
/** 删除*/
function handleSkip(value) {
if (!value) {
createConfirm({
title: '是否跳过',
content: '开启跳过后,任务的后续调度执行的状态是过滤。',
onOk() {
createMessage.success('设置成功!');
},
});
}
}
//初始化表单
const [infoForm, { resetFields: infoReset, validate }] = useForm({
labelWidth: 100,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment