[feature]添加一期B15技改,组串数动态

main
huyuanxiang 11 months ago
parent d42171bb4f
commit 5e0781fa9e

@ -75,7 +75,7 @@
<u-collapse-item
name="index"
:title="envData.environmentName"
>
<view class="flex flex-center">
<table border="1" class="env-table" >
@ -113,15 +113,15 @@
</tr>
</table>
</view>
</u-collapse-item>
</u-collapse>
</uni-section>
</view>
<view class="station-content">
<uni-section title="采集器" type="line">
<template v-slot:right >
<view class="second-status" :class="allOffLineState ? 'z4' : 'z1'" v-show="showSecond" @click="handleGetStatus">
@ -404,17 +404,25 @@ export default {
handleFilterSecondArr(arr) {
const item = arr[0]
let maxNum = 1
let itemNum = 1
for (let i = 1; i<= 50; i++) {
if (!item['dayEnergy' + i]) {
maxNum = i-1
break
}
}
for (let i = 25; i> 0; i--) {
if (item['electricQuantity1_' + i]) {
itemNum = i
break
}
}
// this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
this.itemNum = itemNum
// width: 183px;
const eightNumArr = ['1052758023'] // 8
const sixteenNumArr = ['30'] // 16
this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
// this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
this.secondList = Array.from(Array(maxNum)).map((v, inde) => {
const index = inde + 1
const cList = Array.from(Array(this.itemNum)).map((cv, cIndex) => {

Loading…
Cancel
Save