diff --git a/src/views/sponeScreen/waterFlood/pipeDetail.vue b/src/views/sponeScreen/waterFlood/pipeDetail.vue index a39769f..4db8ce8 100644 --- a/src/views/sponeScreen/waterFlood/pipeDetail.vue +++ b/src/views/sponeScreen/waterFlood/pipeDetail.vue @@ -13,16 +13,7 @@
井深:{{ pipeDetail.bottomBuriedDepthTemp || '--' }}米
- +
水深:{{ realData.z || '--' }} 米
@@ -143,6 +134,7 @@ import chartOption from '@/components/Echarts/pieChart_1.js'; import * as echarts from 'echarts'; import { graphicReport, realtimeDataLatest, getStationDetail } from '@/api/dataAnalysis/syntherticData'; +import { nextTick } from 'vue'; const { proxy } = getCurrentInstance(); const tabActive = ref('1'); @@ -152,6 +144,7 @@ const pipeLoading = ref(true); const valIndex = ref(0); const dialogShow = ref(false); +const waterHeight = ref(0); const formData = ref({ name: '李文峰', phone: '13837899917', @@ -244,6 +237,7 @@ // 实时数据 realtimeDataLatest(props.pipeParams.stCode).then(res => { realData.value = res.data; + getWaterHeight(); }); } @@ -269,6 +263,7 @@ realData.value.turb = nameToData(datas.propertyMonitorList, 'SS')[valIndex.value]; realData.value.tt = datas.propertyMonitorXList[valIndex.value]; realData.value.stName = datas.propertyMonitorList[0].stName; + getWaterHeight(); } } // 公共方法,根据监测名称来匹配对应的数值 @@ -285,6 +280,24 @@ }); } +// 水深高度 +function getWaterHeight() { + setTimeout(() => { + // 水深高度判断 非满管 满管溢流 + if (realData.value.z > pipeDetail.value.bottomBuriedDepthTemp) { + waterHeight.value = 390; + } else if (realData.value.z <= pipeDetail.value.pipelineDiameterTemp) { + waterHeight.value = (140 * realData.value.z) / pipeDetail.value.pipelineDiameterTemp; + } else if (realData.value.z > pipeDetail.value.pipelineDiameterTemp) { + // 满管溢流 + waterHeight.value = + 140 + + (250 * (realData.value.z - pipeDetail.value.pipelineDiameterTemp)) / + (pipeDetail.value.bottomBuriedDepthTemp - pipeDetail.value.pipelineDiameterTemp); + } + }); +} + onMounted(() => { getStationData(); // 项目建设中需要获取某一天的监测数据,排水防涝里面获取实时数据 @@ -294,9 +307,9 @@ pipeTime.value = [localStorage.getItem('setRainDateKF'), localStorage.getItem('setRainDateKF')]; getHistoryData(); } + // 短信内容 setTimeout(() => { - console.log(realData.value.tt); formData.value.content = '【开封海绵办】在' + realData.value.stName +