湖里大屏(数字工地):升降机数据渲染

This commit is contained in:
骆乐 2022-08-11 11:10:41 +08:00
parent fbf9c5183e
commit fdeecd62d6
2 changed files with 16 additions and 3 deletions

View File

@ -18,7 +18,7 @@
</div> </div>
<div class="rightBox"> <div class="rightBox">
<div class="rightTop"> <div class="rightTop">
<rightTop title="升降机设备"></rightTop> <rightTop title="升降机设备" :lifterList="lifterList" :totalLifterDev="totalLifterDev" :totalDangerLifterDev="totalDangerLifterDev"></rightTop>
</div> </div>
<div class="rightCenter"> <div class="rightCenter">
<rightCenter title="环境监测"></rightCenter> <rightCenter title="环境监测"></rightCenter>

View File

@ -1,8 +1,8 @@
<template> <template>
<Card :title="title"> <Card :title="title">
<DeviceCard <DeviceCard
:leftCount="{ value: 22, label: '升降机设备数', img: 'elevator' }" :leftCount="{ value: totalLifterDev, label: '升降机设备数', img: 'elevator' }"
:rightCount="{ value: 65, label: '今日报警数', img: 'warring2' }" :rightCount="{ value: totalDangerLifterDev, label: '今日报警数', img: 'warring2' }"
> >
<div class="legend"> <div class="legend">
<div class="item">报警数</div> <div class="item">报警数</div>
@ -23,7 +23,20 @@ export default {
title: { title: {
type: String, type: String,
default: '' default: ''
},
totalLifterDev:{
type: Number,
default: ""
},
totalDangerLifterDev:{
type: Number,
default: ""
},
lifterList:{
type: Array,
default: ""
} }
}, },
data() { data() {
const yData = [23, 44, 63, 12, 45, 78, 34, 67].map((value, i) => { const yData = [23, 44, 63, 12, 45, 78, 34, 67].map((value, i) => {