改名
This commit is contained in:
@@ -752,4 +752,8 @@ export default {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-table-striped :deep(.table-striped) {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -33,8 +33,13 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<ele-pro-table ref="table" row-key="id" :datasource="url" :columns="columns" :where="where"
|
<ele-pro-table ref="table" row-key="id" :datasource="url" :columns="columns" :where="where" :needPage="false"
|
||||||
:scroll="{x: 'max-content'}" :rowClassName="(record, index) => (index % 2 === 1 ? 'table-striped' : null)">
|
@done="(d)=>data = d.data" :scroll="{x: 'max-content'}">
|
||||||
|
<template #toolbar>
|
||||||
|
<a-space>
|
||||||
|
<a-button @click="exportFile">导出excel</a-button>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
@@ -44,6 +49,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import XLSX from 'xlsx';
|
||||||
import {
|
import {
|
||||||
pageRoadNoiseStatisticUrl
|
pageRoadNoiseStatisticUrl
|
||||||
} from "@/api/ecology/road-sound"
|
} from "@/api/ecology/road-sound"
|
||||||
@@ -152,7 +158,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "SD",
|
title: "SDdB(A)",
|
||||||
children: [{
|
children: [{
|
||||||
title: '平均',
|
title: '平均',
|
||||||
dataIndex: 'avgSD',
|
dataIndex: 'avgSD',
|
||||||
@@ -177,7 +183,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "L10",
|
title: "L10dB(A)",
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -203,7 +209,7 @@
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: 'L50',
|
title: 'L50dB(A)',
|
||||||
children: [{
|
children: [{
|
||||||
title: '平均',
|
title: '平均',
|
||||||
dataIndex: 'avgL50',
|
dataIndex: 'avgL50',
|
||||||
@@ -228,7 +234,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "L90",
|
title: "L90dB(A)",
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -255,7 +261,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Lmin",
|
title: "LmindB(A)",
|
||||||
children: [{
|
children: [{
|
||||||
title: '平均',
|
title: '平均',
|
||||||
dataIndex: 'avgLmin',
|
dataIndex: 'avgLmin',
|
||||||
@@ -279,7 +285,7 @@
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: 'Lmax',
|
title: 'LmaxdB(A)',
|
||||||
children: [{
|
children: [{
|
||||||
title: '平均',
|
title: '平均',
|
||||||
dataIndex: 'avgLmax',
|
dataIndex: 'avgLmax',
|
||||||
@@ -315,6 +321,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: pageRoadNoiseStatisticUrl,
|
url: pageRoadNoiseStatisticUrl,
|
||||||
|
data: [],
|
||||||
where: {
|
where: {
|
||||||
model: "place"
|
model: "place"
|
||||||
},
|
},
|
||||||
@@ -372,6 +379,21 @@
|
|||||||
|
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
exportFile() {
|
||||||
|
let array = [
|
||||||
|
['测点', '路段', '城区', '路长', '路宽', '平均Leq', '平均SD']
|
||||||
|
];
|
||||||
|
this.data.forEach(d => {
|
||||||
|
array.push([d.place, d.road, d.area, d.roadLength, d.roadWidth, d.avgLeq, d.avgSD]);
|
||||||
|
});
|
||||||
|
let sheet = XLSX.utils.aoa_to_sheet(array);
|
||||||
|
// sheet['!merges'] = [
|
||||||
|
// {s: {r: 0, c: 1}, e: {r: 0, c: 5}}, // 合并第0行第1列到第0行第5列
|
||||||
|
// {s: {r: 0, c: 0}, e: {r: 1, c: 0}}, // 合并第0行第0列到第1行第0列
|
||||||
|
// {s: {r: 0, c: 6}, e: {r: 1, c: 6}} // 合并第0行第6列到第1行第6列
|
||||||
|
// ];
|
||||||
|
this.$util.exportSheet(XLSX, sheet, '道路交通噪声统计表');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user