From 4b5b0a6e6ba115adb1f327eb18e202e348e2e091 Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 17 Mar 2019 16:52:11 +0800 Subject: [PATCH] feature[Excel]: add export merge header excel demo --- src/lang/en.js | 1 + src/lang/es.js | 1 + src/lang/zh.js | 7 ++- src/router/index.js | 6 ++ src/views/excel/exportExcel.vue | 39 +++++------- src/views/excel/mergeHeader.vue | 101 ++++++++++++++++++++++++++++++++ 6 files changed, 128 insertions(+), 27 deletions(-) create mode 100644 src/views/excel/mergeHeader.vue diff --git a/src/lang/en.js b/src/lang/en.js index caed5c5b..963c60d3 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -57,6 +57,7 @@ export default { excel: 'Excel', exportExcel: 'Export Excel', selectExcel: 'Export Selected', + mergeHeader: 'Merge Header', uploadExcel: 'Upload Excel', zip: 'Zip', pdf: 'PDF', diff --git a/src/lang/es.js b/src/lang/es.js index f0d7de41..31fa8303 100755 --- a/src/lang/es.js +++ b/src/lang/es.js @@ -57,6 +57,7 @@ export default { excel: 'Excel', exportExcel: 'Exportar a Excel', selectExcel: 'Export seleccionado', + mergeHeader: 'Merge Header', uploadExcel: 'Subir Excel', zip: 'Zip', pdf: 'PDF', diff --git a/src/lang/zh.js b/src/lang/zh.js index 9bea838e..574cba11 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -55,9 +55,10 @@ export default { page404: '404', errorLog: '错误日志', excel: 'Excel', - exportExcel: 'Export Excel', - selectExcel: 'Export Selected', - uploadExcel: 'Upload Excel', + exportExcel: '导出 Excel', + selectExcel: '导出 已选择项', + mergeHeader: '导出 多级表头', + uploadExcel: '上传 Excel', zip: 'Zip', pdf: 'PDF', exportZip: 'Export Zip', diff --git a/src/router/index.js b/src/router/index.js index 529c1ab2..fcff584e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -279,6 +279,12 @@ export const asyncRoutes = [ name: 'SelectExcel', meta: { title: 'selectExcel' } }, + { + path: 'export-merge-header', + component: () => import('@/views/excel/mergeHeader'), + name: 'MergeHeader', + meta: { title: 'mergeHeader' } + }, { path: 'upload-excel', component: () => import('@/views/excel/uploadExcel'), diff --git a/src/views/excel/exportExcel.vue b/src/views/excel/exportExcel.vue index 8e969386..253f1641 100644 --- a/src/views/excel/exportExcel.vue +++ b/src/views/excel/exportExcel.vue @@ -19,22 +19,20 @@ {{ scope.$index }} - - - - - - - - - - + + + + + + + +