Commit 1fcf553e authored by 冷玲鹏's avatar 冷玲鹏

调度执行:修改页面bug

parent 8c4e2041
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
tooltip:'详情', tooltip:'详情',
onClick: handleConsanguinity.bind(null, record), onClick: handleConsanguinity.bind(null, record),
ifShow: () => { ifShow: () => {
return record.releaseStatus !== '父级'; // 这里只是实现树文件夹按钮 return record.releaseStatus !== ''; // 这里只是实现树文件夹按钮
}, },
}, },
{ {
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
tooltip:'下线', tooltip:'下线',
onClick: handleOnline.bind(null, record), onClick: handleOnline.bind(null, record),
ifShow: () => { ifShow: () => {
return record.releaseStatus !== '父级'; // 根据业务控制是否显示: 非enable状态的不显示启用按钮 return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
}, },
}, },
{ {
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
tooltip:'发布', tooltip:'发布',
onClick: apiDetail.bind(null, record), onClick: apiDetail.bind(null, record),
ifShow: () => { ifShow: () => {
return record.releaseStatus !== '父级'; // 根据业务控制是否显示: 非enable状态的不显示启用按钮 return record.releaseStatus !== ''; // 根据业务控制是否显示: 非enable状态的不显示启用按钮
}, },
}, },
{ {
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
tooltip:'检查?', tooltip:'检查?',
onClick: handleOffline.bind(null, record), onClick: handleOffline.bind(null, record),
ifShow: () => { ifShow: () => {
return record.releaseStatus !== '父级'; // 这里只是实现树文件夹按钮 return record.releaseStatus !== ''; // 这里只是实现树文件夹按钮
}, },
}, },
]" ]"
......
...@@ -122,7 +122,7 @@ export const tableList: any[] = [ ...@@ -122,7 +122,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'theme', type: 'theme',
...@@ -136,7 +136,7 @@ export const tableList: any[] = [ ...@@ -136,7 +136,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'theme', type: 'theme',
...@@ -150,7 +150,7 @@ export const tableList: any[] = [ ...@@ -150,7 +150,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -164,7 +164,7 @@ export const tableList: any[] = [ ...@@ -164,7 +164,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -178,7 +178,7 @@ export const tableList: any[] = [ ...@@ -178,7 +178,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -192,7 +192,7 @@ export const tableList: any[] = [ ...@@ -192,7 +192,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -206,7 +206,7 @@ export const tableList: any[] = [ ...@@ -206,7 +206,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -220,7 +220,7 @@ export const tableList: any[] = [ ...@@ -220,7 +220,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
...@@ -234,7 +234,7 @@ export const tableList: any[] = [ ...@@ -234,7 +234,7 @@ export const tableList: any[] = [
updateDate: '2023/07/10 10:49:38', updateDate: '2023/07/10 10:49:38',
businessTag: '_', businessTag: '_',
owner: 'admin', owner: 'admin',
releaseStatus: '父级', releaseStatus: '',
task: null, task: null,
type: 'twoLevel', type: 'twoLevel',
......
...@@ -7,268 +7,216 @@ ...@@ -7,268 +7,216 @@
@ok="handleSubmit" @ok="handleSubmit"
> >
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
<template #checkFrequency="{ field, model }"> <template #checkFrequency="{ field,model,}">
<Input style="width: 180px" v-model:value="model[field]" placeholder="请输入" /> <Input style="width: 180px;"
<Select v-model:value="model[field]" placeholder="请输入"/>
style="width: 180px; margin-left: 20px" <Select style="width: 180px;margin-left: 20px" placeholder="请选择"
placeholder="请选择" v-model:value="model['checkFrequencys']" :options="timeList"/>
v-model:value="model['checkFrequencys']"
:options="timeList"
/>
</template> </template>
<template #triggerType="{ field, fields, model }"> <template #triggerType="{ field,fields,model }">
<RadioGroup <RadioGroup v-model:value="model[field]" :options="triggerTypeOptions"
v-model:value="model[field]" style="margin: 5px 15px 0 0"/>
:options="triggerTypeOptions"
style="margin: 5px 15px 0 0"
/>
<div v-if="model[field] === '文件到达'" style="margin: 25px 0 0 0"> <div v-if="model[field] === '文件到达'" style="margin: 25px 0 0 0">
<Alert <Alert
type="info" type="info"
:message=" :message="
'①任务流发布后,监听程序将按照检查频率一直监听文件系统的文件夹路径下的' + '①任务流发布后,监听程序将按照检查频率一直监听文件系统的文件夹路径下的' +
'所有的资源的变化(新增、更新),每次变动均会触发任务流的执行\n' '所有的资源的变化(新增、更新),每次变动均会触发任务流的执行\n'"
"
:style="{ whiteSpace: 'pre-line' }" :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>
<div v-if="model[field] === 'SQL结果检查'" style="margin: 25px 0 0 0"> <div v-if="model[field] === 'SQL结果检查'" style="margin: 25px 0 0 0">
<Alert <Alert
type="info" type="info"
:message=" :message="
'①任务流发布后,监听程序将按照检查频率定期执行SQL判断结果是否符合预' + '①任务流发布后,监听程序将按照检查频率定期执行SQL判断结果是否符合预' +
'期,若在当时时间窗口已满足,则当前窗口内将不再监听\n' '期,若在当时时间窗口已满足,则当前窗口内将不再监听\n'"
"
:style="{ whiteSpace: 'pre-line' }" :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>
<div v-if="model[field] === '脚本自定义'" style="margin: 25px 0 0 0"> <div v-if="model[field] === '脚本自定义'" style="margin: 25px 0 0 0">
<Alert <Alert
type="info" type="info"
:message=" :message="
'①任务流发布后,监听程序将按照检查频率定期执行脚本判断结果是否复合预' + '①任务流发布后,监听程序将按照检查频率定期执行脚本判断结果是否复合预' +
'期,若在当前时间窗口已满足,则当前窗口内将不在监听\n' '期,若在当前时间窗口已满足,则当前窗口内将不在监听\n'"
"
:style="{ whiteSpace: 'pre-line' }" :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> </div>
</template> </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> </BasicForm>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, unref, reactive } from 'vue'; import {ref, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import {BasicModal, useModalInner} from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form'; import {BasicForm, useForm} from "@/components/Form";
import { defineEvent } from '@/views/taskScheduling/taskFlowDesign/design.data'; import {defineEvent} from "@/views/taskScheduling/taskFlowDesign/design.data";
import { import {
FormItemRest, FormItemRest,
Input, Input,
Select, Select,
RadioGroup, RadioGroup,
Alert, Alert,
Textarea, Textarea,
Checkbox, Checkbox,
CheckboxGroup, CheckboxGroup,
TimePicker, TimePicker
} from 'ant-design-vue'; } from "ant-design-vue";
import Icon from '@/components/Icon/Icon.vue'; import Icon from "@/components/Icon/Icon.vue";
const getTitle = '定义事件'; const getTitle = '定义事件';
//初始化弹框 //初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
setModalProps({ setModalProps({
confirmLoading: false, confirmLoading: false,
okText: '确定', okText: '确定',
});
await resetFields();
});
//初始化列表
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 120,
schemas: defineEvent,
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
}); });
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 = [ /**确定按钮*/
{ async function handleSubmit() {
label: '文件到达', closeModal();
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();
}
</script> </script>
import { FormSchema } from '@/components/Form'; import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table'; import { BasicColumn } from '@/components/Table';
import { TableColumn } from 'ant-design-vue'; import {InputProps, TableColumn} from 'ant-design-vue';
import { TreeItem } from '@/components/Tree'; import { TreeItem } from '@/components/Tree';
export const designFormSchema: FormSchema[] = [ export const designFormSchema: FormSchema[] = [
...@@ -853,12 +853,38 @@ export const taskOverallConfig: FormSchema[] = [ ...@@ -853,12 +853,38 @@ export const taskOverallConfig: FormSchema[] = [
slot: 'cycle', slot: 'cycle',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
}, },
/* { {
label: 'Cron表达式', label: 'Cron表达式',
helpMessage: '0 0 0 ? * * *',
component: 'Input',
componentProps: {
placeholder: '0 0 0 ? * * *',
} as InputProps,
field: 'cron', field: 'cron',
slot: 'cron',
colProps: { lg: 24, md: 24 }, 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: '自定义日历', label: '自定义日历',
field: 'calendar', field: 'calendar',
...@@ -1057,81 +1083,219 @@ export const defineEvent: FormSchema[] = [ ...@@ -1057,81 +1083,219 @@ export const defineEvent: FormSchema[] = [
label: '触发类型', label: '触发类型',
field: 'triggerType', field: 'triggerType',
fields: ['saveResult'], fields: ['saveResult'],
/*componentProps: { defaultValue: '文件到达',
options: [
{
label: '文件到达',
value: '文件到达',
},
{
label: 'SQL结果检查',
value: 'SQL结果检查',
},
{
label: '脚本自定义',
value: '脚本自定义',
},
],
},*/
colProps: { colProps: {
span: 20, span: 20,
}, },
slot:'triggerType', slot:'triggerType',
}, },
/* { {
label: '文件系统源', label: '文件系统源',
field: 'fileSystemSource', 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: { componentProps: {
options: [ options: [
{ {
label: 'HDFS', label: '超时失败',
value: 'HDFS', value: '超时失败',
},
{
label: 'FTP',
value: 'FTP',
}, },
],
},
},
{
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', label: '超时失败',
value: 'SFTP', value: '超时失败',
}, },
], ],
}, },
},
{
label: '连接',
field: 'connection',
component:'Select',
colProps: { colProps: {
span: 20, 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: '文件路径', label: 'SQL',
field: 'filePath', field: 'sql',
component: 'Input', component: 'InputTextArea',
componentProps: {
placeholder:'事件满足取决于当前sql返回结果是否为空,' +
'若无返回结果则判断事件条件未达成:此处支持引用任务流参数、工作区参数、全局参数',
} as InputProps,
colProps: { colProps: {
span: 20, span: 20,
}, },
show: ({ model }) => {
return model.triggerType === 'SQL结果检查';
},
}, },
{ {
label: '目标对象', label: '保存结果',
field: 'targetObject', field: 'saveResultsT',
component: 'Input', fields: ['saveResults','saveResultName','saveResultObject'],
colProps: {
span: 20,
},
slot:'saveResults',
show: ({ model }) => {
return model.triggerType === 'SQL结果检查';
},
},
{
label: '开始时间',
field: 'startTimeT',
colProps: { colProps: {
span: 20, 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: '超时设置', label: '超时设置',
field: 'targetObject', field: 'timeoutSettingsTh',
component: 'Input', component: 'CheckboxGroup',
show: ({ model }) => {
return model.triggerType === '脚本自定义';
},
colProps: { colProps: {
span: 20, span: 20,
}, },
componentProps: {
options: [
{
label: '超时失败',
value: '超时失败',
},
],
},
}, },
{ {
label: '保存结果', label: '脚本内容',
field: 'saveResults', field: 'scriptContent',
component: 'Input', component: 'InputTextArea',
componentProps: {
placeholder:'脚本运行成功,即满足,因此判断逻辑由用户确定',
} as InputProps,
colProps: { colProps: {
span: 20, span: 20,
}, },
},*/ show: ({ model }) => {
return model.triggerType === '脚本自定义';
},
},
]; ];
...@@ -9,24 +9,6 @@ ...@@ -9,24 +9,6 @@
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
<template #cycle="{ field, model }"> <template #cycle="{ field, model }">
<Select v-model:value="model[field]" :options="cycleOptions" placeholder="请选择"/> <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 <a-button
type="link" type="link"
v-if="model[field] === '事件触发器'" v-if="model[field] === '事件触发器'"
...@@ -34,23 +16,25 @@ ...@@ -34,23 +16,25 @@
style="margin-left: -15px" style="margin-left: -15px"
>批量调整直接下游配置 >批量调整直接下游配置
</a-button> </a-button>
<div v-if="model[field] === '事件触发器'" style="margin-bottom: -15px"> </template>
<div style="display: flex;margin: 15px 0 0 -65px"> <template #scheduleTime="{ field, model }">
<div style="width: 100px">事件定义</div> <div style="display: flex">
<a-button @click="handleSetConfig" style="color: red;border-color: red;margin-left: -30px">定义事件 <Input v-model:value="model[field]" style="width: 45%"/>
</a-button> <Input v-model:value="model['scheduleTime']" style="width: 45%"/>
<a-button @click="viewLogs" style="margin-left: 20px">查看日志</a-button> </div>
</div> </template>
<a-button type="link" style="color: red;margin-left: -10px"> <template #eventTrigger="{ field, model }">
<Icon icon="ant-design:exclamation-circle-outlined"/> <div style="display: flex;">
请定义触发事件详情 <a-button @click="handleSetConfig"
style="color: red;border-color: red;">定义事件
</a-button> </a-button>
<a-button @click="viewLogs" style="margin-left: 20px">查看日志</a-button>
</div> </div>
<a-button type="link" style="color: red;margin-left: -10px">
<Icon icon="ant-design:exclamation-circle-outlined"/>
请定义触发事件详情
</a-button>
</template> </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 }"> <template #overTime="{ field, model }">
<CheckboxGroup :options="overTimeOptions" v-model:value="model[field]"/> <CheckboxGroup :options="overTimeOptions" v-model:value="model[field]"/>
<div v-if="model[field]" style="display: flex; width: 30%"> <div v-if="model[field]" style="display: flex; width: 30%">
...@@ -103,6 +87,7 @@ function viewLogs() { ...@@ -103,6 +87,7 @@ function viewLogs() {
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
setModalProps({confirmLoading: false}); setModalProps({confirmLoading: false});
}); });
/**调度周期*/
const cycleOptions = [ const cycleOptions = [
{ {
label: '每天一次', label: '每天一次',
......
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