|
@@ -1,12 +1,13 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <v-card elevation="5" class="pa-10">
|
|
|
+ <v-card elevation="5" class="pa-10 d-flex align-center">
|
|
|
<TextInput
|
|
|
v-model="content"
|
|
|
:item="textItem"
|
|
|
@enter="handleSearch"
|
|
|
@appendInnerClick="handleSearch"
|
|
|
></TextInput>
|
|
|
+ <v-btn color="primary" width="100" class="ml-5" @click="handleSearch">搜 索</v-btn>
|
|
|
</v-card>
|
|
|
|
|
|
<v-card elevation="5" class="mt-3">
|
|
@@ -31,6 +32,11 @@
|
|
|
</v-card>
|
|
|
|
|
|
<v-navigation-drawer v-model="showDetail" absolute location="right" rounded temporary width="700" class="pa-5">
|
|
|
+ <!-- 名片 -->
|
|
|
+ <div v-if="previewUrl">
|
|
|
+ <div class="color-primary font-size-18 font-weight-bold">名片</div>
|
|
|
+ <img width="100%" :src="previewUrl" />
|
|
|
+ </div>
|
|
|
<!-- 基本信息 -->
|
|
|
<baseInfo :data="detail"></baseInfo>
|
|
|
<!-- 职业轨迹 -->
|
|
@@ -38,120 +44,28 @@
|
|
|
</v-navigation-drawer>
|
|
|
</div>
|
|
|
|
|
|
- <Loading :visible="annotationLoading"></Loading>
|
|
|
+ <Loading :visible="detailLoading"></Loading>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'NewTalentMapSearch' })
|
|
|
import { ref } from 'vue'
|
|
|
import { getTalentList, getBusinessCardDetails } from '@/api/recruit/enterprise/talentMap/search'
|
|
|
+import { getTalentCardByImagePath } from '@/api/recruit/enterprise/talentMap/labeling'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import baseInfo from './components/baseInfo.vue'
|
|
|
import careerPath from './components/careerPath.vue'
|
|
|
|
|
|
const loading = ref(false)
|
|
|
-const annotationLoading = ref(false)
|
|
|
+const detailLoading = ref(false)
|
|
|
const content = ref('')
|
|
|
-// const items = ref([])
|
|
|
-const items = ref([
|
|
|
- {
|
|
|
- brand_group_english_name: null,
|
|
|
- brand_group_name: null,
|
|
|
- chinese_name: "陈静",
|
|
|
- email: "angela.chen@dossen.com",
|
|
|
- english_name: "Angela Chen",
|
|
|
- hotel_chinese_name: "东呈集团",
|
|
|
- hotel_english_name: "DOSSEN",
|
|
|
- hotel_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- hotel_updated: "2025-05-13 20:12:47",
|
|
|
- mobile: "+86 138 2502 1012, +852 92651012",
|
|
|
- position_chinese: "国际事业部资深副总裁",
|
|
|
- position_english: "Senior Vice President of International Business Department",
|
|
|
- talent_id: 33,
|
|
|
- talent_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- talent_updated: "2025-05-13 20:12:47",
|
|
|
- work_relation_updated: "2025-05-13 20:12:47"
|
|
|
- },
|
|
|
- {
|
|
|
- brand_group_english_name: null,
|
|
|
- brand_group_name: null,
|
|
|
- chinese_name: "陈玮",
|
|
|
- email: "cw928383712@163.com",
|
|
|
- english_name: null,
|
|
|
- hotel_chinese_name: "苏州木渎古镇 ROSSO酒店",
|
|
|
- hotel_english_name: "ROSSO Hotel Suzhou Mudu Ancient Town",
|
|
|
- hotel_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- hotel_updated: "2025-05-13 20:05:03",
|
|
|
- mobile: "13073381364",
|
|
|
- position_chinese: "销售总监",
|
|
|
- position_english: "Sales Director",
|
|
|
- talent_id: 30,
|
|
|
- talent_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- talent_updated: "2025-05-13 20:05:03",
|
|
|
- work_relation_updated: "2025-05-13 20:05:03"
|
|
|
- },
|
|
|
- {
|
|
|
- brand_group_english_name: null,
|
|
|
- brand_group_name: null,
|
|
|
- chinese_name: "陈静",
|
|
|
- email: "angela.chen@dossen.com",
|
|
|
- english_name: "Angela Chen",
|
|
|
- hotel_chinese_name: "东呈集团",
|
|
|
- hotel_english_name: "DOSSEN",
|
|
|
- hotel_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- hotel_updated: "2025-05-13 18:11:38",
|
|
|
- mobile: "+86 138 2502 1012, +852 92651012",
|
|
|
- position_chinese: "国际事业部资深副总裁",
|
|
|
- position_english: "Senior Vice President of International Business Department",
|
|
|
- talent_id: 29,
|
|
|
- talent_tags: [
|
|
|
- {
|
|
|
- tag_category: null,
|
|
|
- tag_en_name: null,
|
|
|
- tag_name: null
|
|
|
- }
|
|
|
- ],
|
|
|
- talent_updated: "2025-05-13 18:11:38",
|
|
|
- work_relation_updated: "2025-05-13 18:11:38"
|
|
|
- }
|
|
|
-])
|
|
|
+const items = ref([])
|
|
|
const headers = [
|
|
|
- { title: '姓名', key: 'chinese_name', sortable: false },
|
|
|
- { title: '酒店名称', key: 'hotel_chinese_name', sortable: false },
|
|
|
- { title: '职位', key: 'position_chinese', sortable: false },
|
|
|
- { title: '邮箱', key: 'email', sortable: false },
|
|
|
+ { title: '中文名', key: 'name_zh', sortable: false },
|
|
|
+ { title: '英文名', key: 'name_en', sortable: false },
|
|
|
{ title: '联系电话', key: 'mobile', sortable: false },
|
|
|
- { title: '更新时间', key: 'talent_updated', sortable: false },
|
|
|
+ { title: '电子邮箱', key: 'email', sortable: false },
|
|
|
+ { title: '更新时间', key: 'updated_at', sortable: false },
|
|
|
{ title: '操作', key: 'actions', sortable: false, align: 'center' }
|
|
|
]
|
|
|
const textItem = ref({
|
|
@@ -174,37 +88,44 @@ const getList = async () => {
|
|
|
loading.value = false
|
|
|
}
|
|
|
}
|
|
|
-getList()
|
|
|
-
|
|
|
|
|
|
// 查看详情
|
|
|
const showDetail = ref(false)
|
|
|
const detail = ref({})
|
|
|
+const previewUrl = ref(null)
|
|
|
const handleDetail = async (item) => {
|
|
|
- if (!item?.talent_id) {
|
|
|
+ if (!item?.pg_id) {
|
|
|
return
|
|
|
}
|
|
|
- const result = await getBusinessCardDetails(item.talent_id)
|
|
|
- if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~')
|
|
|
- detail.value = result
|
|
|
- showDetail.value = true
|
|
|
-}
|
|
|
|
|
|
+ detailLoading.value = true
|
|
|
+ try {
|
|
|
+ const result = await getBusinessCardDetails(item.pg_id)
|
|
|
+ if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~')
|
|
|
+ detail.value = result
|
|
|
+
|
|
|
+ // 获取名片预览
|
|
|
+ if (result?.image_path) {
|
|
|
+ const data = await getTalentCardByImagePath(result.image_path)
|
|
|
+ previewUrl.value = URL.createObjectURL(data)
|
|
|
+ }
|
|
|
+
|
|
|
+ showDetail.value = true
|
|
|
+ } finally {
|
|
|
+ detailLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
// 搜索
|
|
|
-const handleSearch = async () => {
|
|
|
- if (!content.value) return Snackbar.warning('请输入您的描述信息定位人才')
|
|
|
- getList()
|
|
|
+const handleSearch = async (value, type) => {
|
|
|
+ if (type === 'clear') {
|
|
|
+ items.value = []
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!type && !content.value) return Snackbar.warning('请输入您的描述信息定位人才')
|
|
|
+ getList()
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.base-info {
|
|
|
- background-color: #f7f8fa;
|
|
|
- border-radius: 6px;
|
|
|
-}
|
|
|
-.common-width {
|
|
|
- width: 25%;
|
|
|
- max-width: 25%;
|
|
|
-}
|
|
|
</style>
|