Riku
2025-07-13 4b275f2093954cc58bbc23e4fc67e67d6fe81c0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<template>
  <!-- <CardDialog
    :model-value="modelValue"
    @update:model-value="handleDialogShow"
    title="污染异常"
    draggable
    :modal="false"
  >
    <template #default> -->
  <BaseCard v-if="item" v-show="item.showMore">
    <template #content>
      <el-scrollbar class="clue-card">
        <el-row justify="space-between" align="bottom">
          <el-text type="warning" style="font-weight: 600" size="large">
            溯源切片
          </el-text>
 
          <el-link
            type="info"
            :underline="true"
            @click="showMarksAndPolygon(item)"
          >
            {{ item.showMore ? '收起' : '定位' }}
            <el-icon size="large"><CircleClose /></el-icon>
          </el-link>
        </el-row>
        <div>
          <el-text type="info">
            <el-icon><Timer /></el-icon>
            {{
              '切片时段:' +
              item.pollutedData._startTime +
              ' - ' +
              item.pollutedData._endTime
            }}
          </el-text>
        </div>
        <div>
          <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>
          <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>
        <el-row justify="space-between">
          <!-- <el-link
                    type="info"
                    underline
                    @click="showMarksAndPolygon(item)"
                  >
                    {{
                      (item.showMore ? '收起溯源场景' : '查看溯源场景') +
                      '(' +
                      item.pollutedSource.sceneList.length +
                      ')'
                    }}
                  </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>
          <el-text type="info" tag="b">
            {{ item.pollutedSource.conclusion }}
          </el-text>
        </div>
        <SceneTable
          :show-marks="item.showMore"
          :scene-list="item.pollutedSource.sceneList"
        ></SceneTable>
      </el-scrollbar>
    </template>
  </BaseCard>
  <!-- </template>
  </CardDialog> -->
</template>
<script setup>
import { ref } from 'vue';
 
const props = defineProps({
  modelValue: Boolean,
  item: Object
});
 
const emits = defineEmits(['showMarksAndPolygon', 'update:modelValue']);
 
function showMarksAndPolygon(item) {
  emits('showMarksAndPolygon', item);
}
 
function formatPercentage(value) {
  return Math.round(value * 100) + '%';
}
 
function formatDistanceType(value) {
  switch (value) {
    case 'TYPE1':
      return '50米';
    case 'TYPE2':
      return '50米 - 500米';
    case 'TYPE3':
      return '50米 - 1公里';
    case 'TYPE4':
      return '50米 - 2公里';
 
    default:
      break;
  }
}
 
function formatChangeRate(value) {
  return Math.round(value * 100) / 100 + '';
}
</script>
<style scoped>
/* :deep(.el-statistic) {
  --el-statistic-title-color: rgb(215, 215, 215);
  --el-statistic-content-color: white;
}
 
:deep(.el-text.el-text--primary) {
  --el-text-color: white;
}
 
:deep(.el-link) {
  --el-link-text-color: #23dad1;
} */
 
.scrollbar {
  min-width: 300px;
  max-width: 60vw;
  /* height: 35vh; */
  /* color: #02ffea; */
}
 
.clue-card {
  padding: 0 4px;
  /* margin-right: 2px; */
  width: 340px;
  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;
}
</style>