Files
app-govern/pages/index/comp/indexYouKe.vue

63 lines
2.4 KiB
Vue
Raw Normal View History

2023-02-28 16:39:58 +08:00
<template>
<view class="index-zhuyonghu">
2023-08-10 09:18:17 +08:00
<view class="canneng-index-title mb20">所有工程统计信息</view>
<view class="header">
<view class="header-item">
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
<view class="header-item-label">设备总数</view>
</view>
<view class="header-item" @click="jump('onLineDevs')">
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
<view class="header-item-label">在线设备</view>
</view>
<view class="header-item" @click="jump('offLineDevs')">
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
<view class="header-item-label">离线设备</view>
</view>
</view>
<view class="canneng-index-title mb20 mt20">当前工程统计信息</view>
<view class="header">
<view class="header-item">
<view class="header-item-value">{{
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
}}</view>
<view class="header-item-label">设备总数</view>
</view>
<view class="header-item" @click="jump('currentOnLineDevs')">
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
<view class="header-item-label">在线设备</view>
</view>
<view class="header-item" @click="jump('currentOffLineDevs')">
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
<view class="header-item-label">离线设备</view>
</view>
</view>
2023-02-28 16:39:58 +08:00
</view>
</template>
<script>
export default {
2023-07-06 14:24:03 +08:00
props: {
devCount: {
type: Object,
default: {},
},
},
2023-08-02 09:10:45 +08:00
methods:{
jump(type) {
switch (type) {
2023-08-10 09:18:17 +08:00
default:
2023-08-02 09:10:45 +08:00
uni.navigateTo({
url:
2023-08-10 09:18:17 +08:00
'/pages/device/list?type=' +
type +
'&projectList=' +
encodeURIComponent(JSON.stringify(this.devCount[type])),
2023-08-02 09:10:45 +08:00
})
break
}
},
}
2023-02-28 16:39:58 +08:00
}
</script>
2023-07-03 20:29:24 +08:00
<style lang="scss"></style>