2024-10-22 09:55:33 +08:00
|
|
|
<!--
|
|
|
|
|
* @Author: SunTao 328867980@qq.com
|
|
|
|
|
* @Date: 2024-10-21 09:59:32
|
|
|
|
|
* @LastEditors: SunTao 328867980@qq.com
|
2024-10-29 09:45:49 +08:00
|
|
|
* @LastEditTime: 2024-10-28 11:42:15
|
2024-10-22 09:55:33 +08:00
|
|
|
* @FilePath: \znxjxt-ui\src\views\big-screen\traffic-components\traffic-safety.vue
|
|
|
|
|
* @Description: 交安事件大屏-交安事件
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="content">
|
2024-10-29 09:45:49 +08:00
|
|
|
<div class="traffic-left"><span>{{today}}</span></div>
|
2024-10-22 09:55:33 +08:00
|
|
|
<div class="traffic-right">
|
2024-10-29 09:45:49 +08:00
|
|
|
<div class="right-sum"><span>{{all}}</span>个</div>
|
|
|
|
|
<div class="right-rate"><span> {{scale}} </span>%</div>
|
2024-10-22 09:55:33 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-10-29 09:45:49 +08:00
|
|
|
import { safetyData } from "@/api/xj/screen/traffic-screen";
|
2024-10-22 09:55:33 +08:00
|
|
|
export default {
|
|
|
|
|
name: "TrafficSafety",
|
2024-10-29 09:45:49 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
today: 0,
|
|
|
|
|
all: 0,
|
|
|
|
|
scale: 0,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData() {
|
|
|
|
|
safetyData().then(({ code, data }) => {
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
this.today = data.today;
|
|
|
|
|
this.all = data.all;
|
|
|
|
|
this.scale = data.scale;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-10-22 09:55:33 +08:00
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.traffic-left {
|
|
|
|
|
width: 45%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding-left: 1.5rem;
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
background-image: url("../../../assets/screen/traffic/traffic-left.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 85%;
|
|
|
|
|
background-position: 100% 60%;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
|
|
|
|
#2773d0
|
|
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.traffic-right {
|
|
|
|
|
width: 55%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
|
|
.right-sum {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 4rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
padding-left: 1rem;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
line-height: 3rem;
|
|
|
|
|
background-image: url("../../../assets/screen/traffic/right-sum.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-position: 100% 50%;
|
2024-10-29 09:45:49 +08:00
|
|
|
color: #aac6c7;
|
2024-10-22 09:55:33 +08:00
|
|
|
font-size: 0.9rem;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
|
|
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
|
|
|
|
#21f1e1
|
|
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right-rate {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 4rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding-left: 1rem;
|
|
|
|
|
line-height: 3rem;
|
|
|
|
|
background-image: url("../../../assets/screen/traffic/right-rate.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-position: 100% 50%;
|
2024-10-29 09:45:49 +08:00
|
|
|
color: #aac6c7;
|
2024-10-22 09:55:33 +08:00
|
|
|
font-size: 0.9rem;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
|
|
|
|
#e9bc5c
|
|
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|