|
|
@ -644,11 +644,6 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
distance: 2, |
|
|
|
rotate: 'tangential', |
|
|
|
}, |
|
|
|
// title: {
|
|
|
|
// offsetCenter: [0, '-10%'],
|
|
|
|
// fontSize: 12,
|
|
|
|
// color: '#FFF',
|
|
|
|
// },
|
|
|
|
detail: { |
|
|
|
fontSize: 10, |
|
|
|
offsetCenter: [0, '-10%'], |
|
|
@ -658,7 +653,6 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
data: [ |
|
|
|
{ |
|
|
|
value: centreData?.sGrille_level?.toFixed(2) || 0, |
|
|
|
// name: '实时液位'
|
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
@ -796,10 +790,10 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
type: 'time', |
|
|
|
// name: "时间",
|
|
|
|
boundaryGap: false, |
|
|
|
data: depthWater?.map(v => moment(v.time).format('MM-DD HH:mm')) |
|
|
|
minInterval: 1000 * 60, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
@ -816,7 +810,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
data: depthWater?.map(v => v.sLiquid_level?.toFixed(2) || 0) |
|
|
|
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'), v.sLiquid_level?.toFixed(2) || null])||[] |
|
|
|
}, { |
|
|
|
type: 'line', |
|
|
|
name: '池前(上游)液位', |
|
|
@ -824,7 +818,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
data: depthWater?.map(v => v.sGrille_level?.toFixed(2) || 0) |
|
|
|
data: depthWater?.map(v => [moment(v.time).format('YYYY-MM-DD HH:mm:ss'), v.sGrille_level?.toFixed(2) || null])||[] |
|
|
|
}, |
|
|
|
] |
|
|
|
}} |
|
|
@ -860,79 +854,65 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
{ |
|
|
|
(() => { |
|
|
|
console.log(electricityTrend); |
|
|
|
let timeSet = new Set() |
|
|
|
electricityTrend?.map(p => { |
|
|
|
p.data?.map(s => { |
|
|
|
timeSet.add(moment(s.time).format('YYYY-MM-DD HH:mm:ss')) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let time = [...timeSet].sort((a, b) => moment(a).isBefore(b) ? -1 : 1) |
|
|
|
<ReactECharts |
|
|
|
option={{ |
|
|
|
title: { |
|
|
|
// text: v.name,
|
|
|
|
}, |
|
|
|
grid: { |
|
|
|
// width: 300,
|
|
|
|
// height: 200
|
|
|
|
}, |
|
|
|
dataZoom: [ |
|
|
|
{ |
|
|
|
type: 'slider', |
|
|
|
showDetail: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'inside', |
|
|
|
|
|
|
|
return <ReactECharts |
|
|
|
option={{ |
|
|
|
title: { |
|
|
|
// text: v.name,
|
|
|
|
}, |
|
|
|
grid: { |
|
|
|
// width: 300,
|
|
|
|
// height: 200
|
|
|
|
}, |
|
|
|
dataZoom: [ |
|
|
|
{ |
|
|
|
type: 'slider', |
|
|
|
showDetail: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'inside', |
|
|
|
|
|
|
|
}, |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis' |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
data: electricityTrend?.map(v => v.name) || [], |
|
|
|
right: '10%', |
|
|
|
textStyle: { |
|
|
|
color: '#FFF', |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
// name: "时间",
|
|
|
|
boundaryGap: false, |
|
|
|
data: time?.map(v => moment(v).format('MM-DD HH:mm')) |
|
|
|
}, |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis' |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
data: electricityTrend?.map(v => v.name) || [], |
|
|
|
right: '10%', |
|
|
|
textStyle: { |
|
|
|
color: '#FFF', |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'time', |
|
|
|
// name: "时间",
|
|
|
|
boundaryGap: false, |
|
|
|
minInterval: 1000 * 60, |
|
|
|
|
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
|
name: "单位:A", |
|
|
|
areaStyle: { |
|
|
|
color: '#FFF', |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: electricityTrend?.map(v => ({ |
|
|
|
type: 'line', |
|
|
|
name: v.name, |
|
|
|
smooth: true, |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
data: time?.map(d => { |
|
|
|
return v.data?.find(f => moment(f.time).format('YYYY-MM-DD HH:mm:ss') == d)?.eMotor_A_A || null |
|
|
|
}) || [] |
|
|
|
})) || [] |
|
|
|
}} |
|
|
|
notMerge={true} |
|
|
|
lazyUpdate={true} |
|
|
|
style={{ width: "100%", height: "100%" }} |
|
|
|
theme={'ReactEChart'} |
|
|
|
/> |
|
|
|
})() |
|
|
|
} |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
|
name: "单位:A", |
|
|
|
areaStyle: { |
|
|
|
color: '#FFF', |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: electricityTrend?.map(v => ({ |
|
|
|
type: 'line', |
|
|
|
name: v.name, |
|
|
|
smooth: true, |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
data: v.data?.map(f => [moment(f.time).format('YYYY-MM-DD HH:mm:ss'), f.eMotor_A_A?.toFixed(2)]) || [] |
|
|
|
|
|
|
|
})) || [] |
|
|
|
}} |
|
|
|
notMerge={true} |
|
|
|
lazyUpdate={true} |
|
|
|
style={{ width: "100%", height: "100%" }} |
|
|
|
theme={'ReactEChart'} |
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div style={{ |
|
|
@ -960,16 +940,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
{(() => { |
|
|
|
let timeSet = new Set() |
|
|
|
useTrend?.map(p => { |
|
|
|
p.data?.map(s => { |
|
|
|
timeSet.add(moment(s.time).format('YYYY-MM-DD HH:mm:ss')) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let time = [...timeSet].sort((a, b) => moment(a).isBefore(b) ? -1 : 1) |
|
|
|
|
|
|
|
return <ReactECharts |
|
|
|
<ReactECharts |
|
|
|
option={{ |
|
|
|
title: { |
|
|
|
// text: v.name,
|
|
|
@ -977,7 +948,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
grid: { |
|
|
|
// width: 300,
|
|
|
|
// height: 200
|
|
|
|
left:100 |
|
|
|
left: 100 |
|
|
|
}, |
|
|
|
dataZoom: [ |
|
|
|
{ |
|
|
@ -986,7 +957,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'inside', |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
], |
|
|
|
tooltip: { |
|
|
@ -1000,10 +971,10 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: { |
|
|
|
type: 'category', |
|
|
|
type: 'time', |
|
|
|
// name: "时间",
|
|
|
|
boundaryGap: false, |
|
|
|
data: time?.map(v => moment(v).format('MM-DD HH:mm')) |
|
|
|
minInterval: 1000 * 60, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
type: 'value', |
|
|
@ -1020,9 +991,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
areaStyle: { |
|
|
|
color: '#0e9cff26', |
|
|
|
}, |
|
|
|
data: time?.map(d => { |
|
|
|
return v.data?.find(f => moment(f.time).format('YYYY-MM-DD HH:mm:ss') == d)?.eMotor_EQ || null |
|
|
|
}) || [] |
|
|
|
data: v.data?.map(f => [moment(f.time).format('YYYY-MM-DD HH:mm:ss'), f.eMotor_EQ?.toFixed(2)]) || [] |
|
|
|
} |
|
|
|
}) || [] |
|
|
|
}} |
|
|
@ -1031,8 +1000,6 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
|
style={{ width: "100%", height: "100%" }} |
|
|
|
theme={'ReactEChart'} |
|
|
|
/> |
|
|
|
})()} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div > |
|
|
|