From 28dc25e9f9e997322c8400594dc05bd1c08a8740 Mon Sep 17 00:00:00 2001 From: "SGK\\17962" <1796293269@qq.com> Date: Wed, 26 Nov 2025 09:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=90=8D=E7=A7=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/example-expression.vue | 2 +- src/components/common/select-group.vue | 13 ++--- .../workflow/modules/drawer/start-drawer.vue | 26 ++-------- src/service/api/group.ts | 5 +- .../task/modules/job-task-operate-drawer.vue | 52 +++++++++++++++++-- 5 files changed, 60 insertions(+), 38 deletions(-) diff --git a/src/components/common/example-expression.vue b/src/components/common/example-expression.vue index a45e4f2..e5dacdc 100644 --- a/src/components/common/example-expression.vue +++ b/src/components/common/example-expression.vue @@ -46,7 +46,7 @@ const examples = { } const typeLabel = 'QL' -const exampleText = `// 查询语言示例\nfrom Employee e\nwhere e.salary > 10000\nand e.joinDate > '2020-01-01'\nselect e.name, e.position` +const exampleText = 'if (city ==1 and age>70 and sex==1) then {return 33;}' const toggleExample = () => { show.value = !show.value diff --git a/src/components/common/select-group.vue b/src/components/common/select-group.vue index da5bbb1..738b9e9 100644 --- a/src/components/common/select-group.vue +++ b/src/components/common/select-group.vue @@ -3,7 +3,6 @@ import { ref } from 'vue'; import type { SelectOption } from 'naive-ui'; import { NEllipsis } from 'naive-ui'; import { $t } from '@/locales'; -import { translateOptions2 } from '@/utils/common'; import { fetchGetAllGroupNameList } from '@/service/api'; defineOptions({ @@ -28,12 +27,14 @@ const emit = defineEmits(); /** 可选组列表 */ const groupNameList = ref([]); +const groups = ref(); async function getGroupNameList() { - const { data, error } = await fetchGetAllGroupNameList(); - if (!error) { - groupNameList.value = data; - } + const res= await fetchGetAllGroupNameList(); + groups.value = res.data?.map(option => ({ + value: option.groupName, + label: option.groupNameCn + })); } const handleUpdate = (value: string) => { @@ -49,7 +50,7 @@ const renderLabel = (option: SelectOption) => {option.label} { .catch(() => window.$message?.warning('请检查表单信息')); }; -const getGroupNameList = async () => { - const { data, error } = await fetchGetAllGroupNameList(); - if (!error) { - groupNameList.value = data; - } -}; - -getGroupNameList(); - const typeChange = (value: number) => { if (value === 3) { form.value.triggerInterval = '* * * * * ?'; @@ -148,19 +140,7 @@ const rules: Record = { - + diff --git a/src/service/api/group.ts b/src/service/api/group.ts index ea42f8c..1eab799 100644 --- a/src/service/api/group.ts +++ b/src/service/api/group.ts @@ -9,11 +9,10 @@ export function fetchGetGroupConfigList(params?: Api.GroupConfig.GroupConfigSear }); } -export function fetchGetAllGroupNameList(params?: Api.GroupConfig.GroupConfigSearchParams) { - return request({ +export function fetchGetAllGroupNameList() { + return request({ url: '/group/all/group-name/list', method: 'get', - params }); } diff --git a/src/views/job/task/modules/job-task-operate-drawer.vue b/src/views/job/task/modules/job-task-operate-drawer.vue index e964941..a10010e 100644 --- a/src/views/job/task/modules/job-task-operate-drawer.vue +++ b/src/views/job/task/modules/job-task-operate-drawer.vue @@ -204,6 +204,11 @@ const executorCustomOptions = [ type ScriptParams = { method: string; + downloadType: string; + userName: string; + password: string; + downloadPath: string; + downloadUrl: string; scriptParams: string; charset: string; }; @@ -213,6 +218,11 @@ const scriptParams = reactive(createDefaultScriptParams()); function createDefaultScriptParams() { return { method: 'LOCAL_SCRIPT', + downloadType: 'FTP', + userName: '', + password: '', + downloadPath: '', + downloadUrl: '', scriptParams: '', charset: '' }; @@ -472,6 +482,24 @@ const scriptMethodOptions = [ value: 'LOCAL_SCRIPT' } ]; +const downloadTypeOptions = [ + { + label: 'SFTP', + value: 'SFTP' + }, + { + label: 'FTP', + value: 'FTP' + }, + { + label: 'MINIO', + value: 'MINIO' + }, + { + label: 'S3', + value: 'S3' + } +];