提交 61d38944 authored 作者: 钟是志's avatar 钟是志

黔南迎新 报到单打印页面修改

上级 576e70c0
...@@ -3,6 +3,7 @@ import ReactToPrint from 'react-to-print'; ...@@ -3,6 +3,7 @@ import ReactToPrint from 'react-to-print';
import styles from './index.less'; import styles from './index.less';
import { Button } from 'antd'; import { Button } from 'antd';
import IframeForRenderForm from './IframeForRenderForm'; import IframeForRenderForm from './IframeForRenderForm';
import { setToken } from '@/utils/authority';
const idsConfig = [ const idsConfig = [
...@@ -21,7 +22,6 @@ const idsConfig = [ ...@@ -21,7 +22,6 @@ const idsConfig = [
export default function PrintQnmz(props) { export default function PrintQnmz(props) {
const componentRef = useRef(); const componentRef = useRef();
const [showPrint, setShowPrint] = useState(false); const [showPrint, setShowPrint] = useState(false);
console.log(window.history);
useEffect(() => { useEffect(() => {
document.title = '新手报到单打印'; document.title = '新手报到单打印';
setTimeout(() => { setTimeout(() => {
...@@ -64,6 +64,14 @@ export default function PrintQnmz(props) { ...@@ -64,6 +64,14 @@ export default function PrintQnmz(props) {
}}>返回</Button> }}>返回</Button>
} }
{
showPrint && window.history.length > 1 &&
<Button type={'danger'} onClick={() => {
setToken('');
window.location.reload();
}}>清空缓存</Button>
}
</div> </div>
<div ref={componentRef}> <div ref={componentRef}>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
.buttonDiv{ .buttonDiv{
display: grid; display: grid;
grid-template-columns: 150px 150px; grid-template-columns: 150px 150px 150px;
column-gap: 20px; column-gap: 20px;
padding: 10px; padding: 10px;
justify-content: center; justify-content: center;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论