修正统计平均值
This commit is contained in:
@@ -246,7 +246,7 @@ export default {
|
||||
hide();
|
||||
Modal.error({
|
||||
title: "导入失败",
|
||||
content: "表格格式有误,请检查后重新上传!",
|
||||
content: error.message,
|
||||
});
|
||||
}
|
||||
// console.log(billData);
|
||||
|
||||
@@ -419,6 +419,15 @@
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
</template>
|
||||
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button
|
||||
@@ -547,6 +556,7 @@ export default {
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ export default {
|
||||
return excelData.map(item => {
|
||||
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,8 +44,20 @@ 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;
|
||||
})
|
||||
|
||||
},
|
||||
@@ -74,11 +86,11 @@ export default {
|
||||
|
||||
},
|
||||
// 解析县级数据
|
||||
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],
|
||||
@@ -141,6 +153,10 @@ export default {
|
||||
quarter
|
||||
|
||||
}
|
||||
if(row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90){
|
||||
throw new Error(row.place + "数值有误")
|
||||
}
|
||||
return row;
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,6 @@
|
||||
<!-- 搜索表单 -->
|
||||
<a-form :model="where" layout="inline" :labelCol="{ offset: 1}">
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="统计模块:">
|
||||
<a-select :options="modelOptions" v-model:value="where.model" placeholder="统计模块">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="昼夜:">
|
||||
<a-select :options="timeSlotOptions" v-model:value="where.timeSlot" placeholder="昼夜">
|
||||
@@ -50,20 +44,13 @@
|
||||
import {
|
||||
pageRoadNoiseStatisticUrl
|
||||
} from "@/api/ecology/road-sound"
|
||||
const columns = [{
|
||||
title: '测点',
|
||||
dataIndex: 'place',
|
||||
const columns = [
|
||||
|
||||
},
|
||||
{
|
||||
title: '路段',
|
||||
dataIndex: 'road',
|
||||
|
||||
},
|
||||
{
|
||||
title: '城区',
|
||||
dataIndex: 'area',
|
||||
},
|
||||
|
||||
{
|
||||
title: '市',
|
||||
dataIndex: 'city',
|
||||
@@ -71,248 +58,32 @@
|
||||
{
|
||||
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)
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
children: [{
|
||||
title: '平均',
|
||||
title: 'SDdB(A)',
|
||||
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: "L10dB(A)",
|
||||
children: [
|
||||
|
||||
{
|
||||
title: '平均',
|
||||
title: 'L10dB(A)',
|
||||
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: '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)
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "L90dB(A)",
|
||||
children: [
|
||||
|
||||
{
|
||||
title: '平均',
|
||||
title: 'L90dB(A)',
|
||||
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: "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 = []
|
||||
|
||||
@@ -74,6 +74,14 @@
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -173,7 +181,9 @@ export default {
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
sorter: true,
|
||||
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user