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

一站式表单审批页面修改

上级 2f35d8ea
......@@ -5,13 +5,14 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
import router from 'umi/router';
import { getToken } from '@/utils/authority';
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';
window.iframeParentComponent = {
Modal,
message,
notification,
Popconfirm
Popconfirm,
};
const getUrlInfo = (param) => {
......@@ -44,6 +45,7 @@ export default class Detail extends Component {
}
this.state = {
id,
showAll: props.from !== 'onestopApp2.0'
};
}
......@@ -53,17 +55,10 @@ export default class Detail extends Component {
(event) => {
if (event.data && event.data.indexOf && event.data.indexOf('iframeDetailHeight') > -1) {
const height = Number(event.data.split('-')[1]);
// console.log(height);
const dom = document.getElementById('detailIframeId');
if(dom){
document.getElementById('detailIframeId').height = height + 50;
setTimeout(() => {
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,
......@@ -86,7 +81,7 @@ export default class Detail extends Component {
if (showPrint) {
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 = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
......@@ -117,8 +112,9 @@ export default class Detail extends Component {
</div>
</Shell>
<Shell>
<DetailOneStop id={id}/>
{/* <iframe
{
from === 'onestopApp2.0' ?
<iframe
src={iframeUrl}
frameBorder={0}
id='detailIframeId'
......@@ -134,7 +130,12 @@ export default class Detail extends Component {
overflowY: 'hidden',
minHeight: '80vh',
}}
/>*/}
/> :
<div id={'detailIframeId'}>
<DetailOneStop id={id} {...this.props} />
</div>
}
</Shell>
<Shell>
<div
......
......@@ -24,18 +24,18 @@ export default class WebModal extends Component {
* 修改Iframe打开弹窗的时候 弹窗定位错误的bug
* */
componentDidMount() {
setTimeout(() => {
let dom = document.getElementById('detailInfoDiv');
if (dom && dom.offsetHeight) {
let height = dom.offsetHeight;
if (height > 700) {
this.setState({
top: height - 700,
});
}
// console.log(height, 'Iframe页面的高度');
}
}, 1500);
// setTimeout(() => {
// let dom = document.getElementById('detailInfoDiv');
// if (dom && dom.offsetHeight) {
// let height = dom.offsetHeight;
// if (height > 700) {
// this.setState({
// top: height - 700,
// });
// }
// // console.log(height, 'Iframe页面的高度');
// }
// }, 1500);
}
render() {
......
......@@ -227,12 +227,12 @@ export default class GetDetail extends Component {
btnList: arr,
radiovalue: val.formLevelId ? val.formLevelId : arr[arr.length - 1].id,
}, () => {
this.giveMessageTop();
// this.giveMessageTop();
});
},
});
} else {
this.giveMessageTop();
// this.giveMessageTop();
}
},
);
......@@ -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 用户点击确认执行相应操作
......@@ -495,7 +481,7 @@ export default class GetDetail extends Component {
justifyContent: 'center',
}}
>
<div style={{ width: 1200 }}>
<div style={{ width: '100%' }}>
<div
className={styles.header}
style={{
......@@ -610,7 +596,7 @@ export default class GetDetail extends Component {
</div>
{isLoading ? (
<>
<Card>
<Card style={{width: '100%'}}>
{!isCloseUserDetail && (
<div className={styles.body_hea}>
<h3>发起人信息</h3>
......@@ -727,7 +713,7 @@ export default class GetDetail extends Component {
alignItems: 'center',
}}
>
<Spin size='large' />
<Spin size='large' spinning={true}/>
</div>
) : (
/* <div>
......@@ -780,7 +766,7 @@ export default class GetDetail extends Component {
)}
</div>
</Card>
<Card>
<Card style={{width: '100%'}}>
<div className={styles.body_content} style={{ minHeight: '300px' }}>
<div id={'btnsModalMountDiv'}></div>
<h3>
......@@ -1025,7 +1011,7 @@ export default class GetDetail extends Component {
alignItems: 'center',
}}
>
<Spin size='large' />
<Spin size='large' spinning={true}/>
</div>
)}
<PortalFlowExamineModal // 流程图
......
......@@ -40,7 +40,7 @@ export default class GetDetail extends Component {
...location,
state: {
id,
fromIframe: true,
fromIframe: false,
},
};
return (
......@@ -51,6 +51,8 @@ export default class GetDetail extends Component {
// overflow: isFromIframe() ? 'hidden' : 'unset',
overflow: 'auto',
height: '100%',
width: 'calc(100vw - 300px)',
padding: 0,
}}
>
<DetailSplit history={{...this.props.history, location}}
......
......@@ -6,10 +6,13 @@
import React, { Component } from 'react'
import styles from './index.less'
export default class Card extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className={styles.div}>
<div className={styles.card}>
<div className={styles.card} style={this.props.style}>
{this.props.children}
</div>
</div>
......
/*查看详情样式*/
.detail_div {
padding: 0 24px 20px;
:global(.antd-pro-web-public-one_stop_public-detail-for-audit-components-card-index-card) {
width: 100% !important;
}
.header {
width: 100%;
text-align: center;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论