2024-10-18 17:31:35 +08:00
|
|
|
<!--
|
|
|
|
|
* @Author: SunTao 328867980@qq.com
|
|
|
|
|
* @Date: 2024-10-18 09:42:49
|
|
|
|
|
* @LastEditors: SunTao 328867980@qq.com
|
2024-10-25 17:29:08 +08:00
|
|
|
* @LastEditTime: 2024-10-24 14:10:06
|
2024-10-18 17:31:35 +08:00
|
|
|
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\today-inspection.vue
|
|
|
|
|
* @Description: 病害巡检-今日巡查
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="content">
|
2024-10-25 17:29:08 +08:00
|
|
|
<div class="today-left">
|
|
|
|
|
<span>{{ today }}</span>
|
|
|
|
|
</div>
|
2024-10-18 17:31:35 +08:00
|
|
|
<div class="today-right">
|
2024-10-25 17:29:08 +08:00
|
|
|
<div class="right-sum">
|
|
|
|
|
<span>{{ all }}</span
|
|
|
|
|
>个
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right-rate">
|
|
|
|
|
<span> {{ scale }}</span
|
|
|
|
|
>%
|
|
|
|
|
</div>
|
2024-10-18 17:31:35 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-10-25 17:29:08 +08:00
|
|
|
import { roadToday } from "@/api/xj/screen/disease-screen";
|
2024-10-18 17:31:35 +08:00
|
|
|
export default {
|
|
|
|
|
name: "TodayInspection",
|
|
|
|
|
data() {
|
2024-10-25 17:29:08 +08:00
|
|
|
return {
|
|
|
|
|
// 新增病害总数
|
|
|
|
|
today: "0",
|
|
|
|
|
// 病害总数
|
|
|
|
|
all: "0",
|
|
|
|
|
// 增长率
|
|
|
|
|
scale: "0",
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/* 获取数据 */
|
|
|
|
|
getData() {
|
|
|
|
|
roadToday().then(({ data, code }) => {
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
this.today = data.today;
|
|
|
|
|
this.all = data.all;
|
|
|
|
|
this.scale = (data.scale * 1).toFixed(2);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-10-18 17:31:35 +08:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.today-left {
|
|
|
|
|
width: 45%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding-left: 1.5rem;
|
|
|
|
|
background-image: url("../../../assets/screen/disease/today-left.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 85%;
|
|
|
|
|
background-position: 100% 60%;
|
2024-10-22 09:55:33 +08:00
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
|
|
|
|
#2773d0
|
|
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
2024-10-18 17:31:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.today-right {
|
|
|
|
|
width: 55%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2024-10-31 14:39:01 +08:00
|
|
|
justify-content: space-around;
|
2024-10-18 17:31:35 +08:00
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
|
|
.right-sum {
|
|
|
|
|
width: 100%;
|
2024-10-31 14:39:01 +08:00
|
|
|
height: 45%;
|
2024-10-18 17:31:35 +08:00
|
|
|
display: flex;
|
2024-10-22 09:55:33 +08:00
|
|
|
padding-left: 1rem;
|
2024-10-18 17:31:35 +08:00
|
|
|
justify-content: center;
|
|
|
|
|
line-height: 3rem;
|
|
|
|
|
background-image: url("../../../assets/screen/disease/right-sum.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-position: 100% 50%;
|
2024-10-22 09:55:33 +08:00
|
|
|
color: #aac6c7;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
|
|
|
|
#2773d0
|
|
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
2024-10-18 17:31:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right-rate {
|
|
|
|
|
width: 100%;
|
2024-10-31 14:39:01 +08:00
|
|
|
height: 45%;
|
2024-10-22 09:55:33 +08:00
|
|
|
padding-left: 1rem;
|
2024-10-18 17:31:35 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
line-height: 3rem;
|
|
|
|
|
background-image: url("../../../assets/screen/disease/right-rate.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-position: 100% 50%;
|
2024-10-22 09:55:33 +08:00
|
|
|
color: #aac6c7;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
font-family: "DouYu";
|
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
#ffffff,
|
2024-10-25 17:29:08 +08:00
|
|
|
#e9bc5c
|
2024-10-22 09:55:33 +08:00
|
|
|
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
|
|
|
|
|
background-clip: text; /*将设置的背景颜色限制在文字中*/
|
|
|
|
|
-webkit-text-fill-color: transparent; /*给文字设置成透明*/
|
|
|
|
|
}
|
2024-10-18 17:31:35 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|