解决导出不全等问题
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter" :visiable="visiable"/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
@@ -61,6 +60,13 @@ export default {
|
||||
selection: [],
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
key: 'index',
|
||||
dataIndex: 'index',
|
||||
width: 48,
|
||||
align: 'center',
|
||||
customRender: ({index}) => index + 1
|
||||
},
|
||||
{title: "监测时间", dataIndex: "monitorTime", sorter: true,},
|
||||
{title: "类别", dataIndex: "type", sorter: true,},
|
||||
{title: "点位名称", dataIndex: "pointName", sorter: true,},
|
||||
@@ -129,7 +135,7 @@ export default {
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
this.datasource.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user