integrated_traffic_vue/src/views/BI/components/personnel.vue

365 lines
7.7 KiB
Vue
Raw Normal View History

2024-01-25 10:28:53 +08:00
<template>
<div class="container">
<div class="block1">
<layout-title title="人员类型统计" />
<div class="option">
<div
class="list"
v-for="(item, index) in block1OptionsList"
:key="index"
>
<img :src="item.img" alt="" class="img" />
<div class="label">{{ item.label }}</div>
<div class="num">
<count-up :end-val="item.count"></count-up>
</div>
</div>
</div>
</div>
<div class="block2">
<layout-title title="告警类型统计" />
<div class="option">
<div
class="list"
v-for="(item, index) in block2OptionsList"
:key="index"
>
<div class="name">{{ item.label }}</div>
<div class="num">
<count-up :end-val="item.count"></count-up>
</div>
</div>
</div>
</div>
<div class="block3">
<layout-title title="人员定位情况" />
<div class="option">
<div class="tab_list">
<div
class="list"
v-for="(item, index) in tabsList"
:class="['item', { active: index === tabIndex }]"
:key="index"
@click="tabIndex = index"
>
{{ item }}
</div>
</div>
<div class="table">
<div class="tr">
<div class="td">姓名</div>
<div class="td">职务</div>
<div class="td">电量</div>
</div>
<div class="tr" v-for="(item, index) in block3List" :key="index">
<div class="td">{{ item.name }}</div>
<div class="td">{{ item.Office }}</div>
<div class="td">{{ item.electricity }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import LayoutTitle from "./title.vue";
import CountUp from "vue-countup-v3";
import { ref } from "vue";
const block1OptionsList = [
{
img: new URL("/src/assets/images/map/img1.png", import.meta.url).href,
label: "人员",
count: 3500,
},
{
img: new URL("/src/assets/images/map/img2.png", import.meta.url).href,
label: "相关方人员",
count: 3500,
},
{
img: new URL("/src/assets/images/map/img3.png", import.meta.url).href,
label: "外来人员",
count: 3500,
},
];
const block2OptionsList = [
{
label: "滞留报警",
count: 3500,
},
{
label: "越界报警",
count: 235,
},
{
label: "超员报警",
count: 569,
},
{
label: "缺员报警",
count: 569,
},
{
label: "静止报警",
count: 423,
},
{
label: "串岗报警",
count: 789,
},
{
label: "一键告警",
count: 236,
},
{
label: "聚集告警",
count: 214,
},
{
label: "作业告警",
count: 852,
},
];
const block3List = [
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
{
name: "赵一诺",
Office: "大堂经理",
electricity: "30%",
},
];
const tabsList = ["人员", "相关方人员", "外来人员"];
const tabIndex = ref(0);
</script>
<style scoped lang="scss">
.container {
width: 100%;
.block1 {
width: 430px;
.option {
width: 100%;
min-height: 100px;
background-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.8)
);
border-radius: 10px;
border: 1px solid;
border-image: linear-gradient(
to bottom,
rgba(58, 122, 149, 0),
rgba(16, 188, 236, 1)
)
1;
border-top: none;
display: flex;
justify-content: space-around;
padding: 20px 0;
text-align: center;
.list {
text-align: center;
width: 33%;
.img {
animation: slideY 2s infinite;
}
.label {
margin-top: 5px;
}
.num {
font-size: 24px;
margin-top: 10px;
background: linear-gradient(to top, #ffffff, #00a8ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
font-family: "Pingfang SC", "Microsoft YaHei", "Monospaced Number",
"Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue",
Helvetica, Arial, sans-serif;
text-shadow: 0 0 20px #2c67ec;
}
}
}
}
.block2 {
width: 430px;
margin-top: 10px;
.option {
width: 100%;
min-height: 100px;
background-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.8)
);
border-radius: 10px;
border: 1px solid;
border-image: linear-gradient(
to bottom,
rgba(58, 122, 149, 0),
rgba(16, 188, 236, 1)
)
1;
border-top: none;
display: flex;
padding: 10px;
text-align: center;
flex-wrap: wrap;
justify-content: space-between;
.list {
width: 48%;
background: rgba(20, 88, 177, 0.3);
border: 1px solid rgba(63, 145, 197, 0.5);
border-radius: 4px;
margin-top: 10px;
display: flex;
justify-content: space-between;
padding: 10px;
}
}
}
.block3 {
width: 430px;
margin-top: 10px;
.tab_list {
}
.option {
width: 100%;
min-height: 100px;
background-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.8)
);
border-radius: 10px;
border: 1px solid;
border-image: linear-gradient(
to bottom,
rgba(58, 122, 149, 0),
rgba(16, 188, 236, 1)
)
1;
border-top: none;
padding: 10px;
.tab_list {
display: flex;
background: rgba(52, 147, 245, 0.3);
border: 1px solid rgba(63, 145, 197, 0.4);
border-radius: 2px;
width: 55%;
justify-content: space-between;
.list {
padding: 8px 10px;
cursor: pointer;
&:hover,
&.active {
background-image: linear-gradient(
to bottom,
rgba(1, 168, 255, 1),
rgba(17, 74, 152, 1)
);
}
}
}
.table {
margin-top: 5px;
.tr {
display: flex;
&:nth-child(odd) {
background-color: rgba(42, 86, 158, 0.53);
}
.td {
flex: 1;
text-align: left;
font-size: 14px;
color: #fff;
padding: 10px 10px;
&:nth-child(1) {
flex-basis: 30%;
}
&:nth-child(2) {
flex-basis: 50%;
}
&:nth-child(3) {
flex-basis: 20%;
}
}
.empty {
flex: 1;
text-align: center;
font-size: 12px;
color: #fff;
padding: 5px;
}
}
}
}
}
@keyframes slideY {
0% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
100% {
transform: translateY(0);
}
}
}
</style>