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

109 lines
4.3 KiB
Vue
Raw Normal View History

2023-02-09 08:50:01 +08:00
<template>
<view class="index-zhuanzhi">
2023-08-17 09:24:59 +08:00
<template v-if="devCount.engineeringListLength > 1">
<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 class="header-item">
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
<view class="header-item-label">告警数量</view>
</view>
<view class="header-item">
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
<view class="header-item-label">事件数量</view>
</view>
<view class="header-item" @click="projectNum">
<view class="header-item-value">{{ devCount.projectCount || 0 }}</view>
<view class="header-item-label">项目个数</view>
</view>
2023-08-10 09:18:17 +08:00
</view>
2023-08-17 09:24:59 +08:00
<view class="mt20"></view>
</template>
<view class="canneng-index-title mb20">当前工程设备统计</view>
2023-08-10 09:18:17 +08:00
<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 class="header-item">
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
<view class="header-item-label">告警数量</view>
</view>
<view class="header-item">
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
<view class="header-item-label">事件数量</view>
</view>
<view class="header-item" @click="projectNum">
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
<view class="header-item-label">项目个数</view>
</view>
</view>
2023-02-09 08:50:01 +08:00
</view>
</template>
<script>
export default {
2023-07-06 14:24:03 +08:00
data() {
2023-02-09 08:50:01 +08:00
return {
2023-02-28 16:39:58 +08:00
loading: false,
2023-02-09 08:50:01 +08:00
}
},
2023-07-06 14:24:03 +08:00
props: {
devCount: {
type: Object,
default: {},
},
},
2023-02-09 08:50:01 +08:00
methods: {
2023-07-06 14:24:03 +08:00
projectWarning() {
2023-03-01 08:48:52 +08:00
uni.navigateTo({
2023-07-06 14:24:03 +08:00
url: '/pages/zhuanzhi/warning',
2023-03-01 08:48:52 +08:00
})
},
2023-07-06 14:24:03 +08:00
projectNum() {
2023-03-01 08:48:52 +08:00
uni.navigateTo({
2023-07-06 14:24:03 +08:00
url: '/pages/project/list',
2023-03-01 08:48:52 +08:00
})
},
2023-08-02 09:10:45 +08:00
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-09 16:37:53 +08:00
}
},
2023-02-28 16:39:58 +08:00
},
2023-07-06 14:24:03 +08:00
created() {},
2023-02-09 08:50:01 +08:00
}
</script>
2023-07-06 14:24:03 +08:00
<style lang="scss">
.index-zhuanzhi {
}
</style>