From b8d49dd356186d9e49dbe89cafcfde4c6db85a22 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 20 Apr 2023 10:22:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=BA=E5=91=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/hrm.js | 9 +++++++ src/views/hrm/employee.vue | 51 +++++++++++++++++++++++++++++++++++--- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/api/model/hrm.js b/src/api/model/hrm.js index 22173ae9..7b21e21e 100644 --- a/src/api/model/hrm.js +++ b/src/api/model/hrm.js @@ -53,6 +53,15 @@ export default { req: async function(data){ return await http.post(`${config.API_URL}/hrm/employee/improve_info/`, data); } + }, + export_excel: { + name: "导出", + req: async function(data){ + return await http.get( + `${config.API_URL}/hrm/employee/export_excel/`, + data + ); + } } }, diff --git a/src/views/hrm/employee.vue b/src/views/hrm/employee.vue index 4c4ab1ee..798e2c13 100644 --- a/src/views/hrm/employee.vue +++ b/src/views/hrm/employee.vue @@ -2,12 +2,26 @@
+ + +
@@ -54,6 +68,12 @@ icon="el-icon-search" @click="handleQuery" > + 导出
@@ -104,7 +124,7 @@ width="120" > { + that.cLoading = false; + that.ElLoading.close(); + let urls = config.API_URL.slice(0,-4)+res.path; + window.open(urls, "_blank"); + }).catch(e=>{ + that.cLoading = false; + that.ElLoading.close(); + }) + }, }, };