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(); + }) + }, }, };