|
@@ -30,6 +30,9 @@
|
|
</template>
|
|
</template>
|
|
<template #actions="{ item }">
|
|
<template #actions="{ item }">
|
|
<v-btn variant="text" color="primary" @click.stop="handleDetail(item)">详 情</v-btn>
|
|
<v-btn variant="text" color="primary" @click.stop="handleDetail(item)">详 情</v-btn>
|
|
|
|
+ <v-btn :disabled="!item.userPersonList || !item.userPersonList.length" variant="text" color="primary" @click.stop="handleContactInformation(item)">
|
|
|
|
+ 联系方式
|
|
|
|
+ </v-btn>
|
|
</template>
|
|
</template>
|
|
</CtTable>
|
|
</CtTable>
|
|
</v-card>
|
|
</v-card>
|
|
@@ -53,15 +56,48 @@
|
|
</div>
|
|
</div>
|
|
<div class="text-center ml-5">潘青海先生(Peter Pan)</div>
|
|
<div class="text-center ml-5">潘青海先生(Peter Pan)</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </CtDialog>
|
|
|
|
+
|
|
|
|
+ <!-- 联系方式 -->
|
|
|
|
+ <CtDialog :visible="showContactDialog" title="当前联系方式匹配人员" :footer="false" widthType="0" @close="showContactDialog = false">
|
|
|
|
+ <CtTable
|
|
|
|
+ :loading="false"
|
|
|
|
+ :items="contactList"
|
|
|
|
+ :headers="contactHeaders"
|
|
|
|
+ :elevation="0"
|
|
|
|
+ :isTools="false"
|
|
|
|
+ :showPage="false"
|
|
|
|
+ itemKey="user.id"
|
|
|
|
+ >
|
|
|
|
+ <template #name="{ item }">
|
|
|
|
+ <div class="d-flex align-center cursor-pointer">
|
|
|
|
+ <v-badge
|
|
|
|
+ v-if="item?.person?.sex === '1' || item?.person?.sex === '2'"
|
|
|
|
+ bordered
|
|
|
|
+ offset-y="6"
|
|
|
|
+ :color="badgeColor(item)"
|
|
|
|
+ :icon="badgeIcon(item)">
|
|
|
|
+ <v-avatar size="40" :image="getUserAvatar(item.person.avatar, item.person.sex)"></v-avatar>
|
|
|
|
+ </v-badge>
|
|
|
|
+ <v-avatar v-else size="40" :image="getUserAvatar(item.person?.avatar, item.person?.sex)"></v-avatar>
|
|
|
|
+ <span class="ml-3">{{ item?.person?.name || item?.phone }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #actions="{ item }">
|
|
|
|
+ <v-btn variant="text" color="primary" @click.stop="handleContactInformation({ userPersonList: [item] })">联系方式</v-btn>
|
|
|
|
+ </template>
|
|
|
|
+ </CtTable>
|
|
</CtDialog>
|
|
</CtDialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'newlyAppointedTable'})
|
|
defineOptions({ name: 'newlyAppointedTable'})
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
+import { ref, computed } from 'vue'
|
|
import { getNewAppointmentsPage, getNewAppointmentsDetail } from '@/api/recruit/enterprise/newlyAppointed'
|
|
import { getNewAppointmentsPage, getNewAppointmentsDetail } from '@/api/recruit/enterprise/newlyAppointed'
|
|
import { useUserStore } from '@/store/user'
|
|
import { useUserStore } from '@/store/user'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
+import { getUserAvatar } from '@/utils/avatar'
|
|
|
|
+import { dealDictObjData } from '@/utils/position'
|
|
|
|
|
|
const store = useUserStore()
|
|
const store = useUserStore()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -217,6 +253,47 @@ const handleDetail = async (item) => {
|
|
detail.value = result
|
|
detail.value = result
|
|
showDetail.value = true
|
|
showDetail.value = true
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 查看联系方式
|
|
|
|
+const contactList = ref([])
|
|
|
|
+const showContactDialog = ref(false)
|
|
|
|
+const contactHeaders = ref([
|
|
|
|
+ { title: '中文名', key: 'name', sortable: false },
|
|
|
|
+ { title: '英文名', key: 'person.foreignName', sortable: false },
|
|
|
|
+ { title: '求职状态', key: 'person.jobStatusName', sortable: false },
|
|
|
|
+ { title: '工作经验', key: 'person.expName', sortable: false },
|
|
|
|
+ { title: '最高学历', key: 'person.eduName', sortable: false },
|
|
|
|
+ { title: '联系电话', key: 'phone', sortable: false, value: item => item?.person?.phone || item.user.phone },
|
|
|
|
+ { title: '电子邮箱', key: 'email', sortable: false, value: item => item?.person?.email || item.user.email },
|
|
|
|
+ { title: '操作', key: 'actions', sortable: false, align: 'center' }
|
|
|
|
+])
|
|
|
|
+const handleContactInformation = async ({ userPersonList }) => {
|
|
|
|
+ await store.getEnterpriseInfo(true)
|
|
|
|
+ // 没有权限提示联系门墩儿
|
|
|
|
+ if (!info.value?.entitlement?.newAppointment) {
|
|
|
|
+ showDialog.value = true
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 只匹配到一个用户的直接查看详情
|
|
|
|
+ if (userPersonList.length === 1) {
|
|
|
|
+ window.open(`/recruit/enterprise/talentPool/details/${userPersonList[0].user.id}`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 匹配到多个用户,展示列表
|
|
|
|
+ contactList.value = userPersonList.map(e => {
|
|
|
|
+ if (e?.person) e.person = Object.assign(e.person, dealDictObjData({}, e.person))
|
|
|
|
+ return e
|
|
|
|
+ })
|
|
|
|
+ showContactDialog.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const badgeColor = computed(() => (item) => {
|
|
|
|
+ return (item.person && item.person.sex) ? (item.person.sex === '1' ? '#1867c0' : 'error') : 'error'
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+const badgeIcon = computed(() => (item) => {
|
|
|
|
+ return (item.person && item.person.sex) ? (item.person.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|