1
0
forked from dyf/dyf-vue-ui
Files
dyf-vue-ui/src/views/homeIndex/components/AlarmOverview.vue

81 lines
1.9 KiB
Vue
Raw Normal View History

2025-09-27 16:10:17 +08:00
<template>
<div>
<div class="alarmOvery">
<div class="alarm">
2025-09-27 17:58:07 +08:00
<div class="alarmIMG">
2025-09-28 15:28:15 +08:00
<div class="alarmNum">{{ alarmOverview.activeAlarms || '0' }} <span></span></div>
2025-09-27 17:58:07 +08:00
</div>
2025-09-27 16:10:17 +08:00
<div class="alarmText">正在报警</div>
</div>
<div class="alarm">
2025-09-27 17:58:07 +08:00
<div class="alarmIMG">
2025-09-28 15:28:15 +08:00
<div class="alarmNum">{{ alarmOverview.totalAlarms || '0' }} <span></span></div>
2025-09-27 17:58:07 +08:00
</div>
2025-09-27 16:10:17 +08:00
<div class="alarmText">报警总数</div>
</div>
<div class="alarm">
2025-09-27 17:58:07 +08:00
<div class="alarmIMG">
2025-09-28 15:28:15 +08:00
<div class="alarmNum">{{ alarmOverview.processedAlarms || '0' }} <span></span></div>
2025-09-27 17:58:07 +08:00
</div>
2025-09-27 16:10:17 +08:00
<div class="alarmText">已处理</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
2025-09-28 15:28:15 +08:00
const props = defineProps({
alarmOverview: {
type: Object,
required: false,
default: () => ({}),
},
});
2025-09-27 16:10:17 +08:00
</script>
<style scoped lang="scss">
.alarmOvery {
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
2025-09-27 17:58:15 +08:00
margin-top: 7.5vh;
2025-09-27 16:10:17 +08:00
text-align: center;
2025-09-28 15:28:15 +08:00
font-size: 0.7vw;
2025-09-27 16:10:17 +08:00
color: #DEEFFF;
2025-09-27 17:58:15 +08:00
padding: 1.5vw;
2025-09-27 16:10:17 +08:00
}
.alarmIMG {
width: 12vh;
height: 12vh;
background: url(@/assets/homeIndex/alarmIMG.png) no-repeat;
background-size: 100% 100%;
2025-09-27 17:58:07 +08:00
position: relative;
2025-09-27 16:10:17 +08:00
}
2025-09-28 15:28:15 +08:00
.alarmText {
2025-09-27 16:10:17 +08:00
padding-top: 1.5vh;
}
2025-09-28 15:28:15 +08:00
.alarmNum {
2025-09-27 17:58:07 +08:00
line-height: 12vh;
2025-09-28 15:28:15 +08:00
display: inline-block;
position: relative;
background: radial-gradient(circle at center, #F63838 0%, #FFFFFF 49%);
/* 兼容写法 */
-webkit-background-clip: text;
background-clip: text;
color: transparent;
z-index: 1;
overflow: visible;
font-size: 1.3vw;
font-weight: 600;
}
.alarmNum span {
font-size: 0.6vw;
2025-09-27 17:58:07 +08:00
}
2025-09-27 16:10:17 +08:00
</style>