|
@@ -1,8 +1,5 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <div class="text-end">
|
|
|
|
- <v-btn v-if="tab === 1" color="primary" :disabled="selected.length ? false : true" variant="tonal" @click="handleAction('all', 0)">入职</v-btn>
|
|
|
|
- </div>
|
|
|
|
<v-data-table
|
|
<v-data-table
|
|
class="mt-3"
|
|
class="mt-3"
|
|
v-model="selected"
|
|
v-model="selected"
|
|
@@ -30,15 +27,20 @@
|
|
<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="handlePreviewResume(item)">查看附件</v-btn>
|
|
<v-btn color="primary" variant="text" @click="handlePreviewResume(item)">查看附件</v-btn>
|
|
|
|
+ <v-btn color="primary" variant="text" @click="handleInterviewInvite(item)">邀请面试</v-btn>
|
|
</div>
|
|
</div>
|
|
<v-btn v-if="tab === 0 || tab === 1" color="primary" variant="text" @click="handleEliminate(item)">不合适</v-btn>
|
|
<v-btn v-if="tab === 0 || tab === 1" color="primary" variant="text" @click="handleEliminate(item)">不合适</v-btn>
|
|
<div v-if="tab === 1">
|
|
<div v-if="tab === 1">
|
|
- <!-- <v-btn color="primary" variant="text" @click="handleInterviewInvite(item)">邀请面试</v-btn> -->
|
|
|
|
- <v-btn color="primary" variant="text" @click="handleAction('', 0, item)">入职</v-btn>
|
|
|
|
|
|
+ <v-btn color="primary" variant="text" @click="handleEnterByEnterprise(item)">入职</v-btn>
|
|
</div>
|
|
</div>
|
|
- <v-btn v-if="tab === 4" color="primary" variant="text" @click="handleCancelEliminate(item)">取消不合适</v-btn>
|
|
|
|
|
|
+ <v-btn v-if="tab === 3" color="primary" variant="text" @click="handleCancelEliminate(item)">取消不合适</v-btn>
|
|
</template>
|
|
</template>
|
|
</v-data-table>
|
|
</v-data-table>
|
|
|
|
+
|
|
|
|
+ <!-- 邀请面试 -->
|
|
|
|
+ <CtDialog :visible="showInvite" :widthType="2" titleClass="text-h6" title="面试信息" @close="handleEditClose" @submit="handleEditSubmit">
|
|
|
|
+ <InvitePage v-if="showInvite" ref="inviteRef" :itemData="itemData"></InvitePage>
|
|
|
|
+ </CtDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -47,14 +49,17 @@ defineOptions({ name: 'table-page'})
|
|
import { ref, computed, watch } from 'vue'
|
|
import { ref, computed, watch } from 'vue'
|
|
import { previewFile } from '@/utils'
|
|
import { previewFile } from '@/utils'
|
|
import { personJobCvLook, joinEliminate, personEntryByEnterprise, personCvUnfitCancel } from '@/api/recruit/enterprise/personnel'
|
|
import { personJobCvLook, joinEliminate, personEntryByEnterprise, personCvUnfitCancel } from '@/api/recruit/enterprise/personnel'
|
|
|
|
+import { saveInterviewInvite } from '@/api/recruit/enterprise/interview'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
+import InvitePage from './invite.vue'
|
|
|
|
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
const emit = defineEmits(['refresh'])
|
|
const emit = defineEmits(['refresh'])
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
tab: Number,
|
|
tab: Number,
|
|
- items: Array
|
|
|
|
|
|
+ items: Array,
|
|
|
|
+ statusList: Array
|
|
})
|
|
})
|
|
const badgeColor = computed(() => (item) => {
|
|
const badgeColor = computed(() => (item) => {
|
|
return (item.person && item.person.sex) ? (item.person.sex === '1' ? '#1867c0' : 'error') : 'error'
|
|
return (item.person && item.person.sex) ? (item.person.sex === '1' ? '#1867c0' : 'error') : 'error'
|
|
@@ -64,6 +69,8 @@ const badgeIcon = computed(() => (item) => {
|
|
return (item.person && item.person.sex) ? (item.person.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'
|
|
return (item.person && item.person.sex) ? (item.person.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+const inviteRef = ref()
|
|
|
|
+const showInvite = ref(false)
|
|
const selected = ref([])
|
|
const selected = ref([])
|
|
const headers = ref([
|
|
const headers = ref([
|
|
{ title: '姓名', value: 'name', sortable: false },
|
|
{ title: '姓名', value: 'name', sortable: false },
|
|
@@ -72,20 +79,21 @@ 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: 'status', sortable: false, value: item => item.status ? props.statusList.find(i => i.value === item.status).label : '' },
|
|
{ title: '操作', value: 'actions', sortable: false }
|
|
{ title: '操作', value: 'actions', sortable: false }
|
|
])
|
|
])
|
|
const unfit = { title: '类型', key: 'unfitType', sortable: false, value: item => item.type === '0' ? '简历不合适' : '面试不合适' }
|
|
const unfit = { title: '类型', key: 'unfitType', sortable: false, value: item => item.type === '0' ? '简历不合适' : '面试不合适' }
|
|
const delivery = { title: '类型', key: 'deliveryType', sortable: false, value: item => item.status === '0' ? '新投递' : '已查看' }
|
|
const delivery = { title: '类型', key: 'deliveryType', sortable: false, value: item => item.status === '0' ? '新投递' : '已查看' }
|
|
|
|
|
|
-const list = [0, 4]
|
|
|
|
|
|
+const list = [0, 3]
|
|
watch(
|
|
watch(
|
|
() => props.tab,
|
|
() => props.tab,
|
|
(val) => {
|
|
(val) => {
|
|
if (list.indexOf(val) !== -1) {
|
|
if (list.indexOf(val) !== -1) {
|
|
headers.value.splice(-1, 0, val === 0 ? delivery : unfit)
|
|
headers.value.splice(-1, 0, val === 0 ? delivery : unfit)
|
|
} else {
|
|
} else {
|
|
- const index = headers.value.findIndex(item => item.key === val === 0 ? 'deliveryType' : 'unfitType')
|
|
|
|
- if (index > -1) headers.value.splice(index, 1)
|
|
|
|
|
|
+ const index = headers.value.indexOf(item => item.key === val === 0 ? 'deliveryType' : 'unfitType')
|
|
|
|
+ if (index !== -1) headers.value.splice(index, 1)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
@@ -97,15 +105,10 @@ const handleToPersonDetail = ({ userId, id }) => {
|
|
window.open(`/recruit/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
window.open(`/recruit/enterprise/talentPool/details/${userId}?id=${id}`)
|
|
}
|
|
}
|
|
|
|
|
|
-const apiList = [
|
|
|
|
- personEntryByEnterprise // 入职
|
|
|
|
-]
|
|
|
|
-
|
|
|
|
// 入职
|
|
// 入职
|
|
-const handleAction = async (type, index, item) => {
|
|
|
|
- const ids = type ? selected.value : [item?.id]
|
|
|
|
- if (!ids) return
|
|
|
|
- await apiList[index](ids)
|
|
|
|
|
|
+const handleEnterByEnterprise = async (item) => {
|
|
|
|
+ if (!item.id) return
|
|
|
|
+ await personEntryByEnterprise(item.id)
|
|
Snackbar.success(t('common.operationSuccessful'))
|
|
Snackbar.success(t('common.operationSuccessful'))
|
|
emit('refresh')
|
|
emit('refresh')
|
|
}
|
|
}
|
|
@@ -139,9 +142,28 @@ const handlePreviewResume = async ({ url, id }) => {
|
|
previewFile(url)
|
|
previewFile(url)
|
|
}
|
|
}
|
|
|
|
|
|
-// const handleInterviewInvite = (item) => {
|
|
|
|
-// console.log(item, 'item')
|
|
|
|
-// }
|
|
|
|
|
|
+// 邀请面试
|
|
|
|
+const itemData = ref({})
|
|
|
|
+const handleInterviewInvite = (item) => {
|
|
|
|
+ itemData.value = item
|
|
|
|
+ showInvite.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleEditClose = () => {
|
|
|
|
+ showInvite.value = false
|
|
|
|
+ itemData.value = {}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleEditSubmit = async () => {
|
|
|
|
+ const { valid } = await inviteRef.value.CtFormRef.formRef.validate()
|
|
|
|
+ if (!valid) return
|
|
|
|
+ const query = inviteRef.value.getQuery()
|
|
|
|
+ if (!query?.time) return Snackbar.warning('请选择面试时间')
|
|
|
|
+ await saveInterviewInvite(query)
|
|
|
|
+ Snackbar.success(t('common.operationSuccessful'))
|
|
|
|
+ handleEditClose()
|
|
|
|
+ emit('refresh')
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -149,7 +171,6 @@ const handlePreviewResume = async ({ url, id }) => {
|
|
background-color: #f7f8fa !important;
|
|
background-color: #f7f8fa !important;
|
|
}
|
|
}
|
|
:deep(.v-selection-control__input) {
|
|
:deep(.v-selection-control__input) {
|
|
- // color: var(--v-primary-base) !important;
|
|
|
|
- color: #767778;
|
|
|
|
|
|
+ color: var(--v-primary-base) !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|