首页添加设备快捷按钮
This commit is contained in:
parent
30e0db4748
commit
92a944f715
@ -23,4 +23,12 @@ export function getEquipInfoById(id) {
|
||||
url: "/equip/info/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备详情
|
||||
export function getEquipCount() {
|
||||
return request({
|
||||
url: "/equip/info/equipCount",
|
||||
method: "get",
|
||||
});
|
||||
}
|
@ -26,6 +26,22 @@
|
||||
<swiper class="swiper-box">
|
||||
<swiper-item>
|
||||
<view class="content-card-container">
|
||||
<view class="content-card-wrap" @click="handleClickAllEquip">
|
||||
<view class="content-container">
|
||||
<view class="content-icon-wrap">
|
||||
<view class="content-icon-wrap">
|
||||
<uni-icons type="flag-filled" size="40" color="#4eb562"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-title-wrap">
|
||||
<view class="content-title">设备管理</view>
|
||||
<view class="content-subTitle">
|
||||
<text class="content-count">{{equipCount}}</text>
|
||||
台
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-card-wrap" @click="handleClickPatrolCount">
|
||||
<view class="content-container">
|
||||
<view class="content-icon-wrap">
|
||||
@ -296,6 +312,10 @@
|
||||
getAlarmCount
|
||||
} from "@/api/alarm/alarm.js";
|
||||
|
||||
import {
|
||||
getEquipCount
|
||||
} from "@/api/equip/equip.js";
|
||||
|
||||
import {
|
||||
getPatrolCount
|
||||
} from "@/api/patrol/patrol.js"
|
||||
@ -314,6 +334,8 @@
|
||||
data() {
|
||||
return {
|
||||
XDATA: [],
|
||||
//设备总数
|
||||
equipCount: 0,
|
||||
//巡检任务总数
|
||||
patrolCount: 0,
|
||||
//报警总数
|
||||
@ -409,10 +431,12 @@
|
||||
created() {
|
||||
this.getAlarmCount();
|
||||
this.getPatrolCount();
|
||||
this.getEquipCount();
|
||||
},
|
||||
onShow() {
|
||||
this.getAlarmCount();
|
||||
this.getPatrolCount();
|
||||
this.getEquipCount();
|
||||
},
|
||||
mounted() {
|
||||
this.queryBottomCylDataInit();
|
||||
@ -422,9 +446,17 @@
|
||||
}, 10000);
|
||||
},
|
||||
methods: {
|
||||
handleClickAllEquip() {
|
||||
this.$tab.navigateTo("/pages/work/equipInfo/listEquipInfo");
|
||||
},
|
||||
handleClickPatrolCount() {
|
||||
this.$tab.navigateTo("/pages/work/patrol/listPatrol");
|
||||
},
|
||||
getEquipCount() {
|
||||
getEquipCount().then((res) => {
|
||||
this.equipCount = res;
|
||||
})
|
||||
},
|
||||
getPatrolCount() {
|
||||
getPatrolCount().then((res) => {
|
||||
this.patrolCount = res;
|
||||
|
Loading…
Reference in New Issue
Block a user