Commit 8584caa4 authored by xinglei's avatar xinglei

首页跳转告警页

parent db00198a
...@@ -791,6 +791,7 @@ ...@@ -791,6 +791,7 @@
position: absolute; position: absolute;
margin-top: 1px; margin-top: 1px;
margin-left: 30px; margin-left: 30px;
cursor: pointer;
} }
.pulse-spread-div{ .pulse-spread-div{
...@@ -806,6 +807,7 @@ ...@@ -806,6 +807,7 @@
animation: pulseAnim 1.5s ease-out; animation: pulseAnim 1.5s ease-out;
animation-iteration-count: infinite; animation-iteration-count: infinite;
z-index: 1; z-index: 1;
cursor: pointer;
} }
} }
...@@ -829,6 +831,7 @@ ...@@ -829,6 +831,7 @@
position: absolute; position: absolute;
margin-left: 30px; margin-left: 30px;
margin-top: 1px; margin-top: 1px;
cursor: pointer;
} }
.pulse-spread-div{ .pulse-spread-div{
...@@ -844,6 +847,7 @@ ...@@ -844,6 +847,7 @@
animation: pulseAnim 1.5s ease-out; animation: pulseAnim 1.5s ease-out;
animation-iteration-count: infinite; animation-iteration-count: infinite;
z-index: 1; z-index: 1;
cursor: pointer;
} }
} }
...@@ -873,6 +877,7 @@ ...@@ -873,6 +877,7 @@
position: absolute; position: absolute;
margin-top: 1px; margin-top: 1px;
margin-left: 16px; margin-left: 16px;
cursor: pointer;
} }
.pulse-spread-div{ .pulse-spread-div{
...@@ -888,6 +893,7 @@ ...@@ -888,6 +893,7 @@
animation: pulseAnim 1.5s ease-out; animation: pulseAnim 1.5s ease-out;
animation-iteration-count: infinite; animation-iteration-count: infinite;
z-index: 1; z-index: 1;
cursor: pointer;
} }
} }
...@@ -917,6 +923,7 @@ ...@@ -917,6 +923,7 @@
position: absolute; position: absolute;
margin-top: 1px; margin-top: 1px;
margin-left: 30px; margin-left: 30px;
cursor: pointer;
} }
.pulse-spread-div{ .pulse-spread-div{
...@@ -932,6 +939,7 @@ ...@@ -932,6 +939,7 @@
animation: pulseAnim 1.5s ease-out; animation: pulseAnim 1.5s ease-out;
animation-iteration-count: infinite; animation-iteration-count: infinite;
z-index: 1; z-index: 1;
cursor: pointer;
} }
} }
...@@ -961,6 +969,7 @@ ...@@ -961,6 +969,7 @@
position: absolute; position: absolute;
margin-top: 1px; margin-top: 1px;
margin-left: 30px; margin-left: 30px;
cursor: pointer;
} }
.pulse-spread-div{ .pulse-spread-div{
...@@ -976,6 +985,7 @@ ...@@ -976,6 +985,7 @@
animation: pulseAnim 1.5s ease-out; animation: pulseAnim 1.5s ease-out;
animation-iteration-count: infinite; animation-iteration-count: infinite;
z-index: 1; z-index: 1;
cursor: pointer;
} }
} }
......
...@@ -35,7 +35,7 @@ class IndexChart extends Component { ...@@ -35,7 +35,7 @@ class IndexChart extends Component {
if(pointData && pointData.name && pointData.name === '西安'){ if(pointData && pointData.name && pointData.name === '西安'){
this.props.indexViewChange(true); this.props.indexViewChange(true);
}else if (seriesType === 'lines') { } else if (seriesType === 'lines') {
// window.localStorage.setItem('cityLine',JSON.stringify(pointData)) // window.localStorage.setItem('cityLine',JSON.stringify(pointData))
browserHistory.push({pathname: '/biz/defaultRoute',state: { cityLine: JSON.stringify(pointData) }}); browserHistory.push({pathname: '/biz/defaultRoute',state: { cityLine: JSON.stringify(pointData) }});
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ class TwinkleDiv extends Component { ...@@ -13,7 +13,7 @@ class TwinkleDiv extends Component {
} }
render() { render() {
const { eName, aName, status, isCenter } = this.props.info; const { eName, aName, status, isCenter, sourceIdStr } = this.props.info;
const { markerOnClick, styleCss } = this.props; const { markerOnClick, styleCss } = this.props;
let color; let color;
let visable = false; let visable = false;
...@@ -27,13 +27,12 @@ class TwinkleDiv extends Component { ...@@ -27,13 +27,12 @@ class TwinkleDiv extends Component {
backgroundColor: color backgroundColor: color
}; };
return ( return (
<div className={eName} style={style} > <div className={eName} style={style} >
<span onClick={() => markerOnClick(eName)}>{aName}</span> <span onClick={() => markerOnClick(eName, sourceIdStr)}>{aName}</span>
<div className={`${eName}-line`} style={style} /> <div className={`${eName}-line`} style={style} />
{ visable && (eName === 'xian' || eName === 'xianyang') && <div className={`${eName} pulse-spread-circular`} /> } { visable && (eName === 'xian' || eName === 'xianyang') && <div className={`${eName} pulse-spread-circular`} /> }
{ visable && <div className={`${eName} pulse-spread-div`} onClick={() => markerOnClick(eName)} /> } { visable && <div className={`${eName} pulse-spread-div`} onClick={() => markerOnClick(eName, sourceIdStr)} /> }
</div> </div>
); );
} }
......
...@@ -109,7 +109,6 @@ class Warnings extends Component { ...@@ -109,7 +109,6 @@ class Warnings extends Component {
pageSize: 10, pageSize: 10,
total: 1 total: 1
}, },
pageItem1: [ pageItem1: [
{ {
// name: 'alarmLevel', // name: 'alarmLevel',
...@@ -118,7 +117,6 @@ class Warnings extends Component { ...@@ -118,7 +117,6 @@ class Warnings extends Component {
value: '' value: ''
} }
], ],
//搜索框查询参数 //搜索框查询参数
queryParams: { queryParams: {
searchValue: '' searchValue: ''
...@@ -129,41 +127,17 @@ class Warnings extends Component { ...@@ -129,41 +127,17 @@ class Warnings extends Component {
} }
componentDidMount() { componentDidMount() {
//this.getWarnings(); if (this.props.location.state) {
this.getWarningsByPage(); let sourceId = this.props.location.state.sourceId;
} console.log(sourceId);
this.onIconClick(null, sourceId.toString());
/** } else {
* 获取告警信息列表 this.getWarningsByPage();
*/ }
getWarnings = () => {
getWarningsData().then((data) => {
if (data.dataList.content > 0) {
this.setState({
warnings: data.dataList.content
})
}
});
}
getQueryParams = () => {
let { queryParams, pageItem } = this.state;
let params = Object.assign({}, queryParams);
params.pageNumber = pageItem.current;
params.pageSize = pageItem.pageSize;
return params;
} }
getWarningsByPage = (arr) => { getWarningsByPage = (arr) => {
// let { pageItem } = this.state; let { pageItem1, pageItem } = this.state;
// if (arr) {
// pageItem.current = arr;
// this.setState({ pageItem });
// }
// let params = this.getQueryParams();
let { queryParams, pageItem1, pageItem } = this.state;
let current = pageItem.current; let current = pageItem.current;
if (arr) { if (arr) {
...@@ -179,11 +153,9 @@ class Warnings extends Component { ...@@ -179,11 +153,9 @@ class Warnings extends Component {
pageSize: data.size, pageSize: data.size,
total: data.totalElements total: data.totalElements
} }
}) });
let ddd = this.setState;
} }
}) });
} }
onSelectChange = (selectedRowKeys, selectionRows) => { onSelectChange = (selectedRowKeys, selectionRows) => {
...@@ -206,11 +178,9 @@ class Warnings extends Component { ...@@ -206,11 +178,9 @@ class Warnings extends Component {
* 搜索 * 搜索
*/ */
onIconClick = (e, value) => { onIconClick = (e, value) => {
let { queryParams, pageItem1 } = this.state; let { pageItem1 } = this.state;
pageItem1[0].value = value; pageItem1[0].value = value;
// queryParams.searchValue = value;
this.setState({ this.setState({
// queryParams
pageItem1 pageItem1
}, () => { }, () => {
this.getWarningsByPage(1); this.getWarningsByPage(1);
......
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