|
@@ -1,20 +1,26 @@
|
|
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
|
<template>
|
|
|
<CostumeHeader>
|
|
|
- <template #select></template>
|
|
|
+ <template #select>
|
|
|
+ <!-- 填写空的div以覆盖默认的选择框 -->
|
|
|
+ <div></div>
|
|
|
+ </template>
|
|
|
<div class="w-200px flex flex-items-center">
|
|
|
<RightCircleOutlined class="w-30px" />
|
|
|
<div class="flex-grow-1">
|
|
|
网络断开
|
|
|
- {{ warns.length }}
|
|
|
+ <span> {{ warns.length }}条 </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</CostumeHeader>
|
|
|
- <Timeline>
|
|
|
- <TimelineItem v-for="(item, i) in warns" :key="`svvhccdw-${i}`">
|
|
|
- {{ item.label }}
|
|
|
- </TimelineItem>
|
|
|
- </Timeline>
|
|
|
+ <div>
|
|
|
+ <div v-for="(item, i) in warns" :key="`svvhccdw-${i}`" class="flex items-center timeline-item">
|
|
|
+ <div class="timeline-item__icon" :class="`timeline-item__icon_${item.color}`"></div>
|
|
|
+ <div class="timeline-item__dot"></div>
|
|
|
+ <div class="timeline-item__label">{{ item.label }}</div>
|
|
|
+ <div :class="`timeline-item__value_${item.color}`">{{ item.count }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { onMounted, ref } from 'vue';
|
|
@@ -48,6 +54,22 @@
|
|
|
{
|
|
|
label: 'test',
|
|
|
count: 0,
|
|
|
+ color: 'red',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test',
|
|
|
+ count: 0,
|
|
|
+ color: 'yellow',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test',
|
|
|
+ count: 0,
|
|
|
+ color: 'green',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test',
|
|
|
+ count: 0,
|
|
|
+ color: 'blue',
|
|
|
},
|
|
|
]);
|
|
|
// 获取全部局扇的数据,并以选项格式返回给 Header 消费
|
|
@@ -70,4 +92,60 @@
|
|
|
// fetchConfig();
|
|
|
});
|
|
|
</script>
|
|
|
-<style scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+ @import '@/design/vent/color.less';
|
|
|
+
|
|
|
+ .timeline-item {
|
|
|
+ height: 60px;
|
|
|
+ }
|
|
|
+ .timeline-item__icon_red {
|
|
|
+ background-image: url('@/assets/images/home-container/warn-icon.png');
|
|
|
+ }
|
|
|
+ .timeline-item__icon_yellow {
|
|
|
+ background-image: url('@/assets/images/home-container/warn-icon1.png');
|
|
|
+ }
|
|
|
+ .timeline-item__icon_green {
|
|
|
+ background-image: url('@/assets/images/home-container/warn-icon2.png');
|
|
|
+ }
|
|
|
+ .timeline-item__icon_blue {
|
|
|
+ background-image: url('@/assets/images/home-container/warn-icon3.png');
|
|
|
+ }
|
|
|
+ .timeline-item__icon {
|
|
|
+ width: 54px;
|
|
|
+ height: 45px;
|
|
|
+ margin: 0 50px 0 50px;
|
|
|
+ }
|
|
|
+ .timeline-item__dot {
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ margin: 0 50px 0 0;
|
|
|
+ background-color: @vent-gas-primary-bg;
|
|
|
+ border-radius: 5px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .timeline-item__dot::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: -3px;
|
|
|
+ left: -3px;
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ border-radius: 8px;
|
|
|
+ border: 1px solid @vent-gas-tab-border;
|
|
|
+ }
|
|
|
+ .timeline-item__label {
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+ .timeline-item__value_red {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .timeline-item__value_yellow {
|
|
|
+ color: yellow;
|
|
|
+ }
|
|
|
+ .timeline-item__value_green {
|
|
|
+ color: green;
|
|
|
+ }
|
|
|
+ .timeline-item__value_blue {
|
|
|
+ color: blue;
|
|
|
+ }
|
|
|
+</style>
|