From e5d499ae6a4e6b320f71c49987b76cc11f6bc1e4 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 28 十月 2025 14:13:10 +0800
Subject: [PATCH] 首页问题
---
src/views/screen/index.vue | 144 +++++++++++++++++++++++++++---------------------
1 files changed, 81 insertions(+), 63 deletions(-)
diff --git a/src/views/screen/index.vue b/src/views/screen/index.vue
index 5080d2e..e612b3d 100644
--- a/src/views/screen/index.vue
+++ b/src/views/screen/index.vue
@@ -1,5 +1,5 @@
<template>
- <div class="container" ref="contaner">
+ <div class="container" style="font-size: 0.75vw" ref="contaner">
<header>
<i @click="returnPath" class="el-icon-s-home" style="color: #00b4ff;position: absolute;font-size: 24px;left: 98%;top: 15%"></i>
<img src="@/assets/images/header-bg.png"/>
@@ -71,10 +71,10 @@
/>
<ul>
<li v-for="(item, index) in facilityData.video" :key="index">
- <div class="value">
+ <div style="font-size: 0.75vw" class="value">
<animate-number from="0" :to="item.value" :key="item.value"></animate-number>
</div>
- <div class="title">{{ item.title }}</div>
+ <div style="font-size: 0.75vw" class="title">{{ item.title }}</div>
</li>
</ul>
</div>
@@ -86,8 +86,8 @@
<ul>
<li v-for="(item, index) in facilityData.car" :key="index">
<!-- <div class="value">{{ item.value ? item.value : "-" }}</div>-->
- <div class="value"><animate-number from="0" :to="item.value" :key="item.value"></animate-number></div>
- <div class="title">{{ item.title }}</div>
+ <div style="font-size: 0.75vw" class="value"><animate-number from="0" :to="item.value" :key="item.value"></animate-number></div>
+ <div style="font-size: 0.75vw" class="title">{{ item.title }}</div>
</li>
</ul>
</div>
@@ -102,8 +102,8 @@
:key="index"
>
<!-- <div class="value">{{ item.value ? item.value : "-" }}</div>-->
- <div class="value"><animate-number from="0" :to="item.value" :key="item.value"></animate-number></div>
- <div class="title">{{ item.title }}</div>
+ <div style="font-size: 0.75vw" class="value"><animate-number from="0" :to="item.value" :key="item.value"></animate-number></div>
+ <div style="font-size: 0.75vw" class="title">{{ item.title }}</div>
</li>
</ul>
</div>
@@ -213,6 +213,7 @@
return {
deptList: [],
deptId: '',
+ intervalId: null, // 鐢ㄤ簬瀛樺偍瀹氭椂鍣ㄧ殑ID
carList: [],
videoList: [],
faceList: [],
@@ -220,49 +221,56 @@
workOrderRegion: [],
platformData: null,
scoreData: {
- 鑷祦浜曞尯: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 楂樻柊鍖�: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 澶у畨鍖�: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 娌挎哗鍖�: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 璐′簳鍖�: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 鑽e幙: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ],
- 瀵岄『鍘�: [
- {
- value: 0,
- name: '寰楀垎'
- }
- ]
- },
+ 鑷祦浜曞尯: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 楂樻柊鍖�: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 澶у畨鍖�: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 娌挎哗鍖�: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 璐′簳鍖�: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 鑽e幙: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ],
+ 瀵岄『鍘�: [
+ {
+ video: 0,
+ car: 0,
+ face: 0
+ },
+ ]
+ },
// 璁惧鏁版嵁
facilityData: {
video: [],
@@ -308,8 +316,16 @@
})
.catch((err) => {
});
- // 鏌ヨ鏁版嵁
this.getData();
+ // 鏌ヨ鏁版嵁
+ this.intervalId = setInterval(this.getData, 3600000); //涓�灏忔椂涓�娆�
+ },
+ beforeDestroy() {
+ // 缁勪欢閿�姣佸墠娓呴櫎瀹氭椂鍣紝闃叉鍐呭瓨娉勬紡
+ if (this.intervalId) {
+ clearInterval(this.intervalId);
+ this.intervalId = null;
+ }
},
methods: {
getDeptId(deptName) {
@@ -366,7 +382,7 @@
});
checkScore(this.activerBtnType, this.deptId)
.then((res) => {
- if(res.data && Object.keys(res.data).length > 0){
+ if (res.data && Object.keys(res.data).length > 0) {
this.scoreData = res.data;
}
})
@@ -374,7 +390,7 @@
});
getPlatform(this.activerBtnType, this.deptId)
.then((res) => {
- if(res.data && Object.keys(res.data).length > 0){
+ if (res.data && Object.keys(res.data).length > 0) {
this.platformData = res.data;
}
})
@@ -1066,7 +1082,7 @@
li {
width: 25%;
text-align: center;
- font-size: 14px;
+ font-size: 0.75vw;
color: #00e6f4;
flex-shrink: 0;
flex-grow: 0;
@@ -1118,6 +1134,7 @@
list-style-type: none;
border-bottom: 1px dashed #223654;
margin: 7px 0;
+
li {
width: 25%;
text-align: center;
@@ -1308,7 +1325,7 @@
background-image: url("../../assets/images/item-car-bg.png");
background-size: 100% 100%;
color: #dcf8ff;
- font-size: 12px;
+ //font-size: 12px;
line-height: 26px;
padding: 0 15px;
font-size: 0.625vw;
@@ -1425,21 +1442,22 @@
}
.rotating-image {
- width: 900px;
- height: 900px;
+ width: 50vw;
+ height: 50vw;
position: absolute;
- top: calc(50% - 450px);
- left: calc(50% - 450px);
+ top: calc(50% - 24vw);
+ left: calc(50% - 24vw);
transform: skewX(-5deg) skewY(-10deg);
animation: rotateImage 36s linear infinite;
}
.rotating-image-in {
- width: 850px;
- height: 850px;
+ width: 47.5vw;
+ height: 47.5vw;
position: absolute;
- top: calc(50% - 425px);
- left: calc(50% - 425px);
+ top: calc(50% - 22.5vw);
+ left: calc(50% - 22.5vw);
animation: rotateCounterClockwise 48s linear infinite;
}
+
</style>
--
Gitblit v1.8.0