假数据修改
This commit is contained in:
parent
9e9be4d477
commit
9a149b6fd8
|
|
@ -22,7 +22,12 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
chartData: [],
|
||||
chartData: [
|
||||
{ name: '在库', value: 900, proportion: 25 },
|
||||
{ name: '在用', value: 2158, proportion: 60 },
|
||||
{ name: '维修', value: 150, proportion: 4.1 },
|
||||
{ name: '共享', value: 389, proportion: 10.9 },
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -37,12 +42,12 @@ export default {
|
|||
const res = await getEquipmentStatusApi()
|
||||
console.log('🚀 ~ 装备状态 ~ res:', res)
|
||||
if (!res.data) return
|
||||
this.chartData = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
value: item.num,
|
||||
}
|
||||
})
|
||||
// this.chartData = res.data.map((item) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// value: item.num,
|
||||
// }
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -65,7 +65,13 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
tableList: [],
|
||||
tableList: [
|
||||
{ name: '牵引机', proportion: 81.06, turnoverRate: 10.2 },
|
||||
{ name: '汽车起重机', proportion: 72.31, turnoverRate: 9.7 },
|
||||
{ name: '曲臂升降机', proportion: 65.89, turnoverRate: 9.5 },
|
||||
{ name: '滤油机', proportion: 60.35, turnoverRate: 8.8 },
|
||||
{ name: '重力机', proportion: 57.78, turnoverRate: 8.12 },
|
||||
],
|
||||
showTab: 1,
|
||||
}
|
||||
},
|
||||
|
|
@ -92,11 +98,11 @@ export default {
|
|||
}
|
||||
const res = await getUsageStatisticsApi({ type })
|
||||
if (!res.data) return
|
||||
if (res.data.length > 5) {
|
||||
this.tableList = res.data.slice(0, 5)
|
||||
} else {
|
||||
this.tableList = res.data
|
||||
}
|
||||
// if (res.data.length > 5) {
|
||||
// this.tableList = res.data.slice(0, 5)
|
||||
// } else {
|
||||
// this.tableList = res.data
|
||||
// }
|
||||
console.log('🚀 ~ 装备在用率统计 ~ res:', res)
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ 装备在用率统计 ~ error:', error)
|
||||
|
|
@ -193,7 +199,7 @@ export default {
|
|||
|
||||
.bt-content {
|
||||
margin-top: 30px;
|
||||
padding: 0 20px;
|
||||
padding: 0 10px;
|
||||
.dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
|
|
@ -204,6 +210,7 @@ export default {
|
|||
}
|
||||
|
||||
.bt-content-item {
|
||||
font-size: 13px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@
|
|||
<img src="@/assets/images/top3-4.png" flt="contain" alt="" />
|
||||
</div>
|
||||
<div class="num" style="color: #FF8F39">
|
||||
{{ num }}
|
||||
<!-- {{ num }} -->
|
||||
2158
|
||||
<span class="unit-text">台</span>
|
||||
</div>
|
||||
<div class="name">在用装备数</div>
|
||||
|
|
@ -35,14 +36,16 @@
|
|||
</div>
|
||||
<div class="bottom-box">
|
||||
<div class="bt-1" @click="openDialogEquip(1)">
|
||||
<Gauge :value="proportion" />
|
||||
<!-- <Gauge :value="proportion" /> -->
|
||||
<Gauge :value="60" />
|
||||
</div>
|
||||
<div class="bt-2" @click="openDialogEquip(2)">
|
||||
<div class="img-box">
|
||||
<img src="@/assets/images/top3-4.png" flt="contain" alt="" />
|
||||
</div>
|
||||
<div class="num" style="color: #FF8F39">
|
||||
{{ turnoverRate }}
|
||||
<!-- {{ turnoverRate }} -->
|
||||
96
|
||||
<span class="unit-text">次/年</span>
|
||||
</div>
|
||||
<div class="name">周转率</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue