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