From 98799e8bcc4ffbaf83178255bb1a4d45cc142067 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Wed, 21 Feb 2024 21:44:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=A3=8E=E5=90=91bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/airInfo/AirInfo.vue | 20 ++++++++++++++----- .../tunnelScene/editEquComp/editDialog.vue | 9 +++++---- src/store/modelSceneStore.js | 5 +++-- src/views/tunnel/index.vue | 1 - 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index 300de33..1b4cadd 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -1,10 +1,15 @@ @@ -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; diff --git a/src/components/content/tunnelScene/editEquComp/editDialog.vue b/src/components/content/tunnelScene/editEquComp/editDialog.vue index 3602d52..297ed4e 100644 --- a/src/components/content/tunnelScene/editEquComp/editDialog.vue +++ b/src/components/content/tunnelScene/editEquComp/editDialog.vue @@ -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) => { diff --git a/src/store/modelSceneStore.js b/src/store/modelSceneStore.js index 5420cd3..e9ee3fa 100644 --- a/src/store/modelSceneStore.js +++ b/src/store/modelSceneStore.js @@ -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) { diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index edff781..40f8f0a 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -350,7 +350,6 @@ const initWebSocket = () => { socketData.sensor = data; } }); - console.log(socketData); } };