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

一站式表单审批页面修改

上级 2f35d8ea
...@@ -5,13 +5,14 @@ import ButtonDiy from '@/baseComponent/ButtonDiy'; ...@@ -5,13 +5,14 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
import router from 'umi/router'; import router from 'umi/router';
import { getToken } from '@/utils/authority'; import { getToken } from '@/utils/authority';
import config from '@/config/config'; import config from '@/config/config';
import { message, Modal, notification, Popconfirm } from "antd"; import { message, Modal, notification, Popconfirm } from 'antd';
import DetailOneStop from '@/webPublic/one_stop_public/DetailForAudit/IframeForDetail'; import DetailOneStop from '@/webPublic/one_stop_public/DetailForAudit/IframeForDetail';
window.iframeParentComponent = { window.iframeParentComponent = {
Modal, Modal,
message, message,
notification, notification,
Popconfirm Popconfirm,
}; };
const getUrlInfo = (param) => { const getUrlInfo = (param) => {
...@@ -44,6 +45,7 @@ export default class Detail extends Component { ...@@ -44,6 +45,7 @@ export default class Detail extends Component {
} }
this.state = { this.state = {
id, id,
showAll: props.from !== 'onestopApp2.0'
}; };
} }
...@@ -53,17 +55,10 @@ export default class Detail extends Component { ...@@ -53,17 +55,10 @@ export default class Detail extends Component {
(event) => { (event) => {
if (event.data && event.data.indexOf && event.data.indexOf('iframeDetailHeight') > -1) { if (event.data && event.data.indexOf && event.data.indexOf('iframeDetailHeight') > -1) {
const height = Number(event.data.split('-')[1]); const height = Number(event.data.split('-')[1]);
// console.log(height); const dom = document.getElementById('detailIframeId');
document.getElementById('detailIframeId').height = height + 50; if(dom){
setTimeout(() => { document.getElementById('detailIframeId').height = height + 50;
let d = document.getElementsByClassName('ant-layout-content'); }
if(d && d.length){
d[0].scrollTo(0, height);
}
// document.getElementsByClassName('ant-layout-content')[0].scrollTo(0, height);
// 23627 签约审核/另行签约审核,审核框优化,自动显示到当前页面,不要一直拉
// 需求存在争议 暂时这样解决
}, 500);
} }
}, },
false, false,
...@@ -86,7 +81,7 @@ export default class Detail extends Component { ...@@ -86,7 +81,7 @@ export default class Detail extends Component {
if (showPrint) { if (showPrint) {
iframeUrl = iframeUrl + '&showPrint=true'; iframeUrl = iframeUrl + '&showPrint=true';
} }
if(from === 'onestopApp2.0'){ if (from === 'onestopApp2.0') {
iframeUrl = config.gateWayPort + `/portal/#/showAuditIframe?id=${id}&hasSingle=false&token=${getToken()}&isPrint=false`; iframeUrl = config.gateWayPort + `/portal/#/showAuditIframe?id=${id}&hasSingle=false&token=${getToken()}&isPrint=false`;
} }
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`; // iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
...@@ -117,24 +112,30 @@ export default class Detail extends Component { ...@@ -117,24 +112,30 @@ export default class Detail extends Component {
</div> </div>
</Shell> </Shell>
<Shell> <Shell>
<DetailOneStop id={id}/> {
{/* <iframe from === 'onestopApp2.0' ?
src={iframeUrl} <iframe
frameBorder={0} src={iframeUrl}
id='detailIframeId' frameBorder={0}
name='applyIframe' id='detailIframeId'
marginWidth='0' name='applyIframe'
marginHeight='0' marginWidth='0'
onLoad={this.showAll} marginHeight='0'
allowtransparency='yes' onLoad={this.showAll}
seamless allowtransparency='yes'
scrolling={'no'} seamless
style={{ scrolling={'no'}
width: '100%', style={{
overflowY: 'hidden', width: '100%',
minHeight: '80vh', overflowY: 'hidden',
}} minHeight: '80vh',
/>*/} }}
/> :
<div id={'detailIframeId'}>
<DetailOneStop id={id} {...this.props} />
</div>
}
</Shell> </Shell>
<Shell> <Shell>
<div <div
......
...@@ -24,18 +24,18 @@ export default class WebModal extends Component { ...@@ -24,18 +24,18 @@ export default class WebModal extends Component {
* 修改Iframe打开弹窗的时候 弹窗定位错误的bug * 修改Iframe打开弹窗的时候 弹窗定位错误的bug
* */ * */
componentDidMount() { componentDidMount() {
setTimeout(() => { // setTimeout(() => {
let dom = document.getElementById('detailInfoDiv'); // let dom = document.getElementById('detailInfoDiv');
if (dom && dom.offsetHeight) { // if (dom && dom.offsetHeight) {
let height = dom.offsetHeight; // let height = dom.offsetHeight;
if (height > 700) { // if (height > 700) {
this.setState({ // this.setState({
top: height - 700, // top: height - 700,
}); // });
} // }
// console.log(height, 'Iframe页面的高度'); // // console.log(height, 'Iframe页面的高度');
} // }
}, 1500); // }, 1500);
} }
render() { render() {
......
...@@ -227,12 +227,12 @@ export default class GetDetail extends Component { ...@@ -227,12 +227,12 @@ export default class GetDetail extends Component {
btnList: arr, btnList: arr,
radiovalue: val.formLevelId ? val.formLevelId : arr[arr.length - 1].id, radiovalue: val.formLevelId ? val.formLevelId : arr[arr.length - 1].id,
}, () => { }, () => {
this.giveMessageTop(); // this.giveMessageTop();
}); });
}, },
}); });
} else { } else {
this.giveMessageTop(); // this.giveMessageTop();
} }
}, },
); );
...@@ -284,20 +284,6 @@ export default class GetDetail extends Component { ...@@ -284,20 +284,6 @@ export default class GetDetail extends Component {
}); });
}; };
giveMessageTop = () => {
const isCg = this.props.history.location.state && this.props.history.location.state.isCg;
const fromIframe =
this.props.history.location.state && this.props.history.location.state.fromIframe;
if (fromIframe) {
const ifrmeTimeOut = setTimeout(() => {
const dom = document.getElementById('detailInfoDiv');
if (typeof dom.scrollHeight !== 'undefined') {
window.top.postMessage(`iframeDetailHeight-${dom.scrollHeight}`, '*');
}
clearTimeout(ifrmeTimeOut);
}, 2500);
}
};
/** /**
* @function 用户点击确认执行相应操作 * @function 用户点击确认执行相应操作
...@@ -495,7 +481,7 @@ export default class GetDetail extends Component { ...@@ -495,7 +481,7 @@ export default class GetDetail extends Component {
justifyContent: 'center', justifyContent: 'center',
}} }}
> >
<div style={{ width: 1200 }}> <div style={{ width: '100%' }}>
<div <div
className={styles.header} className={styles.header}
style={{ style={{
...@@ -610,7 +596,7 @@ export default class GetDetail extends Component { ...@@ -610,7 +596,7 @@ export default class GetDetail extends Component {
</div> </div>
{isLoading ? ( {isLoading ? (
<> <>
<Card> <Card style={{width: '100%'}}>
{!isCloseUserDetail && ( {!isCloseUserDetail && (
<div className={styles.body_hea}> <div className={styles.body_hea}>
<h3>发起人信息</h3> <h3>发起人信息</h3>
...@@ -727,7 +713,7 @@ export default class GetDetail extends Component { ...@@ -727,7 +713,7 @@ export default class GetDetail extends Component {
alignItems: 'center', alignItems: 'center',
}} }}
> >
<Spin size='large' /> <Spin size='large' spinning={true}/>
</div> </div>
) : ( ) : (
/* <div> /* <div>
...@@ -780,7 +766,7 @@ export default class GetDetail extends Component { ...@@ -780,7 +766,7 @@ export default class GetDetail extends Component {
)} )}
</div> </div>
</Card> </Card>
<Card> <Card style={{width: '100%'}}>
<div className={styles.body_content} style={{ minHeight: '300px' }}> <div className={styles.body_content} style={{ minHeight: '300px' }}>
<div id={'btnsModalMountDiv'}></div> <div id={'btnsModalMountDiv'}></div>
<h3> <h3>
...@@ -1025,7 +1011,7 @@ export default class GetDetail extends Component { ...@@ -1025,7 +1011,7 @@ export default class GetDetail extends Component {
alignItems: 'center', alignItems: 'center',
}} }}
> >
<Spin size='large' /> <Spin size='large' spinning={true}/>
</div> </div>
)} )}
<PortalFlowExamineModal // 流程图 <PortalFlowExamineModal // 流程图
......
...@@ -40,7 +40,7 @@ export default class GetDetail extends Component { ...@@ -40,7 +40,7 @@ export default class GetDetail extends Component {
...location, ...location,
state: { state: {
id, id,
fromIframe: true, fromIframe: false,
}, },
}; };
return ( return (
...@@ -51,6 +51,8 @@ export default class GetDetail extends Component { ...@@ -51,6 +51,8 @@ export default class GetDetail extends Component {
// overflow: isFromIframe() ? 'hidden' : 'unset', // overflow: isFromIframe() ? 'hidden' : 'unset',
overflow: 'auto', overflow: 'auto',
height: '100%', height: '100%',
width: 'calc(100vw - 300px)',
padding: 0,
}} }}
> >
<DetailSplit history={{...this.props.history, location}} <DetailSplit history={{...this.props.history, location}}
......
...@@ -6,10 +6,13 @@ ...@@ -6,10 +6,13 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import styles from './index.less' import styles from './index.less'
export default class Card extends Component { export default class Card extends Component {
constructor(props) {
super(props);
}
render() { render() {
return ( return (
<div className={styles.div}> <div className={styles.div}>
<div className={styles.card}> <div className={styles.card} style={this.props.style}>
{this.props.children} {this.props.children}
</div> </div>
</div> </div>
......
/*查看详情样式*/ /*查看详情样式*/
.detail_div { .detail_div {
padding: 0 24px 20px; padding: 0 24px 20px;
:global(.antd-pro-web-public-one_stop_public-detail-for-audit-components-card-index-card) { :global(.antd-pro-web-public-one_stop_public-detail-for-audit-components-card-index-card) {
width: 100% !important; width: 100% !important;
} }
.header { .header {
width: 100%; width: 100%;
text-align: center; text-align: center;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论