fix: 修改风向bug
This commit is contained in:
@@ -1,10 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="air-info">
|
<div id="air-info">
|
||||||
<div style="height: 21px" v-if="airList.length!==0"></div>
|
<div style="height: 21px" v-if="airList.length!==0"></div>
|
||||||
<div class="fan-speed" v-if="windSpeed!==0">
|
<div class="fan-speed">
|
||||||
<img src="@/assets/images/airInfo/fan-v-icon.png" alt=""/>
|
<div v-if="windSpeed!==0">
|
||||||
<div class="fan-info" @click="handleOpenChart">
|
<img src="@/assets/images/airInfo/fan-v-icon.png" alt=""/>
|
||||||
<div class="input-fan"><span>风速</span>{{ windSpeed }}m/s</div>
|
<div class="fan-info" @click="handleOpenChart">
|
||||||
|
<div class="input-fan"><span>风速</span>{{ windSpeed }}m/s</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="fan-info">
|
||||||
|
<div class="input-fan"><span>风向</span>{{ windDirection }}°</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<item-info
|
<item-info
|
||||||
@@ -62,7 +67,6 @@
|
|||||||
<div class="right-bottom-icon"></div>
|
<div class="right-bottom-icon"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -80,6 +84,7 @@ const props = defineProps({
|
|||||||
airData: Array
|
airData: Array
|
||||||
});
|
});
|
||||||
const windSpeed = ref(0)
|
const windSpeed = ref(0)
|
||||||
|
const windDirection = ref(0)
|
||||||
const loadingText = ref('加载中...')
|
const loadingText = ref('加载中...')
|
||||||
const windSpeedId = ref(0)
|
const windSpeedId = ref(0)
|
||||||
const airTitle = ref('')
|
const airTitle = ref('')
|
||||||
@@ -193,6 +198,8 @@ const getAirInfo = (now) => {
|
|||||||
} else if (item.equipmentType === "windSpeed") {
|
} else if (item.equipmentType === "windSpeed") {
|
||||||
windSpeedId.value = item.equipmentId
|
windSpeedId.value = item.equipmentId
|
||||||
windSpeed.value = item.value
|
windSpeed.value = item.value
|
||||||
|
} else if (item.equipmentType === "windDirection") {
|
||||||
|
windDirection.value = item.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(airArr.length!==0){
|
if(airArr.length!==0){
|
||||||
@@ -421,6 +428,9 @@ const initAirChart = (type, values) => {
|
|||||||
padding: 5px 0 5px 15px;
|
padding: 5px 0 5px 15px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
margin-left: 21px;
|
margin-left: 21px;
|
||||||
|
>div:first-child{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
//width: 790px;
|
//width: 790px;
|
||||||
background: #2E5589;
|
background: #2E5589;
|
||||||
|
|||||||
@@ -187,10 +187,11 @@ function addEquipment() {
|
|||||||
.addEquipment({ ...toRaw(equipmentSetting.value) }, params.pointGap)
|
.addEquipment({ ...toRaw(equipmentSetting.value) }, params.pointGap)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
emit("addEquipment", equipmentSetting.value);
|
emit("addEquipment", equipmentSetting.value);
|
||||||
ElMessage({
|
if (res.code===1000) {
|
||||||
message: "添加成功!",
|
ElMessage.success(res.msg)
|
||||||
type: "success",
|
}else {
|
||||||
});
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
resetEquipmentSetting();
|
resetEquipmentSetting();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ export const useModelSceneStore = defineStore("modelSceneData", () => {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("res", res);
|
console.log("res", res);
|
||||||
resolve();
|
resolve(res);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("res", err);
|
console.log("res", err);
|
||||||
equipmentList.value.pop();
|
equipmentList.value.pop();
|
||||||
reject();
|
reject(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -118,6 +118,7 @@ function handleSettingOtherConfig(otherConfig, requestOtherConfig) {
|
|||||||
requestOtherConfig.tunnelId = otherConfig.tunnelId;
|
requestOtherConfig.tunnelId = otherConfig.tunnelId;
|
||||||
requestOtherConfig.tunnelLength = otherConfig.totalLength;
|
requestOtherConfig.tunnelLength = otherConfig.totalLength;
|
||||||
requestOtherConfig.tunnelName = otherConfig.tunnelName;
|
requestOtherConfig.tunnelName = otherConfig.tunnelName;
|
||||||
|
requestOtherConfig.tunnelAlias = otherConfig.tunnelAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoComputeConstructionLength(modelEquipmentList, pointGap) {
|
function autoComputeConstructionLength(modelEquipmentList, pointGap) {
|
||||||
|
|||||||
@@ -350,7 +350,6 @@ const initWebSocket = () => {
|
|||||||
socketData.sensor = data;
|
socketData.sensor = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(socketData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user