diff --git a/src/views/sponeScreen/projectHM/projectFX.vue b/src/views/sponeScreen/projectHM/projectFX.vue index 9120bce..6f59208 100644 --- a/src/views/sponeScreen/projectHM/projectFX.vue +++ b/src/views/sponeScreen/projectHM/projectFX.vue @@ -25,7 +25,7 @@
1 项目设计降雨量为19.8mm对应的年径流总量控制率为68%; 本场降雨径流总量控制率: - 达标 + 达标 ;本场降雨污染削减率(以SS计): 达标 @@ -175,7 +175,6 @@ import { sitePropertyRelation } from '@/api/scada/monitor'; const { proxy } = getCurrentInstance(); -const timer = ref(null); const rainIndex = ref(0); const valIndex2 = ref(0); const valIndex4 = ref(0); diff --git a/src/views/sponeScreen/projectHM/projectFX.vue b/src/views/sponeScreen/projectHM/projectFX.vue index 9120bce..6f59208 100644 --- a/src/views/sponeScreen/projectHM/projectFX.vue +++ b/src/views/sponeScreen/projectHM/projectFX.vue @@ -25,7 +25,7 @@
1 项目设计降雨量为19.8mm对应的年径流总量控制率为68%; 本场降雨径流总量控制率: - 达标 + 达标 ;本场降雨污染削减率(以SS计): 达标 @@ -175,7 +175,6 @@ import { sitePropertyRelation } from '@/api/scada/monitor'; const { proxy } = getCurrentInstance(); -const timer = ref(null); const rainIndex = ref(0); const valIndex2 = ref(0); const valIndex4 = ref(0); diff --git a/src/views/sponeScreen/projectHM/projectSSDX.vue b/src/views/sponeScreen/projectHM/projectSSDX.vue index e52d5f8..df31a2a 100644 --- a/src/views/sponeScreen/projectHM/projectSSDX.vue +++ b/src/views/sponeScreen/projectHM/projectSSDX.vue @@ -5,9 +5,12 @@
- {{ rainDate }} 降雨起止时间 - {{ item.rainStartTime }}-{{ item.rainEndTime }} ,24小时累计降雨量{{ detailDataRain.rainfallIntensity }}mm,降雨等级 + {{ rainDate }}分析:降雨起止时间 + + {{ item.rainStartTime }}-{{ item.rainEndTime }}, + + 累计降雨时长:{{ rainTime }},小时最大降雨量是{{ hourMaxRain }}mm, 24小时累计降雨量{{ detailDataRain.rainfallIntensity }}mm, + 降雨等级 {{ detailDataRain.rainfallIntensity <= 10 @@ -15,24 +18,22 @@ : detailDataRain.rainfallIntensity > 10 && detailDataRain.rainfallIntensity <= 25 ? '中雨' : '大雨' - }} + }}, + 总收水量: {{ ((detailDataRain.rainfallIntensity * 3374.888) / 1000).toFixed(2) }}m³
-
1 - 项目设计降雨量为19.8mm对应的年径流总量控制率为68%;海绵设施设计雨水控制容积 96.52m³ -
-
- 2 - 本场降雨径流总量控制率 + 项目设计降雨量为19.8mm对应的年径流总量控制率为68%; 本场降雨径流总量控制率: + 达标 + + ;本场降雨污染削减率(以SS计): 达标
- 3 + 2 雨水管网产流开始时间{{ detailDataRain.flowStartTime }},结束时间{{ detailDataRain.flowEndTime }},累计出口流量 - 85.23m³, 最大水深 - {{ realSW || '--' }}m + 85.23m³
@@ -41,22 +42,25 @@ - +

管径:2.4 x 1.1米

-

最大水深:{{ realSW || '--' }} 米

-

进口流速:{{ nameToData(station1.propertyMonitorList, '流速')[valIndex1] }} m/s

-

- 进口SS:{{ nameToData(station1.propertyMonitorList, 'SS')[valIndex1] || '--' }} mg/L +

+ 出口水深:{{ nameToData(station2.propertyMonitorList, '水位')[rainIndex] || '--' }} 米

-

出口流速:{{ nameToData(station2.propertyMonitorList, '流速')[valIndex2] || '--' }} m/s

-

- 出口SS:{{ nameToData(station2.propertyMonitorList, 'SS')[valIndex2] || '--' }} mg/L +

进口流速:{{ nameToData(station1.propertyMonitorList, '流速')[rainIndex] }} m/s

+

+ 进口SS:{{ nameToData(station1.propertyMonitorList, 'SS')[rainIndex] || '--' }} mg/L

-

- 水位最深时间:{{ station2.propertyMonitorXList[valIndex2] ? station2.propertyMonitorXList[valIndex2].slice(11) : '--' }} +

出口流速:{{ nameToData(station2.propertyMonitorList, '流速')[rainIndex] || '--' }} m/s

+

