Commit fed47da77f0dc061f41abf1e00ee9e31e51e6790
1 parent
edd37f0b
弹窗关闭后刷新
Showing
3 changed files
with
8 additions
and
5 deletions
src/components/Common/CommonHooks/useCommonBase.js
| ... | ... | @@ -103,7 +103,9 @@ const useCommonBase = props => { |
| 103 | 103 | |
| 104 | 104 | handleSaveState({ formData, ...addState }); |
| 105 | 105 | }, []); |
| 106 | - | |
| 106 | + useEffect(() => { | |
| 107 | + // handleSaveState({ refreshTableList: [] }); | |
| 108 | + }, [props?.refresh]) | |
| 107 | 109 | const { callbackRefresh, callback } = state; |
| 108 | 110 | // 使用useCallback钩子函数,确保callback函数在callbackRefresh改变时重新调用 |
| 109 | 111 | useXlyCallback(callbackRefresh, callback, state, () => { |
| ... | ... | @@ -3473,8 +3475,8 @@ const useCommonBase = props => { |
| 3473 | 3475 | if (tbName === 'master') { |
| 3474 | 3476 | const result = handleMasterChange(tbName, selectConfig.sName, {}, null, null, true, tableData); |
| 3475 | 3477 | tableData = result.masterData; |
| 3476 | - } else if (tbName.includes('slave')){ | |
| 3477 | - tableData.forEach(item=>{ | |
| 3478 | + } else if (tbName.includes('slave')) { | |
| 3479 | + tableData.forEach(item => { | |
| 3478 | 3480 | item.sParentId = state?.masterData?.sId |
| 3479 | 3481 | }) |
| 3480 | 3482 | } |
| ... | ... | @@ -3776,7 +3778,7 @@ const useCommonBase = props => { |
| 3776 | 3778 | onSelectCommonPopup: handleSelectCommonPopup, |
| 3777 | 3779 | onDropDownBlur: handleTableBlur, |
| 3778 | 3780 | onDel: handleDel, // 删除 |
| 3779 | - onBtnExamine: handleAudit, | |
| 3781 | + // onBtnExamine: handleAudit, | |
| 3780 | 3782 | }; |
| 3781 | 3783 | |
| 3782 | 3784 | // 切换页面时,加载角标数据 | ... | ... |
src/mes/common/commonModelComponent/index.js
src/mes/indexMes/index.js
| ... | ... | @@ -1184,7 +1184,7 @@ const CommonModal = () => { |
| 1184 | 1184 | onCancel: () => { |
| 1185 | 1185 | window.bXingchejiluModal = false; |
| 1186 | 1186 | window.deviceTargetInfoModal = false; |
| 1187 | - dispatch(["saveState", { [`${sName}Visible`]: false }]); | |
| 1187 | + dispatch(["saveState", { [`${sName}Visible`]: false, refresh: true}]); | |
| 1188 | 1188 | }, |
| 1189 | 1189 | parentProps: hooksProps[`${sName}parentProps`], |
| 1190 | 1190 | modalCallback: hooksProps[`${sName}modalCallback`] | ... | ... |