|
@@ -22,6 +22,7 @@
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
<el-button type="primary" plain @click="handleAdd"><Icon icon="ep:plus" class="mr-5px" /> 新增</el-button>
|
|
|
+ <el-button v-if="showExport" type="primary" plain @click="handleExport"><Icon icon="ep:download" class="mr-5px" /> 导出参加招聘会职位列表</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
@@ -62,6 +63,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { JobFairWhiteApi } from '@/api/menduner/system/jobFair/white'
|
|
|
import JobFairForm from './jobFairForm.vue'
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
/** 招聘会 列表 */
|
|
|
defineOptions({ name: 'JobFair' })
|
|
@@ -116,6 +118,23 @@ const handleRemoveWhiteList = async (enterpriseName: string) => {
|
|
|
} catch (err) {}
|
|
|
}
|
|
|
|
|
|
+const showExport = ref(true) // 导出参加招聘会职位列表
|
|
|
+const exportLoading = ref(false) // 导出的加载中
|
|
|
+/** 导出按钮操作 */
|
|
|
+const handleExport = async () => {
|
|
|
+ try {
|
|
|
+ // 导出的二次确认
|
|
|
+ await message.exportConfirm()
|
|
|
+ // 发起导出
|
|
|
+ exportLoading.value = true
|
|
|
+ const data = await JobFairWhiteApi.exportJobFairWhiteList()
|
|
|
+ download.excel(data, '招聘会职位列表.xls')
|
|
|
+ } catch {
|
|
|
+ } finally {
|
|
|
+ exportLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
getList()
|