From 7b1c316d9e436e895fc2fd3cb133bcbe58d9f879 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:35:56 +0800 Subject: [PATCH] [Fix][UI][V1.0.0-Beta] Adjust the UI presentation of the dependent task. (#9649) --- .../components/form/fields/custom-parameters.ts | 3 ++- .../src/locales/modules/en_US.ts | 3 +++ .../src/locales/modules/zh_CN.ts | 3 +++ dolphinscheduler-ui-next/src/service/service.ts | 1 - .../src/utils/downloadFile.ts | 3 +-- .../task/components/node/fields/use-dependent.ts | 15 ++++++++++----- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts b/dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts index 0ae2978e5c..a04302e420 100644 --- a/dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts +++ b/dolphinscheduler-ui-next/src/components/form/fields/custom-parameters.ts @@ -110,8 +110,9 @@ export function renderCustomParameters( return h( NFormItemGi, { - showLabel: false, + showLabel: !!mergedChild.name, path: `${field}[${i}].${mergedChild.field}`, + label: mergedChild.name, span: unref(mergedChild.span), class: mergedChild.class }, diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index c785a70170..2eff1369d1 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -872,6 +872,9 @@ const project = { waiting_dependent_start: 'Waiting Dependent start', check_interval: 'Check interval', waiting_dependent_complete: 'Waiting Dependent complete', + project_name: 'Project Name', + process_name: 'Wrokflow Name', + cycle_time: 'Cycle Time', rule_name: 'Rule Name', null_check: 'NullCheck', custom_sql: 'CustomSql', diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index c8a3d47aa7..0121bc9bd5 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -861,6 +861,9 @@ const project = { waiting_dependent_start: '等待依赖启动', check_interval: '检查间隔', waiting_dependent_complete: '等待依赖完成', + project_name: '项目名称', + process_name: '工作流名称', + cycle_time: '时间周期', rule_name: '规则名称', null_check: '空值检测', custom_sql: '自定义SQL', diff --git a/dolphinscheduler-ui-next/src/service/service.ts b/dolphinscheduler-ui-next/src/service/service.ts index 92b25c8921..5d428d0fa9 100644 --- a/dolphinscheduler-ui-next/src/service/service.ts +++ b/dolphinscheduler-ui-next/src/service/service.ts @@ -93,5 +93,4 @@ service.interceptors.response.use((res: AxiosResponse) => { } }, err) - export { service as axios } diff --git a/dolphinscheduler-ui-next/src/utils/downloadFile.ts b/dolphinscheduler-ui-next/src/utils/downloadFile.ts index 4410fee4a4..6937a9fcba 100644 --- a/dolphinscheduler-ui-next/src/utils/downloadFile.ts +++ b/dolphinscheduler-ui-next/src/utils/downloadFile.ts @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -55,4 +54,4 @@ const downloadFile = (url: string, obj?: any) => { document.body.removeChild(form) } -export default downloadFile \ No newline at end of file +export default downloadFile diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts index 58781d8916..2d9c059c00 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-dependent.ts @@ -241,7 +241,8 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { (j = 0) => ({ type: 'select', field: 'projectCode', - span: 12, + name: t('project.node.project_name'), + span: 24, props: { filterable: true, onUpdateValue: async (projectCode: number) => { @@ -256,7 +257,8 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { (j = 0) => ({ type: 'select', field: 'definitionCode', - span: 12, + span: 24, + name: t('project.node.process_name'), props: { filterable: true, onUpdateValue: async (processCode: number) => { @@ -275,7 +277,8 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { (j = 0) => ({ type: 'select', field: 'depTaskCode', - span: 12, + span: 24, + name: t('project.node.task_name'), props: { filterable: true }, @@ -286,7 +289,8 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { (j = 0) => ({ type: 'select', field: 'cycle', - span: 12, + span: 10, + name: t('project.node.cycle_time'), props: { onUpdateValue: (value: 'month') => { model.dependTaskList[i].dependItemList[j].dateOptions = @@ -298,7 +302,8 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] { (j = 0) => ({ type: 'select', field: 'dateValue', - span: 12, + span: 10, + name: ' ', options: model.dependTaskList[i]?.dependItemList[j]?.dateOptions || [] })