From 3491f52aa4ba1e9f5fec1e25604373167c6bcdec Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期二, 10 三月 2026 23:43:17 +0800
Subject: [PATCH] feat(user): 添加员工转正提醒导出功能
---
src/views/dashboard/zzUser.vue | 46 ++++++++++++++++++++++++++++++++++++++++------
1 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/src/views/dashboard/zzUser.vue b/src/views/dashboard/zzUser.vue
index 89001bf..18c7416 100644
--- a/src/views/dashboard/zzUser.vue
+++ b/src/views/dashboard/zzUser.vue
@@ -10,12 +10,8 @@
>
<div class="app-container">
<div class="filter-container" style="margin-left: -340px;">
- <el-input v-model="queryParams.name" placeholder="姓名/身份证号/护卫点/员工编号" class="filter-item search-item" />
- <el-button class="filter-item" type="primary" @click="search">
- {{ $t('table.search') }}
- </el-button>
- <el-button class="filter-item" type="success" @click="reset">
- {{ $t('table.reset') }}
+ <el-button class="filter-item" type="warning" @click="handleExport">
+ 导出
</el-button>
</div>
<el-table
@@ -99,6 +95,24 @@
defaultProps: {
children: 'children',
label: 'label'
+ },
+ // 导出配置
+ exportConfig: {
+ selectedFields: [
+ 'empNumb', // 员工编号
+ 'allDeptName', // 部门(护卫点)
+ 'jobName', // 岗位
+ 'empName', // 姓名
+ 'certificateNumb', // 身份证号码
+ 'birthdate', // 出生日期
+ 'insuranceTypeName', // 社保档位
+ 'socialNumb', // 社保电脑号
+ 'entryDate', // 入职日期
+ 'probationDate', // 转正日期
+ 'probationStatusName' // 转正状态
+ ],
+ exportUrl: 'hr/empBaseInfo/export/probation',
+ fileName: '员工转正提醒.xls'
}
}
},
@@ -157,6 +171,26 @@
},
cancleChoose() {
this.$emit('cancleChooseUser')
+ },
+ // 导出方法
+ handleExport() {
+ const params = {
+ ...this.queryParams,
+ delFlag: 0,
+ empStatus: 0,
+ exportField: this.exportConfig.selectedFields.join(',')
+ }
+
+ this.$download(
+ this.exportConfig.exportUrl,
+ params,
+ this.exportConfig.fileName
+ ).then(() => {
+ this.$message({
+ message: '下载成功!',
+ type: 'success'
+ })
+ })
}
}
}
--
Gitblit v1.8.0