瀏覽代碼

人才搜素-详情

Xiao_123 3 天之前
父節點
當前提交
3cbba78c9b

+ 7 - 0
src/api/recruit/enterprise/talentMap/search.js

@@ -6,4 +6,11 @@ export const getTalentList = async (data) => {
 		url: '/api/parse/query-kg',
 		data
 	})
+}
+
+// 根据ID获取名片详情
+export const getBusinessCardDetails = async (talent_id) => {
+	return await request.get({
+		url: `/api/parse/get-business-card/${talent_id}`
+	})
 }

+ 28 - 17
src/views/recruit/enterprise/newTalentMap/search/components/baseInfo.vue

@@ -1,9 +1,10 @@
 <template>
+  <div class="title">基本信息</div>
   <v-container class="descriptions pa-0">
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文名</div>
+          <div class="label">中文名</div>
           <div class="value">{{ data.name_zh }}</div>
         </div>
       </v-col>
@@ -11,7 +12,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文名</div>
+          <div class="label">英文名</div>
           <div class="value">{{ data.name_en }}</div>
         </div>
       </v-col>
@@ -19,7 +20,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文职位/头衔</div>
+          <div class="label">职位/头衔(中)</div>
           <div class="value">{{ data.title_zh }}</div>
         </div>
       </v-col>
@@ -27,7 +28,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文职位/头衔</div>
+          <div class="label">职位/头衔(英)</div>
           <div class="value">{{ data.title_en }}</div>
         </div>
       </v-col>
@@ -59,7 +60,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文酒店/公司名称</div>
+          <div class="label">酒店/公司名称(中)</div>
           <div class="value">{{ data.hotel_zh }}</div>
         </div>
       </v-col>
@@ -67,7 +68,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文酒店/公司名称</div>
+          <div class="label">酒店/公司名称(英)</div>
           <div class="value">{{ data.hotel_en }}</div>
         </div>
       </v-col>
@@ -75,7 +76,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中中文地址</div>
+          <div class="label">地址(中)</div>
           <div class="value">{{ data.address_zh }}</div>
         </div>
       </v-col>
@@ -83,7 +84,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文地址</div>
+          <div class="label">地址(英)</div>
           <div class="value">{{ data.address_en }}</div>
         </div>
       </v-col>
@@ -91,7 +92,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文邮政编码</div>
+          <div class="label">邮政编码(中)</div>
           <div class="value">{{ data.postal_code_zh }}</div>
         </div>
       </v-col>
@@ -99,7 +100,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文邮政编码</div>
+          <div class="label">邮政编码(英)</div>
           <div class="value">{{ data.postal_code_en }}</div>
         </div>
       </v-col>
@@ -107,7 +108,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文品牌名称</div>
+          <div class="label">品牌名称(中)</div>
           <div class="value">{{ data.brand_zh }}</div>
         </div>
       </v-col>
@@ -115,7 +116,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文品牌名称</div>
+          <div class="label">品牌名称(英)</div>
           <div class="value">{{ data.brand_en }}</div>
         </div>
       </v-col>
@@ -123,7 +124,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">中文隶属关系</div>
+          <div class="label">隶属关系(中)</div>
           <div class="value">{{ data.affiliation_en }}</div>
         </div>
       </v-col>
@@ -131,7 +132,7 @@
     <v-row no-gutters class="descriptions-row">
       <v-col :cols="12">
         <div class="d-flex">
-          <div class="label">英文隶属关系</div>
+          <div class="label">隶属关系(英)</div>
           <div class="value">{{ data.affiliation_en }}</div>
         </div>
       </v-col>
@@ -162,7 +163,11 @@
       <v-col :cols="12">
         <div class="d-flex">
           <div class="label">状态</div>
-          <div class="value">{{ data.status }}</div>
+          <div class="value">
+            <v-chip size="small" variant="elevated" :color="data?.status === 'active' ? 'primary' : 'error'">
+              {{ data?.status === 'active' ? '已启用' : '已禁用' }}
+            </v-chip>
+          </div>
         </div>
       </v-col>
     </v-row>
@@ -171,8 +176,9 @@
 
 <script setup>
 defineOptions({ name: 'NewTalentMapSearch-detail' })
-const props = defineProps({data: Object})
+defineProps({data: Object})
 </script>
+
 <style lang="scss" scoped>
 .descriptions {
   border-left: 1px solid #ebeef5;
@@ -186,7 +192,6 @@ const props = defineProps({data: Object})
       border-right: 1px solid #ebeef5;
       border-bottom: 1px solid #ebeef5;
     }
