qa-regulatory-gwj-vue/src/views/map/components/zhongdian.vue

337 lines
8.1 KiB
Vue

<template>
<div class="renyuan">
<div class="block1">
<layout-title title="重点工程统计"/>
<div class="options">
<div v-for="(item,index) in block1OptionsList" :key="index" class="option">
<div class="imger">
<img :src="item.img" alt="">
</div>
<div class="info">
<div class="label">{{ item.title }}</div>
<div class="text">{{ item.count }}</div>
<!-- <div class="text"><count-to :start-val="0" :end-val="item.count" :duration="3600"/></div>-->
</div>
</div>
</div>
</div>
<div class="block2">
<layout-title title="区域报警数"/>
<div class="options">
<div v-for="(item,index) in block2OptionsList" :key="index" class="option">
<div class="circular"><img :src="item.img" alt=""></div>
<div class="info">
<div class="title">{{ item.label }}</div>
<div class="count"> <count-to :start-val="0" :end-val="+item.count" :duration="3600"/></div>
</div>
</div>
</div>
</div>
<div class="block3">
<layout-title title="安全管理记录"/>
<div class="content">
<div class="table">
<div class="tr">
<div class="td">公司名称</div>
<div class="td">创建数</div>
<div class="td">检查次数</div>
<div class="td">隐患数量</div>
</div>
<div v-for="(item,index) in block3List" :key="index" class="tr">
<div class="td">{{ item.name }}</div>
<div class="td">{{ item.num }}</div>
<div class="td">{{ item.check }}</div>
<div class="td">{{ item.count }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import layoutTitle from './title.vue'
import CountTo from 'vue-count-to'
export default {
components: {
CountTo,
layoutTitle
},
data() {
return {
block1OptionsList: [
{
title: '开工数量',
img: require('../../../assets/map/zhongdian/ico1.png'),
count: '-'
},
{
title: '视频数量',
img: require('../../../assets/map/zhongdian/ico2.png'),
count: '-'
},
{
title: '检查次数',
img: require('../../../assets/map/zhongdian/ico3.png'),
count: '-'
},
{
title: '发现隐患数量',
img: require('../../../assets/map/zhongdian/ico4.png'),
count: '-'
}
],
block2OptionsList: [
{
img: require('../../../assets/map/zhongdian/ico5.png'),
label: '处罚次数',
count: 0
},
{
img: require('../../../assets/map/zhongdian/ico6.png'),
label: '处罚金额',
count: 0
}
],
block3OptionsList: ['风险区域统计', '组织机构统计'],
block3OptionsIndex: 0,
block3List: [
{
name: '-',
num: '-',
check: '-',
count: '-'
}
]
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.renyuan {
.title {
background-image: url("../../../assets/map/menjin/title_on.png");
background-size: 100% 100%;
background-repeat: no-repeat;
width: 113px;
height: 26px;
font-size: 14px;
line-height: 26px;
text-align: center;
color: #fff;
&.active {
background-image: url("../../../assets/map/menjin/title.png");
}
}
.block1 {
width: 410px;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
.options {
padding: 10px 15px;
border: 1px solid;
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
border-top: none;
display: flex;
flex-wrap: wrap;
.option {
display: flex;
width: 50%;
align-items: center;
margin-top: 10px;
&:nth-child(-n+2) {
margin-top: 0;
}
.imger {
width: 50px;
height: 50px;
background-image: url("../../../assets/map/menjin/img1.png");
background-size: 100% 100%;
background-repeat: no-repeat;
text-align: center;
margin-left: 20px;
img {
width: 30px;
height: 30px;
animation: scale 2s infinite;
margin-top: 10px;
}
}
.info {
color: #FFFFFF;
margin-left: 10px;
.label {
font-size: 12px;
height: 25px;
line-height: 25px;
}
.text {
font-size: 24px;
background: linear-gradient(to top, #48bbf0, #ffffff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
margin-top: -5px;
}
}
}
}
}
.block2 {
width: 410px;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
margin-top: 10px;
.options {
padding: 10px 15px;
border: 1px solid;
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
border-top: none;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
position: relative;
height: 150px;
.option{
width: 50%;
display: flex;
align-items: center;
justify-content: space-around;
.circular {
margin-top: 5px;
background-image: url("../../../assets/map/anquan/icobg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
width: 70px;
height: 70px;
text-align: center;
padding-top: 13px;
img {
width: 25px;
height: 26px;
animation: slideY 2s infinite;
}
}
.info{
flex: 1;
text-align: center;
.title{
background-image: url("../../../assets/map/anquan/label.png");
background-size: 100% 100%;
background-repeat: no-repeat;
width: 120px;
height: 24px;
margin-top: 5px;
font-size: 12px;
line-height: 25px;
text-align: center;
color: #fff;
}
.count{
margin-top: 10px;
font-size: 24px;
background: linear-gradient(to top, #48bbf0, #ffffff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
}
}
}
}
}
.block3 {
margin-top: 10px;
width: 410px;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
.content {
border: 1px solid;
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
border-top: none;
padding: 10px;
.options {
display: flex;
justify-content: flex-end;
.title {
cursor: pointer;
}
}
.table {
margin-top: 5px;
.tr {
display: flex;
&:nth-child(odd) {
background-color: rgba(42, 86, 158, 0.53);
}
.td {
flex: 1;
text-align: center;
font-size: 12px;
color: #fff;
padding: 5px;
}
}
}
}
}
}
@keyframes scale {
0% {
transform: scale(0.9);
}
50% {
transform: scale(0.8);
}
100% {
transform: scale(0.9);
}
}
@keyframes slideY {
0% {
transform: translateY(0);
}
50% {
transform: translateY(5px);
}
100% {
transform: translateY(0);
}
}
</style>