mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
代码提交
This commit is contained in:
@@ -535,7 +535,6 @@ export default {
|
||||
this.startRealtimeRefresh()
|
||||
},
|
||||
beforeUnmount() {
|
||||
console.log('beforeUnmount')
|
||||
clearInterval(this.interval) // 组件销毁时清除定时器
|
||||
},
|
||||
methods: {
|
||||
@@ -661,30 +660,7 @@ export default {
|
||||
this.getStatCharts()
|
||||
},
|
||||
|
||||
// async getEchartsList() {
|
||||
// const key = activeKey || this.activeKey;
|
||||
// if (!key) return;
|
||||
// const currentInfo = this.echartsInfo[this.activeKey]
|
||||
|
||||
// const query = {
|
||||
// ...this.paramsDate,
|
||||
// category: this.activeKey
|
||||
// }
|
||||
// try {
|
||||
// const res = await getReq('/queryStatDayList', query)
|
||||
// if (res.errcode === 0) {
|
||||
// this.echartsInfo[this.activeKey].chartData = res.data
|
||||
// console.log(
|
||||
// this.echartsInfo[this.activeKey].chartData,
|
||||
// ' this.echartsInfo[this.activeKey].chartData'
|
||||
// )
|
||||
// } else {
|
||||
// throw res
|
||||
// }
|
||||
// } catch (error) {
|
||||
// this.echartsInfo[this.activeKey].chartData = {}
|
||||
// }
|
||||
// },
|
||||
|
||||
async getStatCharts() {
|
||||
const currentInfo = this.echartsInfo[this.activeKey]
|
||||
const query = {
|
||||
@@ -695,12 +671,7 @@ export default {
|
||||
try {
|
||||
const res = await getReq('/queryStatCharts', query)
|
||||
if (res.errcode === 0) {
|
||||
this.echartsInfo[this.activeKey].chartDatav = {
|
||||
V: [100.0, 100.0, 100.0], // 电压曲线
|
||||
I: [10.0, 10.0, 10.0], // 电流曲线
|
||||
P: [1000.0, 1000.0, 1000.0] // 功率曲线
|
||||
}
|
||||
|
||||
this.echartsInfo[this.activeKey].chartDatav = res.data
|
||||
// x轴0点到24点
|
||||
} else {
|
||||
throw res
|
||||
@@ -714,75 +685,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// async getTableList() {
|
||||
// const currentInfo = this.tableList[this.activeKey]
|
||||
// const query = {
|
||||
// ...this.paramsDate,
|
||||
// category: this.activeKey,
|
||||
// page_size: currentInfo.pageOption.pageSize,
|
||||
// pageNumber: currentInfo.pageOption.page
|
||||
// }
|
||||
// try {
|
||||
// const res = await getReq('/queryStatDayList', query)
|
||||
// if (res.errcode === 0) {
|
||||
// this.tableList[this.activeKey].pageOption.tableData = res.data
|
||||
// this.tableList[this.activeKey].pageOption.pageOption = {
|
||||
// page: res.data.page,
|
||||
// pageSize: res.data.page_size,
|
||||
// count: res.data.count
|
||||
// }
|
||||
// } else {
|
||||
// throw res
|
||||
// }
|
||||
// } catch (error) {
|
||||
// this.tableList[this.activeKey].pageOption.tableData = [
|
||||
// {
|
||||
// key1: '1515151515',
|
||||
// key2: '设备1111',
|
||||
// key3: '类型',
|
||||
// key4: '电量',
|
||||
// key5: '时长',
|
||||
// key6: '时长',
|
||||
// key7: 'dianl',
|
||||
// key8: '时长',
|
||||
// key9: '时长11'
|
||||
// },
|
||||
// {
|
||||
// key1: '1515151515',
|
||||
// key2: '设备1111',
|
||||
// key3: '类型',
|
||||
// key4: '电量',
|
||||
// key5: '时长',
|
||||
// key6: '时长',
|
||||
// key7: 'dianl',
|
||||
// key8: '时长',
|
||||
// key9: '时长11'
|
||||
// },
|
||||
// {
|
||||
// key1: '1515151515',
|
||||
// key2: '设备1111',
|
||||
// key3: '类型',
|
||||
// key4: '电量',
|
||||
// key5: '时长',
|
||||
// key6: '时长',
|
||||
// key7: 'dianl',
|
||||
// key8: '时长',
|
||||
// key9: '时长11'
|
||||
// },
|
||||
// {
|
||||
// key1: '1515151515',
|
||||
// key2: '设备1111',
|
||||
// key3: '类型',
|
||||
// key4: '电量',
|
||||
// key5: '时长',
|
||||
// key6: '时长',
|
||||
// key7: 'dianl',
|
||||
// key8: '时长',
|
||||
// key9: '时长11'
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user