diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index ddb1749..5cefbde 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -675,9 +675,11 @@ input[type="number"] {
font-size:35px;
min-height: 350px;
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
color: #2fb0df;
+ letter-spacing: 3px;
}
//loading
.loading-block{
@@ -689,18 +691,16 @@ input[type="number"] {
font-size: 55px;
color: #38CAFB;
letter-spacing: 3px;
- .loading {
- margin-bottom: 20px;
- width: 100px;
- height: 100px;
- border: 2px solid #38CAFB;
- border-top-color: transparent;
- border-radius: 100%;
- animation: circle infinite 0.75s linear;
- }
-
}
-
+.loading {
+ margin-bottom: 20px;
+ width: 100px;
+ height: 100px;
+ border: 2px solid #38CAFB;
+ border-top-color: transparent;
+ border-radius: 100%;
+ animation: circle infinite 0.75s linear;
+}
// 转转转动画
@keyframes circle {
0% {
diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue
index 1bdb540..25090bb 100644
--- a/src/components/content/airInfo/AirInfo.vue
+++ b/src/components/content/airInfo/AirInfo.vue
@@ -192,8 +192,10 @@ const getAirInfo = (now) => {
windSpeed.value = item.value
}
})
- airArr.push(airArr.shift())
- airList.value = airArr
+ if(airArr.length!==0){
+ airArr.push(airArr.shift())
+ airList.value = airArr
+ }
}
const initChart = (type, values) => {
//3.初始化container容器
diff --git a/src/components/content/badGasInfo/BadGasInfo.vue b/src/components/content/badGasInfo/BadGasInfo.vue
index 48e6b66..2a18979 100644
--- a/src/components/content/badGasInfo/BadGasInfo.vue
+++ b/src/components/content/badGasInfo/BadGasInfo.vue
@@ -4,7 +4,8 @@
:style="{ backgroundImage: 'url(' + getImageUrl(bgImage) + ')' }">
有害气体
- 暂无数据~
+
+ {{loading===0?'加载中...':'暂无数据~'}}
风机
-
- 暂无数据~
+
+
+ {{loading===0?'加载中...':'暂无数据~'}}
+
@@ -107,7 +109,8 @@ import {getFanEchartsInfo} from "../../../api/largeScreen";
const props = defineProps({
list: Array,
fanData: Array,
- transducerData: Array
+ transducerData: Array,
+ loading: Number,
});
const socketData = ref()
let Echarts_info1 = null;
@@ -121,7 +124,9 @@ const isVisited = ref(false)
const showLoading = ref(false)
const fanIndex = ref(0)
let myEcharts = reactive({});
-
+watch(() => props.loading, (now) => {
+ props.loading=now
+}, {deep: true});
watch(() => props.transducerData, (now) => {
getTransData(now.frequencyChangerList)
}, {deep: true});
diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue
index 5bee122..ef39eff 100644
--- a/src/components/content/windPressure/WindPressureList.vue
+++ b/src/components/content/windPressure/WindPressureList.vue
@@ -2,7 +2,8 @@
风压
- 暂无数据~
+
+ {{loading===0?'加载中...':'暂无数据~'}}
-
+ :transducer-data="largeScreenData" :loading="showFanLoading"/>
@@ -48,9 +47,9 @@
-
-
-
+
+
+
@@ -89,6 +88,9 @@ const router = useRouter();
const selectIndex = ref(-1);
const showFan = ref(false);
const drawerLeft = ref(true);
+const showFanLoading = ref(0)
+const showWindLoading = ref(0)
+const showBadLoading = ref(0)
const drawerRight = ref(true);
const showMenu = ref(false);
const currentSiteId = ref(0);
@@ -196,6 +198,36 @@ const getScreenInfo = (id) => {
tunnelId.value = id
getLargeScreen(id).then((res) => {
if (res?.code === 1000) {
+ console.log('res',res.data)
+ if(res.data.frequencyChangerList.length!==0){
+ showFanLoading.value=0
+ }else {
+ showFanLoading.value=1
+ }
+ if(res.data.windPressureSensorList.length!==0){
+ showWindLoading.value=0
+ }else {
+ showWindLoading.value=1
+ }
+
+ if(res.data.sensorList.length!==0){
+ res.data.sensorList.forEach((item,index)=>{
+ if (
+ item.equipmentType === "carbonDioxide" ||
+ item.equipmentType === "carbonMonoxide" ||
+ item.equipmentType === "hydrogenSulfide" ||
+ item.equipmentType === "sulfurDioxide" ||
+ item.equipmentType === "sulfurMonoxide" ||
+ item.equipmentType === "nitrogenDioxide"
+ ) {
+ showBadLoading.value=0
+ }else {
+ showBadLoading.value=1
+ }
+ })
+ }else {
+ showBadLoading.value=1
+ }
largeScreenData.value = res.data;
} else {
ElMessage.warning(res.msg)