Explorar el Código

招聘会-用户投递情况导出

Xiao_123 hace 1 mes
padre
commit
5983ef3789

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

@@ -83,6 +83,11 @@ export const JobFairManageApi = {
     return await request.get({ url: `/menduner/system/job-fair/analysis/user/job/cv-rel`, params })
   },
 
+  // 用户投递列表导出
+  exportDelivery: async (params) => {
+    return await request.download({ url: `/menduner/system/job-fair/analysis/user/job/cv-rel/download`, params })
+  },
+
   // 招聘会门票设置
   updateTicketSettings: async (data: any) => {
     return await request.post({ url: `/menduner/system/job-fair/update/admission`, data })

+ 0 - 40
src/views/menduner/system/jobFair/manage/details/index.vue

@@ -1,10 +1,6 @@
 <template>
   <ContentWrap v-if="id">
     <CardTitle fontSize="16" :title="jobFairInfo.title?.replace(/<\/?p[^>]*>/gi, '')" />
-    <div class="mt-20px text-right">
-      <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>
-    </div>
   </ContentWrap>
 
   <ContentWrap v-if="!id || (jobFairInfo && Object.keys(jobFairInfo).length > 0)">
@@ -28,17 +24,13 @@
 <script setup lang="ts">
 /** 招聘会 详情 */
 defineOptions({ name: 'JobFairDetails' })
-import download from '@/utils/download'
 import { JobFairManageApi } from '@/api/menduner/system/jobFair/manage'
-import { JobFairWhiteApi } from '@/api/menduner/system/jobFair/white'
-import { EnterpriseUserBindApi } from '@/api/menduner/system/enterprise/userBind'
 import TicketSettings from './components/TicketSettings.vue'
 import WhiteList from './components/WhiteList.vue'
 import InfoSettings from './components/InfoSettings.vue'
 import Category from './components/Category.vue'
 import { useTagsViewStore } from '@/store/modules/tagsView'
 
-const message = useMessage() // 消息弹窗
 const activeName = ref('infoSettings') // 当前激活的tab
 
 /* 查询招聘会详情 */
@@ -66,38 +58,6 @@ const handleClose = () => {
   push({ path: '/job-fair/manage' })
 }
 
-const exportLoading = ref(false)
-/** 导出按钮操作 */
-const handleExport = async () => {
-  try {
-    // 导出的二次确认
-    await message.exportConfirm()
-    // 发起导出
-    exportLoading.value = true
-    const data = await JobFairWhiteApi.exportJobFairWhiteList(id)
-    download.excel(data, '招聘会职位列表.xls')
-  } catch {
-  } finally {
-    exportLoading.value = false
-  }
-}
-
-// 招聘会投递情况导出
-const exportDeliveryLoading = ref(false)
-const handleExportDelivery = async () => {
-  try {
-    // 导出的二次确认
-    await message.exportConfirm()
-    // 发起导出
-    exportDeliveryLoading.value = true
-    const data = await JobFairWhiteApi.exportJobFairApplyData(id)
-    download.excel(data, '招聘会职位投递情况.xls')
-  } catch {
-  } finally {
-    exportDeliveryLoading.value = false
-  }
-}
-
 /** 初始化 */
 const route = useRoute()
 const { id } = route.params

+ 38 - 0
src/views/menduner/system/jobFair/manage/statistics/index.vue

@@ -69,6 +69,8 @@
         <el-form-item>
           <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" :loading="exportJobLoading" plain @click="handleExportJob"><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-form-item>
       </el-form>
     </ContentWrap>
@@ -126,6 +128,8 @@ import ComparisonCard from './components/ComparisonCard.vue'
 import { formatName } from '@/utils'
 import { timesTampChange } from '@/utils/transform/date'
 import { DICT_TYPE, getDictLabel } from '@/utils/dict'
+import { JobFairWhiteApi } from '@/api/menduner/system/jobFair/white'
+import download from '@/utils/download'
 
 const route = useRoute() // 路由信息
 const { id } = route.params
@@ -136,6 +140,7 @@ const currentItem = ref({})
 const tableData = ref([])
 const showDialog = ref(false)
 const total = ref(0)
+const message = useMessage() // 消息弹窗
 const page = reactive({ pageNo: 1, pageSize: 10 })
 
 const queryFormRef = ref()
@@ -258,6 +263,39 @@ const dealTableData = () => {
   }
 }
 
+const exportLoading = ref(false)
+/** 导出按钮操作 */
+const handleExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await JobFairManageApi.exportDelivery({ ...queryParams, pageNo: 1 })
+    download.excel(data, '用户投递列表.xls')
+  } catch {
+    exportLoading.value = false
+  } finally {
+    exportLoading.value = false
+  }
+}
+
+const exportJobLoading = ref(false)
+/** 导出按钮操作 */
+const handleExportJob = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await JobFairWhiteApi.exportJobFairWhiteList(id)
+    download.excel(data, '招聘会职位列表.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 const getList = async (typeName, details = '') => {
   loading.value = true
   try {