Commit cad4514b authored by zhengjiangtao's avatar zhengjiangtao

Merge branch 'developer' of http://172.16.10.76/station/station-elec-manage-view into developer

parents bc4fd844 0bfd026e
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
background:rgba(0,185,255,0.3); background:rgba(0,185,255,0.3);
border-radius:17px; border-radius:17px;
top: 30px; top: 30px;
margin-left: 880px;
color: #5FFFFD; color: #5FFFFD;
.amos-search-icon-right{ .amos-search-icon-right{
left: 255px; left: 255px;
...@@ -70,6 +69,21 @@ ...@@ -70,6 +69,21 @@
border-radius: 17px; border-radius: 17px;
} }
} }
.selectDiv{
position: relative;
right: -900px;
margin-left: 20px;
color: white;
.amos-select-dropdown {
border: 0;
min-width: 7em;
line-height: 32px;
background-color: rgba(0,185,255,0.3);
border-radius: 15px;
top: -3px;
}
}
} }
.infoContent{ .infoContent{
height:888px; height:888px;
...@@ -77,10 +91,10 @@ ...@@ -77,10 +91,10 @@
.ant-table-content{ .ant-table-content{
height: 800px; height: 800px;
opacity:1; opacity:1;
.ant-table-placeholder{ .ant-table-placeholder{
background:rgba(14,127,180,0.29); background:rgba(14,127,180,0.29);
opacity:0.63; opacity:0.63;
} }
.ant-table-tbody { .ant-table-tbody {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -90,7 +104,7 @@ ...@@ -90,7 +104,7 @@
} }
} }
table { table {
width: 100%; width: 100%;
} }
.ant-table-body>.clickRowStyl:hover>td { .ant-table-body>.clickRowStyl:hover>td {
background-color: #00b4ed; background-color: #00b4ed;
...@@ -233,7 +247,7 @@ ...@@ -233,7 +247,7 @@
width: 100%; width: 100%;
.ant-table-thead > tr > th { .ant-table-thead > tr > th {
background:rgba(0,185,255,0.38)!important; background:rgba(0,185,255,0.38)!important;
font-size:20p!important; font-size:20px!important;
font-family:Microsoft YaHei; font-family:Microsoft YaHei;
font-weight:bold; font-weight:bold;
color:rgba(255,255,255,1); color:rgba(255,255,255,1);
......
...@@ -107,35 +107,48 @@ const sevenDaysRiskCensusData = [{ ...@@ -107,35 +107,48 @@ const sevenDaysRiskCensusData = [{
'sa': '复龙换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '复龙换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '奉贤换流站', 'sb': '点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '奉贤换流站', 'sb': '点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '苏州换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '苏州换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '中州换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '中州换流站', 'sb': '收点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '天山换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '天山换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '金华换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '金华换流站', 'sb': '送点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '龙泉换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '三亚换流站', 'sb': '送点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '政平换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '龙泉换流站', 'sb': '收点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '伊克昭换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '厦门换流站', 'sb': '收点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
'sa': '陕北换流站', 'sb': '送点', 'sc': '告警', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97', 'sa': '南昌换流站', 'sb': '送点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
},
{
'sa': '政平换流站', 'sb': '送点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
},
{
'sa': '伊克昭换流站', 'sb': '收点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
},
{
'sa': '陕北换流站', 'sb': '送点', 'sc': '隐患', 'sd': '23', 'se': '23', 'sf': '12', 'sg': '12', 'sh': '12', 'si': '23', 'sj': '97',
}, },
{ {
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Layout,Search } from 'amos-framework'; import { Layout, Search, Select } from 'amos-framework';
import {Input,Table, Button } from 'amos-antd'; import { Table } from 'amos-antd';
import JsonData from './data'; import JsonData from './data';
import RiskAssessment from './riskDetail'; import RiskAssessment from './riskDetail';
const { Header, Content } = Layout; const { Header, Content } = Layout;
const riskData = JsonData.riskData; const pageSize = 12;
const dangerWeekCensusData=JsonData.dangerWeekCensusData; const Option = Select.Option;
const sevenDaysRiskCensusData=JsonData.sevenDaysRiskCensusData;
const pageSize=13;
class CentralInfoView extends Component { class CentralInfoView extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.updateParent= this.updateParent.bind(this); this.updateParent = this.updateParent.bind(this);
this.state = { this.state = {
title: '', //modal标题 title: '', //modal标题
divVisable: 'none', divVisable: 'none',
riskVisable: 'none', riskVisable: 'none',
buttonVisable:'block', buttonVisable: 'block',
type:'', //当前表格类型 type: '', //当前表格类型
detailTitle:'', detailTitle: '',
sevenDaySelectValue1:null,
sevenDaySelectValue2:null,
kpsiData:JsonData.riskData,
riskFailureData:JsonData.riskData,
dangerWeekCensusData:JsonData.dangerWeekCensusData,
sevenDaysRiskCensusData: JsonData.sevenDaysRiskCensusData
}; };
} }
componentDidMount(){ componentDidMount() {
this.props.onRef&&this.props.onRef(this) this.props.onRef && this.props.onRef(this);
} }
...@@ -38,7 +42,7 @@ class CentralInfoView extends Component { ...@@ -38,7 +42,7 @@ class CentralInfoView extends Component {
this.setState({ this.setState({
title: "安全指数", title: "安全指数",
divVisable: 'block', divVisable: 'block',
buttonVisable:'none', buttonVisable: 'none',
type: 'kpsi' type: 'kpsi'
}) })
} }
...@@ -50,7 +54,7 @@ class CentralInfoView extends Component { ...@@ -50,7 +54,7 @@ class CentralInfoView extends Component {
this.setState({ this.setState({
title: "安全风险失效", title: "安全风险失效",
divVisable: 'block', divVisable: 'block',
buttonVisable:'none', buttonVisable: 'none',
type: 'safetyRiskFailure' type: 'safetyRiskFailure'
}) })
} }
...@@ -62,7 +66,7 @@ class CentralInfoView extends Component { ...@@ -62,7 +66,7 @@ class CentralInfoView extends Component {
this.setState({ this.setState({
title: "告警隐患周增幅统计", title: "告警隐患周增幅统计",
divVisable: 'block', divVisable: 'block',
buttonVisable:'none', buttonVisable: 'none',
type: 'dangerWeekCensus' type: 'dangerWeekCensus'
}) })
} }
...@@ -74,7 +78,7 @@ class CentralInfoView extends Component { ...@@ -74,7 +78,7 @@ class CentralInfoView extends Component {
this.setState({ this.setState({
title: "七日风险统计", title: "七日风险统计",
divVisable: 'block', divVisable: 'block',
buttonVisable:'none', buttonVisable: 'none',
type: 'sevenDaysRiskCensus' type: 'sevenDaysRiskCensus'
}) })
} }
...@@ -85,32 +89,36 @@ class CentralInfoView extends Component { ...@@ -85,32 +89,36 @@ class CentralInfoView extends Component {
closeDiv = () => { closeDiv = () => {
this.setState({ this.setState({
divVisable: 'none', divVisable: 'none',
buttonVisable:'block', buttonVisable: 'block',
title:'', title: '',
type:'' type: '',
kpsiData:JsonData.riskData,
riskFailureData:JsonData.riskData,
dangerWeekCensusData:JsonData.dangerWeekCensusData,
sevenDaysRiskCensusData: JsonData.sevenDaysRiskCensusData
}) })
} }
/** /**
* 根据类型切换列 * 根据类型切换列
*/ */
columns= (type)=>{ columns = (type) => {
if(type==="kpsi"){ if (type === "kpsi") {
return ( return (
[ [
{ {
title: '换流站', title: '换流站',
dataIndex: 'ka', dataIndex: 'ka',
width: 100, width: 100,
render : (text, record) => { render: (text, record) => {
return(<div style={{color:'yellow',fontWeight: 'normal'}}>{text}</div>) return (<div style={{ color: 'yellow', fontWeight: 'normal' }}>{text}</div>)
} }
}, },
{ {
title: ' 极1高端阀厅', title: ' 极1高端阀厅',
dataIndex: 'kb', dataIndex: 'kb',
width: 100 width: 100
}, },
{ {
title: '极1低端阀厅', title: '极1低端阀厅',
dataIndex: 'kc', dataIndex: 'kc',
...@@ -158,28 +166,28 @@ class CentralInfoView extends Component { ...@@ -158,28 +166,28 @@ class CentralInfoView extends Component {
width: 120 width: 120
}, },
{ {
title: <div><span>总安全指数</span>&nbsp;<span style={{color:'#B8C10B',height:8,width:11}}>↓</span></div>, title: <div><span>总安全指数</span>&nbsp;<span style={{ color: '#B8C10B', height: 8, width: 11 }}>↓</span></div>,
dataIndex: 'kl', dataIndex: 'kl',
width: 120 width: 120
}, },
] ]
) )
}else if(type==="safetyRiskFailure"){ } else if (type === "safetyRiskFailure") {
return ( return (
[ [
{ {
title: '换流站', title: '换流站',
dataIndex: 'ka', dataIndex: 'ka',
width: 100, width: 100,
render : (text, record) => { render: (text, record) => {
return(<div style={{color:'yellow',fontWeight: 'normal'}}>{text}</div>) return (<div style={{ color: 'yellow', fontWeight: 'normal' }}>{text}</div>)
} }
}, },
{ {
title: ' 极1高端阀厅', title: ' 极1高端阀厅',
dataIndex: 'kb', dataIndex: 'kb',
width: 100 width: 100
}, },
{ {
title: '极1低端阀厅', title: '极1低端阀厅',
dataIndex: 'kc', dataIndex: 'kc',
...@@ -208,7 +216,7 @@ class CentralInfoView extends Component { ...@@ -208,7 +216,7 @@ class CentralInfoView extends Component {
{ {
title: '主控楼', title: '主控楼',
dataIndex: 'kh', dataIndex: 'kh',
width:80 width: 80
}, },
{ {
title: '极1辅控楼', title: '极1辅控楼',
...@@ -226,64 +234,64 @@ class CentralInfoView extends Component { ...@@ -226,64 +234,64 @@ class CentralInfoView extends Component {
width: 120 width: 120
}, },
{ {
title: <div><span>总安全指数</span>&nbsp;<span style={{color:'#B8C10B',height:8,width:11}}>↓</span></div>, title: <div><span>总安全指数</span>&nbsp;<span style={{ color: '#B8C10B', height: 8, width: 11 }}>↓</span></div>,
dataIndex: 'kl', dataIndex: 'kl',
width: 120 width: 120
} }
] ]
) )
} }
else if(type==="dangerWeekCensus"){ else if (type === "dangerWeekCensus") {
return ( return (
[ [
{ {
title: '换流站', title: '换流站',
dataIndex: 'da', dataIndex: 'da',
width: 120, width: 120,
render : (text, record) => { render: (text, record) => {
return(<div style={{fontWeight: 'normal'}}>{text}</div>) return (<div style={{ fontWeight: 'normal' }}>{text}</div>)
} }
}, },
{ {
title: '告警', title: '告警',
dataIndex: 'db', dataIndex: 'db',
width: 120, width: 120,
render : (text, record) => { render: (text, record) => {
return(<div><span>{text}</span><span style={{marginLeft:100}}>{Math.round((text/(record.db+record.dc))*100)}%</span></div>) return (<div><span>{text}</span><span style={{ marginLeft: 100 }}>{Math.round((text / (record.db + record.dc)) * 100)}%</span></div>)
} }
}, },
{ {
title: '隐患', title: '隐患',
dataIndex: 'dc', dataIndex: 'dc',
width: 120, width: 120,
render : (text, record) => { render: (text, record) => {
return(<div><span>{text}</span><span style={{marginLeft:100}}>{Math.round((text/(record.db+record.dc))*100)}%</span></div>) return (<div><span>{text}</span><span style={{ marginLeft: 100 }}>{Math.round((text / (record.db + record.dc)) * 100)}%</span></div>)
} }
}, },
] ]
) )
} }
else if(type==="sevenDaysRiskCensus"){ else if (type === "sevenDaysRiskCensus") {
return ( return (
[ [
{ {
title: '换流站', title: '换流站',
dataIndex: 'sa', dataIndex: 'sa',
width: 100, width: 100,
render : (text, record) => { render: (text, record) => {
return(<div style={{fontWeight: 'normal'}}>{text}</div>) return (<div style={{ fontWeight: 'normal' }}>{text}</div>)
} }
}, },
{ {
title: '类型', title: '类型',
dataIndex: 'sb', dataIndex: 'sb',
width: 100 width: 100
}, },
{ {
title: '类别', title: '类别',
dataIndex: 'sc', dataIndex: 'sc',
width: 100 width: 100
}, },
{ {
title: '今天', title: '今天',
dataIndex: 'sd', dataIndex: 'sd',
...@@ -298,12 +306,12 @@ class CentralInfoView extends Component { ...@@ -298,12 +306,12 @@ class CentralInfoView extends Component {
title: '04-30', title: '04-30',
dataIndex: 'sf', dataIndex: 'sf',
width: 100 width: 100
}, },
{ {
title: '04-29', title: '04-29',
dataIndex: 'sg', dataIndex: 'sg',
width: 100 width: 100
}, },
{ {
title: '04-28', title: '04-28',
dataIndex: 'sh', dataIndex: 'sh',
...@@ -313,32 +321,36 @@ class CentralInfoView extends Component { ...@@ -313,32 +321,36 @@ class CentralInfoView extends Component {
title: '04-27', title: '04-27',
dataIndex: 'si', dataIndex: 'si',
width: 100 width: 100
}, },
{ {
title: '04-26', title: '04-26',
dataIndex: 'sj', dataIndex: 'sj',
width: 100 width: 100
}, },
] ]
) )
}else{ } else {
return ( return (
[] []
) )
} }
} }
/** /**
* 根据类型切换数据 * 根据类型切换数据
*/ */
getDataSource =(type)=>{ getDataSource = (type) => {
if(type==="kpsi"||type==="safetyRiskFailure"){ let{kpsiData, riskFailureData,dangerWeekCensusData, sevenDaysRiskCensusData}=this.state;
return riskData; if (type === "kpsi") {
return kpsiData;
} }
else if(type==="dangerWeekCensus"){ else if(type === "safetyRiskFailure"){
return riskFailureData;
}
else if (type === "dangerWeekCensus") {
return dangerWeekCensusData; return dangerWeekCensusData;
} }
else if(type==="sevenDaysRiskCensus"){ else if (type === "sevenDaysRiskCensus") {
return sevenDaysRiskCensusData; return sevenDaysRiskCensusData;
} }
} }
...@@ -346,15 +358,15 @@ class CentralInfoView extends Component { ...@@ -346,15 +358,15 @@ class CentralInfoView extends Component {
/** /**
* 自定义总页数 * 自定义总页数
*/ */
showTotalPage = (total) =>{ showTotalPage = (total) => {
let pages=Math.ceil(total/pageSize); let pages = Math.ceil(total / pageSize);
return `共 ${pages} 页`; return `共 ${pages} 页`;
} }
/** /**
* 设定间隔行样式 * 设定间隔行样式
*/ */
rowClassChange=(record,index) => { rowClassChange = (record, index) => {
let className = 'light-row'; let className = 'light-row';
if (index % 2 === 0) className = 'dark-row'; if (index % 2 === 0) className = 'dark-row';
return className; return className;
...@@ -363,65 +375,200 @@ class CentralInfoView extends Component { ...@@ -363,65 +375,200 @@ class CentralInfoView extends Component {
/** /**
* 当前行点击事件 * 当前行点击事件
*/ */
onRowClick=(record)=>{ onRowClick = (record) => {
if(this.state.type==="kpsi"){ if (this.state.type === "kpsi") {
this.setState({ this.setState({
divVisable:'none', divVisable: 'none',
riskVisable:'block', riskVisable: 'block',
buttonVisable:'none', buttonVisable: 'none',
detailTitle:record.ka detailTitle: record.ka
}) })
} }
} }
/** /**
* 子组件返回当前列表 * 子组件返回当前列表
*/ */
updateParent(values){ updateParent(values){
if(values!=null){ if (values != null) {
this.setState({ this.setState({
divVisable:values.divVisable, divVisable: values.divVisable,
riskVisable:values.riskVisable, riskVisable: values.riskVisable,
}) })
} }
} }
/*
*监听七日风险详情页类型切换
*/
onTypeChange=(value)=>{
let{sevenDaySelectValue2}=this.state;
let sevenDaysRiskCensusData =JsonData.sevenDaysRiskCensusData;
if(value==='收点'||value==='送点'){
sevenDaysRiskCensusData=sevenDaysRiskCensusData.filter(item=>item.sb===value);
}
if(sevenDaySelectValue2!==null&&sevenDaySelectValue2!=='全部'){
sevenDaysRiskCensusData=sevenDaysRiskCensusData.filter(item=>item.sc===sevenDaySelectValue2);
}
this.setState({
sevenDaysRiskCensusData:sevenDaysRiskCensusData,
sevenDaySelectValue1:value
})
}
/*
*监听七日风险详情页统计类别切换
*/
onSumClazzChange=(value,item)=>{
let{sevenDaySelectValue1}=this.state;
let sevenDaysRiskCensusData =JsonData.sevenDaysRiskCensusData;
if(value==='告警'||value==='隐患'){
sevenDaysRiskCensusData=sevenDaysRiskCensusData.filter(item=>item.sc===value);
}
if(sevenDaySelectValue1!==null&&sevenDaySelectValue1!=='全部'){
sevenDaysRiskCensusData=sevenDaysRiskCensusData.filter(item=>item.sb===sevenDaySelectValue1);
}
this.setState({
sevenDaysRiskCensusData:sevenDaysRiskCensusData,
sevenDaySelectValue2:value
})
}
/*
*安全指数查询
*/
onKpsiSearch=(e,value)=>{
if(value!==null&&value.trim()!==''){
let kpsiData=JsonData.riskData;
kpsiData = kpsiData.filter(item => (item.ka).indexOf(value) > -1);
this.setState({
kpsiData:kpsiData
})
} else{
this.setState({
kpsiData:JsonData.riskData
})
}
}
/*
*安全风险失效查询
*/
onRiskFailureSearch=(e,value)=>{
if(value!==null&&value.trim()!==''){
let riskFailureData=JsonData.riskData;
riskFailureData = riskFailureData.filter(item => (item.ka).indexOf(value) > -1);
this.setState({
riskFailureData:riskFailureData
})
} else{
this.setState({
riskFailureData:JsonData.riskData
})
}
}
/*
*七日风险查询
*/
onSevenDaysSearch=(e,value)=>{
if(value!==null&&value.trim()!==''){
let sevenDaysRiskCensusData=JsonData.sevenDaysRiskCensusData;
sevenDaysRiskCensusData = sevenDaysRiskCensusData.filter(item => (item.sa).indexOf(value) > -1);
this.setState({
sevenDaysRiskCensusData:sevenDaysRiskCensusData
})
} else{
this.setState({
sevenDaysRiskCensusData:JsonData.sevenDaysRiskCensusData
})
}
}
/*
*告警隐患查询
*/
onDangerWeekSearch=(e,value)=>{
if(value!==null&&value.trim()!==''){
let dangerWeekCensusData=JsonData.dangerWeekCensusData;
dangerWeekCensusData = dangerWeekCensusData.filter(item => (item.da).indexOf(value) > -1);
this.setState({
dangerWeekCensusData:dangerWeekCensusData
})
} else{
this.setState({
dangerWeekCensusData:JsonData.dangerWeekCensusData
})
}
}
render() { render() {
const {title,divVisable,type,detailTitle,riskVisable,buttonVisable} = this.state; const { title, divVisable, type, detailTitle, riskVisable, buttonVisable } = this.state;
const _pageNation={pageSize:pageSize,size:'small',showTotal:this.showTotalPage}; const _pageNation = { pageSize: pageSize, size: 'small', showTotal: this.showTotalPage };
return ( return (
<div> <div>
<div className="mainContent" style={{display:divVisable}} > <div className="mainContent" style={{ display: divVisable }} >
<Layout> <Layout>
<Header className="contentHeader"> <Header className="contentHeader">
<div className="headerLeft" style={{display:'inline'}}>{title}</div> <div className="headerLeft" style={{ display: 'inline' }}>{title}</div>
<div className="headerRight" style={{display:'inline'}}> <div className="headerRight" style={{ display: 'inline' }}>
<img src="/src/assets/detail/close.png" onClick={this.closeDiv} width="42px" style={{marginTop:'3px'}}/> <img src="/src/assets/detail/close.png" onClick={this.closeDiv} width="42px" style={{ marginTop: '3px' }} />
</div> </div>
</Header> </Header>
<Content className="content"> <Content className="content">
<div className="contentInfo"> <div className="contentInfo">
<div className="infoHeader"> <div className="infoHeader">
{/* <Input className="titleInput" value=" 搜索" addonAfter={<img src="/src/assets/detail/search.png" onClick={this.} style={{width:20,marginTop:27,marginLeft:-33}}/>} /> */} {type === "sevenDaysRiskCensus" ?
<Search icon="search" value=" 搜索" onChange={this.onChange} onIconClick={this.onIconClick} /> <div>
</div> <Search icon="search" style={{ marginLeft: 610 }} defaultValue='搜索' onIconClick={this.onSevenDaysSearch} />
<div className="infoContent"> <div className="selectDiv" style={{display:"inline-block"}}>
<Table className="tableDetail" 类型:<Select defaultValue="全部" onChange={this.onTypeChange}>
dataSource={this.getDataSource(type)} <Option value="全部" >全部</Option>
style={{background:'linear-gradient(180deg,rgba(0,0,0,0.57) 0%,rgba(12,181,213,0.1) 100%)'}} <Option value="送点">送点</Option>
columns={this.columns(type)} <Option value="收点">收点</Option>
rowClassName={this.rowClassChange} </Select>
onRowClick={this.onRowClick} </div>
pagination={_pageNation}> <div className="selectDiv" style={{display:"inline-block"}}>
</Table> 统计类别:<Select defaultValue="全部" onChange={this.onSumClazzChange}>
</div> <Option value="全部" >全部</Option>
<Option value="告警">告警</Option>
<Option value="隐患">隐患</Option>
</Select>
</div>
</div> :
<div style={{display:'flex'}}>
{type === "dangerWeekCensus" ?
<div>
<div style={{display:'inline-block' ,color:'white',fontSize:20, position:'relative',top: 27,left: 80}}>2020-05-232020-05-29</div>
<Search icon="search" style={{ marginLeft: 500,display:'inline-block' }} defaultValue='搜索' onIconClick={this.onDangerWeekSearch} />
</div>:
<div>
{type === "kpsi" ?
<Search icon="search" style={{ marginLeft: 790,display:'inline-block' }} defaultValue='搜索' onIconClick={this.onKpsiSearch} />:
<Search icon="search" style={{ marginLeft: 790,display:'inline-block' }} defaultValue='搜索' onIconClick={this.onRiskFailureSearch} />
}
</div>}
</div>}
</div>
<div className="infoContent">
<Table className="tableDetail"
dataSource={this.getDataSource(type)}
style={{ background: 'linear-gradient(180deg,rgba(0,0,0,0.57) 0%,rgba(12,181,213,0.1) 100%)' }}
columns={this.columns(type)}
rowClassName={this.rowClassChange}
onRowClick={this.onRowClick}
pagination={_pageNation}>
</Table>
</div>
</div> </div>
</Content> </Content>
</Layout> </Layout>
</div> </div>
<RiskAssessment detailTitle={detailTitle} riskVisable={riskVisable} updateParents={this.updateParent}></RiskAssessment> <RiskAssessment detailTitle={detailTitle} riskVisable={riskVisable} updateParents={this.updateParent}></RiskAssessment>
</div> </div>
); );
} }
} }
...@@ -429,7 +576,7 @@ class CentralInfoView extends Component { ...@@ -429,7 +576,7 @@ class CentralInfoView extends Component {
CentralInfoView.propTypes = { CentralInfoView.propTypes = {
}; };
CentralInfoView.defaultProps={ CentralInfoView.defaultProps = {
pages:5 pages: 5
} }
export default CentralInfoView; export default CentralInfoView;
\ No newline at end of file
...@@ -7,7 +7,7 @@ class GrowthStatistics extends Component { ...@@ -7,7 +7,7 @@ class GrowthStatistics extends Component {
<div className='growth-statistics-view common-margin'> <div className='growth-statistics-view common-margin'>
<div className='daily-title daily-title-content'>告警隐患周增幅统计</div> <div className='daily-title daily-title-content'>告警隐患周增幅统计</div>
<div className='growth-content'> <div className='growth-content'>
<div style={{position:"initial",width:28,height:28,marginTop:-23,marginLeft:358}} <div style={{position:"initial",width:28,height:28,marginTop:-28,marginLeft:358}}
onClick={this.props.onWarnClick}></div> onClick={this.props.onWarnClick}></div>
<div className='growth-item growth-item-header'> <div className='growth-item growth-item-header'>
<div>日期</div> <div>日期</div>
...@@ -22,8 +22,7 @@ class GrowthStatistics extends Component { ...@@ -22,8 +22,7 @@ class GrowthStatistics extends Component {
<div>{item.growth}</div> <div>{item.growth}</div>
</div> </div>
) )
)
)
} }
</div> </div>
</div> </div>
......
...@@ -34,7 +34,7 @@ class RecentStatistics extends Component { ...@@ -34,7 +34,7 @@ class RecentStatistics extends Component {
<Button size='sm' children={<span>隐患</span>} className='button-style' value="2" style={(value == '2')?select:noselect}/> <Button size='sm' children={<span>隐患</span>} className='button-style' value="2" style={(value == '2')?select:noselect}/>
</ButtonGroup> </ButtonGroup>
<div className='recent-statistics-content'> <div className='recent-statistics-content'>
<div style={{position:"initial",width:28,height:28,marginTop:-14,marginLeft:362}} <div style={{position:"initial",width:28,height:28,marginTop:-19,marginLeft:362}}
onClick={this.props.onStatisticClick}></div> onClick={this.props.onStatisticClick}></div>
<ReactEcharts option={recentData} style={{ height: '100%', width: '100%' }} /> <ReactEcharts option={recentData} style={{ height: '100%', width: '100%' }} />
</div> </div>
......
...@@ -8,7 +8,7 @@ class RiskFailure extends Component { ...@@ -8,7 +8,7 @@ class RiskFailure extends Component {
<div className='risk-failure-view common-margin daily-title'> <div className='risk-failure-view common-margin daily-title'>
<div className='daily-title daily-title-content'>安全风险失效 TOP10</div> <div className='daily-title daily-title-content'>安全风险失效 TOP10</div>
<div className='top-ten-content'> <div className='top-ten-content'>
<div style={{position:"initial",width:28,height:28,marginTop:-32,marginLeft:352}} <div style={{position:"initial",width:28,height:28,marginTop:-35,marginLeft:352}}
onClick={this.props.onRiskClick}></div> onClick={this.props.onRiskClick}></div>
{ {
riskFailureData.map((item,index)=> riskFailureData.map((item,index)=>
......
...@@ -9,9 +9,9 @@ class SafetyRate extends Component { ...@@ -9,9 +9,9 @@ class SafetyRate extends Component {
<div className='safety-rate-view common-margin daily-title'> <div className='safety-rate-view common-margin daily-title'>
<div className='daily-title-content'> <div className='daily-title-content'>
安全指数 TOP10 安全指数 TOP10
</div> </div>
<div className='top-ten-content' style={{position:"initial"}}> <div className='top-ten-content' style={{position:"initial"}}>
<div style={{position:"initial",width:28,height:28,marginTop:-32,marginLeft:352}} <div style={{position:"initial",width:28,height:28,marginTop:-36,marginLeft:352}}
onClick={this.props.onClick}></div> onClick={this.props.onClick}></div>
{ {
SafetyRateData.map((item,index)=> SafetyRateData.map((item,index)=>
......
...@@ -49,7 +49,7 @@ const data = [ ...@@ -49,7 +49,7 @@ const data = [
title: '换流站', title: '换流站',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: '10%', width: '20%',
query: true, query: true,
}, },
...@@ -57,7 +57,7 @@ const data = [ ...@@ -57,7 +57,7 @@ const data = [
title: '火警告警', title: '火警告警',
dataIndex: 'sex', dataIndex: 'sex',
key: 'sex', key: 'sex',
width: '9%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -72,7 +72,7 @@ const data = [ ...@@ -72,7 +72,7 @@ const data = [
title: '故障报警', title: '故障报警',
dataIndex: 'age', dataIndex: 'age',
key: 'age', key: 'age',
width: '10%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -85,7 +85,7 @@ const data = [ ...@@ -85,7 +85,7 @@ const data = [
title: '巡检告警', title: '巡检告警',
dataIndex: 'address', dataIndex: 'address',
key: 'address', key: 'address',
width: '10%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -112,7 +112,7 @@ const data = [ ...@@ -112,7 +112,7 @@ const data = [
query: true, query: true,
st: 'text', //搜索的类型 st: 'text', //搜索的类型
width: '10%' width: '20%'
} }
]; ];
......
...@@ -49,7 +49,7 @@ const data = [ ...@@ -49,7 +49,7 @@ const data = [
title: '换流站', title: '换流站',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: '10%', width: '20%',
query: true, query: true,
}, },
...@@ -57,7 +57,7 @@ const data = [ ...@@ -57,7 +57,7 @@ const data = [
title: '已治理', title: '已治理',
dataIndex: 'sex', dataIndex: 'sex',
key: 'sex', key: 'sex',
width: '9%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -72,7 +72,7 @@ const data = [ ...@@ -72,7 +72,7 @@ const data = [
title: '未治理', title: '未治理',
dataIndex: 'age', dataIndex: 'age',
key: 'age', key: 'age',
width: '10%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -85,7 +85,7 @@ const data = [ ...@@ -85,7 +85,7 @@ const data = [
title: '逾期未治理', title: '逾期未治理',
dataIndex: 'address', dataIndex: 'address',
key: 'address', key: 'address',
width: '10%', width: '15%',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
// render: (text,record) => { // render: (text,record) => {
...@@ -99,7 +99,7 @@ const data = [ ...@@ -99,7 +99,7 @@ const data = [
key: 'id', key: 'id',
query: true, query: true,
required: true, //是否是默认显示的 required: true, //是否是默认显示的
width: '10%', width: '15%',
// render: (text,record) => { // render: (text,record) => {
// return <p className="si">{text}</p> ; // return <p className="si">{text}</p> ;
...@@ -112,7 +112,7 @@ const data = [ ...@@ -112,7 +112,7 @@ const data = [
query: true, query: true,
st: 'text', //搜索的类型 st: 'text', //搜索的类型
width: '10%' width: '20%'
} }
]; ];
...@@ -226,7 +226,7 @@ class DangerControlTable extends Component { ...@@ -226,7 +226,7 @@ class DangerControlTable extends Component {
<div className="souh" > <div className="souh" >
<div className="sou"> <div className="sou">
<div className="inputxq1"> <div className="inputxq1">
<StdForm > <StdForm>
<Search value={name} className="input_item_select" icon={<Icon icon='search' onClick={ this.onIconClick1} />} onChange={ this.onChange1} /> <Search value={name} className="input_item_select" icon={<Icon icon='search' onClick={ this.onIconClick1} />} onChange={ this.onChange1} />
</StdForm> </StdForm>
......
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