From 1584952f94d38740394357e6980df9e64ced1ebd Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Wed, 24 Dec 2025 14:36:48 +0800 Subject: [PATCH] 弹窗保存后加载数据根据sname来 --- src/components/Common/CommonHooks/useCommonBase.js | 2 +- src/mes/common/commonModelComponent/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Common/CommonHooks/useCommonBase.js b/src/components/Common/CommonHooks/useCommonBase.js index 567f557..a1bf31a 100644 --- a/src/components/Common/CommonHooks/useCommonBase.js +++ b/src/components/Common/CommonHooks/useCommonBase.js @@ -234,7 +234,6 @@ const useCommonBase = props => { // const getGdsmoduleById const configReturnModel = (await commonServices.getService(token, configUrlModel)) .data; - console.log("🚀 ~ handleGetModelConfig ~ configReturnModel:", configReturnModel) const configReturn = (await commonServices.getService(token, configUrl)) .data; @@ -250,6 +249,7 @@ const useCommonBase = props => { if (configReturnModelData) { formData.forEach(item => { item.sModelType = configReturnModelData?.sModelType + item.sName = configReturnModelData?.sName }) } return formData; diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js index ad79702..6cd6b5f 100644 --- a/src/mes/common/commonModelComponent/index.js +++ b/src/mes/common/commonModelComponent/index.js @@ -257,7 +257,7 @@ const useCommonModelEvent = props => { const [refreshCount, setRefreshCount] = useState(0); const sModelType = Array.isArray(formData) && formData.length > 0 - ? (formData[0]?.sModelType || '') + ? (formData[0]?.sName || formData[0]?.sModelType || '') : ''; // 初始化事件 useEffect( -- libgit2 0.22.2