系统总览字段修改

This commit is contained in:
ym1026
2025-09-03 13:53:00 +08:00
parent 6d6d05e18f
commit 1568677c8e
12 changed files with 499 additions and 291 deletions

View File

@@ -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)
}
}