APPbug反馈修改
This commit is contained in:
@@ -1,23 +1,70 @@
|
||||
<template>
|
||||
<view class="index-zhuyonghu">
|
||||
<div class="header">
|
||||
<div class="header-item">
|
||||
<div class="header-item-value">{{ devCount.onLineCount || 0 }}</div>
|
||||
<div class="header-item-label">正常设备</div>
|
||||
</div>
|
||||
<div class="header-item" @click="jump('alarmLineDevs')">
|
||||
<div class="header-item-value">{{ devCount.alarmLineCount || 0 }}</div>
|
||||
<div class="header-item-label">报警设备</div>
|
||||
</div>
|
||||
<div class="header-item" @click="jump('offLineDevs')">
|
||||
<div class="header-item-value">{{ devCount.offLineCount || 0 }}</div>
|
||||
<div class="header-item-label">离线设备</div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="index-zhuanzhi">
|
||||
<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>
|
||||
</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 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>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
@@ -25,28 +72,34 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
projectWarning() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
projectNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list',
|
||||
})
|
||||
},
|
||||
jump(type) {
|
||||
switch (type) {
|
||||
case 'alarmLineDevs':
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=alarmLineDevs&projectList=' +
|
||||
encodeURIComponent(JSON.stringify(this.devCount.alarmLineDevs)),
|
||||
})
|
||||
break
|
||||
case 'offLineDevs':
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=offLineDevs&projectList=' +
|
||||
encodeURIComponent(JSON.stringify(this.devCount.offLineDevs)),
|
||||
})
|
||||
break
|
||||
|
||||
default:
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=' +
|
||||
type +
|
||||
'&projectList=' +
|
||||
encodeURIComponent(JSON.stringify(this.devCount[type])),
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
<style lang="scss">
|
||||
.index-zhuanzhi {
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user