From bd269cffbf7166093666bd89b6f912aa6dc9728f Mon Sep 17 00:00:00 2001 From: zhaowei Date: Tue, 3 Jun 2025 11:11:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=81=E6=B0=B4=E7=BA=BF=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/src/app.tsx | 2 + .../components/PipelineNodeDrawer/index.tsx | 179 ++++++++++-------- 2 files changed, 97 insertions(+), 84 deletions(-) diff --git a/react-ui/src/app.tsx b/react-ui/src/app.tsx index 686c495d..91b0389b 100644 --- a/react-ui/src/app.tsx +++ b/react-ui/src/app.tsx @@ -21,6 +21,7 @@ import { } from './services/session'; import './styles/menu.less'; import { needAuth } from './utils'; +// import { closeAllModals } from './utils/modal'; import { gotoLoginPage } from './utils/ui'; export { requestConfig as request } from './requestConfig'; @@ -96,6 +97,7 @@ export const layout: RuntimeConfig['layout'] = ({ initialState }) => { }, onPageChange: () => { const { location } = history; + // closeAllModals(); // 如果没有登录,重定向到 login if (!initialState?.currentUser && needAuth(location.pathname)) { gotoLoginPage(); diff --git a/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx b/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx index 9279e76d..fd1fb763 100644 --- a/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx +++ b/react-ui/src/pages/Pipeline/components/PipelineNodeDrawer/index.tsx @@ -35,6 +35,12 @@ const PipelineNodeParameter = forwardRef(({ onFormChange }: PipelineNodeParamete const [stagingItem, setStagingItem] = useState( {} as PipelineNodeModelSerialize, ); + const nodeId = Form.useWatch('id', form) as string; + const hasTaskInfo = + nodeId && + !nodeId.startsWith('git-clone') && + !nodeId.startsWith('dataset-export') && + !nodeId.startsWith('model-export'); const [open, setOpen] = useState(false); const [menuItems, setMenuItems] = useState([]); @@ -348,9 +354,9 @@ const PipelineNodeParameter = forwardRef(({ onFormChange }: PipelineNodeParamete }; // 控制策略 - const controlStrategyList = Object.entries(stagingItem.control_strategy ?? {}).map( - ([key, value]) => ({ key, value }), - ); + // const controlStrategyList = Object.entries(stagingItem.control_strategy ?? {}).map( + // ([key, value]) => ({ key, value }), + // ); // 输入参数 const inParametersList = Object.entries(stagingItem.in_parameters ?? {}).map(([key, value]) => ({ @@ -422,71 +428,73 @@ const PipelineNodeParameter = forwardRef(({ onFormChange }: PipelineNodeParamete > -
- -
- -
- - + {hasTaskInfo && ( + <> +
+ +
+ +
+ + + + + + +
- - + { + handleParameterClick('working_directory', value); + }} + /> + } + > + -
-
- { - handleParameterClick('working_directory', value); - }} - /> - } - > - - - { - handleParameterClick('command', value); - }} - /> - } - > -