+ 出口SS:{{ nameToData(station2.propertyMonitorList, 'SS')[rainIndex] || '--' }} mg/L

@@ -88,15 +92,16 @@ const rainDate = ref(''); const { proxy } = getCurrentInstance(); -const timer = ref(null); const station1 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }], propertyMonitorXList: [] }); const station2 = ref({ propertyMonitorList: [{ ylist: [] }, { ylist: [] }, { ylist: [] }], propertyMonitorXList: [] }); const valIndex1 = ref(0); const valIndex2 = ref(0); +const rainIndex = ref(0); const realSW = ref(0); //最大水深 const detailDataRain = ref({ totalOutFlow: 0, totalImportFlow: 0 }); -const jlkzl = ref(0); -const sjRain = ref(0); +const hourMaxRain = ref(0); +const rainDateTwo = ref(''); +const rainTime = ref(''); // 获取实时数据 async function getRealData() { @@ -108,11 +113,6 @@ let res1 = await graphicReport(params1); if (res1.data.propertyMonitorList.length > 0) { station1.value = res1.data; - // 取最大的值 - let max = Math.max(...nameToData(station1.value.propertyMonitorList, '水位')); - valIndex1.value = nameToData(station1.value.propertyMonitorList, '水位').findIndex(item => { - return item == max; - }); } let params2 = { @@ -123,11 +123,6 @@ let res2 = await graphicReport(params2); if (res2.data.propertyMonitorList.length > 0) { station2.value = res2.data; - // 取最大的值 - let max = Math.max(...nameToData(station2.value.propertyMonitorList, '水位')); - valIndex2.value = nameToData(station2.value.propertyMonitorList, '水位').findIndex(item => { - return item == max; - }); // 最大水位出口 realSW.value = nameToData(station2.value.propertyMonitorList, '水位')[valIndex2.value] || 0.2; } @@ -144,56 +139,50 @@ function getRainDetail() { // 关联雨量站是皮革厂雨量站,0371000003 let params = { - searchTime: localStorage.getItem('setRainDateKF'), + searchTime: rainDate.value, rainStCode: '0371000003', projectNo: 'GW06', }; calculateAreaAnnualRunoff(params).then(res => { - detailDataRain.value = res.data || {}; - getRainBZ(); + let datas = res.data; + detailDataRain.value = datas || {}; + // 计算降雨总时长 + let times = 0; + datas.rainfallPeriods && + datas.rainfallPeriods.map(item => { + times += (new Date(item.rainEndTime).getTime() - new Date(item.rainStartTime).getTime()) / 1000; + }); + let hour = Math.floor(times / 60 / 60); + let minutes = Math.floor((times % 3600) / 60); + rainTime.value = hour + '小时' + minutes + '分钟'; }); -} -// 年径流和降雨量关系 -function getRainBZ() { - let val = detailDataRain.value.rainfallIntensity || 0; - if (val <= 3.04) { - sjRain.value = 3.04; - jlkzl.value = 20; - } else if (val > 3.04 && val <= 5) { - sjRain.value = 5; - jlkzl.value = 30; - } else if (val > 5 && val <= 7.56) { - sjRain.value = 7.56; - jlkzl.value = 40; - } else if (val > 7.56 && val <= 10.9) { - sjRain.value = 10.9; - jlkzl.value = 50; - } else if (val > 10.9 && val <= 15.2) { - sjRain.value = 15.2; - jlkzl.value = 60; - } else if (val > 15.2 && val <= 19.84) { - sjRain.value = 19.84; - jlkzl.value = 68; - } else if (val > 19.8) { - sjRain.value = 19.8; - jlkzl.value = 68; - } + // 雨量站监测数据 + let params2 = { + startTime: rainDate.value + ' 08:00:00', + endTime: rainDateTwo.value + ' 08:00:00', + stCode: '0371000003', + }; + graphicReport(params2).then(res => { + let hourData = nameToData(res.data.propertyMonitorList, '1小时时段降水量'); + hourMaxRain.value = Math.max(...hourData); + // 最大降雨量对应的index + rainIndex.value = nameToData(res.data.propertyMonitorList, '1小时时段降水量').findIndex(item => { + return item == hourMaxRain.value; + }); + }); } onMounted(() => { rainDate.value = localStorage.getItem('setRainDateKF'); + // 早八点到第二天早八点逻辑 + let dates = new Date(rainDate.value); + //86400000 一天得毫秒 *1,就是当前日期减一天,如果是需要自定义几天,修改就可 + rainDateTwo.value = proxy.moment(new Date(dates.getTime() + 86400000 * 1)).format('YYYY-MM-DD'); getRealData(); getRainDetail(); - // 5分钟刷新一次数据 - timer.value = setInterval(() => { - getRealData(); - getRainDetail(); - }, 5 * 60 * 1000); }); -onBeforeUnmount(() => { - if (timer.value) clearInterval(timer.value); -}); +onBeforeUnmount(() => {});