2025-09-27 16:10:17 +08:00
|
|
|
<template>
|
2025-09-28 15:28:15 +08:00
|
|
|
<div>
|
|
|
|
|
<div class="deviceOvery">
|
|
|
|
|
<div class="alarm">
|
|
|
|
|
<div class="deviceIMG">
|
|
|
|
|
<div class="deviceNum">{{DataOverview.totalDevices || '0'}} <span>个</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="deviceText">设备总数</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="alarm">
|
|
|
|
|
<div class="deviceIMG">
|
|
|
|
|
<div class="deviceNum">{{DataOverview.onlineDevices || '0'}} <span>个</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="deviceText">在线数量</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="alarm">
|
|
|
|
|
<div class="deviceIMG">
|
|
|
|
|
<div class="deviceNum">{{DataOverview.deviceTypes || '0'}} <span>种</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="deviceText">设备型号</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-27 16:10:17 +08:00
|
|
|
</template>
|
2025-09-28 15:28:15 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { getDeviceOverview } from '@/api/homeIndex'
|
|
|
|
|
const DataOverview = ref<any>({})
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getDeviceOverview({}).then((res) => {
|
|
|
|
|
if (res.code==200) {
|
|
|
|
|
DataOverview.value = res.data
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
2025-09-27 16:10:17 +08:00
|
|
|
</script>
|
2025-09-28 15:28:15 +08:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.deviceOvery {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
width: 100%;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-top: 7.5vh;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size:0.7vw;
|
|
|
|
|
color: #DEEFFF;
|
|
|
|
|
padding: 1.5vw;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deviceIMG {
|
|
|
|
|
width: 12vh;
|
|
|
|
|
height: 12vh;
|
|
|
|
|
background: url(@/assets/homeIndex/deviceIMG.png) no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.deviceText{
|
|
|
|
|
padding-top: 1.5vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.deviceNum{
|
|
|
|
|
line-height: 12vh;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
position: relative;
|
|
|
|
|
background: radial-gradient(circle at center, #00FCFF 0%, #FFFFFF 49%);
|
|
|
|
|
/* 兼容写法 */
|
|
|
|
|
-webkit-background-clip: text;
|
|
|
|
|
background-clip: text;
|
|
|
|
|
color: transparent;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
overflow: visible;
|
|
|
|
|
font-size: 1.3vw;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
.deviceNum span{
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
}
|
|
|
|
|
</style>
|