修改表格数据显示

master
夜笙歌 3 months ago
parent 0af843e1ad
commit 62fc330ee3

@ -108,27 +108,32 @@
<div class="table1"> <div class="table1">
<div class="h1"> <div class="h1">
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
设备名称
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
A A相电流
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
A区 B相电流
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
A区 C相电流
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
A A相电压
</div> </div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 6);"> <div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
合计 B相电压
</div>
<div class="scrollTable" style="font-weight: bold;width: calc(100% / 7);">
C相电压
</div> </div>
</div> </div>
<vue-seamless-scroll <vue-seamless-scroll
:class-option="{...chart1TableOption,limitMoveNum:10}" :class-option="{...chart1TableOption,limitMoveNum:4}"
:data="table1Data" :data="table1Data"
:key="scrollKey1"
class="case-item" class="case-item"
style="height: 84%;overflow: hidden;" style="height: 84%;overflow: hidden;"
> >
@ -137,23 +142,26 @@
:key="index" :key="index"
> >
<div class="T1"> <div class="T1">
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.monitorName || '' }}
</div> </div>
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.iA || 0 }}
</div> </div>
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.iB || 0 }}
</div> </div>
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.iC || 0 }}
</div> </div>
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.vA || 0 }}
</div> </div>
<div class="scrollTable" style="width: calc(100% / 6);"> <div class="scrollTable" style="width: calc(100% / 7);">
{{ item.no }} {{ item.vB || 0 }}
</div>
<div class="scrollTable" style="width: calc(100% / 7);">
{{ item.vC || 0 }}
</div> </div>
</div> </div>
</div> </div>
@ -244,6 +252,7 @@ import {
fiveConsumptionStatistics, fiveConsumptionStatistics,
monthConsumptionRanking, monthConsumptionRanking,
peaksValleysConsumption, realTimeAlarm, peaksValleysConsumption, realTimeAlarm,
realTimeData
} from "@/api/board"; } from "@/api/board";
export default { export default {
name: 'Board', name: 'Board',
@ -265,17 +274,8 @@ export default {
singleHeight: 0, // (0) direction => 0/1 singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3 singleWidth: 0, // (0) direction => 2/3
waitTime: 0, waitTime: 0,
autoPlay: false,
navigation: false
}, },
table1Data: [ table1Data: [],
{
no: 1
},
{
no: 1
},
],
scrollKey1: '', scrollKey1: '',
scrollKey2: '', scrollKey2: '',
deviceOverviewData: {}, deviceOverviewData: {},
@ -613,7 +613,7 @@ export default {
}, },
series: [ series: [
{ {
name: '', name: '能耗',
type: 'bar', type: 'bar',
label: { label: {
show: false, show: false,
@ -631,6 +631,9 @@ export default {
} }
}, },
{ {
tooltip: {
show: false
},
type: 'line', type: 'line',
label: { label: {
show: false, show: false,
@ -655,6 +658,14 @@ export default {
this.realTimeAlarmData = JSON.parse(JSON.stringify(res.data.alarmDataList)) this.realTimeAlarmData = JSON.parse(JSON.stringify(res.data.alarmDataList))
this.scrollKey2 = new Date().getTime() this.scrollKey2 = new Date().getTime()
}) })
realTimeData({
monitorType: this.typeData
}).then(res => {
console.log(res)
this.table1Data = res.data
this.scrollKey1 = new Date().getTime()
})
}, },
selectChange(data) { selectChange(data) {
this.selectData = data this.selectData = data

Loading…
Cancel
Save