|
18 | 18 | {{ scope.$index }}
|
19 | 19 | </template>
|
20 | 20 | </el-table-column>
|
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> |
| 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> |
37 | 35 | </el-table-column>
|
38 | 36 | <el-table-column align="center" label="Date" width="220">
|
39 | 37 | <template slot-scope="scope">
|
|
48 | 46 | <script>
|
49 | 47 | import { fetchList } from '@/api/article'
|
50 | 48 | import { parseTime } from '@/utils'
|
51 |
| -
|
52 | 49 | // options components
|
53 | 50 | import FilenameOption from './components/FilenameOption'
|
54 | 51 | import AutoWidthOption from './components/AutoWidthOption'
|
55 | 52 | import BookTypeOption from './components/BookTypeOption'
|
56 |
| -
|
57 | 53 | export default {
|
58 | 54 | name: 'ExportExcel',
|
59 | 55 | components: { FilenameOption, AutoWidthOption, BookTypeOption },
|
@@ -81,17 +77,13 @@ export default {
|
81 | 77 | handleDownload() {
|
82 | 78 | this.downloadLoading = true
|
83 | 79 | import('@/vendor/Export2Excel').then(excel => {
|
84 |
| - const multiHeader = [['Id', '主要信息', '', '', 'Date']] |
85 |
| - const tHeader = ['', 'Title', 'Author', 'Readings', ''] |
| 80 | + const tHeader = ['Id', 'Title', 'Author', 'Readings', 'Date'] |
86 | 81 | const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time']
|
87 | 82 | const list = this.list
|
88 | 83 | const data = this.formatJson(filterVal, list)
|
89 |
| - const merges = ['A1:A2', 'B1:D1', 'E1:E2'] |
90 | 84 | excel.export_json_to_excel({
|
91 |
| - multiHeader, |
92 | 85 | header: tHeader,
|
93 | 86 | data,
|
94 |
| - merges, |
95 | 87 | filename: this.filename,
|
96 | 88 | autoWidth: this.autoWidth,
|
97 | 89 | bookType: this.bookType
|
@@ -120,4 +112,3 @@ export default {
|
120 | 112 | padding: 0 12px 0 30px;
|
121 | 113 | }
|
122 | 114 | </style>
|
123 |
| - |
0 commit comments