sdf
This commit is contained in:
parent
ad4d7388ad
commit
cc9e0f01b4
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"source": [
|
"source": [
|
||||||
{
|
{
|
||||||
"name": "调漆作业室",
|
"name": "危化品库",
|
||||||
"icon": "warehouse",
|
"icon": "warehouse",
|
||||||
"metrics": [
|
"metrics": [
|
||||||
{ "label": "场景总数", "value": 262 },
|
{ "label": "场景总数", "value": 262 },
|
||||||
@ -9,7 +9,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "喷漆作业室",
|
"name": "危废品库",
|
||||||
"icon": "warehouse",
|
"icon": "warehouse",
|
||||||
"metrics": [
|
"metrics": [
|
||||||
{ "label": "智控场景", "value": 6852 },
|
{ "label": "智控场景", "value": 6852 },
|
||||||
@ -17,4 +17,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -8,19 +8,29 @@
|
|||||||
<a class="link" :style="{ color: option.linkColor }">{{ option.linkText }}</a>
|
<a class="link" :style="{ color: option.linkColor }">{{ option.linkText }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div v-for="(scene, index) in option.dataset" :key="index" class="scene-row" :class="{ reverse: index % 2 !== 0 }">
|
<div
|
||||||
|
v-for="(scene, index) in option.dataset"
|
||||||
|
:key="index"
|
||||||
|
class="scene-row"
|
||||||
|
:class="{ reverse: index % 2 !== 0 }"
|
||||||
|
:style="{ backgroundImage: `url(${backgrounds[index]})` }"
|
||||||
|
>
|
||||||
<div class="scene-icon-container">
|
<div class="scene-icon-container">
|
||||||
|
<div class="yellow-dot"></div>
|
||||||
<svg-icon :icon-class="scene.icon" class="scene-icon"></svg-icon>
|
<svg-icon :icon-class="scene.icon" class="scene-icon"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="scene-name" :style="{ color: option.sceneNameColor, fontSize: option.sceneNameSize + 'px' }">{{ scene.name }}</div>
|
<div class="scene-name" :style="{ color: option.sceneNameColor, fontSize: option.sceneNameSize + 'px' }">{{ scene.name }}</div>
|
||||||
<div class="metrics-container">
|
<div class="metrics-container">
|
||||||
<div v-for="(metric, mIndex) in scene.metrics" :key="mIndex" class="metric">
|
<template v-for="(metric, mIndex) in scene.metrics" :key="mIndex">
|
||||||
<div class="metric-label">
|
<div class="metric">
|
||||||
<span class="point" :style="{ backgroundColor: mIndex === 0 ? option.pointColor1 : option.pointColor2 }"></span>
|
<div class="metric-label">
|
||||||
<span :style="{ color: option.labelColor, fontSize: option.labelSize + 'px' }">{{ metric.label }}</span>
|
<span class="point" :style="{ backgroundColor: mIndex === 0 ? option.pointColor1 : option.pointColor2 }"></span>
|
||||||
|
<span :style="{ color: option.labelColor, fontSize: option.labelSize + 'px' }">{{ metric.label }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="metric-value" :style="{ color: option.valueColor, fontSize: option.valueSize + 'px' }">{{ metric.value }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="metric-value" :style="{ color: option.valueColor, fontSize: option.valueSize + 'px' }">{{ metric.value }}</div>
|
<div class="separator" v-if="mIndex < scene.metrics.length - 1"></div>
|
||||||
</div>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,6 +40,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType, computed } from 'vue'
|
import { PropType, computed } from 'vue'
|
||||||
import { option as configOption } from './config'
|
import { option as configOption } from './config'
|
||||||
|
import bg1 from '/6.png'
|
||||||
|
import bg2 from '/04.png'
|
||||||
|
|
||||||
|
const backgrounds = [bg1, bg2]
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
@ -86,35 +100,29 @@ const option = computed(() => props.chartConfig.option)
|
|||||||
.scene-row {
|
.scene-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: rgba(26, 56, 90, 0.5);
|
padding: 0 30px;
|
||||||
border-radius: 50px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
height: 90px;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
&.reverse {
|
&.reverse {
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
|
|
||||||
.scene-icon-container {
|
|
||||||
margin-right: 0;
|
|
||||||
margin-left: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scene-name {
|
.scene-name {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
margin-left: auto;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.metrics-container {
|
.metrics-container {
|
||||||
flex-direction: row-reverse;
|
margin-right: auto;
|
||||||
.metric {
|
margin-left: 0;
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-icon-container {
|
.scene-icon-container {
|
||||||
|
position: relative;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@ -122,7 +130,16 @@ const option = computed(() => props.chartConfig.option)
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 15px;
|
|
||||||
|
.yellow-dot {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: #FFD700;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.scene-icon {
|
.scene-icon {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
@ -132,31 +149,42 @@ const option = computed(() => props.chartConfig.option)
|
|||||||
|
|
||||||
.scene-name {
|
.scene-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: auto;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.metrics-container {
|
.metrics-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
.metric {
|
align-items: center;
|
||||||
|
margin-left: auto;
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
width: 1px;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #00E5FF;
|
||||||
|
margin: 0 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
|
.metric-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 20px;
|
margin-bottom: 5px;
|
||||||
.metric-label {
|
.point {
|
||||||
display: flex;
|
width: 8px;
|
||||||
align-items: center;
|
height: 8px;
|
||||||
margin-bottom: 5px;
|
border-radius: 50%;
|
||||||
.point {
|
margin-right: 8px;
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.metric-value {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.metric-value {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user