2023-07-12 09:56:31 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="bottomRightBox">
|
|
|
|
|
<div class="title"><i>设备监控台</i></div>
|
|
|
|
|
<div class="content">
|
2023-09-04 14:43:33 +08:00
|
|
|
<div class="equipmentMonitoring" v-for="item in deviceData" :key="item.id" v-if="deviceData.length > 0">
|
2023-07-28 19:43:56 +08:00
|
|
|
<div class="equipmentList" :class="item.isClosed == 1 ? 'offline' : 'online'">
|
|
|
|
|
<p>{{ item.isClosed == 1 ? "离线" : "在线" }}</p>
|
2023-07-14 17:01:04 +08:00
|
|
|
<p class="bottomText">{{ item.devName }}</p>
|
2023-07-12 09:56:31 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-04 14:43:33 +08:00
|
|
|
<div class="notoDta" v-else>
|
|
|
|
|
<img src="@/assets/images/noData.png" alt="" />
|
|
|
|
|
<p>暂无数据</p>
|
|
|
|
|
</div>
|
2023-07-12 09:56:31 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2023-07-14 17:01:04 +08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { onMounted, reactive, ref, onBeforeUnmount } from "vue";
|
|
|
|
|
// import * as echarts from "echarts";
|
|
|
|
|
import { getDevStatisticsApi } from "@/api/modules/distribution";
|
|
|
|
|
// import Card from "@/components/card.vue";
|
|
|
|
|
import { GlobalStore } from "@/stores";
|
|
|
|
|
const store = GlobalStore();
|
|
|
|
|
|
|
|
|
|
// 配电箱设备统计
|
|
|
|
|
let deviceData = ref({} as any);
|
|
|
|
|
|
|
|
|
|
const getDevStatisticsList = async () => {
|
|
|
|
|
const res: any = await getDevStatisticsApi({
|
|
|
|
|
projectSn: store.sn
|
|
|
|
|
});
|
|
|
|
|
if (res.result) {
|
2023-09-04 14:43:33 +08:00
|
|
|
deviceData.value = res.result.list;
|
|
|
|
|
} else {
|
|
|
|
|
deviceData.value = [];
|
2023-07-12 09:56:31 +08:00
|
|
|
}
|
2023-07-14 17:01:04 +08:00
|
|
|
console.log("配电箱实时数据", res);
|
2023-07-12 09:56:31 +08:00
|
|
|
};
|
2023-07-14 17:01:04 +08:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getDevStatisticsList();
|
|
|
|
|
});
|
2023-07-12 09:56:31 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.bottomRightBox {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
.title {
|
|
|
|
|
height: 13%;
|
|
|
|
|
line-height: 33px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
font-size: calc(100vw * 18 / 1920);
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
background: url("@/assets/images/titleBig.webp") no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
i {
|
|
|
|
|
font-family: OPPOSansH;
|
|
|
|
|
margin-left: 6%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.content {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
height: 82%;
|
|
|
|
|
background: url("@/assets/images/cardImg.png") no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
.equipmentMonitoring {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex !important;
|
2023-07-14 17:01:04 +08:00
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2023-07-12 09:56:31 +08:00
|
|
|
.equipmentList {
|
2023-07-14 17:01:04 +08:00
|
|
|
width: 160px;
|
2023-07-12 09:56:31 +08:00
|
|
|
height: 50%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
p {
|
|
|
|
|
font-size: calc(100vw * 20 / 1920);
|
|
|
|
|
color: #65d7f9;
|
|
|
|
|
margin-top: 36%;
|
|
|
|
|
}
|
|
|
|
|
.bottomText {
|
|
|
|
|
font-size: calc(100vw * 16 / 1920);
|
|
|
|
|
color: #fff;
|
|
|
|
|
margin-top: 50%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-04 14:43:33 +08:00
|
|
|
.notoDta {
|
|
|
|
|
width: 20%;
|
|
|
|
|
height: 20%;
|
|
|
|
|
margin-left: 40%;
|
|
|
|
|
margin-top: 8%;
|
|
|
|
|
img {
|
|
|
|
|
width: 38%;
|
|
|
|
|
margin: 6% 36%;
|
|
|
|
|
}
|
|
|
|
|
p {
|
|
|
|
|
width: 100%;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: calc(100vw * 14 / 1920);
|
|
|
|
|
margin: -5% 38%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-12 09:56:31 +08:00
|
|
|
.online {
|
|
|
|
|
background: url("@/assets/images/distributionMonitoring/sbjkOpen.webp") no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
}
|
|
|
|
|
.offline {
|
|
|
|
|
background: url("@/assets/images/distributionMonitoring/sbjkClose.webp") no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
p {
|
|
|
|
|
color: #ffd15e !important;
|
|
|
|
|
}
|
|
|
|
|
.bottomText {
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|