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

增加了一个全屏查看按钮

上级 dfcef8d4
......@@ -46,8 +46,8 @@ export default class Detail extends Component {
if (event.data && event.data.indexOf && event.data.indexOf('iframeDetailHeight') > -1) {
const height = Number(event.data.split('-')[1]);
document.getElementById('detailIframeId').height = height + 50;
setTimeout(()=> {
document.getElementsByClassName('ant-layout-content')[0].scrollTo(0,height);
setTimeout(() => {
document.getElementsByClassName('ant-layout-content')[0].scrollTo(0, height);
// 23627 签约审核/另行签约审核,审核框优化,自动显示到当前页面,不要一直拉
// 需求存在争议 暂时这样解决
}, 500);
......@@ -68,12 +68,12 @@ export default class Detail extends Component {
const url = config.onestopPC.split('/#/');
let showPrint = this.props.location?.state?.showPrint;
let iframeUrl = `${url[0]}/#/IframeForDetail?id=${id}&token=${getToken()}`;
if(showPrint){
if (showPrint) {
iframeUrl = iframeUrl + '&showPrint=true';
}
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
return (
<PageHeaderWrapper title="">
<PageHeaderWrapper title=''>
<Shell>
<div
style={{
......@@ -82,26 +82,32 @@ export default class Detail extends Component {
}}>
{showAll ? (
<ButtonDiy
name="返回"
className="defaultBlue"
name='返回'
className='defaultBlue'
handleClick={() => {
router.goBack();
}}
icon="arrow-left"
icon='arrow-left'
/>
) : null}
<ButtonDiy
name={'全屏查看'}
className='defaultBlue'
handleClick={() => {
document.getElementById('detailIframeId').requestFullscreen();
}} />
</div>
</Shell>
<Shell>
<iframe
src={iframeUrl}
frameBorder={0}
id="detailIframeId"
name="applyIframe"
marginWidth="0"
marginHeight="0"
id='detailIframeId'
name='applyIframe'
marginWidth='0'
marginHeight='0'
onLoad={this.showAll}
allowtransparency="yes"
allowtransparency='yes'
seamless
scrolling={'no'}
style={{
......@@ -111,6 +117,21 @@ export default class Detail extends Component {
}}
/>
</Shell>
<Shell>
<div
style={{
height: '54px',
padding: '12px 0 12px 12px',
}}>
<ButtonDiy
name={'全屏查看'}
type={'primary'}
// className='primaryBlue'
handleClick={() => {
document.getElementById('detailIframeId').requestFullscreen();
}} />
</div>
</Shell>
</PageHeaderWrapper>
);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论