forked from lucas/go-view-fetch
Compare commits
No commits in common. "e5dca79442c8b3a5c7f0a73d1fbd9a5c53383f25" and "dc357e345cc7f1d2bfe00efe1effa2798b8426cf" have entirely different histories.
e5dca79442
...
dc357e345c
Binary file not shown.
Before Width: | Height: | Size: 172 KiB |
@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { AlarmListConfig } from './index'
|
import { AlarmListConfig } from './index'
|
||||||
import dataJson from './data.json'
|
import dataJson from './data.json'
|
||||||
|
import { chartInitConfig } from '@/settings/designSetting'
|
||||||
export enum FontWeightEnum {
|
export enum FontWeightEnum {
|
||||||
NORMAL = '常规',
|
NORMAL = '常规',
|
||||||
BOLD = '加粗',
|
BOLD = '加粗',
|
||||||
@ -32,8 +33,8 @@ export const option = {
|
|||||||
'未解决': '#FF4D4F',
|
'未解决': '#FF4D4F',
|
||||||
'已解决': '#ffffff'
|
'已解决': '#ffffff'
|
||||||
},
|
},
|
||||||
headerHeight: 28,
|
headerHeight: 30,
|
||||||
itemHeight: 28,
|
itemHeight: 30,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
title: '近60分钟报警信息',
|
title: '近60分钟报警信息',
|
||||||
titleSize: 17,
|
titleSize: 17,
|
||||||
@ -42,8 +43,8 @@ export const option = {
|
|||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
paddingX: 40,
|
paddingX: 40,
|
||||||
paddingY: -30,
|
paddingY: -19,
|
||||||
letterSpacing: 1,
|
letterSpacing: 2,
|
||||||
isShowButton: false
|
isShowButton: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +52,6 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
|||||||
public key = AlarmListConfig.key
|
public key = AlarmListConfig.key
|
||||||
public chartConfig = AlarmListConfig
|
public chartConfig = AlarmListConfig
|
||||||
public option = option
|
public option = option
|
||||||
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 300, zIndex: 1 }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType } from 'vue'
|
||||||
import { option, FontWeightEnum, FontWeightObject, FontStyleEnum, FontStyleObject } from './config'
|
import { option, WritingModeEnum, WritingModeObject, FontWeightEnum, FontWeightObject, FontStyleEnum, FontStyleObject } from './config'
|
||||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
optionData: {
|
optionData: {
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
<div class="go-alarm-list">
|
<div class="go-alarm-list">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
<!-- <div class="title-prefix">
|
||||||
|
<svg-icon icon-class="rocket" class="title-icon" :style="{ color: option.iconColor }"></svg-icon>
|
||||||
|
</div> -->
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span :style="{
|
<span :style="{
|
||||||
color: option.titleColor,
|
color: option.titleColor,
|
||||||
@ -17,12 +19,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="option.isShowButton" class="header-right-squares">
|
<div v-if="option.isShowButton" class="header-right-squares">
|
||||||
<div class="square" style="background-color: #2e69e0"></div>
|
<!-- <div class="square" style="background-color: #2e69e0"></div>
|
||||||
<div class="square" style="background-color: #2e9bf0"></div>
|
<div class="square" style="background-color: #2e9bf0"></div>
|
||||||
<div class="square" style="background-color: #2ef0b3"></div>
|
<div class="square" style="background-color: #2ef0b3"></div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-header" :style="{
|
<div class="table-header" :style="{
|
||||||
|
// backgroundColor: option.headerBackgroundColor,
|
||||||
height: option.headerHeight + 'px'
|
height: option.headerHeight + 'px'
|
||||||
}">
|
}">
|
||||||
<div v-for="header in option.header" :key="header" class="header-item"
|
<div v-for="header in option.header" :key="header" class="header-item"
|
||||||
@ -71,40 +74,53 @@ const getStatusColor = (status: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.SmallBorder {
|
|
||||||
position: relative;
|
|
||||||
// background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-alarm-list {
|
.go-alarm-list {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
// background-color: #2066df;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// background-color: #4da6ff;
|
|
||||||
z-index: 10;
|
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: -5px;
|
||||||
|
|
||||||
|
// .title-prefix {
|
||||||
|
// width: 40px;
|
||||||
|
// height: 35px;
|
||||||
|
// // background-image: linear-gradient(to bottom, #2e69e0, #1e55a7);
|
||||||
|
// clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: center;
|
||||||
|
// align-items: center;
|
||||||
|
// margin-left: 0px;
|
||||||
|
|
||||||
|
// .title-icon {
|
||||||
|
// font-size: 22px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
// background-image: linear-gradient(to bottom, #17325f, #0e2142);
|
||||||
padding: 0 20px 0 20px;
|
padding: 0 20px 0 20px;
|
||||||
|
// margin-left: -10px;
|
||||||
|
clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +142,6 @@ const getStatusColor = (status: string) => {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
background: linear-gradient(to top, #226493c8, #0f2448);
|
background: linear-gradient(to top, #226493c8, #0f2448);
|
||||||
border-bottom: 2px solid #4da6ff;
|
border-bottom: 2px solid #4da6ff;
|
||||||
margin-top: 10px;
|
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
flex: 1 0 25%;
|
flex: 1 0 25%;
|
||||||
|
@ -2,20 +2,22 @@ import { PublicConfigClass } from '@/packages/public'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { DeviceStatusConfig } from './index'
|
import { DeviceStatusConfig } from './index'
|
||||||
import dataJson from './data.json'
|
import dataJson from './data.json'
|
||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
dataset: dataJson.source,
|
dataset: dataJson.source,
|
||||||
header: ['所属企业', '设备类型', '设备名称'],
|
header: ['所属企业', '设备类型', '设备名称'],
|
||||||
headerTextColor: '#7F9DB4',
|
headerTextColor: '#ffffff',
|
||||||
textColor: '#ffffff',
|
textColor: '#ffffff',
|
||||||
itemBackgroundColor: '#212936',
|
headerBackgroundColor: 'rgba(26, 56, 90, 0.5)',
|
||||||
timeTextColor: '#B75055',
|
itemBackgroundColor: 'rgba(15, 35, 62, 0.5)',
|
||||||
timeBgColor: '#562922',
|
timeTextColor: '#ffffff',
|
||||||
headerHeight: 30,
|
timeBgColor: '#FF4D4F',
|
||||||
itemHeight: 28,
|
headerHeight: 40,
|
||||||
fontSize: 11,
|
itemHeight: 35,
|
||||||
|
fontSize: 14,
|
||||||
title: '设备实时在线概况',
|
title: '设备实时在线概况',
|
||||||
titleSize: 17,
|
titleSize: 20,
|
||||||
titleColor: '#ffffff',
|
titleColor: '#B4E4FF',
|
||||||
iconColor: '#00E5FF',
|
iconColor: '#00E5FF',
|
||||||
onlineRate: 75,
|
onlineRate: 75,
|
||||||
onlineDevice: 23,
|
onlineDevice: 23,
|
||||||
@ -24,11 +26,7 @@ export const option = {
|
|||||||
headerBgColor2: '#003a8c',
|
headerBgColor2: '#003a8c',
|
||||||
legendColors: ['#00E5FF', '#00FF7F', '#FFFFFF'],
|
legendColors: ['#00E5FF', '#00FF7F', '#FFFFFF'],
|
||||||
progressColor: '#00E5FF',
|
progressColor: '#00E5FF',
|
||||||
progressBgColor: 'rgba(0, 0, 0, 0.1)',
|
progressBgColor: '#1A385A'
|
||||||
progressTextColor: '#DDE3E9',
|
|
||||||
paddingX: 60,
|
|
||||||
paddingY: -4,
|
|
||||||
letterSpacing: 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||||
|
@ -1,90 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<SmallBorder>
|
<div class="go-device-status">
|
||||||
<div class="go-device-status">
|
<div class="header">
|
||||||
<div class="header">
|
<div class="header-left">
|
||||||
<div class="header-left" :style="{
|
<div class="title-icon-bg" :style="{ backgroundColor: option.headerBgColor1 }">
|
||||||
marginLeft:
|
<svg-icon icon-class="rocket" class="title-icon" :style="{ color: option.iconColor }"></svg-icon>
|
||||||
option.paddingX
|
</div>
|
||||||
+ 'px',
|
<div class="title-text-bg" :style="{ backgroundColor: option.headerBgColor2 }">
|
||||||
marginTop:
|
<span class="title-text" :style="{ color: option.titleColor, fontSize: option.titleSize + 'px' }">{{ option.title }}</span>
|
||||||
option.paddingY
|
|
||||||
+ 'px'
|
|
||||||
}
|
|
||||||
">
|
|
||||||
<div class="title-text-bg" :style="{
|
|
||||||
|
|
||||||
}">
|
|
||||||
<span class="title-text" :style="{
|
|
||||||
letterSpacing: option.letterSpacing + 'px',
|
|
||||||
color: option.titleColor, fontSize: option.titleSize + 'px'
|
|
||||||
}">{{
|
|
||||||
option.title }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="status-section">
|
<div class="header-right">
|
||||||
|
<div class="legend">
|
||||||
|
<div v-for="color in option.legendColors" :key="color" class="legend-item" :style="{ backgroundColor: color }"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="status-section">
|
||||||
|
<div class="online-rate">
|
||||||
<div class="rate-circle-bg">
|
<div class="rate-circle-bg">
|
||||||
<div class="rate-circle"
|
<div
|
||||||
:style="{ background: `conic-gradient(${option.progressColor} 0% ${option.onlineRate}%, ${option.progressBgColor} ${option.onlineRate}% 100%)` }">
|
class="rate-circle"
|
||||||
|
:style="{ background: `conic-gradient(${option.progressColor} 0% ${option.onlineRate}%, ${option.progressBgColor} ${option.onlineRate}% 100%)` }"
|
||||||
|
>
|
||||||
<div class="rate-text-wrapper">
|
<div class="rate-text-wrapper">
|
||||||
<span class="rate-text" :style="{ color: option.progressTextColor }">{{ option.onlineRate }}</span>
|
<span class="rate-text" :style="{ color: option.progressColor }">{{ option.onlineRate }}</span>
|
||||||
<span class="rate-percent" :style="{ color: option.progressTextColor }">%</span>
|
<span class="rate-percent" :style="{ color: option.progressColor }">%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span class="rate-label">设备在线率</span>
|
||||||
<div class="online-content">
|
</div>
|
||||||
<div class="text-content">
|
<div class="progress-bar-wrapper">
|
||||||
<span class="online-text">
|
<div class="progress-bar" :style="{ backgroundColor: option.progressBgColor }">
|
||||||
设备在线率
|
<div class="progress" :style="{ width: option.onlineRate + '%', backgroundColor: option.progressColor }"></div>
|
||||||
</span>
|
|
||||||
<div class="online-nums">
|
|
||||||
<span class="online-num">{{ option.onlineDevice }}</span>
|
|
||||||
<span class="total-num">/{{ option.totalDevice }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="progress-bar-wrapper">
|
|
||||||
<div class="progress-bar" :style="{ backgroundColor: option.progressBgColor }">
|
|
||||||
<div class="progress" :style="{ width: option.onlineRate + '%', backgroundColor: option.progressColor }">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-header" :style="{
|
<div class="device-count">
|
||||||
height: option.headerHeight + 'px'
|
<span class="online">{{ option.onlineDevice }}</span>
|
||||||
}">
|
<span class="total">/ {{ option.totalDevice }}</span>
|
||||||
<div v-for="header in option.header" :key="header" class="header-item"
|
|
||||||
:style="{ color: option.headerTextColor, fontSize: option.fontSize + 'px' }">
|
|
||||||
{{ header }}
|
|
||||||
</div>
|
|
||||||
<div class="header-item"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-body">
|
</div>
|
||||||
<div v-for="(item, index) in option.dataset" :key="index" class="table-row"
|
<div class="table-header" :style="{ backgroundColor: option.headerBackgroundColor, height: option.headerHeight + 'px' }">
|
||||||
:style="{ backgroundColor: option.itemBackgroundColor, height: option.itemHeight + 'px' }">
|
<div v-for="header in option.header" :key="header" class="header-item" :style="{ color: option.headerTextColor, fontSize: option.fontSize + 'px' }">
|
||||||
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{
|
{{ header }}
|
||||||
item.enterprise }}</div>
|
</div>
|
||||||
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{
|
<div class="header-item"></div>
|
||||||
item.deviceType }}</div>
|
</div>
|
||||||
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{
|
<div class="table-body">
|
||||||
item.deviceName }}</div>
|
<div v-for="(item, index) in option.dataset" :key="index" class="table-row" :style="{ backgroundColor: option.itemBackgroundColor, height: option.itemHeight + 'px' }">
|
||||||
<div class="row-item time-wrapper">
|
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{ item.enterprise }}</div>
|
||||||
<div class="time"
|
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{ item.deviceType }}</div>
|
||||||
:style="{ backgroundColor: option.timeBgColor, color: option.timeTextColor, fontSize: option.fontSize + 'px' }">
|
<div class="row-item" :style="{ color: option.textColor, fontSize: option.fontSize + 'px' }">{{ item.deviceName }}</div>
|
||||||
{{ item.time }}
|
<div class="row-item time-wrapper">
|
||||||
</div>
|
<div class="time" :style="{ backgroundColor: option.timeBgColor, color: option.timeTextColor, fontSize: option.fontSize + 'px' }">
|
||||||
|
{{ item.time }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SmallBorder>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SmallBorder from '../SmallBorder/index.vue'
|
|
||||||
import { PropType, computed } from 'vue'
|
import { PropType, computed } from 'vue'
|
||||||
import { option as configOption } from './config'
|
import { option as configOption } from './config'
|
||||||
|
|
||||||
@ -99,39 +76,56 @@ const option = computed(() => props.chartConfig.option)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
SmallBorder {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-device-status {
|
.go-device-status {
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
// background-color: #041126;
|
background-color: #041126;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 10px 15px;
|
padding: 15px;
|
||||||
// padding-bottom: 3px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.title-icon-bg {
|
||||||
|
width: 50px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
clip-path: polygon(0 0, 80% 0, 100% 100%, 0% 100%);
|
||||||
|
.title-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-text-bg {
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 20px 0 30px;
|
||||||
|
margin-left: -10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
|
||||||
|
.title-text {
|
||||||
|
text-shadow: 0 0 10px rgba(180, 228, 255, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.header-right {
|
.header-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.legend {
|
.legend {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
||||||
.legend-item {
|
.legend-item {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
@ -143,147 +137,102 @@ SmallBorder {
|
|||||||
|
|
||||||
.status-section {
|
.status-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: -2px;
|
margin-bottom: 15px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
.online-rate {
|
||||||
.rate-circle-bg {
|
|
||||||
position: relative;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-bottom: 2px;
|
margin-right: 15px;
|
||||||
|
.rate-circle-bg {
|
||||||
&::after {
|
position: relative;
|
||||||
content: '';
|
width: 60px;
|
||||||
position: absolute;
|
height: 60px;
|
||||||
top: -5px;
|
|
||||||
left: -5px;
|
|
||||||
right: -5px;
|
|
||||||
bottom: -5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
filter: blur(5px);
|
|
||||||
background: radial-gradient(circle, #0d5585, transparent 60%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rate-circle {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
background-color: #041126;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rate-text-wrapper {
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
.rate-text {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rate-percent {
|
|
||||||
font-size: 12px;
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.online-content {
|
|
||||||
margin-top: -5px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
height: 80%;
|
|
||||||
justify-content: center;
|
|
||||||
margin-left: 10px;
|
|
||||||
|
|
||||||
.text-content {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
justify-content: center;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
width: 100%;
|
&::after {
|
||||||
margin-bottom: 2px;
|
content: '';
|
||||||
|
position: absolute;
|
||||||
.online-num {
|
top: -5px;
|
||||||
font-size: 16px;
|
left: -5px;
|
||||||
font-weight: bold;
|
right: -5px;
|
||||||
color: #23DEE9;
|
bottom: -5px;
|
||||||
}
|
border-radius: 50%;
|
||||||
|
filter: blur(5px);
|
||||||
.total-num {
|
background: radial-gradient(circle, rgba(0, 229, 255, 0.5), transparent 70%);
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #555657;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.rate-circle {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
background-color: #041126;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.rate-text-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
.rate-text {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.rate-percent {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rate-label {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar-wrapper {
|
.progress-bar-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 10px;
|
height: 12px;
|
||||||
border-radius: 1px;
|
border-radius: 6px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: #082846 0px 0px 0px 2px;
|
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 1px;
|
border-radius: 6px;
|
||||||
background: linear-gradient(to right, #0A5987, #71D8FE);
|
}
|
||||||
|
}
|
||||||
|
.device-count {
|
||||||
|
font-size: 20px;
|
||||||
|
margin-left: 15px;
|
||||||
|
.online {
|
||||||
|
color: #00e5ff;
|
||||||
|
}
|
||||||
|
.total {
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-header {
|
.table-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
border-radius: 1px;
|
border-radius: 5px;
|
||||||
background: linear-gradient(to top, #226493c8, #0f2448);
|
|
||||||
border-bottom: 2px solid #4da6ff;
|
|
||||||
|
|
||||||
|
|
||||||
.header-item {
|
.header-item {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
&:nth-child(1) { flex: 2; }
|
||||||
&:nth-child(1) {
|
&:nth-child(2) { flex: 2; }
|
||||||
flex: 2;
|
&:nth-child(3) { flex: 3; }
|
||||||
}
|
&:nth-child(4) { flex: 1; }
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(3) {
|
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(4) {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,60 +240,32 @@ SmallBorder {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
/* 隐藏滚动条 */
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
scrollbar-width: none;
|
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 5px;
|
||||||
border-radius: 1px;
|
border-radius: 5px;
|
||||||
border-bottom: 1px solid #29333C;
|
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-item {
|
.row-item {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
&:nth-child(1) { flex: 2; }
|
||||||
&:nth-child(1) {
|
&:nth-child(2) { flex: 2; }
|
||||||
flex: 2;
|
&:nth-child(3) { flex: 3; }
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(3) {
|
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(4) {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-wrapper {
|
.time-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
padding: 1px 6px;
|
padding: 2px 8px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { SmallBorderConfig } from './index'
|
import { SmallBorderConfig } from './index'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
|
import { chartInitConfig } from '@/settings/designSetting'
|
||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
colors: ['#1089ff', '#0000ff'],
|
colors: ['#1089ff', '#0000ff'],
|
||||||
@ -12,6 +13,6 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
|||||||
public key = SmallBorderConfig.key
|
public key = SmallBorderConfig.key
|
||||||
public chartConfig = cloneDeep(SmallBorderConfig)
|
public chartConfig = cloneDeep(SmallBorderConfig)
|
||||||
public option = cloneDeep(option)
|
public option = cloneDeep(option)
|
||||||
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 300, zIndex: 1 }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { TopAlarmsConfig } from './index'
|
import { TopAlarmsConfig } from './index'
|
||||||
import dataJson from './data.json'
|
import dataJson from './data.json'
|
||||||
|
import { chartInitConfig } from '@/settings/designSetting'
|
||||||
export const option = {
|
export const option = {
|
||||||
dataset: dataJson.source,
|
dataset: dataJson.source,
|
||||||
title: '未处置报警数TOP5',
|
title: '未处置报警数TOP5',
|
||||||
@ -15,14 +16,15 @@ export const option = {
|
|||||||
dropdownOptions: ['当日', '当月', '当年'],
|
dropdownOptions: ['当日', '当月', '当年'],
|
||||||
dropdownDefault: '当日',
|
dropdownDefault: '当日',
|
||||||
iconColor: '#00E5FF',
|
iconColor: '#00E5FF',
|
||||||
letterSpacing: 1,
|
letterSpacing:2,
|
||||||
paddingX: 40,
|
paddingX: 40,
|
||||||
paddingY: -5,
|
paddingY: -5,
|
||||||
isShowButton: false
|
isShowButton: false
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||||
public key = TopAlarmsConfig.key
|
public key = TopAlarmsConfig.key
|
||||||
public chartConfig = TopAlarmsConfig
|
public chartConfig = TopAlarmsConfig
|
||||||
public option = option
|
public option = option
|
||||||
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 300, zIndex: 1 }
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
<div class="go-top-alarms">
|
<div class="go-top-alarms">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
<!-- <div class="title-prefix">
|
||||||
|
<svg-icon icon-class="rocket" class="title-icon" :style="{ color: option.iconColor }"></svg-icon>
|
||||||
|
</div> -->
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span :style="{
|
<span :style="{
|
||||||
color: option.titleColor,
|
color: option.titleColor,
|
||||||
@ -119,11 +122,25 @@ const handleSelect = (key: string) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
// .title-prefix {
|
||||||
|
// width: 40px;
|
||||||
|
// height: 35px;
|
||||||
|
// background-image: linear-gradient(to bottom, #2e69e0, #1e55a7);
|
||||||
|
// clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: center;
|
||||||
|
// align-items: center;
|
||||||
|
|
||||||
|
// .title-icon {
|
||||||
|
// font-size: 22px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
// background-image: linear-gradient(to bottom, #17325f, #0e2142);
|
||||||
padding: 0 20px 0 20px;
|
padding: 0 20px 0 20px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
|
clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
|
||||||
@ -173,8 +190,10 @@ const handleSelect = (key: string) => {
|
|||||||
'info value'
|
'info value'
|
||||||
'bar bar';
|
'bar bar';
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
// margin-right: 10px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
gap: 6px 15px;
|
gap: 6px 15px;
|
||||||
|
// background-color: antiquewhite;
|
||||||
|
|
||||||
.item-info {
|
.item-info {
|
||||||
grid-area: info;
|
grid-area: info;
|
||||||
@ -183,12 +202,14 @@ const handleSelect = (key: string) => {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
// background-color: yellowgreen;
|
||||||
|
|
||||||
.rank {
|
.rank {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
// background-color: #fff;
|
||||||
|
|
||||||
.rank-icon {
|
.rank-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -214,18 +235,22 @@ const handleSelect = (key: string) => {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
// font-size: 16px;
|
// font-size: 16px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
// background-color: aquamarine;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar-wrapper {
|
.progress-bar-wrapper {
|
||||||
grid-area: bar;
|
grid-area: bar;
|
||||||
width: calc(100% - 60px);
|
width: calc(100% - 60px);
|
||||||
|
/* Adjust width to not overlap value */
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
|
/* Align with name */
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
|
// background-color: rgba(42, 58, 91, 0.5);
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ export const theme = {
|
|||||||
export const chartInitConfig = {
|
export const chartInitConfig = {
|
||||||
x: 50,
|
x: 50,
|
||||||
y: 50,
|
y: 50,
|
||||||
w: 450,
|
w: 500,
|
||||||
h: 300,
|
h: 300,
|
||||||
// 不建议动 offset
|
// 不建议动 offset
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user