|
|
@ -5,6 +5,7 @@ import copy from "copy-to-clipboard"; |
|
|
|
import moment from "moment"; |
|
|
|
import PerfectScrollbar from "perfect-scrollbar"; |
|
|
|
import ReactECharts from 'echarts-for-react'; |
|
|
|
import * as echarts from 'echarts'; |
|
|
|
|
|
|
|
let projectScrollbar; |
|
|
|
|
|
|
@ -43,6 +44,12 @@ function SideSheets ({ dispatch, actions, close, alarmId }) { |
|
|
|
}) |
|
|
|
// console.log(dataSort); |
|
|
|
let data = { |
|
|
|
grid: { |
|
|
|
left: '5%', |
|
|
|
// right: '4%', |
|
|
|
// bottom: '3%', |
|
|
|
// containLabel: true |
|
|
|
}, |
|
|
|
dataZoom: [ |
|
|
|
{ |
|
|
|
show: true, |
|
|
@ -60,10 +67,14 @@ function SideSheets ({ dispatch, actions, close, alarmId }) { |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis' |
|
|
|
}, |
|
|
|
|
|
|
|
legend: { |
|
|
|
data: ['次数'], |
|
|
|
right: '10%', |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
name: "时间", |
|
|
|
boundaryGap: false, |
|
|
|
data: dataSort.map(v => v.hours) |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
@ -75,9 +86,13 @@ function SideSheets ({ dispatch, actions, close, alarmId }) { |
|
|
|
data: dataSort.map(v => v.count), |
|
|
|
type: 'line', |
|
|
|
name: '次数', |
|
|
|
// markLine: { |
|
|
|
// data: [{ type: 'average', name: 'Avg' }] |
|
|
|
// } |
|
|
|
smooth: true, |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
markLine: { |
|
|
|
data: [{ type: 'average', name: 'Avg' }] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
@ -148,6 +163,12 @@ function SideSheets ({ dispatch, actions, close, alarmId }) { |
|
|
|
<Tabs type="line"> |
|
|
|
<TabPane tab="告警信息" itemKey="1"> |
|
|
|
<div id='Alarm' style={{ position: 'relative', height: document.body.clientHeight - 126, marginTop: 12 }}> |
|
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', margin: "0 0 16px 0" }}> |
|
|
|
<span style={{ width: 0, height: 20, margin: "0 8px 0 0", borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></span> |
|
|
|
<span style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#101531', }}>告警详情</span> |
|
|
|
<span style={{ marginLeft: 6, fontSize: 12, color: "rgb(150, 151, 153)", fontFamily: 'DINExp' }}>ALARM DETAILS</span> |
|
|
|
</div> |
|
|
|
<Table |
|
|
|
columns={columns} |
|
|
|
dataSource={dataSource.slice((query.page - 1) * query.pageSize, query.page * query.pageSize)} |
|
|
@ -177,15 +198,24 @@ function SideSheets ({ dispatch, actions, close, alarmId }) { |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> : ""} |
|
|
|
<ReactECharts |
|
|
|
option={option} |
|
|
|
notMerge={true} |
|
|
|
lazyUpdate={true} |
|
|
|
theme={"theme_name"} |
|
|
|
// onChartReady={this.onChartReadyCallback} |
|
|
|
// onEvents={EventsDict} |
|
|
|
// opts={} |
|
|
|
/> |
|
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', margin: "36px 0 0 0" }}> |
|
|
|
<span style={{ width: 0, height: 20, margin: "0 8px 0 0", borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></span> |
|
|
|
<span style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#101531', }}>趋势分析</span> |
|
|
|
<span style={{ marginLeft: 6, fontSize: 12, color: "rgb(150, 151, 153)", fontFamily: 'DINExp' }}>TREND ANALYSIS</span> |
|
|
|
</div> |
|
|
|
<div style={{ marginBottom: 60 }}> |
|
|
|
<ReactECharts |
|
|
|
option={option} |
|
|
|
notMerge={true} |
|
|
|
lazyUpdate={true} |
|
|
|
theme={"theme_name"} |
|
|
|
// onChartReady={this.onChartReadyCallback} |
|
|
|
// onEvents={EventsDict} |
|
|
|
// opts={} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|