|
@@ -1,7 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <div class="text-end" v-if="tab === '0'">
|
|
|
|
- <v-btn color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleJoinEliminate('all')">不合适</v-btn>
|
|
|
|
|
|
+ <div class="text-end">
|
|
|
|
+ <v-btn v-if="tab === '0'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 0)">不合适</v-btn>
|
|
|
|
+ <v-btn v-if="tab === '1'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 1)">入职</v-btn>
|
|
</div>
|
|
</div>
|
|
<v-data-table
|
|
<v-data-table
|
|
class="mt-3"
|
|
class="mt-3"
|
|
@@ -27,17 +28,20 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template v-slot:item.exp="{ item }">
|
|
<template v-slot:item.exp="{ item }">
|
|
- <span v-if="Object.keys(item?.jobExperience)">{{ item.jobExperience.positionName }} {{ item.jobExperience.enterpriseName }}</span>
|
|
|
|
|
|
+ <span v-if="item?.jobExperience && Object.keys(item?.jobExperience).length">{{ item.jobExperience.positionName }} {{ item.jobExperience.enterpriseName }}</span>
|
|
<span v-else>未填写工作经历</span>
|
|
<span v-else>未填写工作经历</span>
|
|
</template>
|
|
</template>
|
|
<template v-slot:item.edu="{ item }">
|
|
<template v-slot:item.edu="{ item }">
|
|
- <span v-if="Object.keys(item?.eduExperience)">{{ timesTampChange(item.eduExperience.startTime).slice(0, 4) }}-{{ timesTampChange(item.eduExperience.endTime).slice(0, 4) }} {{ item.eduExperience.schoolName }}</span>
|
|
|
|
- <span v-else></span>
|
|
|
|
|
|
+ <span v-if="item?.eduExperience && Object.keys(item?.eduExperience).length">{{ timesTampChange(item.eduExperience.startTime).slice(0, 4) }}-{{ timesTampChange(item.eduExperience.endTime).slice(0, 4) }} {{ item.eduExperience.schoolName }}</span>
|
|
|
|
+ <span v-else>未填写教育经历</span>
|
|
</template>
|
|
</template>
|
|
<template v-slot:item.actions="{ item }">
|
|
<template v-slot:item.actions="{ item }">
|
|
<div v-if="tab === '0'">
|
|
<div v-if="tab === '0'">
|
|
<v-btn color="primary" variant="text" @click="previewFile(item.url)">查看简历</v-btn>
|
|
<v-btn color="primary" variant="text" @click="previewFile(item.url)">查看简历</v-btn>
|
|
- <v-btn color="primary" variant="text" @click="handleJoinEliminate('', item)">不合适</v-btn>
|
|
|
|
|
|
+ <v-btn color="primary" variant="text" @click="handleAction('', 0, item)">不合适</v-btn>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="tab === '1'">
|
|
|
|
+ <v-btn color="primary" variant="text" @click="handleAction('', 1, item)">入职</v-btn>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</v-data-table>
|
|
</v-data-table>
|
|
@@ -49,7 +53,7 @@ defineOptions({ name: 'table-page'})
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
import { previewFile } from '@/utils'
|
|
import { previewFile } from '@/utils'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
-import { joinEliminate } from '@/api/enterprise'
|
|
|
|
|
|
+import { joinEliminate, personEntryByEnterprise } from '@/api/enterprise'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
@@ -84,11 +88,16 @@ const handleToPersonDetail = ({ userId, id }) => {
|
|
window.open(`/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
window.open(`/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
}
|
|
}
|
|
|
|
|
|
-// 不合适
|
|
|
|
-const handleJoinEliminate = async (type, item) => {
|
|
|
|
|
|
+const apiList = [
|
|
|
|
+ joinEliminate, // 不合适
|
|
|
|
+ personEntryByEnterprise // 入职
|
|
|
|
+]
|
|
|
|
+
|
|
|
|
+// 不合适、入职
|
|
|
|
+const handleAction = async (type, index, item) => {
|
|
const ids = type ? selected.value : [item?.id]
|
|
const ids = type ? selected.value : [item?.id]
|
|
if (!ids) return
|
|
if (!ids) return
|
|
- await joinEliminate(ids)
|
|
|
|
|
|
+ await apiList[index](ids)
|
|
Snackbar.success(t('common.operationSuccessful'))
|
|
Snackbar.success(t('common.operationSuccessful'))
|
|
emit('refresh')
|
|
emit('refresh')
|
|
}
|
|
}
|