<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" size="large"> 典型切片 </el-text>
|
|
<el-link
|
type="primary"
|
:underline="true"
|
@click="showMarksAndPolygon(item)"
|
>
|
{{ item.showMore ? '收起' : '定位' }}
|
<el-icon size="large"><CircleClose /></el-icon>
|
</el-link>
|
</el-row>
|
<div>
|
<el-text type="primary">
|
<el-icon><Timer /></el-icon>
|
{{
|
'切片时段:' +
|
item.pollutedData._startTime +
|
' - ' +
|
item.pollutedData._endTime
|
}}
|
</el-text>
|
</div>
|
<div>
|
<el-text type="primary">
|
<el-icon><MapLocation /></el-icon>
|
{{ '风险区域:' + item.pollutedArea.address }}
|
</el-text>
|
</div>
|
<!-- <div>
|
<el-text type="primary">
|
溯源距离:{{ formatDistanceType(item.pollutedArea.distanceType) }}
|
</el-text>
|
</div> -->
|
<div>
|
<el-text type="primary">
|
<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="primary"
|
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="primary" 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>
|