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

增加迎新打印报到单的页面

上级 1a2ed5c5
...@@ -25,15 +25,23 @@ export default function PrintQnmz(props) { ...@@ -25,15 +25,23 @@ export default function PrintQnmz(props) {
document.title = "新手报到单打印"; document.title = "新手报到单打印";
setTimeout(() => { setTimeout(() => {
setShowPrint(true); setShowPrint(true);
}, 2000); }, 1000);
}, []); }, []);
return (<div> return (<div>
<div className={styles.buttonDiv}>
{ {
showPrint && <ReactToPrint showPrint && <ReactToPrint
trigger={() => <div className={styles.buttonDiv}><Button type={"primary"}>打印</Button></div>} trigger={() => <Button type={"primary"}>打印</Button>}
content={() => componentRef.current} content={() => componentRef.current}
/> />
} }
{
showPrint &&
<Button type={"danger"} onClick={() => {
window.history.goBack()
}}>返回</Button>
}
</div>
<div ref={componentRef}> <div ref={componentRef}>
{ {
idsConfig.map((x) => { idsConfig.map((x) => {
......
...@@ -18,10 +18,9 @@ ...@@ -18,10 +18,9 @@
} }
.buttonDiv{ .buttonDiv{
display: grid;
grid-template-columns: 150px 150px;
column-gap: 20px;
padding: 10px; padding: 10px;
margin: 0px auto; justify-content: center;
//font-size: 20px;
//font-weight: bold;
width: 100%;
text-align: center;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论