解决导出不全等问题

This commit is contained in:
庞东林
2021-12-14 20:25:50 +08:00
parent d37d3a7230
commit 5a30d9ca4c
12 changed files with 81 additions and 20 deletions

View File

@@ -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"
@@ -187,6 +186,13 @@ export default {
})
}
this.columns = [
{
key: 'index',
dataIndex: 'index',
width: 48,
align: 'center',
customRender: ({index}) => index + 1
},
{ title: "类别", dataIndex: "type", sorter: true },
{ title: "点位名称", dataIndex: "pointName", sorter: true},
...addCloumns
@@ -237,7 +243,7 @@ export default {
arr.push(th1)
arr.push(th2)
this.data.forEach((d) => {
this.datasource.forEach((d) => {
const td = this.sColumns.map((item) => d[item.dataIndex]);
arr.push(td);
});