From eb4111e0fd7110e5aa6a00608da2da9af21a3035 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 20 十月 2025 10:13:32 +0800
Subject: [PATCH] 2025.10.18 修改嫉妒报告生成逻辑
---
src/views/historymode/component/MissionReport.vue | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/views/historymode/component/MissionReport.vue b/src/views/historymode/component/MissionReport.vue
index 422c678..9eb05e6 100644
--- a/src/views/historymode/component/MissionReport.vue
+++ b/src/views/historymode/component/MissionReport.vue
@@ -277,7 +277,7 @@
item._time = formatDateTimeRange(item.startTime, item.endTime);
item._airQulity = `AQI锛�${item.aqi}锛�${item.pollutionDegree}锛塦;
item._abnormalFactors = item.abnormalFactors
- .map((factor) => factor)
+ .map((factor) => factorName[factor])
.join('銆�');
item._kilometres = Math.round(item.kilometres / 1000);
@@ -321,9 +321,9 @@
radioOptions(TYPE0).forEach((f) => {
const _factor = item.dataStatistics.find((e) => e.factor == f.name);
- item[`avgValue_${f.name}`] = _factor?.avgValue ?? '-';
- item[`maxValue_${f.name}`] = _factor?.maxValue ?? '-';
- item[`minValue_${f.name}`] = _factor?.minValue ?? '-';
+ item[`avgValue_${f.name}`] = _factor?.avgValue.toFixed(0) ?? '-';
+ item[`maxValue_${f.name}`] = _factor?.maxValue.toFixed(0) ?? '-';
+ item[`minValue_${f.name}`] = _factor?.minValue.toFixed(0) ?? '-';
});
return item;
@@ -350,14 +350,15 @@
_area: `${township}`,
clueByFactorList: clues
.groupBy((e) => e.factorTag)
- .map((item2) => {
+ .map((item2, index2) => {
const { key: factorTag, values: clues2 } = item2;
const factorNames = [...new Set(clues2.flatMap((e) => e.factors))]
- .map((e) => factorName(e))
+ .map((e) => factorName[e])
.join('銆�');
return {
+ index: index2 + 1,
factor: factorNames,
- clues: clues2.map((clue) => {
+ clues: clues2.map((item3, index3) => {
// const _riskRegion = [];
// if (clue.pollutedArea.address) {
// _riskRegion.push(clue.pollutedArea.address);
@@ -368,13 +369,15 @@
// if (clue.pollutedArea.roadinter) {
// _riskRegion.push(clue.pollutedArea.roadinter);
// }
+ const clue = item3.clue
return {
+ index: index3+1,
_title:
(clue.pollutedArea.street ?? '') +
(clue.pollutedArea.streetNumber ?? '') +
(clue.pollutedArea.direction ?? ''),
_factorNames: Object.keys(clue.pollutedData.statisticMap)
- .map((e) => factorName(e))
+ .map((e) => factorName[e])
.join('銆�'),
_time:
moment(clue.pollutedData.startTime).format(
@@ -468,14 +471,14 @@
const infoDes = item.highRiskGridMap[key].map((e) => {
return {
- factorValue: g.factorValue,
+ factorValue: e.factorValue,
// 鍥涜嚦鑼冨洿锛岄『搴忎负鏈�灏忕粡搴︼紝鏈�澶х粡搴︼紝鏈�灏忕含搴︼紝鏈�澶х含搴�
- _boundsDes: `缁忓害${g.bounds[0]}鑷�${g.bounds[1]}锛岀含搴�${g.bounds[2]}鑷�${g.bounds[3]}`,
+ _boundsDes: `缁忓害${e.bounds[0]}鑷�${e.bounds[1]}锛岀含搴�${e.bounds[2]}鑷�${e.bounds[3]}`,
// 娑夊強琛楅晣
- town: g.town,
+ town: e.town,
_scenesDes:
- g.highRiskScenes.length > 0
- ? `娑夊強鐨勬薄鏌撳満鏅寘鎷�${g.highRiskScenes.map((s) => s.name).join('銆�')}`
+ e.highRiskScenes.length > 0
+ ? `娑夊強鐨勬薄鏌撳満鏅寘鎷�${e.highRiskScenes.map((s) => s.name).join('銆�')}`
: '缃戞牸鍐呭彲鑳藉瓨鍦ㄩ殣钘忛闄╂簮'
};
});
@@ -488,7 +491,7 @@
const { url1, url2 } = url;
_highRiskGridList.push({
index: i + 1,
- factor: factorName(g.factorType),
+ factor: factorName[g.factorType],
// 鏍囧噯鑹茬綉鏍煎浘
gridImgUrl1: url1,
// 瀵规瘮鑹茬綉鏍煎浘
--
Gitblit v1.9.3