11-mes-new/src/views/3DOverview/components/RightContentQualityAnalysis.vue

89 lines
2.1 KiB
Vue

<template>
<div class="right-content-quality-analysis">
<techy-analysis-bar
v-for="(item, index) in datalist"
:key="index"
:name="item.name"
:amount="item.value"
color="green"
/>
<!-- <div v-for="item in datalist" :key="item.name" class="analysis-item">
<span class="absolute" :style="{ backgroundColor: item.color }" />
<span>{{ item.name }}</span>
<span>{{ item.value }}</span>
</div> -->
</div>
</template>
<script>
import TechyAnalysisBar from './TechyAnalysisBar.vue'
export default {
name: 'RightContentQualityAnalysis',
components: { TechyAnalysisBar },
props: {},
data() {
return {
datalist: [
{ name: '热端', value: 2332039120, color: '#0b88ff' },
{ name: '原片上片', value: 30, color: '#0bffa6' },
{ name: '上片', value: 27, color: '#e3ff0b' },
{ name: '磨边', value: 23, color: '#950bff' },
{ name: '原片磨边', value: 30, color: '#0bffa6' },
{ name: '原片', value: 30, color: '#0bffa6' },
{ name: '上片', value: 27, color: '#e3ff0b' },
{ name: '磨边镀膜膜', value: 23, color: '#950bff' },
{ name: '镀膜', value: 10, color: '#ff0bc2' },
{ name: '清晰', value: 66, color: '#ff7d0b' }
]
}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style scoped>
.right-content-quality-analysis {
height: calc(100% - 32px);
overflow: hidden;
overflow-y: auto; /** 右边会有多的padding给滑道 */
display: grid;
grid-template-columns: 1fr 1fr;
grid-auto-rows: min-content;
gap: calc(4px * var(--beilv)) calc(6px * var(--beilv));
justify-content: end;
}
.analysis-item {
padding-left: 16px;
font-size: 12px;
line-height: 1.5;
display: flex;
align-items: center;
justify-content: space-between;
color: #fffc;
position: relative;
}
.analysis-item::before {
content: '';
position: absolute;
left: 4px;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: attr(data-color color, blue);
}
.absolute {
position: absolute;
width: 8px;
height: 8px;
left: 3px;
border-radius: 50%;
}
</style>