From c23ac06446a9a1edc41cc13723e5d0b8eabdfd63 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 16 七月 2025 17:30:50 +0800
Subject: [PATCH] 2025.7.16 动态溯源新增合并异常

---
 src/views/sourcetrace/component/PollutedExceptionItem.vue |  169 ++++++++++++++++++++++----------------------------------
 1 files changed, 66 insertions(+), 103 deletions(-)

diff --git a/src/views/sourcetrace/component/PollutedExceptionItem.vue b/src/views/sourcetrace/component/PollutedExceptionItem.vue
index e7defcc..d269ccd 100644
--- a/src/views/sourcetrace/component/PollutedExceptionItem.vue
+++ b/src/views/sourcetrace/component/PollutedExceptionItem.vue
@@ -10,71 +10,81 @@
   <BaseCard v-if="item" v-show="item.showMore">
     <template #content>
       <el-scrollbar class="clue-card">
-        <el-row justify="space-between">
-          <!-- <el-tag v-if="index == 0" type="danger">鏈�鏂�</el-tag> -->
-          <el-text type="primary">{{
-            '鍒囩墖鏃堕棿锛�' +
-            item.pollutedData.startTime +
-            ' - ' +
-            item.pollutedData.endTime
-          }}</el-text>
+        <el-row justify="space-between" align="bottom">
+          <el-text type="warning" style="font-weight: 600" size="large">
+            婧簮鍒囩墖
+          </el-text>
+
           <el-link
-            type="primary"
+            type="info"
             :underline="true"
             @click="showMarksAndPolygon(item)"
           >
-            {{ item.showMore ? '鏀惰捣寮傚父' : '瀹氫綅寮傚父' }}
+            {{ item.showMore ? '鏀惰捣' : '瀹氫綅' }}
+            <el-icon size="large"><CircleClose /></el-icon>
           </el-link>
         </el-row>
         <div>
-          <el-text type="primary">
-            姹℃煋鍖哄煙锛歿{ item.pollutedArea.address }}
+          <el-text type="info">
+            <el-icon><Timer /></el-icon>
+            {{
+              '鍒囩墖鏃舵锛�' +
+              item.pollutedData._startTime +
+              ' - ' +
+              item.pollutedData._endTime
+            }}
           </el-text>
         </div>
         <div>
-          <el-text type="primary">
+          <el-text type="info">
+            <el-icon><MapLocation /></el-icon>
+            {{ '椋庨櫓鍖哄煙锛�' + item.pollutedArea.address }}
+          </el-text>
+        </div>
+        <!-- <div>
+          <el-text type="info">
             婧簮璺濈锛歿{ formatDistanceType(item.pollutedArea.distanceType) }}
           </el-text>
-        </div>
+        </div> -->
         <div>
-          <el-text type="primary">
+          <el-text type="info">
+            <el-icon><Bell /></el-icon>
             寮傚父绫诲瀷锛歿{ item.pollutedData.exception }}
           </el-text>
         </div>
-        <el-row style="border-top: 1px solid white">
-          <el-col :span="6">
-            <el-statistic
-              title="绐佸彉鍥犲瓙"
-              :value="item.pollutedData.factorName"
-            />
-          </el-col>
-          <el-col :span="6">
-            <el-statistic
-              v-if="item.pollutedData.exceptionType == 4"
-              title="鍙樺寲骞呭害"
-              :value="formatPercentage(item.pollutedData.avgPer)"
-            />
-            <el-statistic
-              v-else-if="item.pollutedData.exceptionType == 9"
-              title="鍙樺寲閫熺巼"
-              :value="formatChangeRate(item.pollutedData.avgRate)"
-              suffix=""
-            />
-          </el-col>
-          <el-col :span="6">
-            <el-statistic title="鍙戠敓娆℃暟" :value="item.pollutedData.times" />
-          </el-col>
-          <el-col :span="6">
-            <el-statistic
-              title="骞冲潎椋庨��"
-              :value="item.pollutedData.windSpeed"
-              suffix="m/s"
-            />
-          </el-col>
-        </el-row>
+        <div v-for="s in item.pollutedData.statisticMap" :key="s">
+          <el-row style="border-top: 1px solid white">
+            <el-col :span="6">
+              <el-statistic title="绐佸彉鍥犲瓙" :value="s.factorName" />
+            </el-col>
+            <el-col :span="6">
+              <el-statistic
+                v-if="item.pollutedData.exceptionType == 4"
+                title="鍙樺寲骞呭害"
+                :value="formatPercentage(s.avgPer)"
+              />
+              <el-statistic
+                v-else-if="item.pollutedData.exceptionType == 9"
+                title="鍙樺寲閫熺巼"
+                :value="formatChangeRate(s.avgRate)"
+                suffix=""
+              />
+            </el-col>
+            <el-col :span="6">
+              <el-statistic title="鍙戠敓娆℃暟" :value="item.pollutedData.times" />
+            </el-col>
+            <el-col :span="6">
+              <el-statistic
+                title="骞冲潎椋庨��"
+                :value="item.pollutedData.windSpeed"
+                suffix="m/s"
+              />
+            </el-col>
+          </el-row>
+        </div>
         <el-row justify="space-between">
           <!-- <el-link
