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

修改bug

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