diff --git a/src/views/sound/road/collect/index.vue b/src/views/sound/road/collect/index.vue
index 4e4cf43..e9293ac 100644
--- a/src/views/sound/road/collect/index.vue
+++ b/src/views/sound/road/collect/index.vue
@@ -246,7 +246,7 @@ export default {
hide();
Modal.error({
title: "导入失败",
- content: "表格格式有误,请检查后重新上传!",
+ content: error.message,
});
}
// console.log(billData);
diff --git a/src/views/sound/road/collect/noise.vue b/src/views/sound/road/collect/noise.vue
index 461aeeb..e7c879b 100644
--- a/src/views/sound/road/collect/noise.vue
+++ b/src/views/sound/road/collect/noise.vue
@@ -419,6 +419,15 @@
+
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+
+
{
const monitorTime = new Date();
monitorTime.setFullYear(item[0]);
- monitorTime.setMonth(item[10]-1);
+ monitorTime.setMonth(item[10] - 1);
monitorTime.setDate(item[11]);
monitorTime.setHours(item[12]);
monitorTime.setMinutes(item[13]);
@@ -15,10 +15,10 @@ export default {
quarter = 2
} else if (month < 10) {
quarter = 3
- } else{
+ } else {
quarter = 4
}
- return {
+ const row = {
monitorYear: item[0],
place: item[1],
placeCode: item[2],
@@ -44,9 +44,21 @@ export default {
indexLmin: item[19],
indexLmax: item[20],
quarter
-
- }
- })
+ }
+
+ if (row.monitorHour >= 6 && row.monitorHour <= 22 && row.timeSlot != "昼") {
+ throw new Error(row.place + "时段有误")
+ }
+
+ if (row.monitorHour <= 6 && row.monitorHour > 22 && row.timeSlot != "夜") {
+ throw new Error(row.place + "时段有误")
+ }
+ if(row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90){
+ throw new Error(row.place + "数值有误")
+ }
+
+ return row;
+ })
},
toPlaceData(excelData) {
@@ -68,17 +80,17 @@ export default {
soundPressureValue: item[13],
soundInstrumentModel: item[14],
soundInstrumentCode: item[15],
-
- }
- })
+
+ }
+ })
},
// 解析县级数据
- toAreaObjData(excelData){
+ toAreaObjData(excelData) {
return excelData.map(item => {
const monitorTime = new Date();
monitorTime.setFullYear(item[1]);
- monitorTime.setMonth(item[14]-1);
+ monitorTime.setMonth(item[14] - 1);
monitorTime.setDate(item[15]);
monitorTime.setHours(item[16]);
monitorTime.setMinutes(item[17]);
@@ -90,15 +102,15 @@ export default {
quarter = 2
} else if (month < 10) {
quarter = 3
- } else{
+ } else {
quarter = 4
}
let timeSlot = "夜";
- if(item[16]>=6&&item[16]<=22){
+ if (item[16] >= 6 && item[16] <= 22) {
timeSlot = "昼"
}
- return {
- regionCode:item[0],
+ const row = {
+ regionCode: item[0],
regionLevel: "县级",
monitorYear: item[1],
placeCode: item[2],
@@ -139,8 +151,12 @@ export default {
timeSlot,
monitorTime: monitorTime.getTime(),
quarter
-
- }
- })
+
+ }
+ if(row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90){
+ throw new Error(row.place + "数值有误")
+ }
+ return row;
+ })
}
}
\ No newline at end of file
diff --git a/src/views/sound/road/statistic/average.vue b/src/views/sound/road/statistic/average.vue
index 755e2fb..293c445 100644
--- a/src/views/sound/road/statistic/average.vue
+++ b/src/views/sound/road/statistic/average.vue
@@ -6,12 +6,6 @@
-
-
-
-
-
-
@@ -50,269 +44,46 @@
import {
pageRoadNoiseStatisticUrl
} from "@/api/ecology/road-sound"
- const columns = [{
- title: '测点',
- dataIndex: 'place',
-
- },
- {
- title: '路段',
- dataIndex: 'road',
-
- },
+ const columns = [
+
{
title: '城区',
dataIndex: 'area',
},
- {
+
+ {
title: '市',
dataIndex: 'city',
},
{
title: '路长',
dataIndex: 'roadLength',
- customRender: ({
- text
- }) => Math.round(text)
},
{
title: '路宽',
dataIndex: 'roadWidth',
- customRender: ({
- text
- }) => Math.round(text)
},
- {
- title: '20分钟中小型车流量',
- children: [{
- title: '平均',
- dataIndex: 'avgSmallTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- {
- title: '最大',
- dataIndex: 'maxSmallTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- {
- title: '最小',
- dataIndex: 'minSmallTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- ],
- },
- {
- title: '20分钟大型车流量',
- children: [{
- title: '平均',
- dataIndex: 'avgLargeTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- {
- title: '最大',
- dataIndex: 'maxLargeTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- {
- title: '最小',
- dataIndex: 'minLargeTrafficFlow',
- customRender: ({
- text
- }) => Math.round(text)
- },
- ]
- },
- {
+ {
title: 'LeqdB(A)',
- children: [{
- title: '平均',
- dataIndex: 'avgLeq',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxLeq',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minLeq',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
+ dataIndex: 'avgLeq',
},
- {
- title: "SDdB(A)",
- children: [{
- title: '平均',
- dataIndex: 'avgSD',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxSD',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minSD',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
+ {
+ title: 'SDdB(A)',
+ dataIndex: 'avgSD',
},
- {
- title: "L10dB(A)",
- children: [
-
- {
- title: '平均',
- dataIndex: 'avgL10',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxL10',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minL10',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
- }, {
+ {
+ title: 'L10dB(A)',
+ dataIndex: 'avgL10',
+ },
+ {
title: 'L50dB(A)',
- children: [{
- title: '平均',
- dataIndex: 'avgL50',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxL50',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minL50',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
+ dataIndex: 'avgL50',
},
- {
- title: "L90dB(A)",
- children: [
-
- {
- title: '平均',
- dataIndex: 'avgL90',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxL90',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minL90',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
+ {
+ title: 'L90dB(A)',
+ dataIndex: 'avgL90',
},
- {
- title: "LmindB(A)",
- children: [{
- title: '平均',
- dataIndex: 'avgLmin',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxLmin',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minLmin',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
- }, {
- title: 'LmaxdB(A)',
- children: [{
- title: '平均',
- dataIndex: 'avgLmax',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最大',
- dataIndex: 'maxLmax',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- {
- title: '最小',
- dataIndex: 'minLmax',
- customRender: ({
- text
- }) => Number(text).toFixed(2)
- },
- ]
- },
-
-
-
]
export default {
name: 'StatisticSoundRoadAverage',
@@ -324,7 +95,7 @@
url: pageRoadNoiseStatisticUrl,
data: [],
where: {
- model: "place"
+ model: "area"
},
timeScope: [],
columns,
@@ -380,7 +151,7 @@
/* 重置搜索 */
reset() {
this.where = {
- model: "place",
+ model: "area",
timeSlot: "昼"
};
this.this.timeScope = []
diff --git a/src/views/sound/road/statistic/base.vue b/src/views/sound/road/statistic/base.vue
index 159887b..75e6a60 100644
--- a/src/views/sound/road/statistic/base.vue
+++ b/src/views/sound/road/statistic/base.vue
@@ -74,6 +74,14 @@
:scroll="{ x: 'max-content' }"
@done="(d) => (data = d.data)"
>
+
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+
@@ -173,7 +181,9 @@ export default {
{
title: "LeqdB(A)",
dataIndex: "indexLeq",
+ slots: {customRender: "Leq"},
sorter: true,
+
},
{
title: "SDdB(A)",
diff --git a/src/views/sound/road/statistic/compare.vue b/src/views/sound/road/statistic/compare.vue
index f606606..61f1330 100644
--- a/src/views/sound/road/statistic/compare.vue
+++ b/src/views/sound/road/statistic/compare.vue
@@ -261,123 +261,149 @@ export default {
this.hisYears.forEach((item) => {
if (
- (!this.where.timeRange[0] ||
- this.where.timeRange[0] <= item) &&
- (!this.where.timeRange[1] ||
- this.where.timeRange[1] >= item)
+ (!this.where.timeRange[0] || this.where.timeRange[0] <= item) &&
+ (!this.where.timeRange[1] || this.where.timeRange[1] >= item)
) {
if (this.where.groupTimeLength == "quarter") {
columns.push({
title: item + "年第一季度Leq",
dataIndex: item + "1" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Leq",
dataIndex: item + "2" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Leq",
dataIndex: item + "3" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Leq",
dataIndex: item + "4" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度SD",
dataIndex: item + "1" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度SD",
dataIndex: item + "2" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度SD",
dataIndex: item + "3" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度SD",
dataIndex: item + "4" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L10",
dataIndex: item + "1" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L10",
dataIndex: item + "2" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L10",
dataIndex: item + "3" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L10",
dataIndex: item + "4" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L50",
dataIndex: item + "1" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L50",
dataIndex: item + "2" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L50",
dataIndex: item + "3" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L50",
dataIndex: item + "4" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L90",
dataIndex: item + "1" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L90",
dataIndex: item + "2" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L90",
dataIndex: item + "3" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L90",
dataIndex: item + "4" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度Lmin",
dataIndex: item + "1" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Lmin",
dataIndex: item + "2" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Lmin",
dataIndex: item + "3" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Lmin",
dataIndex: item + "4" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度Lmax",
dataIndex: item + "1" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Lmax",
dataIndex: item + "2" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Lmax",
dataIndex: item + "3" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Lmax",
dataIndex: item + "4" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
} else {
if (this.where.valueType.includes("index_Leq")) {