|  | @@ -1,7 +1,7 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <ContentWrap>
 | 
	
		
			
				|  |  |      <!-- 搜索工作栏 -->
 | 
	
		
			
				|  |  | -    <CardTitle :title="jobFairInfo.title?.replace(/<\/?p[^>]*>/gi, '')" />
 | 
	
		
			
				|  |  | +    <CardTitle fontSize="16" :title="jobFairInfo.title?.replace(/<\/?p[^>]*>/gi, '')" />
 | 
	
		
			
				|  |  |      <el-form
 | 
	
		
			
				|  |  |        class="-mb-15px m-t-20px"
 | 
	
		
			
				|  |  |        :model="queryParams"
 | 
	
	
		
			
				|  | @@ -16,7 +16,6 @@
 | 
	
		
			
				|  |  |        <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 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>
 | 
	
	
		
			
				|  | @@ -25,25 +24,51 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    <!-- 列表 -->
 | 
	
		
			
				|  |  |    <ContentWrap>
 | 
	
		
			
				|  |  | -    <el-table v-loading="loading" :data="list" :stripe="true">
 | 
	
		
			
				|  |  | -      <el-table-column label="企业全称" align="center" prop="name">
 | 
	
		
			
				|  |  | -        <template #default="scope">{{ formatName(scope.row.enterprise.name) }}</template>
 | 
	
		
			
				|  |  | -      </el-table-column>
 | 
	
		
			
				|  |  | -      <el-table-column label="企业别称" align="center" prop="anotherName">
 | 
	
		
			
				|  |  | -        <template #default="scope">{{ formatName(scope.row.enterprise.anotherName) }}</template>
 | 
	
		
			
				|  |  | -      </el-table-column>
 | 
	
		
			
				|  |  | -      <el-table-column label="操作" align="center">
 | 
	
		
			
				|  |  | -        <template #default="scope">
 | 
	
		
			
				|  |  | -          <el-button
 | 
	
		
			
				|  |  | -            link
 | 
	
		
			
				|  |  | -            type="primary"
 | 
	
		
			
				|  |  | -            @click="handleRemoveWhiteList(formatName(scope.row.enterprise.anotherName || scope.row.enterprise.name), scope.row.enterpriseId)"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -            移出白名单
 | 
	
		
			
				|  |  | -          </el-button>
 | 
	
		
			
				|  |  | -        </template>
 | 
	
		
			
				|  |  | -      </el-table-column>
 | 
	
		
			
				|  |  | -    </el-table>
 | 
	
		
			
				|  |  | +    <el-tabs v-model="activeName" @tab-change="handleClick">
 | 
	
		
			
				|  |  | +      <el-tab-pane label="白名单" name="whiteList">
 | 
	
		
			
				|  |  | +        <div class="text-right">
 | 
	
		
			
				|  |  | +          <el-button type="primary" plain @click="handleAdd"><Icon icon="ep:plus" class="mr-5px" /> 新增</el-button>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  | +        <el-table v-loading="loading" :data="list" :stripe="true">
 | 
	
		
			
				|  |  | +          <el-table-column label="企业全称" align="center" prop="name">
 | 
	
		
			
				|  |  | +            <template #default="scope">{{ formatName(scope.row.enterprise.name) }}</template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column label="企业别称" align="center" prop="anotherName">
 | 
	
		
			
				|  |  | +            <template #default="scope">{{ formatName(scope.row.enterprise.anotherName) }}</template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column label="操作" align="center">
 | 
	
		
			
				|  |  | +            <template #default="scope">
 | 
	
		
			
				|  |  | +              <el-button
 | 
	
		
			
				|  |  | +                link
 | 
	
		
			
				|  |  | +                type="primary"
 | 
	
		
			
				|  |  | +                @click="handleRemoveWhiteList(formatName(scope.row.enterprise.anotherName || scope.row.enterprise.name), scope.row.enterpriseId)"
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  | +                移出白名单
 | 
	
		
			
				|  |  | +              </el-button>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +        </el-table>
 | 
	
		
			
				|  |  | +      </el-tab-pane>
 | 
	
		
			
				|  |  | +      <el-tab-pane label="购买门票企业" name="ticketEntList">
 | 
	
		
			
				|  |  | +        <el-table v-loading="loading" :data="list" :stripe="true">
 | 
	
		
			
				|  |  | +          <el-table-column label="企业全称" align="center" prop="name">
 | 
	
		
			
				|  |  | +            <template #default="scope">{{ formatName(scope.row.enterprise.name) }}</template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column label="企业别称" align="center" prop="anotherName">
 | 
	
		
			
				|  |  | +            <template #default="scope">{{ formatName(scope.row.enterprise.anotherName) }}</template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column label="操作" align="center">
 | 
	
		
			
				|  |  | +            <template #default="scope">
 | 
	
		
			
				|  |  | +              <el-button v-if="scope.row.status === '1'" link type="primary" @click="handleEnableRights(formatName(scope.row.enterprise.anotherName || scope.row.enterprise.name), scope.row.id)">
 | 
	
		
			
				|  |  | +                开启权益
 | 
	
		
			
				|  |  | +              </el-button>
 | 
	
		
			
				|  |  | +              <el-button v-if="scope.row.status === '0'" link type="danger" @click="handleDisableRights(formatName(scope.row.enterprise.anotherName || scope.row.enterprise.name), scope.row.id)">禁用权益</el-button>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +        </el-table>
 | 
	
		
			
				|  |  | +      </el-tab-pane>
 | 
	
		
			
				|  |  | +    </el-tabs>
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  |      <Pagination
 | 
	
		
			
				|  |  |        :total="total"
 | 
	
		
			
				|  |  |        v-model:page="queryParams.pageNo"
 | 
	
	
		
			
				|  | @@ -70,6 +95,7 @@ defineOptions({ name: 'JobFairDetails' })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const message = useMessage() // 消息弹窗
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +const activeName = ref('whiteList')
 | 
	
		
			
				|  |  |  const loading = ref(true) // 列表的加载中
 | 
	
		
			
				|  |  |  const list = ref([]) // 列表的数据
 | 
	
		
			
				|  |  |  const total = ref(0)
 | 
	
	
		
			
				|  | @@ -83,8 +109,9 @@ const queryParams = ref({
 | 
	
		
			
				|  |  |  /** 查询列表 */
 | 
	
		
			
				|  |  |  const getList = async () => {
 | 
	
		
			
				|  |  |    loading.value = true
 | 
	
		
			
				|  |  | +  const api = activeName.value === 'whiteList' ? JobFairWhiteApi.getJobFairWhiteList : JobFairManageApi.getBuyTicketEnterprise
 | 
	
		
			
				|  |  |    try {
 | 
	
		
			
				|  |  | -    const data = await JobFairWhiteApi.getJobFairWhiteList(queryParams.value)
 | 
	
		
			
				|  |  | +    const data = await api(queryParams.value)
 | 
	
		
			
				|  |  |      total.value = data.total
 | 
	
		
			
				|  |  |      list.value = data.list
 | 
	
		
			
				|  |  |    } finally {
 | 
	
	
		
			
				|  | @@ -92,6 +119,13 @@ const getList = async () => {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +const handleClick = () => {
 | 
	
		
			
				|  |  | +  total.value = 0
 | 
	
		
			
				|  |  | +  list.value = []
 | 
	
		
			
				|  |  | +  queryParams.value.pageNo = 1
 | 
	
		
			
				|  |  | +  getList()
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /* 查询招聘会详情 */
 | 
	
		
			
				|  |  |  const jobFairInfo = ref({})
 | 
	
		
			
				|  |  |  const getJobFairDetail = async () => {
 | 
	
	
		
			
				|  | @@ -102,6 +136,8 @@ const getJobFairDetail = async () => {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const handleQuery = () => {
 | 
	
		
			
				|  |  | +  total.value = 0
 | 
	
		
			
				|  |  | +  list.value = []
 | 
	
		
			
				|  |  |    queryParams.value.pageNo = 1
 | 
	
		
			
				|  |  |    getList()
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -129,6 +165,28 @@ const handleRemoveWhiteList = async (enterpriseName: string, enterpriseId: strin
 | 
	
		
			
				|  |  |    } catch (err) {}
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +// 开启权益
 | 
	
		
			
				|  |  | +const handleEnableRights = async (enterpriseName: string, id: string) => {
 | 
	
		
			
				|  |  | +  if (!id) return message.warning('操作失败,请刷新页面重试')
 | 
	
		
			
				|  |  | +  try {
 | 
	
		
			
				|  |  | +    await message.confirm(`是否确定开启【${formatName(enterpriseName)}】的招聘会权益?`)
 | 
	
		
			
				|  |  | +    await JobFairManageApi.enableTicketRights(id)
 | 
	
		
			
				|  |  | +    message.success('开启成功')
 | 
	
		
			
				|  |  | +    getList()
 | 
	
		
			
				|  |  | +  } catch (err) {}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +// 关闭权益
 | 
	
		
			
				|  |  | +const handleDisableRights = async (enterpriseName: string, id: string) => {
 | 
	
		
			
				|  |  | +  if (!id) return message.warning('操作失败,请刷新页面重试')
 | 
	
		
			
				|  |  | +  try {
 | 
	
		
			
				|  |  | +    await message.confirm(`是否确定禁用【${formatName(enterpriseName)}】的招聘会权益?`)
 | 
	
		
			
				|  |  | +    await JobFairManageApi.disableTicketRights(id)
 | 
	
		
			
				|  |  | +    message.success('禁用成功')
 | 
	
		
			
				|  |  | +    getList()
 | 
	
		
			
				|  |  | +  } catch (err) {}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  const exportLoading = ref(false)
 | 
	
		
			
				|  |  |  /** 导出按钮操作 */
 | 
	
		
			
				|  |  |  const handleExport = async () => {
 |