湖里大屏(CIM+):完成模型布局
This commit is contained in:
parent
da2533b644
commit
74e39abee6
@ -1,42 +1,24 @@
|
||||
<template>
|
||||
<!-- 模型 -->
|
||||
<div class="container">
|
||||
<div class="titleTxt">{{ title }}</div>
|
||||
|
||||
</div>
|
||||
<Card :title="title">
|
||||
<CountList :allCount="{ value: 22, label: '塔吊总数' }" :todayCount="{ value: 65, label: '今日报警总数' }" :list="[]" />
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../components/Card.vue'
|
||||
import CountList from '../components/CountList.vue'
|
||||
export default {
|
||||
|
||||
components: { Card, CountList },
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: "default title"
|
||||
default: 'default title'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid #0081c3;
|
||||
|
||||
.titleTxt {
|
||||
font-size: 18px;
|
||||
color: #6ee4f0;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<div class="h-count-list">
|
||||
<div class="counts">
|
||||
<div class="count">
|
||||
<div class="icon"></div>
|
||||
<div class="info">
|
||||
<div class="num blue">{{ allCount.value }}</div>
|
||||
<div class="label">{{ allCount.label }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count">
|
||||
<div class="icon"></div>
|
||||
<div class="info">
|
||||
<div class="num red">{{ todayCount.value }}</div>
|
||||
<div class="label">{{ todayCount.label }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="list-item" :class="i === 2 ? 'offline' : 'online'" v-for="i in 3" :key="i">
|
||||
<div class="status">在线</div>
|
||||
<div class="label">1号塔吊</div>
|
||||
<div class="num">今日报警:2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
allCount: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({
|
||||
img: '',
|
||||
value: '',
|
||||
label: ''
|
||||
})
|
||||
},
|
||||
todayCount: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({
|
||||
img: '',
|
||||
value: '',
|
||||
label: '',
|
||||
color: ''
|
||||
})
|
||||
},
|
||||
list: {
|
||||
props: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [{}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.h-count-list {
|
||||
.counts {
|
||||
padding: 10px 26px 20px;
|
||||
display: flex;
|
||||
.count {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
margin-right: 10px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
.info {
|
||||
color: #fff;
|
||||
.num {
|
||||
margin-bottom: 6px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.label {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 10px;
|
||||
.list-item {
|
||||
margin-bottom: 6px;
|
||||
padding-left: 16px;
|
||||
height: 38px;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.online {
|
||||
background-image: linear-gradient(90deg, rgba(24, 52, 73, 1), rgba(24, 52, 73, 0));
|
||||
.status {
|
||||
background-color: #61c9d6;
|
||||
}
|
||||
}
|
||||
&.offline {
|
||||
background-image: linear-gradient(90deg, rgba(44, 35, 56, 1), rgba(44, 35, 56, 0));
|
||||
.status {
|
||||
background-color: #ff6c7f;
|
||||
}
|
||||
}
|
||||
.status {
|
||||
margin-right: 6px;
|
||||
width: 36px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
border-radius: 9px;
|
||||
}
|
||||
.label {
|
||||
margin-right: auto;
|
||||
}
|
||||
.num {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #5281f7;
|
||||
}
|
||||
.red {
|
||||
color: #ff6c7f;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user