From b33e28bc2843555355ecad59a80c83e3c26445a3 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 01 九月 2025 17:29:36 +0800
Subject: [PATCH] 走航季度报告模块(待完成)

---
 src/views/sourcetrace/component/PollutedExceptionItem.vue |   36 ++++++++++++++++++++++++++----------
 1 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/src/views/sourcetrace/component/PollutedExceptionItem.vue b/src/views/sourcetrace/component/PollutedExceptionItem.vue
index d269ccd..2482d6c 100644
--- a/src/views/sourcetrace/component/PollutedExceptionItem.vue
+++ b/src/views/sourcetrace/component/PollutedExceptionItem.vue
@@ -38,7 +38,10 @@
         <div>
           <el-text type="info">
             <el-icon><MapLocation /></el-icon>
-            {{ '椋庨櫓鍖哄煙锛�' + item.pollutedArea.address }}
+            {{
+              '椋庨櫓鍖哄煙锛�' +
+              (item.pollutedArea.address ? item.pollutedArea.address : '')
+            }}
           </el-text>
         </div>
         <!-- <div>
@@ -52,7 +55,7 @@
             寮傚父绫诲瀷锛歿{ item.pollutedData.exception }}
           </el-text>
         </div>
-        <div v-for="s in item.pollutedData.statisticMap" :key="s">
+        <div v-for="s in item.pollutedData.statisticMap" :key="s.factorId">
           <el-row style="border-top: 1px solid white">
             <el-col :span="6">
               <el-statistic title="绐佸彉鍥犲瓙" :value="s.factorName" />
@@ -77,10 +80,19 @@
               <el-statistic
                 title="骞冲潎椋庨��"
                 :value="item.pollutedData.windSpeed"
+                :precision="1"
                 suffix="m/s"
               />
             </el-col>
           </el-row>
+          <RealTimeLineChart
+            v-for="(item1, index1) in s._chartOptions"
+            :key="index1"
+            :model-value="item1"
+            chart-height="80px"
+            :y-min-interval="20"
+            :exception-index-arr="exceptionIndexArr"
+          ></RealTimeLineChart>
         </div>
         <el-row justify="space-between">
           <!-- <el-link
@@ -97,13 +109,6 @@
                   </el-link> -->
         </el-row>
         <!-- <div style="width: 320px; height: 80px"> -->
-        <RealTimeLineChart
-          v-for="(item1, index1) in item._chartOptions"
-          :key="index1"
-          :model-value="item1"
-          chart-height="80px"
-          :y-min-interval="20"
-        ></RealTimeLineChart>
         <!-- </div> -->
         <div class="border-dashed">
           <el-icon color="#ffbc58" size="20"><WarningFilled /></el-icon>
@@ -122,13 +127,24 @@
   </CardDialog> -->
 </template>
 <script setup>
-import { ref } from 'vue';
+import { ref, computed } from 'vue';
 
 const props = defineProps({
   modelValue: Boolean,
   item: Object
 });
 
+const exceptionIndexArr = computed(() => {
+  const indexArr = [];
+  props.item.pollutedData.dataVoList.forEach((e) => {
+    const i = props.item.pollutedData.historyDataList.findIndex(
+      (v) => v.time == e.time
+    );
+    indexArr.push([i - 1 < 0 ? 0 : i - 1, i]);
+  });
+  return indexArr;
+});
+
 const emits = defineEmits(['showMarksAndPolygon', 'update:modelValue']);
 
 function showMarksAndPolygon(item) {

--
Gitblit v1.9.3