|
@@ -1,9 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <!-- <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 class="text-end">
|
|
|
|
+ <v-btn v-if="tab === '2'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 0, {})">不合适</v-btn>
|
|
|
|
+ <v-btn v-if="tab === '3'" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 1, {})">入职</v-btn>
|
|
|
|
+ </div>
|
|
<v-data-table
|
|
<v-data-table
|
|
class="mt-3"
|
|
class="mt-3"
|
|
v-model="selected"
|
|
v-model="selected"
|
|
@@ -29,13 +29,10 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template v-slot:item.actions="{ item }">
|
|
<template v-slot:item.actions="{ item }">
|
|
- <!-- <div v-if="tab === '0'">
|
|
|
|
- <v-btn color="primary" variant="text" @click="previewFile(item.url)">查看简历</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> -->
|
|
|
|
|
|
+ <v-btn v-if="tab === '0' && item.url" color="primary" variant="text" @click="previewFile(item.url)">查看简历</v-btn>
|
|
|
|
+ <v-btn v-if="tab === '2'" color="primary" variant="text" @click="handleAction('', 0, item)">不合适</v-btn>
|
|
|
|
+ <v-btn v-if="tab === '3'" color="primary" variant="text" @click="handleAction('', 1, item)">入职</v-btn>
|
|
|
|
+ <v-btn v-if="tab === '4'" color="primary" variant="text" @click="handleSettlement(item)">结算</v-btn>
|
|
</template>
|
|
</template>
|
|
</v-data-table>
|
|
</v-data-table>
|
|
</div>
|
|
</div>
|
|
@@ -44,12 +41,13 @@
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'table-page'})
|
|
defineOptions({ name: 'table-page'})
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
-// import { previewFile } from '@/utils'
|
|
|
|
-// import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
-// import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
+import { hireJobCvRelEntry, hireJobCvRelEliminate, hireJobCvRelSettlement } from '@/api/recruit/public/delivery'
|
|
|
|
+import { previewFile } from '@/utils'
|
|
|
|
+import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
+import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
-// const { t } = useI18n()
|
|
|
|
-// const emit = defineEmits(['refresh'])
|
|
|
|
|
|
+const { t } = useI18n()
|
|
|
|
+const emit = defineEmits(['refresh'])
|
|
defineProps({
|
|
defineProps({
|
|
tab: String,
|
|
tab: String,
|
|
items: Array
|
|
items: Array
|
|
@@ -70,7 +68,7 @@ const headers = ref([
|
|
{ title: '工作经验', key: 'person.expName', sortable: false },
|
|
{ title: '工作经验', key: 'person.expName', sortable: false },
|
|
{ title: '最高学历', key: 'person.eduName', sortable: false },
|
|
{ title: '最高学历', key: 'person.eduName', sortable: false },
|
|
{ title: '岗位薪资', key: 'job', value: item => `${item.job.payFrom}-${item.job.payTo}/${item.job.payName}`, sortable: false },
|
|
{ title: '岗位薪资', key: 'job', value: item => `${item.job.payFrom}-${item.job.payTo}/${item.job.payName}`, sortable: false },
|
|
- { title: '结果反馈', key: '' },
|
|
|
|
|
|
+ { title: '结果反馈', key: '', sortable: false },
|
|
{ title: '操作', value: 'actions' }
|
|
{ title: '操作', value: 'actions' }
|
|
])
|
|
])
|
|
|
|
|
|
@@ -80,19 +78,27 @@ const handleToPersonDetail = ({ userId, id }) => {
|
|
window.open(`/recruit/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
window.open(`/recruit/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
}
|
|
}
|
|
|
|
|
|
-// const apiList = [
|
|
|
|
-// joinEliminate, // 不合适
|
|
|
|
-// personEntryByEnterprise // 入职
|
|
|
|
-// ]
|
|
|
|
|
|
+const apiList = [
|
|
|
|
+ hireJobCvRelEliminate, // 不合适
|
|
|
|
+ hireJobCvRelEntry // 入职
|
|
|
|
+]
|
|
|
|
|
|
// 不合适、入职
|
|
// 不合适、入职
|
|
-// const handleAction = async (type, index, item) => {
|
|
|
|
-// const ids = type ? selected.value : [item?.id]
|
|
|
|
-// if (!ids) return
|
|
|
|
-// await apiList[index](ids)
|
|
|
|
-// Snackbar.success(t('common.operationSuccessful'))
|
|
|
|
-// emit('refresh')
|
|
|
|
-// }
|
|
|
|
|
|
+const handleAction = async (type, index, item) => {
|
|
|
|
+ const ids = type ? selected.value : [item?.id]
|
|
|
|
+ if (!ids) return
|
|
|
|
+ await apiList[index](ids)
|
|
|
|
+ Snackbar.success(t('common.operationSuccessful'))
|
|
|
|
+ emit('refresh')
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 结算
|
|
|
|
+const handleSettlement = async (item) => {
|
|
|
|
+ if (!item.id) return
|
|
|
|
+ await hireJobCvRelSettlement(item.id)
|
|
|
|
+ Snackbar.success(t('common.operationSuccessful'))
|
|
|
|
+ emit('refresh')
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|