合并develop最新代码

This commit is contained in:
2025-08-20 17:53:26 +08:00
45 changed files with 3485 additions and 1325 deletions

View File

@ -47,11 +47,34 @@ export default {
},
setOption(data) {
if(!this.chart) return
let obj = {}
for(var i=0;i<=23;i++){
obj[i] = {
title:i<=9?`0${i}:00` : `${i}:00`
}
}
const nowMonth = new Date().getMonth()+1;
const localMonth = data.find(item=>item.month === nowMonth)?.powerList || []
localMonth.forEach(item => {
const startHours = parseInt(item.startTime.split(':')[0], 10)
const endHours =parseInt(item.endTime.split(':')[0], 10)
for(let i=startHours;i<=endHours;i++){
obj[i].value = item.powerData
}
})
let source = [['时间','冲放功率']]
Object.values(obj).forEach(item => {
const {title,value} = item
source.push([title,value])
})
this.chart.setOption({
color:['#FFBD00','#3C81FF'],
grid: {
containLabel: true
},
legend: {
left: 'center',
bottom: '10',
bottom: '15',
},
tooltip: {
trigger: 'axis',
@ -63,7 +86,7 @@ export default {
color:"#333333",
},
xAxis: {
data: ['01:00','02:00','03:00','05:00','06:00','07:00','08:00','09:00','10:00'],
type: 'category',
axisLine: {
lineStyle:{
color: '#333333',
@ -78,16 +101,14 @@ export default {
}
}
},
dataset: {
source
},
series: [
{
name:'模板一',
data: [80,92,1,34,90,130,320,80,9,91],
name:'冲放功率',
type: 'line',
},{
name:'模板二',
data: [820,932,901,934,1290,1330,1320,820,932,901],
type: 'line',
}]
}]
})
}
}

View File

@ -40,7 +40,6 @@ export default {
this.$refs.tomePowerChart.changeSiteId()
})
},
//在编辑、删除模板后更新时间配置、echart的数据todo
updateTimeSetting(){
this.$refs.timeSetting.init()
this.$refs.tomePowerChart.init()