|
@@ -0,0 +1,161 @@
|
|
|
|
+<template>
|
|
|
|
+ <ContentWrap>
|
|
|
|
+ <!-- 搜索工作栏 -->
|
|
|
|
+ <CardTitle :title="jobFairInfo.title" />
|
|
|
|
+ <el-form
|
|
|
|
+ class="-mb-15px m-t-20px"
|
|
|
|
+ :model="queryParams"
|
|
|
|
+ ref="queryFormRef"
|
|
|
|
+ :inline="true"
|
|
|
|
+ label-width="68px"
|
|
|
|
+ @submit.prevent
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="企业名称" prop="name">
|
|
|
|
+ <el-input v-model="queryParams.name" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <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" 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>
|
|
|
|
+
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <ContentWrap>
|
|
|
|
+ <el-table v-loading="loading" :data="list" :stripe="true">
|
|
|
|
+ <el-table-column label="招聘会标题" align="center" prop="jobFair.title">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <div v-html="scope.row.jobFair.title"></div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="企业名称" align="center" prop="name" />
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="handleRemoveWhiteList(scope.row.name)"
|
|
|
|
+ >
|
|
|
|
+ 移出白名单
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <Pagination
|
|
|
|
+ :total="total"
|
|
|
|
+ v-model:page="queryParams.pageNo"
|
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+ </ContentWrap>
|
|
|
|
+
|
|
|
|
+ <!-- 表单弹窗:添加/修改 -->
|
|
|
|
+ <JobFairForm ref="formRef" @success="getList" />
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup lang="ts">
|
|
|
|
+import { JobFairWhiteApi } from '@/api/menduner/system/jobFair/white'
|
|
|
|
+import JobFairForm from './jobFairForm.vue'
|
|
|
|
+import download from '@/utils/download'
|
|
|
|
+import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
|
+import { JobFairManageApi } from '@/api/menduner/system/jobFair/manage'
|
|
|
|
+
|
|
|
|
+/** 招聘会 列表 */
|
|
|
|
+defineOptions({ name: 'JobFairDetails' })
|
|
|
|
+
|
|
|
|
+const message = useMessage() // 消息弹窗
|
|
|
|
+
|
|
|
|
+const loading = ref(true) // 列表的加载中
|
|
|
|
+const list = ref([]) // 列表的数据
|
|
|
|
+const total = ref(0)
|
|
|
|
+const queryParams = ref({
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ name: undefined,
|
|
|
|
+ jobFairId: ''
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+/** 查询列表 */
|
|
|
|
+const getList = async () => {
|
|
|
|
+ loading.value = true
|
|
|
|
+ try {
|
|
|
|
+ const data = await JobFairWhiteApi.getJobFairWhiteList(queryParams.value)
|
|
|
|
+ total.value = data.total
|
|
|
|
+ list.value = data.list
|
|
|
|
+ } finally {
|
|
|
|
+ loading.value = false
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 查询招聘会详情 */
|
|
|
|
+const jobFairInfo = ref({})
|
|
|
|
+const getJobFairDetail = async () => {
|
|
|
|
+ try {
|
|
|
|
+ const data = await JobFairManageApi.getJobFair(queryParams.value.jobFairId)
|
|
|
|
+ jobFairInfo.value = data
|
|
|
|
+ } catch {}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleQuery = () => {
|
|
|
|
+ queryParams.value.pageNo = 1
|
|
|
|
+ getList()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 重置按钮操作 */
|
|
|
|
+const queryFormRef = ref()
|
|
|
|
+const resetQuery = () => {
|
|
|
|
+ queryFormRef.value.resetFields()
|
|
|
|
+ handleQuery()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const formRef = ref()
|
|
|
|
+const handleAdd = () => {
|
|
|
|
+ formRef.value.open(queryParams.value.jobFairId)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 移出白名单
|
|
|
|
+const handleRemoveWhiteList = async (enterpriseName: string) => {
|
|
|
|
+ try {
|
|
|
|
+ await message.confirm(`确定要将【${enterpriseName}】移出白名单吗?`)
|
|
|
|
+ await JobFairWhiteApi.removeJobFairWhiteList({ enterpriseName, jobFairId: queryParams.value.jobFairId })
|
|
|
|
+ message.success('移出成功')
|
|
|
|
+ getList()
|
|
|
|
+ } 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(queryParams.value.jobFairId)
|
|
|
|
+ download.excel(data, '招聘会职位列表.xls')
|
|
|
|
+ } catch {
|
|
|
|
+ } finally {
|
|
|
|
+ exportLoading.value = false
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 初始化 */
|
|
|
|
+const { currentRoute } = useRouter() // 路由
|
|
|
|
+const { delView } = useTagsViewStore() // 视图操作
|
|
|
|
+const route = useRoute()
|
|
|
|
+const { id } = route.params
|
|
|
|
+onMounted(() => {
|
|
|
|
+ if (!id) {
|
|
|
|
+ ElMessage.warning('参数错误,招聘会编号不能为空!')
|
|
|
|
+ delView(unref(currentRoute))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ queryParams.value.jobFairId = id
|
|
|
|
+ getList()
|
|
|
|
+ getJobFairDetail()
|
|
|
|
+})
|
|
|
|
+</script>
|