diff --git a/src/page/Dashboard/DataPrint/QueryConditionBox/index.jsx b/src/page/Dashboard/DataPrint/QueryConditionBox/index.jsx index 847d216..069d3eb 100644 --- a/src/page/Dashboard/DataPrint/QueryConditionBox/index.jsx +++ b/src/page/Dashboard/DataPrint/QueryConditionBox/index.jsx @@ -155,7 +155,7 @@ function QueryConditionBox(props) { + onClick={() => navigate('/generate-certificate')}>生成新证明 diff --git a/src/page/Dashboard/GenerateCertificate/ChooseUser.jsx b/src/page/Dashboard/GenerateCertificate/ChooseUser.jsx index 0db9e9b..997cf78 100644 --- a/src/page/Dashboard/GenerateCertificate/ChooseUser.jsx +++ b/src/page/Dashboard/GenerateCertificate/ChooseUser.jsx @@ -51,21 +51,23 @@ const ChooseUser = props => { console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); allowNext(selectedRows.length > 0); setRequest({...request, stuffNumber: selectedRows[0].staffNumber}); - sessionStorage.setItem('chooseUser', selectedRowKeys) - sessionStorage.removeItem('certificateParam'); - sessionStorage.removeItem('targetKeys'); - sessionStorage.removeItem('generate-request'); + //sessionStorage.setItem('chooseUser', selectedRowKeys) + //sessionStorage.removeItem('certificateParam'); + //sessionStorage.removeItem('targetKeys'); + //sessionStorage.removeItem('generate-request'); }, - defaultSelectedRowKeys: () => { - const selectedRowKeys = []; - let selected = sessionStorage.getItem('chooseUser'); - if (selected) { - // 转换为number - selectedRowKeys.push(selected); - allowNext(selectedRowKeys.length > 0); - } - return selectedRowKeys; - } + //defaultSelectedRowKeys: () => { + // const selectedRowKeys = []; + // let selected = sessionStorage.getItem('chooseUser'); + // if (selected) { + // // 转换为number + // selectedRowKeys.push(selected); + // allowNext(selectedRowKeys.length > 0); + // } + // return selectedRowKeys; + //} + // 移除默认选中行的缓存恢复 + defaultSelectedRowKeys: () => [], }; useEffect(() => { diff --git a/src/page/Dashboard/GenerateCertificate/index.jsx b/src/page/Dashboard/GenerateCertificate/index.jsx index d1f482c..c922ac0 100644 --- a/src/page/Dashboard/GenerateCertificate/index.jsx +++ b/src/page/Dashboard/GenerateCertificate/index.jsx @@ -15,14 +15,15 @@ const GenerateCertificate = props => { const navigate = useNavigate(); - const [current, setCurrent] = React.useState(() => { - let nowStep = sessionStorage.getItem('nowStep'); - if (nowStep === null) { - return 0; - } else { - return parseInt(nowStep); - } - }); + //const [current, setCurrent] = React.useState(() => { + // let nowStep = sessionStorage.getItem('nowStep'); + // if (nowStep === null) { + // return 0; + // } else { + // return parseInt(nowStep); + // } + //}); + const [current, setCurrent] = React.useState(0); const [request, setRequest] = React.useState({ ids: [],