Commit 8a268da0 authored by zhengjiangtao's avatar zhengjiangtao

Merge branch 'develop_20200601' of http://172.16.10.76/bank/AmosBankView into develop_20200601

parents ad7b2c8f 0500596b
......@@ -72,3 +72,7 @@ body {
line-height: 36px;
border: 0;
}
.amos-toast-inner.amos-toast-inner-closable {
top: 150px;
background:#49a9ee;
}
......@@ -3,6 +3,8 @@ import { Table, Col, Row, Pagination } from 'amos-antd';
import { Search, Icon } from 'amos-framework';
import './../../../../styles/view/biz/situation/warn.scss';
import { getWarningsData, getWarningsByPageData, getWarningsExcelData } from 'SERVICES/situationService';
import AmosWebSocket from 'amos-websocket';
import SysWsURL, { completeToken } from 'CONSTS/wsUrlConsts';
//页面列表
const columnss = () => [
......@@ -127,9 +129,12 @@ class Warnings extends Component {
}
componentDidMount() {
this.initData();
}
initData = () =>{
if (this.props.location.state) {
let sourceId = this.props.location.state.sourceId;
console.log(sourceId);
this.onIconClick(null, sourceId.toString());
} else {
this.getWarningsByPage();
......@@ -196,6 +201,16 @@ class Warnings extends Component {
window.open(url);
}
/**
* webSocket接收数据
*/
handleData = data => {
if (data){
console.log('alarmMarqueeWS');
this.initData();
}
};
render() {
let columns = columnss();
let { selectedRowKeys, warnings, pageItem } = this.state;
......@@ -203,8 +218,10 @@ class Warnings extends Component {
selectedRowKeys,
onChange: this.onSelectChange
};
const wsURL = completeToken(SysWsURL.view3dws);
return (
<div className="amos-warn" style={{ overflow: 'auto', height: '100%' }}>
<AmosWebSocket ref={node => (this.aws = node)} url={wsURL} onMessage={this.handleData} reconnect debug />
<div className="amos-warn-up">
<Row >
<Col span={24} className="amos-warn-top">
......
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