diff --git a/client/src/router/index.js b/client/src/router/index.js index 09b0c32..94cfb0f 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -280,6 +280,12 @@ export const asyncRoutes = [ meta: { title: '报送任务执行', perms: ['task_view'] }, hidden: true }, + { + path: 'statisticsGroup', + name: 'statisticsGroup', + component: () => import('@/views/supervisionNew/statisticsGroup.vue'), + meta: { title: '部门报告统计'}, + }, { path: 'statistics', name: 'statistics', diff --git a/client/src/views/supervisionNew/basicGoalDept.vue b/client/src/views/supervisionNew/basicGoalDept.vue index 3168300..acb90e4 100644 --- a/client/src/views/supervisionNew/basicGoalDept.vue +++ b/client/src/views/supervisionNew/basicGoalDept.vue @@ -16,6 +16,11 @@ icon="el-icon-search" @click="handleFilter" >搜索 + 导出 + @@ -27,6 +32,7 @@ stripe highlight-current-row :height="heightTable" + id="myTable" > @@ -37,13 +43,6 @@ - @@ -53,6 +52,7 @@ import { getOrgList, getSubOrgList } from "@/api/org"; import checkPermission from "@/utils/permission"; import Pagination from "@/components/Pagination"; + import * as XLSX from "xlsx"; export default { components:{Pagination}, data(){ @@ -184,8 +184,12 @@ handleFilter(){ this.getList(); }, - - + handleExport() { + let filename = this.listQuery.year+'部门目标.xlsx' + let table =document.getElementById('myTable'); + let workbook = XLSX.utils.table_to_book(table); + XLSX.writeFile(workbook, filename); + }, }, }; diff --git a/client/src/views/supervisionNew/statisticsGroup.vue b/client/src/views/supervisionNew/statisticsGroup.vue index c107bca..69de25a 100644 --- a/client/src/views/supervisionNew/statisticsGroup.vue +++ b/client/src/views/supervisionNew/statisticsGroup.vue @@ -1,20 +1,7 @@