From ec9fe1733b8d564193af1500c8a19d4755fe655f Mon Sep 17 00:00:00 2001 From: calvin Date: Sat, 26 Feb 2022 05:27:09 +0800 Subject: [PATCH] [Improve][UI-Next] Work out a little kink about the select component of the environment in the task form. --- .../task/components/node/fields/use-environment-name.ts | 5 +++-- .../src/views/projects/task/components/node/use-task.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-environment-name.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-environment-name.ts index 0799046084..5a2c2a0ddd 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-environment-name.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-environment-name.ts @@ -36,9 +36,10 @@ export function useEnvironmentName( loading.value = true try { const res = await queryAllEnvironmentList() - environmentList = res.map((item: { code: string; name: string }) => ({ + environmentList = res.map((item: { code: string; name: string; workerGroups: string[] }) => ({ label: item.name, - value: item.code + value: item.code, + workerGroups: item.workerGroups })) options.value = environmentList.filter((option: IEnvironmentNameOption) => filterByWorkerGroup(option) diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts index 85735f6d6c..22438a97a3 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/use-task.ts @@ -150,4 +150,4 @@ export function useTask({ } return node -} +} \ No newline at end of file