-    // .label-200px { width: 200px; }
     .value {
       flex: 1;
       padding: 8px 12px;
@@ -196,4 +201,10 @@ const props = defineProps({data: Object})
     }
   }
 }
+.title {
+  margin: 0 0 12px;
+  font-size: 18px;
+  color: var(--v-primary-base);
+  font-weight: bold;
+}
 </style>

+ 8 - 4
src/views/recruit/enterprise/newTalentMap/search/components/careerPath.vue

@@ -7,6 +7,7 @@
           <div class="d-flex text-center">
             <div class="label">酒店名称</div>
             <div class="label">职位名称</div>
+            <div class="label">日期</div>
           </div>
         </v-col>
       </v-row>
@@ -14,8 +15,9 @@
         <v-row no-gutters class="descriptions-row" v-for="(val, index) in careerData" :key="index+'career'">
           <v-col :cols="12">
             <div class="d-flex text-center">
-              <div class="value">{{ val.name }}</div>
-              <div class="value">{{ val.name }}</div>
+              <div class="value">{{ val.company_name }}</div>
+              <div class="value">{{ val.position }}</div>
+              <div class="value">{{ val.current_date }}</div>
             </div>
           </v-col>
         </v-row>
@@ -26,6 +28,7 @@
             <div class="d-flex text-center">
               <div class="value">-</div>
               <div class="value">-</div>
+              <div class="value">-</div>
             </div>
           </v-col>
         </v-row>
@@ -37,8 +40,9 @@
 <script setup>
 import { ref } from 'vue'
 defineOptions({ name: 'NewTalentMapSearch-careerPath' })
+
 const props = defineProps({data: Object})
-const careerData = ref(props?.data?.career_path ? JSON.parse(JSON.stringify(props?.data?.career_path)) : [])
+const careerData = ref(props?.data?.career_path || [])
 
 </script>
 <style lang="scss" scoped>
@@ -54,7 +58,7 @@ const careerData = ref(props?.data?.career_path ? JSON.parse(JSON.stringify(prop
   border-top: 1px solid #ebeef5;
   &-row{
     .label {
-      width: 50%;
+      width: 33.3%;
       padding: 8px 12px;
       color: #666;
       background-color: #f7f8fa;

+ 9 - 13
src/views/recruit/enterprise/newTalentMap/search/index.vue

@@ -29,11 +29,8 @@
 				</template>
 			</CtTable>
 		</v-card>
+
 		<v-navigation-drawer v-model="showDetail" absolute location="right" rounded temporary width="700" class="pa-5">
-      <!-- 照片 -->
-			<div v-if="detail.picUrl" style="width: 300px; height: 300px; margin: 0 auto;">
-				<v-img :src="detail.picUrl" width="300" height="300" />
-			</div>
       <!-- 基本信息 -->
       <baseInfo :data="detail"></baseInfo>
       <!-- 职业轨迹 -->
@@ -47,7 +44,7 @@
 <script setup>
 defineOptions({ name: 'NewTalentMapSearch' })
 import { ref } from 'vue'
-import { getTalentList } from '@/api/recruit/enterprise/talentMap/search'
+import { getTalentList, getBusinessCardDetails } from '@/api/recruit/enterprise/talentMap/search'
 import Snackbar from '@/plugins/snackbar'
 import baseInfo from './components/baseInfo.vue'
 import careerPath from './components/careerPath.vue'
@@ -76,7 +73,7 @@ const items = ref([
     mobile: "+86 138 2502 1012, +852 92651012", 
     position_chinese: "国际事业部资深副总裁", 
     position_english: "Senior Vice President of International Business Department", 
-    talent_id: 31, 
+    talent_id: 33, 
     talent_tags: [
       {
         tag_category: null, 
@@ -184,12 +181,12 @@ const getList = async () => {
 const showDetail = ref(false)
 const detail = ref({})
 const handleDetail = async (item) => {
-	// if (!item?.id) {
-	// 	return
-	// }
-	// const result = await getNewAppointmentsDetail(item.id)
-	// if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~') 
-	// detail.value = result
+	if (!item?.talent_id) {
+		return
+	}
+	const result = await getBusinessCardDetails(item.talent_id)
+	if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~') 
+	detail.value = result
 	showDetail.value = true
 }
 
@@ -199,7 +196,6 @@ const handleSearch = async () => {
 	if (!content.value) return Snackbar.warning('请输入您的描述信息定位人才')
 	getList()
 }
-
 </script>
 
 <style scoped lang="scss">