update data

This commit is contained in:
lb
2022-11-16 15:47:10 +08:00
parent 177cab9b2f
commit c309be87eb
2 changed files with 16 additions and 12 deletions

View File

@@ -14,16 +14,16 @@
<div class="flex items-center gap-8">
<span class="param-name">MTBR</span>
<div class="progress-bar grow">
<ProgreeBar :process="+mtbr * 100" :colors="['#2EC6B4', '#85F6E9']" />
<ProgreeBar :process="+mtbr" :max="30" :colors="['#2EC6B4', '#85F6E9']" />
</div>
<span class="param-value">{{ mtbr | noDecimalFilter }}%</span>
<span class="param-value">{{ mtbr }}min</span>
</div>
<div class="flex items-center gap-8">
<span class="param-name">MTBF</span>
<div class="progress-bar grow">
<ProgreeBar :process="+mtbf * 100" :colors="['#EB46A1', '#FF8BC3']" />
<ProgreeBar :process="+mtbf" :max="99999" :colors="['#EB46A1', '#FF8BC3']" />
</div>
<span class="param-value">{{ mtbf | noDecimalFilter }}%</span>
<span class="param-value">{{ mtbf }}h</span>
</div>
</div>
</TechyBox>
@@ -39,6 +39,10 @@ const ProgreeBar = {
type: Number,
default: 0
},
max: {
type: Number,
default: 100
},
colors: {
type: Array,
default: () => ['#1295FF', '#9DD5FF']
@@ -68,7 +72,7 @@ const ProgreeBar = {
position: 'absolute',
left: 0,
top: 0,
width: this.process + '%',
width: this.process / this.max * 100 + '%',
height: '100%',
borderRadius: 'calc(8px * var(--beilv))',
background: `linear-gradient(to right, ${this.colors[0]}, ${this.colors[1]})`
@@ -141,7 +145,7 @@ export default {
width: 24px; */
font-size: calc(12px * var(--beilv));
line-height: calc(14px * var(--beilv));
width: 25%;
width: 15%;
}
.param-list::before {