Commit 1584952f94d38740394357e6980df9e64ced1ebd
1 parent
4a000ac0
弹窗保存后加载数据根据sname来
Showing
2 changed files
with
2 additions
and
2 deletions
src/components/Common/CommonHooks/useCommonBase.js
| ... | ... | @@ -234,7 +234,6 @@ const useCommonBase = props => { |
| 234 | 234 | // const getGdsmoduleById |
| 235 | 235 | const configReturnModel = (await commonServices.getService(token, configUrlModel)) |
| 236 | 236 | .data; |
| 237 | - console.log("🚀 ~ handleGetModelConfig ~ configReturnModel:", configReturnModel) | |
| 238 | 237 | |
| 239 | 238 | const configReturn = (await commonServices.getService(token, configUrl)) |
| 240 | 239 | .data; |
| ... | ... | @@ -250,6 +249,7 @@ const useCommonBase = props => { |
| 250 | 249 | if (configReturnModelData) { |
| 251 | 250 | formData.forEach(item => { |
| 252 | 251 | item.sModelType = configReturnModelData?.sModelType |
| 252 | + item.sName = configReturnModelData?.sName | |
| 253 | 253 | }) |
| 254 | 254 | } |
| 255 | 255 | return formData; | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -257,7 +257,7 @@ const useCommonModelEvent = props => { |
| 257 | 257 | const [refreshCount, setRefreshCount] = useState(0); |
| 258 | 258 | const sModelType = |
| 259 | 259 | Array.isArray(formData) && formData.length > 0 |
| 260 | - ? (formData[0]?.sModelType || '') | |
| 260 | + ? (formData[0]?.sName || formData[0]?.sModelType || '') | |
| 261 | 261 | : ''; |
| 262 | 262 | // 初始化事件 |
| 263 | 263 | useEffect( | ... | ... |