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