Bläddra i källkod

招聘会职位投递情况导出

Xiao_123 4 månader sedan
förälder
incheckning
f7dee20ad6

+ 5 - 0
src/api/menduner/system/jobFair/white/index.ts

@@ -20,5 +20,10 @@ export const JobFairWhiteApi = {
   // 导出参加双选会职位 Excel
   exportJobFairWhiteList: async (jobFairId) => {
     return await request.download({ url: `/menduner/system/job-fair/detail/export-excel?jobFairId=${jobFairId}` })
+  },
+
+  // 导出招聘会投递数据
+  exportJobFairApplyData: async (jobFairId) => {
+    return await request.downloadGET({ url: `/flames/school/student/detail/export`, data: { jobFairId } })
   }
 }

+ 4 - 0
src/config/axios/index.ts

@@ -43,6 +43,10 @@ export default {
     const res = await request({ method: 'GET', responseType: 'blob', ...option })
     return res as unknown as Promise<T>
   },
+  downloadGET: async <T = any>(option: any) => {
+    const res = await request({ method: 'POST', responseType: 'blob', ...option })
+    return res as unknown as Promise<T>
+  },
   upload: async <T = any>(option: any) => {
     option.headersType = 'multipart/form-data'
     const res = await request({ method: 'POST', ...option })

+ 19 - 3
src/views/menduner/system/jobFair/manage/details/index.vue

@@ -17,7 +17,8 @@
         <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-button type="primary" :loading="exportLoading" plain @click="handleExport"><Icon icon="ep:download" class="mr-5px" /> 参加招聘会职位列表导出</el-button>
+        <el-button type="primary" :loading="exportDeliveryLoading" plain @click="handleExportDelivery"><Icon icon="ep:download" class="mr-5px" /> 招聘会职位投递情况导出</el-button>
       </el-form-item>
     </el-form>
   </ContentWrap>
@@ -129,8 +130,7 @@ const handleRemoveWhiteList = async (enterpriseName: string) => {
   } catch (err) {}
 }
 
-const showExport = ref(true) // 导出参加招聘会职位列表
-const exportLoading = ref(false) // 导出的加载中
+const exportLoading = ref(false)
 /** 导出按钮操作 */
 const handleExport = async () => {
   try {
@@ -146,6 +146,22 @@ const handleExport = async () => {
   }
 }
 
+// 招聘会投递情况导出
+const exportDeliveryLoading = ref(false)
+const handleExportDelivery = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportDeliveryLoading.value = true
+    const data = await JobFairWhiteApi.exportJobFairApplyData(queryParams.value.jobFairId)
+    download.excel(data, '招聘会职位投递情况.xls')
+  } catch {
+  } finally {
+    exportDeliveryLoading.value = false
+  }
+}
+
 /** 初始化 */
 const { currentRoute } = useRouter() // 路由
 const { delView } = useTagsViewStore() // 视图操作