Commit 4ba5d8ed authored by chenjiahao's avatar chenjiahao

Merge remote-tracking branch 'origin/master'

parents 5c6d1dc8 d864acd4
...@@ -3,13 +3,6 @@ ...@@ -3,13 +3,6 @@
<template #title> <template #title>
<span style="font-size: 23px; font-weight: lighter">新建规则</span> <span style="font-size: 23px; font-weight: lighter">新建规则</span>
</template> </template>
<Span style="font-size: 18px">
<Icon
style="margin-right: 5px; font-size: 18px"
:color="'#5cb3ff'"
icon="material-symbols:table-convert-outline"
/>数据转换规则
</Span>
<List> <List>
<Row :gutter="16"> <Row :gutter="16">
<template v-for="item in cardRuleList" :key="item.title"> <template v-for="item in cardRuleList" :key="item.title">
......
...@@ -55,7 +55,7 @@ export const sourceSideConfigurationFormSchema: FormSchema[] = [ ...@@ -55,7 +55,7 @@ export const sourceSideConfigurationFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
required: true, required: true,
componentProps: { componentProps: {
placeholder: '请选择数据', placeholder: '请选择数据',
displayRender: ({ labels }) => { displayRender: ({ labels }) => {
return labels[labels.length - 1]; return labels[labels.length - 1];
}, },
...@@ -146,7 +146,18 @@ export const NewFieldRuleFormSchema: FormSchema[] = [ ...@@ -146,7 +146,18 @@ export const NewFieldRuleFormSchema: FormSchema[] = [
{ {
field: 'newFieldType', field: 'newFieldType',
label: '新增字段类型', label: '新增字段类型',
component: 'Input', component: 'Select',
componentProps: {
options: [
{ label: 'STRING', value: 'STRING' },
{ label: 'INTEGER', value: 'INTEGER' },
{ label: 'FLOAT', value: 'FLOAT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'DATE', value: 'DATE' },
{ label: 'TIMESTAMP', value: 'TIMESTAMP' },
{ label: 'BOOLEAN', value: 'BOOLEAN' },
]
},
required: true, required: true,
}, },
{ {
...@@ -273,13 +284,35 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [ ...@@ -273,13 +284,35 @@ export const FieldTypeMappingRuleFormSchema: FormSchema[] = [
{ {
field: 'sourceFieldType', field: 'sourceFieldType',
label: '源字段类型', label: '源字段类型',
component: 'Input', component: 'Select',
componentProps: {
options: [
{ label: 'STRING', value: 'STRING' },
{ label: 'INTEGER', value: 'INTEGER' },
{ label: 'FLOAT', value: 'FLOAT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'DATE', value: 'DATE' },
{ label: 'TIMESTAMP', value: 'TIMESTAMP' },
{ label: 'BOOLEAN', value: 'BOOLEAN' },
]
},
required: true, required: true,
}, },
{ {
field: 'targetFieldType', field: 'targetFieldType',
label: '目标字段类型', label: '目标字段类型',
component: 'Input', component: 'Select',
componentProps: {
options: [
{ label: 'STRING', value: 'STRING' },
{ label: 'INTEGER', value: 'INTEGER' },
{ label: 'FLOAT', value: 'FLOAT' },
{ label: 'DECIMAL', value: 'DECIMAL' },
{ label: 'DATE', value: 'DATE' },
{ label: 'TIMESTAMP', value: 'TIMESTAMP' },
{ label: 'BOOLEAN', value: 'BOOLEAN' },
]
},
required: true, required: true,
}, },
]; ];
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@register="registerModal" @register="registerModal"
title="全局字段名称映射规则" title="字段名映射规则"
@ok="handleSubmit" @ok="handleSubmit"
style="width: 35%" width="40%"
minHeight="50" minHeight="50"
> >
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@register="registerModal" @register="registerModal"
title="全局字段类型映射规则" title="字段类型映射规则"
@ok="handleSubmit" @ok="handleSubmit"
minHeight="50" minHeight="50"
> >
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
import { getMetadataTableList } from './mock' import { getMetadataTableList } from './mock'
import { getMetadataColumns } from './dataLakePunctual.data'; import { getMetadataColumns } from './dataLakePunctual.data';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
const emit = defineEmits(['success', 'register', 'setFlag']);
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const unfold = ref(false); const unfold = ref(false);
let startId = ref(); let startId = ref();
...@@ -79,6 +78,7 @@ ...@@ -79,6 +78,7 @@
/**确定按钮*/ /**确定按钮*/
async function handleSubmit() { async function handleSubmit() {
closeModal(); closeModal();
emit('setFlag', 0);
} }
/**获取元数据-选择按钮*/ /**获取元数据-选择按钮*/
......
...@@ -415,7 +415,7 @@ export const cardRuleList = [ ...@@ -415,7 +415,7 @@ export const cardRuleList = [
}, },
{ {
title: '【全局】字段映射规则', title: '【全局】表名映射规则',
type: 'singleTableFieldMappingRule', type: 'singleTableFieldMappingRule',
description: '根据业务需求,对选中的源端表进行详情字段名、类型、注释 的映射配置', description: '根据业务需求,对选中的源端表进行详情字段名、类型、注释 的映射配置',
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@register="registerModal" @register="registerModal"
title="全局新增字段规则" title="新增字段规则"
@ok="handleSubmit" @ok="handleSubmit"
minHeight="50" minHeight="50"
> >
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@register="registerModal" @register="registerModal"
title="全局字段映射规则" title="表名映射规则"
@ok="handleSubmit" @ok="handleSubmit"
style="width: 35%" width="40%"
minHeight="50" minHeight="50"
> >
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
......
...@@ -6,8 +6,24 @@ ...@@ -6,8 +6,24 @@
<Col :span="24"> <Col :span="24">
<Card> <Card>
<div style="flex: 1"> <div style="flex: 1">
<div class="ml-1 mt-1"> <div class="ml-2 mt-1">
<BasicForm @register="registerForm"/> <div class="flex">
<a-button type="default" @click="handleGoBack"><icon icon="ant-design:left-outlined"/>返回</a-button>
<Select
class="ml-6"
v-model:value="value1"
style="width: 260px"
:options="options1"
@change="handleChange"
></Select>
</div>
<BasicForm class="mt-2" @register="registerForm">
<template #refresh="{ field, model }">
<div class="mr-2" style="float: right">
<a-button type="primary" @click="resetFields">刷新</a-button>
</div>
</template>
</BasicForm>
</div> </div>
<div class="card_content"> <div class="card_content">
<col :span="3" /> <col :span="3" />
...@@ -21,7 +37,7 @@ ...@@ -21,7 +37,7 @@
<Col :span="3" @click="clickButton(1)" :class="{ 'listItemClass': selectedItem === 1 }"> <Col :span="3" @click="clickButton(1)" :class="{ 'listItemClass': selectedItem === 1 }">
<div class="card_item"> <div class="card_item">
<div class="card_itemInfo"> <div class="card_itemInfo">
<div class="dataNum">10</div> <div class="dataNum">{{ allNum }}</div>
<div class="dataTitle">执行记录</div> <div class="dataTitle">执行记录</div>
</div> </div>
</div> </div>
...@@ -30,7 +46,7 @@ ...@@ -30,7 +46,7 @@
<div class="card_item"> <div class="card_item">
<Icon icon="ant-design:check-circle-filled" :size="30" :color="'rgb(84,198,159)'" /> <Icon icon="ant-design:check-circle-filled" :size="30" :color="'rgb(84,198,159)'" />
<div class="card_itemInfo"> <div class="card_itemInfo">
<div class="dataNum">1</div> <div class="dataNum">{{ successNum }}</div>
<div class="dataTitle">成功</div> <div class="dataTitle">成功</div>
</div> </div>
</div> </div>
...@@ -39,7 +55,7 @@ ...@@ -39,7 +55,7 @@
<div class="card_item"> <div class="card_item">
<Icon icon="line-md:loading-twotone-loop" :size="30" :color="'rgb(81, 160, 248)'" /> <Icon icon="line-md:loading-twotone-loop" :size="30" :color="'rgb(81, 160, 248)'" />
<div class="card_itemInfo"> <div class="card_itemInfo">
<div class="dataNum">2</div> <div class="dataNum">{{ runningNum }}</div>
<div class="dataTitle">进行中</div> <div class="dataTitle">进行中</div>
</div> </div>
</div> </div>
...@@ -48,7 +64,7 @@ ...@@ -48,7 +64,7 @@
<div class="card_item"> <div class="card_item">
<Icon icon="line-md:close-circle-filled" :size="30" :color="'rgb(212, 115, 113)'" /> <Icon icon="line-md:close-circle-filled" :size="30" :color="'rgb(212, 115, 113)'" />
<div class="card_itemInfo"> <div class="card_itemInfo">
<div class="dataNum">3</div> <div class="dataNum">{{ failNum }}</div>
<div class="dataTitle">失败</div> <div class="dataTitle">失败</div>
</div> </div>
</div> </div>
...@@ -57,7 +73,7 @@ ...@@ -57,7 +73,7 @@
<div class="card_item"> <div class="card_item">
<Icon icon="ri:hourglass-fill" :size="30" :color="'rgb(147, 140, 206)'" /> <Icon icon="ri:hourglass-fill" :size="30" :color="'rgb(147, 140, 206)'" />
<div class="card_itemInfo"> <div class="card_itemInfo">
<div class="dataNum">4</div> <div class="dataNum">{{ waitNum }}</div>
<div class="dataTitle">等待</div> <div class="dataTitle">等待</div>
</div> </div>
</div> </div>
...@@ -106,9 +122,10 @@ ...@@ -106,9 +122,10 @@
<script setup lang="ts"> <script setup lang="ts">
import PageWrapper from "@/components/Page/src/PageWrapper.vue"; import PageWrapper from "@/components/Page/src/PageWrapper.vue";
import {Card, Col, Row} from "ant-design-vue"; import {Card, Col, Row,Select} from "ant-design-vue";
import type { SelectProps } from 'ant-design-vue';
import Icon from "@/components/Icon/Icon.vue"; import Icon from "@/components/Icon/Icon.vue";
import {Ref, ref, watch} from "vue"; import {onMounted, onUnmounted, Ref, ref, watch} from "vue";
import {useECharts} from "@/hooks/web/useECharts"; import {useECharts} from "@/hooks/web/useECharts";
import {useMessage} from "@/hooks/web/useMessage"; import {useMessage} from "@/hooks/web/useMessage";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
...@@ -124,7 +141,79 @@ import {BasicForm,useForm} from "@/components/Form"; ...@@ -124,7 +141,79 @@ import {BasicForm,useForm} from "@/components/Form";
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
/*饼图数据获取*/
const successNum = ref(0);
const runningNum = ref(0);
const failNum = ref(0);
const waitNum = ref(0);
const allNum = ref(0);
onMounted(() => {
tableList.forEach(item => {
if (item.operationalStatus === '成功') {
successNum.value ++
} else if (item.operationalStatus === '进行中') {
runningNum.value ++
} else if (item.operationalStatus === '失败') {
failNum.value ++
} else if (item.operationalStatus === '等待') {
waitNum.value ++
}
allNum.value ++
})
watch(
() => props.loading,
() => {
if (props.loading) {
return;
}
setOptions({
tooltip: {
trigger: 'item',
},
series: [
{
color: ['rgb(84,198,159)', 'rgb(81, 160, 248)', 'rgb(212, 115, 113)', 'rgb(147, 140, 206)'],
// name: '访问来源',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 2,
},
label: {
show: false,
position: 'center',
},
emphasis: {
label: {
show: true,
fontSize: '12',
fontWeight: 'bold',
},
},
labelLine: {
show: false,
},
data: [
{ value: successNum.value, name:'成功'},
{ value: runningNum.value , name:'进行中'},
{ value: failNum.value ,name:'失败'},
{ value: waitNum.value ,name:'等待'},
],
animationType: 'scale',
animationEasing: 'exponentialInOut',
animationDelay: function () {
return Math.random() * 100;
},
},
],
});
},
{ immediate: true },
);
})
const [register1] = useDescription({ const [register1] = useDescription({
bordered: false, bordered: false,
data: mockData, data: mockData,
...@@ -148,59 +237,7 @@ const route = useRoute(); ...@@ -148,59 +237,7 @@ const route = useRoute();
const go = useGo(); const go = useGo();
const searchInfo = ref(''); const searchInfo = ref('');
const selectedItem = ref() const selectedItem = ref()
watch(
() => props.loading,
() => {
if (props.loading) {
return;
}
setOptions({
tooltip: {
trigger: 'item',
},
series: [
{
color: ['rgb(84,198,159)', 'rgb(81, 160, 248)', 'rgb(212, 115, 113)', 'rgb(147, 140, 206)'],
// name: '访问来源',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 2,
},
label: {
show: false,
position: 'center',
},
emphasis: {
label: {
show: true,
fontSize: '12',
fontWeight: 'bold',
},
},
labelLine: {
show: false,
},
data: [
{ value: 1 , name:'成功'},
{ value: 2 , name:'进行中'},
{ value: 3 ,name:'失败'},
{ value: 4 ,name:'等待'},
],
animationType: 'scale',
animationEasing: 'exponentialInOut',
animationDelay: function () {
return Math.random() * 100;
},
},
],
});
},
{ immediate: true },
);
//初始化表单 //初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100, labelWidth: 100,
...@@ -256,8 +293,11 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get ...@@ -256,8 +293,11 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
// }, // },
}); });
/**返回按钮*/
function handleGoBack() {
router.go(-1);
}
/**执行 按钮*/ /**执行 按钮*/
const handleExecute = () => { const handleExecute = () => {
console.log('触发了执行按钮') console.log('触发了执行按钮')
...@@ -273,22 +313,73 @@ function handleEdit() { ...@@ -273,22 +313,73 @@ function handleEdit() {
/**重跑 按钮*/ /**重跑 按钮*/
const handleRun = () => { const handleRun = () => {
console.log('触发了重跑按钮') console.log('触发了重跑按钮')
createConfirm({
iconType: 'warning',
title: '重跑',
content: '确认重跑选中数据吗?',
onOk() {
createMessage.success('重跑成功!');
},
});
}; };
/**错误恢复 按钮*/ /**错误恢复 按钮*/
const handleRecover = () => { const handleRecover = () => {
console.log('触发了错误恢复按钮') console.log('触发了错误恢复按钮')
createConfirm({
iconType: 'warning',
title: '错误恢复',
content: '确认恢复选中数据吗?',
onOk() {
createMessage.success('恢复成功!');
},
});
}; };
/**取消 按钮*/ /**取消 按钮*/
const handleCancel = () => { const handleCancel = () => {
console.log('触发了取消执行按钮') console.log('触发了取消执行按钮')
createConfirm({
iconType: 'warning',
title: '取消执行',
content: '确认取消执行选中数据吗?',
onOk() {
createMessage.success('取消执行成功!');
},
});
}; };
const value1 = ref('admin-个人工作区,共享工作区,test001');
const options1 = ref<SelectProps['options']>([
{
label: 'admin-个人工作区',
value: 'admin-个人工作区',
},
{
label: '共享工作区',
value: '共享工作区',
},
{
label: 'test001',
value: 'test001',
},
{
label: 'test002',
value: 'test002',
},
{
label: 'test003',
value: 'test003',
},
]);
const handleChange = (value: string) => {
console.log(`selected ${value}`);
};
/**点击card 改变css样式*/ /**点击card 改变css样式*/
function clickButton(item){ function clickButton(item){
selectedItem.value = item; selectedItem.value = item;
} }
</script> </script>
...@@ -298,7 +389,6 @@ function clickButton(item){ ...@@ -298,7 +389,6 @@ function clickButton(item){
::v-deep(.ant-card-body) { ::v-deep(.ant-card-body) {
display: flex; display: flex;
justify-content: center; justify-content: center;
height: 150px;
padding: 0; padding: 0;
} }
.homePage_left { .homePage_left {
...@@ -308,6 +398,7 @@ function clickButton(item){ ...@@ -308,6 +398,7 @@ function clickButton(item){
} }
.card_content { .card_content {
width: 100%; width: 100%;
margin-bottom: 16px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
......
...@@ -26,6 +26,24 @@ export const tableList: any[] = [ ...@@ -26,6 +26,24 @@ export const tableList: any[] = [
version: 'V2', version: 'V2',
executeMode: '手动执行', executeMode: '手动执行',
}, },
{
dispatchTime: '2024-10-25 10:04:05',
executeTime: '2024-10-25 10:04:05',
rows: 12,
executeDuration: '5s',
operationalStatus: '等待',
version: 'V2',
executeMode: '手动执行',
},
{
dispatchTime: '2024-10-25 10:04:05',
executeTime: '2024-10-25 10:04:05',
rows: 12,
executeDuration: '5s',
operationalStatus: '等待',
version: 'V2',
executeMode: '手动执行',
},
] ]
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<template #toolbar> <template #toolbar>
<div style="flex: 1;display: flex; justify-content: space-between;"> <div style="flex: 1;display: flex; justify-content: space-between;">
<div> <div>
<span>加载成功数量:2&nbsp;</span> <span>加载成功数量:2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span>加载成功数量:0</span> <span>加载成功数量:0&nbsp;&nbsp;</span>
<span>(加载成功数量:0,</span> <span>(加载成功数量:0,</span>
<span>加载成功数量:0)</span> <span>加载成功数量:0)</span>
</div> </div>
......
import {BasicColumn, FormSchema} from "@/components/Table"; import { BasicColumn, FormSchema } from '@/components/Table';
import {DescItem} from "@/components/Description"; import { DescItem } from '@/components/Description';
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
...@@ -57,9 +56,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -57,9 +56,7 @@ export const searchFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
placeholder: '按来源过滤', placeholder: '按来源过滤',
options: [ options: [{ label: '指标汇总表', value: '1' }],
{ label: '指标汇总表', value: '1' },
],
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
...@@ -71,7 +68,8 @@ export const resetNameFormSchema: FormSchema[] = [ ...@@ -71,7 +68,8 @@ export const resetNameFormSchema: FormSchema[] = [
field: 'schedulingTime', field: 'schedulingTime',
component: 'RadioButtonGroup', component: 'RadioButtonGroup',
colProps: { colProps: {
lg: 4, md: 4, lg: 4,
md: 4,
}, },
defaultValue: '1', defaultValue: '1',
componentProps: { componentProps: {
...@@ -90,26 +88,27 @@ export const resetNameFormSchema: FormSchema[] = [ ...@@ -90,26 +88,27 @@ export const resetNameFormSchema: FormSchema[] = [
}, },
}, },
}, },
{ {
field: 'days', field: 'days',
component: 'DatePicker', component: 'DatePicker',
colProps: { colProps: {
lg: 3, lg: 3,
md: 3, md: 3,
}, },
defaultValue: new Date(), defaultValue: new Date(),
componentProps: { componentProps: {
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
placeholder: '选择日期范围', placeholder: '选择日期范围',
}, },
}, },
{ {
field: 'schedulingType', field: 'schedulingType',
component: 'Select', component: 'Select',
label: '调度类型', label: '调度类型',
colProps: { colProps: {
lg: 4, md: 4, lg: 4,
md: 4,
}, },
defaultValue: '1', defaultValue: '1',
componentProps: { componentProps: {
...@@ -137,7 +136,8 @@ export const resetNameFormSchema: FormSchema[] = [ ...@@ -137,7 +136,8 @@ export const resetNameFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
label: '发布状态', label: '发布状态',
colProps: { colProps: {
lg: 4, md: 4, lg: 4,
md: 4,
}, },
defaultValue: '1', defaultValue: '1',
componentProps: { componentProps: {
...@@ -160,6 +160,16 @@ export const resetNameFormSchema: FormSchema[] = [ ...@@ -160,6 +160,16 @@ export const resetNameFormSchema: FormSchema[] = [
], ],
}, },
}, },
{
field: 'refresh',
label: ' ',
colProps: {
lg: 9,
md: 9,
},
component: 'Slot',
slot: 'refresh',
},
]; ];
export const schema: DescItem[] = [ export const schema: DescItem[] = [
...@@ -175,7 +185,6 @@ export const schema: DescItem[] = [ ...@@ -175,7 +185,6 @@ export const schema: DescItem[] = [
field: 'createdBy', field: 'createdBy',
label: '创建者', label: '创建者',
}, },
]; ];
export const detailsColumns: BasicColumn[] = [ export const detailsColumns: BasicColumn[] = [
{ {
...@@ -194,7 +203,7 @@ export const detailsColumns: BasicColumn[] = [ ...@@ -194,7 +203,7 @@ export const detailsColumns: BasicColumn[] = [
width: 170, width: 170,
}, },
{ {
title: '调用状态', title: '运行状态',
dataIndex: 'callStatus', dataIndex: 'callStatus',
width: 100, width: 100,
slots: { customRender: 'callStatus' }, slots: { customRender: 'callStatus' },
...@@ -204,7 +213,7 @@ export const detailsColumns: BasicColumn[] = [ ...@@ -204,7 +213,7 @@ export const detailsColumns: BasicColumn[] = [
dataIndex: 'rows', dataIndex: 'rows',
width: 100, width: 100,
}, },
] ];
export const detailSchemas: FormSchema[] = [ export const detailSchemas: FormSchema[] = [
{ {
......
<template> <template>
<BasicModal <BasicModal
width="50%" width="40%"
@register="registerModal" @register="registerModal"
:title="getTitle" :title="getTitle"
@ok="handleSubmit" @ok="handleSubmit"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<template #insertFooter> <template #insertFooter>
<a-button @click="downloadLog" style="float: left;" type="link" >下载日志</a-button> <a-button @click="downloadLog" style="float: left;" type="link" >下载日志</a-button>
</template> </template>
<img src="@/assets/images/Log.png"/> <img class="w-1/1" src="@/assets/images/Log.png"/>
</BasicModal> </BasicModal>
</template> </template>
......
<template> <template>
<div class="m-5 mr-0 overflow-hidden bg-white"> <div class="overflow-hidden bg-white">
<BasicTree <BasicTree
title="" title=""
ref="treeRef" ref="treeRef"
......
<template> <template>
<div class="m-5 mr-0 overflow-hidden bg-white"> <div class="overflow-hidden bg-white">
<BasicTree <BasicTree
title="" title=""
ref="treeRef" ref="treeRef"
......
<template> <template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> <PageWrapper dense contentFullHeight fixedHeight>
<div class="w-1/4 xl:w-1/5"> <div class="flex">
<DataTree @select="handleSelect" style="height: 50%" /> <div class="w-1/4 xl:w-1/5">
<GroupTree @select="handleGroupSelect" style="height: 50%" /> <DataTree @select="handleSelect" style="height: 50%" />
<GroupTree @select="handleGroupSelect" style="height: 50%" />
</div>
<div class="w-3/4 xl:w-4/5">
<div>
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #headerTop>
<a-input-search
v-model:value="form.value"
placeholder="输入关键字搜索"
style="width: 200px"
/>
</template>
<template #toolbar>
<a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleExport"
>导出</a-button
>
<a-button type="primary" @click="handleImport">导入</a-button></template
>
</BasicTable>
</div>
<div v-if="showTable === 'true'">
<BasicTable @register="registerDataPreviewTable">
<template #headerTop>
<Dropdown :trigger="['click']">
<span type="primary" @click.prevent style="margin-left: 1180px"
>字段选择<Icon
icon="ant-design:caret-down-filled"
style="font-size: 12px; margin-left: 2px"
/></span>
<template #overlay>
<Checkbox.Group v-model:value="selectedTasks">
<Menu>
<MenuItem
v-for="task in fieldData"
:key="task.value"
@click.stop="handleTaskModel(item)"
>
<Checkbox :value="task.value">{{ task.label }}</Checkbox>
</MenuItem>
</Menu>
</Checkbox.Group>
</template>
</Dropdown>
<Icon
icon="bxs:download"
style="margin-left: 20px"
:size="25"
@click="handleDownload"
/>
</template>
</BasicTable>
</div>
</div>
</div> </div>
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar>
<a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleExport"
>导出</a-button
>
<a-button type="primary" @click="handleImport">导入</a-button></template
>
</BasicTable>
<importModal @register="registerImport" @success="handleImportSuccess" /> <importModal @register="registerImport" @success="handleImportSuccess" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, onMounted } from 'vue'; import { reactive, onMounted, ref } from 'vue';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import { getRoleListByPage, deleteById, exportRoleList } from '@/api/system/role/role'; import { exportRoleList } from '@/api/system/role/role';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import DataTree from './DataTree.vue'; import DataTree from './DataTree.vue';
import GroupTree from './GroupTree.vue'; import GroupTree from './GroupTree.vue';
import { DataTreeData } from './sqlDevelopmentData'; import { DataTreeData, previewData } from './sqlDevelopmentData';
import { columns, searchFormSchema } from './data'; import { columns, previewColumns } from './data';
import importModal from './importModal/importModal.vue'; import importModal from './importModal/importModal.vue';
import { router } from '@/router'; import { router } from '@/router';
import { downloadByData } from '@/utils/file/download'; import { downloadByData } from '@/utils/file/download';
import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { Dropdown, Menu, MenuItem, Checkbox } from 'ant-design-vue';
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
const [registerImport, { openModal: openImportModal }] = useModal(); const [registerImport, { openModal: openImportModal }] = useModal();
const searchInfo = reactive<Recordable>({}); const searchInfo = reactive<Recordable>({});
const { createMessage } = useMessage();
const showTable = ref('false');
const selectedTasks = ref([]);
const fieldData = [
{ value: 'script', label: '脚本' },
{ value: 'java', label: 'Java' },
{ value: 'python', label: 'Python' },
{ value: 'rTask', label: 'R任务' },
{ value: 'scala', label: 'Scala' },
{ value: 'sql', label: 'SQL' },
{ value: 'dataLoad', label: '数据加载' },
{ value: 'dataSync', label: '数据同步' },
{ value: 'dataQuality', label: '数据质量' },
{ value: 'dataMetrics', label: '数据指标' },
{ value: 'nestedWorkflow', label: '嵌套任务流' },
{ value: 'delay', label: '延时器' },
];
const form = reactive({
value: '',
});
const [ const [
registerTable, registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection }, { reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
...@@ -67,21 +136,44 @@ ...@@ -67,21 +136,44 @@
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
formConfig: { scroll: { y: 400 },
labelWidth: 10, useSearchForm: false,
schemas: searchFormSchema, showTableSetting: false,
autoSubmitOnEnter: true, bordered: true,
resetFunc: () => { handleSearchInfoFn(info) {
searchInfo.res = ''; return info;
}, },
});
const [registerDataPreviewTable] = useTable({
title: '数据预览',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
total: previewData.length,
data: previewData,
};
return { ...response };
}, },
useSearchForm: true, rowKey: 'id',
rowSelection: true,
columns: previewColumns,
showIndexColumn: false,
pagination: true,
scroll: { y: 400 },
useSearchForm: false,
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
handleSearchInfoFn(info) { handleSearchInfoFn(info) {
return info; return info;
}, },
}); });
function handleDownload() {
selectedTasks.value = [];
createMessage.success('下载成功');
}
/** 导出按钮*/ /** 导出按钮*/
async function handleExport() { async function handleExport() {
console.log('导出----'); console.log('导出----');
...@@ -111,9 +203,7 @@ ...@@ -111,9 +203,7 @@
} }
function handleGroupSelect() { function handleGroupSelect() {
router.push({ showTable.value = 'true';
path: '/scriptDevelopment/sqlDevelopment/sqlExecute/sqlExecute',
});
} }
onMounted(() => {}); onMounted(() => {});
</script> </script>
<template>
<BasicModal
width="55%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<template #footer>
<a-button type="primary" @click="handleSubmit">关闭</a-button>
</template>
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<!-- 下载-->
<a-button type="primary" @click="handleDownload"
><Icon icon="bxs:download" :size="20"
/></a-button>
</template>
</BasicTable>
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, reactive, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, useTable } from '@/components/Table';
import Icon from '@/components/Icon/Icon.vue';
import { previewData } from '../sqlDevelopmentData';
import { previewColumns } from '../data';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
const searchInfo = reactive<Recordable>({});
const tableData = ref([]);
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
tableData.value = [];
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
total: previewData.length,
data: previewData,
};
return { ...response };
},
rowKey: 'id',
rowSelection: true,
columns: previewColumns,
showIndexColumn: false,
pagination: false,
formConfig: {
labelWidth: 10,
autoSubmitOnEnter: true,
resetFunc: () => {
searchInfo.res = '';
},
},
useSearchForm: false,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
return info;
},
});
function handleDownload() {
createMessage.success('下载成功');
}
async function handleSubmit() {
closeModal();
}
onMounted(() => {});
</script>
...@@ -4,11 +4,10 @@ ...@@ -4,11 +4,10 @@
dense dense
contentFullHeight contentFullHeight
fixedHeight fixedHeight
contentClass="flex"
@back="goBack" @back="goBack"
> >
<GroupTree @select="handleSelect" class="w-1/4 xl:w-1/5" /> <div style="padding-top: 20px">
<div class="w-3/4 xl:w-4/5" style="padding-top: 20px">
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
<template #formFooter> <template #formFooter>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
...@@ -16,7 +15,7 @@ ...@@ -16,7 +15,7 @@
<Tooltip placement="top" title="新窗口运行"> <Tooltip placement="top" title="新窗口运行">
<a-button <a-button
type="primary" type="primary"
style="margin-right: 10px; margin-left: 500px" style="margin-right: 10px; margin-left: 700px"
@click="handleExecute" @click="handleExecute"
> >
<Icon icon="si:play-forward-duotone" :size="20" /> <Icon icon="si:play-forward-duotone" :size="20" />
...@@ -77,7 +76,6 @@ ...@@ -77,7 +76,6 @@
</div> </div>
<optionsModal @register="registerModal" /> <optionsModal @register="registerModal" />
<resultModal @register="registerResultModal" /> <resultModal @register="registerResultModal" />
<PreviewModal @register="registerPreviewModal" />
<RecordModal @register="registerRecordModal" /> <RecordModal @register="registerRecordModal" />
<versionManagementModal @register="registerVersionManagementModal" /> <versionManagementModal @register="registerVersionManagementModal" />
</PageWrapper> </PageWrapper>
...@@ -86,7 +84,6 @@ ...@@ -86,7 +84,6 @@
import { Tooltip } from 'ant-design-vue'; import { Tooltip } from 'ant-design-vue';
import { ref, nextTick, watch, onMounted } from 'vue'; import { ref, nextTick, watch, onMounted } from 'vue';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import GroupTree from '../GroupTree.vue';
import { jsonData } from '../sqlDevelopmentData'; import { jsonData } from '../sqlDevelopmentData';
import { formSchema } from '../data'; import { formSchema } from '../data';
import { useGo } from '@/hooks/web/usePage'; import { useGo } from '@/hooks/web/usePage';
...@@ -95,7 +92,6 @@ ...@@ -95,7 +92,6 @@
import optionsModal from './optionsModal.vue'; import optionsModal from './optionsModal.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import resultModal from './resultModal.vue'; import resultModal from './resultModal.vue';
import PreviewModal from './dataPreviewModal.vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue'; import RecordModal from './executeRecordModal.vue';
...@@ -107,7 +103,6 @@ ...@@ -107,7 +103,6 @@
const go = useGo(); const go = useGo();
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerResultModal, { openModal: openResultModal }] = useModal(); const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal(); const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal(); const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerForm] = useForm({ const [registerForm] = useForm({
...@@ -116,12 +111,6 @@ ...@@ -116,12 +111,6 @@
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
/** 部门树的select*/
function handleSelect() {
openPreviewModal(true, {
title: '数据预览',
});
}
function handleOptions() { function handleOptions() {
openModal(true, { openModal(true, {
title: '参数配置', title: '参数配置',
......
...@@ -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',
......
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[] = [
...@@ -284,6 +284,7 @@ export const sqlFormSchema: FormSchema[] = [ ...@@ -284,6 +284,7 @@ export const sqlFormSchema: FormSchema[] = [
{ {
label: 'SQL执行模式', label: 'SQL执行模式',
field: 'runMode', field: 'runMode',
defaultValue: '不拆分执行',
component: 'RadioGroup', component: 'RadioGroup',
componentProps: { componentProps: {
options: [ options: [
...@@ -702,6 +703,7 @@ export const embedFlowFormSchema: FormSchema[] = [ ...@@ -702,6 +703,7 @@ export const embedFlowFormSchema: FormSchema[] = [
{ {
label: '任务流', label: '任务流',
field: 'path', field: 'path',
required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -720,6 +722,27 @@ export const delayFormSchema: FormSchema[] = [ ...@@ -720,6 +722,27 @@ export const delayFormSchema: FormSchema[] = [
slot: 'time', slot: 'time',
}, },
]; ];
export const checkFormSchema: FormSchema[] = [
{
label: '落标检查',
field: 'path',
required: true,
slot: 'path',
},
{
label: '检查结果',
field: 'result',
component: 'CheckboxGroup',
componentProps: {
options: [
{
label: '所有规则均通过检查',
value: '所有规则均通过检查',
},
],
},
},
];
export const dataLoadConfigColumn: BasicColumn[] = [ export const dataLoadConfigColumn: BasicColumn[] = [
{ {
title: '参数名', title: '参数名',
...@@ -830,12 +853,38 @@ export const taskOverallConfig: FormSchema[] = [ ...@@ -830,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',
...@@ -1034,81 +1083,219 @@ export const defineEvent: FormSchema[] = [ ...@@ -1034,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 === '脚本自定义';
},
},
]; ];
...@@ -131,6 +131,9 @@ ...@@ -131,6 +131,9 @@
<MenuItem @click="handleTaskModel('12')"> <MenuItem @click="handleTaskModel('12')">
<span>延时器</span> <span>延时器</span>
</MenuItem> </MenuItem>
<MenuItem @click="handleTaskModel('13')">
<span>落标检查任务</span>
</MenuItem>
</Menu> </Menu>
</template> </template>
</Dropdown> </Dropdown>
......
...@@ -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: '每天一次',
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
</div> </div>
</template> </template>
<template #skip="{ field, model }"> <template #skip="{ field, model }">
<Checkbox v-model:checked="model[field]" @click="handleSkip(model[field])">开启</Checkbox> <Checkbox v-model:checked="model[field]" @click="handleSkip(model[field])"
>开启</Checkbox
>
</template> </template>
<template #group="{ field, model }"> <template #group="{ field, model }">
<Select :options="groupOptions" v-model:value="model[field]" /> <Select :options="groupOptions" v-model:value="model[field]" />
...@@ -186,16 +188,18 @@ ...@@ -186,16 +188,18 @@
<TabPane v-if="type === '9'" key="9" tab="数据质量任务"> <TabPane v-if="type === '9'" key="9" tab="数据质量任务">
<BasicForm @register="dataQualityForm"> <BasicForm @register="dataQualityForm">
<template #perc="{ field, model }"> <template #perc="{ field, model }">
<Switch v-model:checked="model.percFlag" /> <div class="flex" style="gap: 6px">
<InputNumber <Switch v-model:checked="model.percFlag" style="margin-top: 5px" />
style="width: 30%" <InputNumber
:disabled="!model.percFlag" style="width: 30%"
v-model:value="model[field]" :disabled="!model.percFlag"
:min="0" v-model:value="model[field]"
:max="100" :min="0"
:step="1" :max="100"
addon-after="%" :step="1"
/> />
<div style="font-size: 18px">%</div>
</div>
</template> </template>
</BasicForm> </BasicForm>
</TabPane> </TabPane>
...@@ -221,6 +225,19 @@ ...@@ -221,6 +225,19 @@
</template> </template>
</BasicForm> </BasicForm>
</TabPane> </TabPane>
<TabPane v-if="type === '13'" key="13" tab="落标检查任务">
<BasicForm @register="checkForm">
<template #path="{ field, model }">
<div style="display: flex">
<InputSearch
v-model:value="model[field]"
enter-button="选择"
@search="onCheckSearch"
/>
</div>
</template>
</BasicForm>
</TabPane>
<TabPane v-if="type !== '7' && type !== '8' && type !== '10'" key="100" tab="任务参数"> <TabPane v-if="type !== '7' && type !== '8' && type !== '10'" key="100" tab="任务参数">
<!--嵌套任务流任务区别部分--> <!--嵌套任务流任务区别部分-->
<div v-if="type === '11'"> <div v-if="type === '11'">
...@@ -259,7 +276,9 @@ ...@@ -259,7 +276,9 @@
<template #toolbar> <template #toolbar>
<div style="flex: 1; display: flex; justify-content: space-between"> <div style="flex: 1; display: flex; justify-content: space-between">
<a-button type="link">查看内置函数</a-button> <a-button type="link">查看内置函数</a-button>
<a-button type="link"><SyncOutlined />刷新参数列表</a-button> <a-button type="link" @click="handleFlushFieldList"
><SyncOutlined />刷新参数列表</a-button
>
</div> </div>
</template> </template>
</BasicTable> </BasicTable>
...@@ -282,6 +301,7 @@ ...@@ -282,6 +301,7 @@
Switch, Switch,
InputNumber, InputNumber,
CheckboxGroup, CheckboxGroup,
InputSearch,
} from 'ant-design-vue'; } from 'ant-design-vue';
import { import {
CheckOutlined, CheckOutlined,
...@@ -294,6 +314,7 @@ ...@@ -294,6 +314,7 @@
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 { import {
checkFormSchema,
dataIndexFormSchema, dataIndexFormSchema,
dataLoadConfigColumn, dataLoadConfigColumn,
dataLoadFormSchema, dataLoadFormSchema,
...@@ -582,7 +603,7 @@ ...@@ -582,7 +603,7 @@
value: '秒', value: '秒',
}, },
]; ];
const [delayForm, {}] = useForm({ const [delayForm] = useForm({
labelWidth: 120, labelWidth: 120,
baseColProps: { lg: 24, md: 24 }, baseColProps: { lg: 24, md: 24 },
schemas: delayFormSchema, schemas: delayFormSchema,
...@@ -591,6 +612,16 @@ ...@@ -591,6 +612,16 @@
span: 23, span: 23,
}, },
}); });
function onCheckSearch() {}
const [checkForm] = useForm({
labelWidth: 120,
baseColProps: { lg: 24, md: 24 },
schemas: checkFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化列表 //初始化列表
const typeOptions = [ const typeOptions = [
...@@ -662,7 +693,10 @@ ...@@ -662,7 +693,10 @@
striped: false, striped: false,
pagination: false, pagination: false,
}); });
const [dataLoadConfigTable, {}] = useTable({ function handleFlushFieldList() {
createMessage.success('刷新成功');
}
const [dataLoadConfigTable] = useTable({
title: '', title: '',
api: async (params) => { api: async (params) => {
console.log('params', params); console.log('params', params);
......
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