mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
系统总览字段修改
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
export default {
|
||||
name: '',
|
||||
props: {
|
||||
total: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
deviceInfo: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
@@ -27,14 +31,14 @@ export default {
|
||||
curList: [
|
||||
{
|
||||
name: '日发电量',
|
||||
key: 'key1',
|
||||
key: 'solarElectGen',
|
||||
lineColor: '#22E4FF',
|
||||
value: 0,
|
||||
d: 'kW·h'
|
||||
},
|
||||
{
|
||||
name: '日入网电量',
|
||||
key: 'key2',
|
||||
key: 'solarElectGrid',
|
||||
lineColor: '#0E68E4',
|
||||
value: 0,
|
||||
d: 'kW·h'
|
||||
@@ -53,6 +57,18 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
total: {
|
||||
handler(n) {
|
||||
if (n) {
|
||||
let that = this
|
||||
that.curList.forEach((item) => {
|
||||
item.value = that.total[item.key]
|
||||
})
|
||||
}
|
||||
},
|
||||
deep: true, // 深度监听
|
||||
immediate: true
|
||||
},
|
||||
deviceInfo: {
|
||||
handler(n) {
|
||||
this.$nextTick(() => {
|
||||
@@ -73,7 +89,6 @@ export default {
|
||||
this.faultChart.resize()
|
||||
},
|
||||
processData(data, keys) {
|
||||
console.log(data, 'dddddddddddddddddddddddddddd')
|
||||
data.sort((a, b) => {
|
||||
return new Date(a.date) - new Date(b.date)
|
||||
})
|
||||
@@ -160,7 +175,6 @@ export default {
|
||||
series: this.lineChartData.ydata
|
||||
}
|
||||
option && faultChart.setOption(option)
|
||||
console.log(this.lineChartData, 'this.lineChartData')
|
||||
window.addEventListener('resize', this.handleResize)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user