-                    type="primary"
+                    type="info"
                     underline
                     @click="showMarksAndPolygon(item)"
                   >
@@ -92,10 +102,12 @@
           :key="index1"
           :model-value="item1"
           chart-height="80px"
+          :y-min-interval="20"
         ></RealTimeLineChart>
         <!-- </div> -->
         <div class="border-dashed">
-          <el-text type="" tag="mark">
+          <el-icon color="#ffbc58" size="20"><WarningFilled /></el-icon>
+          <el-text type="info" tag="b">
             {{ item.pollutedSource.conclusion }}
           </el-text>
         </div>
@@ -103,57 +115,6 @@
           :show-marks="item.showMore"
           :scene-list="item.pollutedSource.sceneList"
         ></SceneTable>
-
-        <!-- <el-space gap="4">
-                  <el-tag :type="item.status == 1 ? 'danger' : 'info'">{{
-                    item._statusStr
-                  }}</el-tag>
-                  <el-text type="default">{{ item.exception }}</el-text>
-                </el-space>
-                <el-row gap="4">
-                  <el-text type="primary">鍙戠敓鏃堕棿锛�</el-text>
-                  <el-text type="primary">{{
-                    item.startTime + ' 鑷� '
-                  }}</el-text>
-                  <el-text type="primary">{{
-                    item.status == 1 ? '褰撳墠' : item.endTime
-                  }}</el-text>
-                </el-row>
-                <el-row>
-                  <el-col :span="6">
-                    <el-statistic title="鍥犲瓙" :value="item.factorName" />
-                  </el-col>
-                  <el-col :span="6">
-                    <el-statistic title="鍧囧��" :value="item.avg" />
-                  </el-col>
-                  <el-col :span="6">
-                    <el-statistic title="宄板��" :value="item.max" />
-                  </el-col>
-                  <el-col :span="6">
-                    <el-statistic title="璋峰��" :value="item.min" />
-                  </el-col>
-                </el-row>
-                <el-row justify="space-between">
-                  <el-link
-                    type="primary"
-                    @click="item.showMore = !item.showMore"
-                  >
-                    {{
-                      (item.showMore ? '鏀惰捣婧簮鍦烘櫙' : '鏌ョ湅婧簮鍦烘櫙') +
-                      '锛�' +
-                      item.relatedSceneList.length +
-                      '锛�'
-                    }}
-                  </el-link>
-                  <el-link type="primary" @click="drawSector(item)">
-                    鏌ョ湅寮傚父
-                  </el-link>
-                </el-row>
-                <SceneTable
-                  v-show="item.showMore"
-                  :scene-list="item.relatedSceneList"
-                ></SceneTable>
-                <el-divider /> -->
       </el-scrollbar>
     </template>
   </BaseCard>
@@ -199,7 +160,7 @@
 }
 </script>
 <style scoped>
-:deep(.el-statistic) {
+/* :deep(.el-statistic) {
   --el-statistic-title-color: rgb(215, 215, 215);
   --el-statistic-content-color: white;
 }
@@ -210,7 +171,7 @@
 
 :deep(.el-link) {
   --el-link-text-color: #23dad1;
-}
+} */
 
 .scrollbar {
   min-width: 300px;
@@ -223,13 +184,15 @@
   padding: 0 4px;
   /* margin-right: 2px; */
   width: 340px;
-  height: 35vh;
-  border-right: 1px solid white;
+  height: 400px;
+  /* border-right: 1px solid white; */
   border-radius: 2px;
 }
 
 .border-dashed {
   /* border: 1px dashed white; */
+  display: flex;
+  /* align-items: center; */
   border: 1px dashed #ffbc58;
   padding: 0px 1px;
   margin-bottom: 4px;

--
Gitblit v1.9.3