Commit 02287a1e authored by 王珂's avatar 王珂

修改bug

parent 6970a539
......@@ -271,8 +271,8 @@
.create-device-root {
width: 100%;
// height: 100%;
height: 50%;
height: 100%;
// height: 50%;
//background-color: rgba(51, 51, 51, 1);
// margin-top: 15px;
......@@ -576,7 +576,8 @@
&.ant-table-bordered {
&.ant-table-fixed-header {
&.ant-table-scroll-position-left {
height: 80%;
// height: 80%;
height: 100%;
.ant-table-content {
height: 100%;
......@@ -703,10 +704,10 @@
}
.ant-table-body {
border-left: 1px solid $core-border-color;
// border-left: 1px solid $core-border-color;
table {
border: 0 solid #e9e9e9;
border: 1 solid #e9e9e9;
}
tr {
......
......@@ -50,7 +50,7 @@ class AmosGridTable extends Component {
}
let { current, pageSize } = this.state;
if (nextProps.totals > 0 && Math.ceil(nextProps.totals / pageSize) < current ) {
this.setState({ current: Math.ceil(nextProps.totals / pageSize)})
this.setState({ current: Math.ceil(nextProps.totals / pageSize) });
}
if (nextProps.current === 0 && this.state.current !== 1 && (nextProps.current !== this.state.current)){
this.onPaginationChange(nextProps.current + 1);
......@@ -150,7 +150,7 @@ class AmosGridTable extends Component {
getHeightOffset = () => {
let { getPanelHeight } = this.props;
let height = getPanelHeight === undefined ? 450 : getPanelHeight();
let height = getPanelHeight ? getPanelHeight() : 450;
height && this.setState({ maxHeight: height });
}
......@@ -188,8 +188,9 @@ class AmosGridTable extends Component {
pageSize: this.state.pageSize,
onShowSizeChange: this.onSizeChange,
onChange: this.onPaginationChange,
maxSeries:4,
showSizeChanger: true
maxSeries: 4,
showSizeChanger: true,
style: { position: 'fixed', bottom: 0, right: 0 }
// showTotal: this.showTotal
}, pagination);
let _tempPagination = isPageable === false ? false : tepmPage;
......@@ -199,9 +200,8 @@ class AmosGridTable extends Component {
let divStyle = this.state.showFilter ? 'other-table-bar' : 'table-bar';
let display = this.state.showFilter ? 'block' : 'none';
let searchStyle = { display };
return (
<div className='grid-content'>
<div className='grid-content' style={{ height: '100%' }}>
<div className='oper-bar'>
<div className='amos-grid-oper-btns'>
{
......
......@@ -157,11 +157,15 @@ class AlarmView extends Component {
});
};
getPanelHeight = () => {
return window.innerHeight - 200 || 450;
}
render() {
let { pagination, isChecked, dataList, totalCount, selectedRowKeys } = this.state;
let defaultPageConfig = this.pageConfig;
return (
<div className="alarm-view">
<div className="alarm-view" ref={component => this.alarmViewContent = component} style={{ height: 'calc(100% - 80px)' }}>
<AlarmSearch setSearchParam={this.setSearchParam} />
<AmosGridTable
columns={getColumns()}
......@@ -176,6 +180,7 @@ class AlarmView extends Component {
defaultPageConfig={defaultPageConfig}
onRowDoubleClick={this.onRowDoubleClick}
isChecked={isChecked}
getPanelHeight={this.getPanelHeight}
/>
</div>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment