feature/2.9.42310.02-社保福利档案页面重构
This commit is contained in:
parent
121d82d379
commit
8a3a1dcf76
|
|
@ -29,10 +29,16 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
window.addEventListener("resize", this.handleResize, false);
|
||||
}
|
||||
|
||||
handleResize = () => {
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
window.removeEventListener("resize", this.handleResize, false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
|
|
@ -107,8 +113,13 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const dom = document.querySelector(".wea-new-top-req-content");
|
||||
let height = 280;
|
||||
if (dom && dataSource.length > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 170;
|
||||
}
|
||||
return (
|
||||
<div className="table-layout" style={{ height: dataSource.length * 38 + "px" }}>
|
||||
<div className="table-layout" style={{ height: height + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
flex-direction: column;
|
||||
|
||||
.table-layout {
|
||||
min-height: 220px;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue