单体电池
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
<template v-slot:header>
|
||||
<view class="list-header">
|
||||
单体编号:{{item.deviceId}}
|
||||
<button type="warn" size="mini" class="charts">图表</button>
|
||||
<button type="warn" size="mini" class="charts" @click="toDetail(item)">图表</button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
@ -42,7 +42,7 @@
|
||||
<view>电压(V)</view>
|
||||
</uni-col>
|
||||
<uni-col :span="14">
|
||||
<view class="right color">{{item.voltage}}
|
||||
<view class="right color" @click="toDetail(item,'voltage')">{{item.voltage}}
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
@ -51,7 +51,7 @@
|
||||
<view>温度(℃)</view>
|
||||
</uni-col>
|
||||
<uni-col :span="14">
|
||||
<view class="right color">
|
||||
<view class="right color" @click="toDetail(item,'temperature')">
|
||||
{{item.temperature}}
|
||||
</view>
|
||||
</uni-col>
|
||||
@ -61,7 +61,7 @@
|
||||
<view>SOC(%)</view>
|
||||
</uni-col>
|
||||
<uni-col :span="14">
|
||||
<view class="right color">{{item.soc}}</view>
|
||||
<view class="right color" @click="toDetail(item,'soc')">{{item.soc}}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row>
|
||||
@ -69,7 +69,7 @@
|
||||
<view>SOH(%)</view>
|
||||
</uni-col>
|
||||
<uni-col :span="14">
|
||||
<view class="right color">{{item.soh}}</view>
|
||||
<view class="right color" @click="toDetail(item,'soh')">{{item.soh}}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
@ -77,10 +77,12 @@
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
<chart ref="chart" :pageScrollTop="pageScrollTop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Chart from './Chart.vue'
|
||||
import {
|
||||
getStackNameList,
|
||||
getClusterNameList,
|
||||
@ -90,6 +92,9 @@
|
||||
mapState
|
||||
} from 'vuex'
|
||||
export default {
|
||||
components: {
|
||||
Chart
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
workStatusOptions: (state) =>
|
||||
@ -111,9 +116,26 @@
|
||||
},
|
||||
list: [],
|
||||
siteId: '',
|
||||
pageScrollTop: 0,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.pageScrollTop = e.scrollTop
|
||||
},
|
||||
methods: {
|
||||
toDetail(item, dataType) {
|
||||
const {
|
||||
clusterDeviceId,
|
||||
deviceId
|
||||
} = item, {
|
||||
siteId
|
||||
} = this
|
||||
this.$refs.chart.open({
|
||||
siteId,
|
||||
clusterDeviceId,
|
||||
deviceId
|
||||
}, dataType)
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('触底了')
|
||||
this.pageNum += 1 //每次搜索从1开始搜索
|
||||
|
||||
Reference in New Issue
Block a user