|
@ -321,7 +321,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
query: { |
|
|
query: { |
|
|
stations: p.payload.data[0]?.groups[0]?.stations[0]?.id, |
|
|
stations: p.payload.data[0]?.groups[0]?.stations[0]?.id, |
|
|
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
limit: 1440 |
|
|
limit: 1440 |
|
|
} |
|
|
} |
|
@ -360,7 +360,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
query: { |
|
|
query: { |
|
|
stations: pumpId?.join(), |
|
|
stations: pumpId?.join(), |
|
|
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
limit: 1440 |
|
|
limit: 1440 |
|
|
} |
|
|
} |
|
@ -387,9 +387,9 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
type: 'get', url: `stations/theme/data`, params: { |
|
|
query: { |
|
|
query: { |
|
|
stations: usePumpId?.join(), |
|
|
stations: usePumpId?.join(), |
|
|
startTime: moment().add(-12, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
startTime: moment().add(-6, 'hours').format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
endTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
limit: 3 |
|
|
limit: 1440 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
})).then(d => { |
|
|
})).then(d => { |
|
@ -427,7 +427,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
backgroundSize: '100% 100%', |
|
|
backgroundSize: '100% 100%', |
|
|
backgroundPosition: 'center', display: 'flex', justifyContent: 'space-between', alignItems: 'center' |
|
|
backgroundPosition: 'center', display: 'flex', justifyContent: 'space-between', alignItems: 'center' |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 18, fontWeight: 400, marginLeft: 46, color: '#FFFFFF' }}>{v.name}</div> |
|
|
<div style={{ fontSize: 18, fontWeight: 400, marginLeft: 46, color: '#FFFFFF', fontFamily: "YouSheBiaoTiHei" }}>{v.name}</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
width: 50, height: 26, background: [2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00434180' : '#a7110033', border: `1px solid ${[2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00434180' : '#A71100'}`, cursor: "pointer", |
|
|
width: 50, height: 26, background: [2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00434180' : '#a7110033', border: `1px solid ${[2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00434180' : '#A71100'}`, cursor: "pointer", |
|
|
borderRadius: 4, color: [2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00FFF8' : '#E83E2B', textAlign: 'center', lineHeight: '22px', marginRight: 10 |
|
|
borderRadius: 4, color: [2, 4, 6].includes(v.data[0]?.sMotor_State) ? '#00FFF8' : '#E83E2B', textAlign: 'center', lineHeight: '22px', marginRight: 10 |
|
@ -502,7 +502,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
<div style={{ width: "100%", height: 90, padding: '10px 25px', display: 'flex', flexDirection: 'column', justifyContent: 'space-around', color: 'white' }}> |
|
|
<div style={{ width: "100%", height: 90, padding: '10px 25px', display: 'flex', flexDirection: 'column', justifyContent: 'space-around', color: 'white' }}> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ width: 90, textAlign: 'end' }}>总用电量:</div> |
|
|
<div style={{ width: 90, textAlign: 'end' }}>总用电量:</div> |
|
|
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00' }}>{v.data[0]?.eMotor_EQ?.toFixed(2)} kwh</div> |
|
|
<div style={{ width: 90, textAlign: 'end', color: '#FFCB00', fontFamily: "D-DIN-Italic" }}>{v.data[0]?.eMotor_EQ?.toFixed(2)} kwh</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ width: 90, textAlign: 'end' }}>单次运行时间:</div> |
|
|
<div style={{ width: 90, textAlign: 'end' }}>单次运行时间:</div> |
|
@ -548,8 +548,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
湿度:</div>{centreData?.sHumidity} % |
|
|
湿度:</div>{centreData?.sHumidity} % |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ color: '#00FFF8', fontSize: 20, position: 'absolute', top: '15%', left: "calc(50% - 90px)", display: 'inline-block' }}> |
|
|
<div style={{ color: '#00FFF8', fontSize: 20, position: 'absolute', top: '15%', left: "calc(50% - 90px)", display: 'inline-block' }}> |
|
|
<span style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<span style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600, }}> |
|
|
总用量:</span>{centreData?.daySun?.toFixed(2)} kWh |
|
|
总用量:</span><span title={centreData?.daySun?.toFixed(2)} style={{ width: 50, lineHeight: "16px", display: "inline-block", overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', }}>{centreData?.daySun?.toFixed(2)}</span> kWh |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
@ -568,7 +568,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
position: 'absolute', top: '35%', left: -60, |
|
|
position: 'absolute', top: '35%', left: -60, |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
今年用电:</div>{centreData?.day365?.toFixed(2) || '--'} kWh |
|
|
今年用电:</div> |
|
|
|
|
|
<span title={centreData?.day365?.toFixed(2)} style={{ width: 90, textAlign:"center",display: "inline-block", overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', }}>{centreData?.day365?.toFixed(2) || '--'}</span> kWh |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/oblique.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/oblique.png)', |
|
@ -577,7 +578,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
position: 'absolute', top: '54%', left: 0, |
|
|
position: 'absolute', top: '54%', left: 0, |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
当月用电:</div>{centreData?.day30?.toFixed(2) || '--'} kWh |
|
|
当月用电:</div> |
|
|
|
|
|
<span title={centreData?.day30?.toFixed(2)} style={{ width: 90, textAlign:"center", display: "inline-block", overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', }}>{centreData?.day30?.toFixed(2) || '--'}</span> kWh |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/oblique.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/oblique.png)', |
|
@ -586,7 +588,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
position: 'absolute', top: '67%', left: 'calc(50% - 80px)', |
|
|
position: 'absolute', top: '67%', left: 'calc(50% - 80px)', |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 18, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
当日用电:</div>{centreData?.day1?.toFixed(2) || '--'} kWh |
|
|
当日用电:</div> |
|
|
|
|
|
<span title={centreData?.day1?.toFixed(2)} style={{ width: 90, textAlign:"center", display: "inline-block", overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', }}>{centreData?.day1?.toFixed(2) || '--'}</span> kWh |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div style={{ |
|
|
<div style={{ |
|
@ -716,7 +719,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
backgroundSize: '100% 100%', |
|
|
backgroundSize: '100% 100%', |
|
|
backgroundPosition: 'center', display: 'flex', justifyContent: 'space-between', alignItems: 'center' |
|
|
backgroundPosition: 'center', display: 'flex', justifyContent: 'space-between', alignItems: 'center' |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 18, fontWeight: 400, marginLeft: 46, color: '#FFFFFF' }}>{v.name}</div> |
|
|
<div style={{ fontSize: 18, fontWeight: 400, marginLeft: 46, color: '#FFFFFF', fontFamily: "YouSheBiaoTiHei" }}>{v.name}</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
width: 50, height: 26, background: v.sQF_CLOSING ? "#00434180" : '#a7110033', border: `1px solid ${v.sQF_CLOSING ? "#00FFF8" : '#A71100'}`, cursor: "pointer", |
|
|
width: 50, height: 26, background: v.sQF_CLOSING ? "#00434180" : '#a7110033', border: `1px solid ${v.sQF_CLOSING ? "#00FFF8" : '#A71100'}`, cursor: "pointer", |
|
|
borderRadius: 4, color: v.sQF_CLOSING ? '#00FFF8' : '#E83E2B', textAlign: 'center', lineHeight: '22px', marginRight: 10 |
|
|
borderRadius: 4, color: v.sQF_CLOSING ? '#00FFF8' : '#E83E2B', textAlign: 'center', lineHeight: '22px', marginRight: 10 |
|
@ -860,7 +863,17 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<ReactECharts |
|
|
{ |
|
|
|
|
|
(() => { |
|
|
|
|
|
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) |
|
|
|
|
|
|
|
|
|
|
|
return <ReactECharts |
|
|
option={{ |
|
|
option={{ |
|
|
title: { |
|
|
title: { |
|
|
// text: v.name,
|
|
|
// text: v.name,
|
|
@ -892,7 +905,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
type: 'category', |
|
|
type: 'category', |
|
|
// name: "时间",
|
|
|
// name: "时间",
|
|
|
boundaryGap: false, |
|
|
boundaryGap: false, |
|
|
data: electricityTrend[0]?.data?.map(v => moment(v.time).format('MM-DD HH:mm')) |
|
|
data: time?.map(v => moment(v).format('MM-DD HH:mm')) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
yAxis: { |
|
|
yAxis: { |
|
|
type: 'value', |
|
|
type: 'value', |
|
@ -908,7 +922,9 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
areaStyle: { |
|
|
areaStyle: { |
|
|
color: '#0e9cff26', |
|
|
color: '#0e9cff26', |
|
|
}, |
|
|
}, |
|
|
data: v.data?.map(s => s.eMotor_A_A?.toFixed(2) || 0) || [] |
|
|
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} |
|
|
notMerge={true} |
|
@ -916,6 +932,9 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
style={{ width: "100%", height: "100%" }} |
|
|
style={{ width: "100%", height: "100%" }} |
|
|
theme={'ReactEChart'} |
|
|
theme={'ReactEChart'} |
|
|
/> |
|
|
/> |
|
|
|
|
|
})() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/headerTitle.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/headerTitle.png)', |
|
@ -942,7 +961,16 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
options={pumpList?.map(v => ({ value: v.id, label: v.name })) || []} |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<ReactECharts |
|
|
{(() => { |
|
|
|
|
|
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 |
|
|
option={{ |
|
|
option={{ |
|
|
title: { |
|
|
title: { |
|
|
// text: v.name,
|
|
|
// text: v.name,
|
|
@ -974,7 +1002,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
type: 'category', |
|
|
type: 'category', |
|
|
// name: "时间",
|
|
|
// name: "时间",
|
|
|
boundaryGap: false, |
|
|
boundaryGap: false, |
|
|
data: useTrend[0]?.data?.map(v => moment(v.time).format('MM-DD HH:mm')) |
|
|
data: time?.map(v => moment(v.time).format('MM-DD HH:mm')) |
|
|
}, |
|
|
}, |
|
|
yAxis: { |
|
|
yAxis: { |
|
|
type: 'value', |
|
|
type: 'value', |
|
@ -984,7 +1012,6 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
series: useTrend?.map(v => { |
|
|
series: useTrend?.map(v => { |
|
|
let front = [{}, {}] |
|
|
|
|
|
return { |
|
|
return { |
|
|
type: 'line', |
|
|
type: 'line', |
|
|
name: v.name, |
|
|
name: v.name, |
|
@ -992,10 +1019,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
areaStyle: { |
|
|
areaStyle: { |
|
|
color: '#0e9cff26', |
|
|
color: '#0e9cff26', |
|
|
}, |
|
|
}, |
|
|
data: v.data?.map(s => { |
|
|
data: time?.map(d => { |
|
|
front[0] = front[1] |
|
|
return v.data?.find(f => moment(f.time).format('YYYY-MM-DD HH:mm:ss') == d)?.eMotor_EQ || null |
|
|
front[1] = s |
|
|
|
|
|
return front[0]?.eMotor_EQ && (s?.eMotor_EQ - front[0]?.eMotor_EQ)?.toFixed(2) || 0 |
|
|
|
|
|
}) || [] |
|
|
}) || [] |
|
|
} |
|
|
} |
|
|
}) || [] |
|
|
}) || [] |
|
@ -1005,6 +1030,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { |
|
|
style={{ width: "100%", height: "100%" }} |
|
|
style={{ width: "100%", height: "100%" }} |
|
|
theme={'ReactEChart'} |
|
|
theme={'ReactEChart'} |
|
|
/> |
|
|
/> |
|
|
|
|
|
})()} |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div > |
|
|
</div > |
|
|