import React from 'react';
import { connect } from 'react-redux';
import { Select } from 'antd';
import ReactECharts from 'echarts-for-react';
import moment from 'moment'
const { Option } = Select;
const LevelTrend = ({ user, voltagePumpId, pumpList, setVoltagePumpId, depthWater }) => {
return
moment(v.time).format('MM-DD HH:mm'))
},
yAxis: {
type: 'value',
name: "单位:m",
areaStyle: {
color: '#FFF',
},
},
series: [
{
type: 'line',
name: '集水池液位',
smooth: true,
areaStyle: {
color: '#0e9cff26',
},
data: depthWater?.map(v => v.sLiquid_level?.toFixed(2) || 0)
}, {
type: 'line',
name: '池前(上游)液位',
smooth: true,
areaStyle: {
color: '#0e9cff26',
},
data: depthWater?.map(v => v.sGrille_level?.toFixed(2) || 0)
},
]
}}
notMerge={true}
lazyUpdate={true}
style={{ width: "100%", height: "100%" }}
theme={'ReactEChart'}
/>
}
function mapStateToProps (state) {
const { auth, global } = state;
return {
user: auth.user,
clientHeight: global.clientHeight,
};
}
export default connect(mapStateToProps)(LevelTrend);