|
19 | 19 | {{ scope.$index }}
|
20 | 20 | </template>
|
21 | 21 | </el-table-column>
|
22 |
| - <el-table-column label="Title"> |
23 |
| - <template slot-scope="scope"> |
24 |
| - {{ scope.row.title }} |
25 |
| - </template> |
26 |
| - </el-table-column> |
27 |
| - <el-table-column label="Author" width="110" align="center"> |
28 |
| - <template slot-scope="scope"> |
29 |
| - <el-tag>{{ scope.row.author }}</el-tag> |
30 |
| - </template> |
31 |
| - </el-table-column> |
32 |
| - <el-table-column label="Readings" width="115" align="center"> |
33 |
| - <template slot-scope="scope"> |
34 |
| - {{ scope.row.pageviews }} |
35 |
| - </template> |
| 22 | + <el-table-column label="主要信息" align="center"> |
| 23 | + <el-table-column label="Title"> |
| 24 | + <template slot-scope="scope"> |
| 25 | + {{ scope.row.title }} |
| 26 | + </template> |
| 27 | + </el-table-column> |
| 28 | + <el-table-column label="Author" width="110" align="center"> |
| 29 | + <template slot-scope="scope"> |
| 30 | + <el-tag>{{ scope.row.author }}</el-tag> |
| 31 | + </template> |
| 32 | + </el-table-column> |
| 33 | + <el-table-column label="Readings" width="115" align="center"> |
| 34 | + <template slot-scope="scope"> |
| 35 | + {{ scope.row.pageviews }} |
| 36 | + </template> |
| 37 | + </el-table-column> |
36 | 38 | </el-table-column>
|
37 | 39 | <el-table-column align="center" label="Date" width="220">
|
38 | 40 | <template slot-scope="scope">
|
@@ -80,13 +82,17 @@ export default {
|
80 | 82 | handleDownload() {
|
81 | 83 | this.downloadLoading = true
|
82 | 84 | import('@/vendor/Export2Excel').then(excel => {
|
83 |
| - const tHeader = ['Id', 'Title', 'Author', 'Readings', 'Date'] |
| 85 | + const multiHeader = [['Id', '主要信息', '', '', 'Date']] |
| 86 | + const tHeader = ['', 'Title', 'Author', 'Readings', ''] |
84 | 87 | const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time']
|
85 | 88 | const list = this.list
|
86 | 89 | const data = this.formatJson(filterVal, list)
|
| 90 | + const merges = ['A1:A2', 'B1:D1', 'E1:E2'] |
87 | 91 | excel.export_json_to_excel({
|
| 92 | + multiHeader, |
88 | 93 | header: tHeader,
|
89 | 94 | data,
|
| 95 | + merges, |
90 | 96 | filename: this.filename,
|
91 | 97 | autoWidth: this.autoWidth,
|
92 | 98 | bookType: this.bookType
|
|
0 commit comments