From 5679cbbb630092a197d991cb41997a2d953261e9 Mon Sep 17 00:00:00 2001 From: Riku <risaku@163.com> Date: 星期三, 11 六月 2025 22:49:07 +0800 Subject: [PATCH] 动态溯源(待完成) --- src/views/sourcetrace/component/PollutedClueItem.vue | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/src/views/sourcetrace/component/PollutedClueItem.vue b/src/views/sourcetrace/component/PollutedClueItem.vue index 392d271..0bf7086 100644 --- a/src/views/sourcetrace/component/PollutedClueItem.vue +++ b/src/views/sourcetrace/component/PollutedClueItem.vue @@ -5,7 +5,7 @@ <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 @@ -39,7 +39,13 @@ </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="formatPercentage(item.pollutedData.avgPer)" /> </el-col> @@ -146,6 +152,36 @@ const props = defineProps({ item: Object }); + +const emits = defineEmits(['showMarksAndPolygon']); + +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() { + +} </script> <style scoped> :deep(.el-statistic) { -- Gitblit v1.9.3