|
@@ -14,10 +14,13 @@
|
|
|
<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="success" plain @click="queryParams.pageNo = 1, getList()"><Icon icon="ep:refresh" class="mr-5px" />刷新</el-button>
|
|
|
+ <el-button type="success" plain @click="queryParams.pageNo = 1, getList()"><Icon icon="ep:refresh" class="mr-5px" />刷新</el-button>
|
|
|
+ <el-button type="primary" plain :disabled="!selectData || !selectData.length" @click="handleRemove">一键移出白名单</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table v-loading="loading" :data="list" :stripe="true">
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="list" :stripe="true" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
<el-table-column label="企业全称" align="center" prop="name">
|
|
|
<template #default="scope">{{ formatName(scope.row.enterprise.name) }}</template>
|
|
|
</el-table-column>
|
|
@@ -71,6 +74,7 @@ const queryParams = ref({
|
|
|
name: undefined,
|
|
|
jobFairId: undefined
|
|
|
})
|
|
|
+const selectData = ref([])
|
|
|
|
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
@@ -84,6 +88,10 @@ const getList = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const handleSelectionChange = (data) => {
|
|
|
+ selectData.value = data
|
|
|
+}
|
|
|
+
|
|
|
const handleQuery = () => {
|
|
|
total.value = 0
|
|
|
list.value = []
|
|
@@ -114,6 +122,15 @@ const handleRemoveWhiteList = async (enterpriseName: string, enterpriseId: strin
|
|
|
} catch (err) {}
|
|
|
}
|
|
|
|
|
|
+// 一键移出白名单
|
|
|
+const handleRemove = () => {
|
|
|
+ if (!selectData.value || selectData.value.length === 0) return message.warning('请选择要移出的企业')
|
|
|
+ const enterpriseIds = selectData.value.map(item => item.enterpriseId).join(',')
|
|
|
+ const enterpriseNames = selectData.value.map(item => formatName(item.enterprise.anotherName || item.enterprise.name)).join(',')
|
|
|
+
|
|
|
+ handleRemoveWhiteList(enterpriseNames, enterpriseIds)
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
if (props.info && Object.keys(props.info).length > 0) {
|
|
|
queryParams.value.jobFairId = props.info.id
|