custom/领悦
This commit is contained in:
parent
e333c34ff4
commit
7de7d189ae
|
|
@ -48,7 +48,9 @@ class List extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.getLYList();
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
}, () => this.getLYList());
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
|
|
@ -96,9 +98,9 @@ class List extends Component {
|
|||
}, () => {
|
||||
onInit();
|
||||
this.postMessageToChild({
|
||||
scrollHeight: 195, dataSource, pageInfo: this.state.pageInfo, selectedRowKeys,
|
||||
dataSource, pageInfo: this.state.pageInfo, selectedRowKeys,
|
||||
unitTableType: "custom_lingyue", columns: traverseCols(columns), showTotalCell: true,
|
||||
sumDataSource: this.state.sumDataSource
|
||||
sumDataSource: this.state.sumDataSource, scrollHeight: !_.isEmpty(dataSource) ? 195 : 0
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -140,16 +142,15 @@ class List extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { loading, visible } = this.state;
|
||||
const { loading, dataSource, visible } = this.state;
|
||||
const { type } = this.props;
|
||||
const dom = document.querySelector(".wea-new-top-content");
|
||||
let height = 307.53;
|
||||
if (dom && dataSource.length > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 47 + 204.53 : dataSource.length < 10 ? dataSource.length * 47 + 204.53 : parseFloat(dom.style.height) - 32;
|
||||
}
|
||||
return (
|
||||
<div className="custom_lingyue_list"
|
||||
style={{
|
||||
height: dom ? `calc(${parseFloat(dom.style.height)}px - 32px)` : 0,
|
||||
maxHeight: "678px",
|
||||
minHeight: "307.53px"
|
||||
}}>
|
||||
<div className="custom_lingyue_list" style={{ height }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue