소스 검색

企业-人才地图路由调整

Xiao_123 1 개월 전
부모
커밋
b1cf069b1f

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

@@ -1,17 +0,0 @@
-import request from '@/config/axios'
-
-// 根据条件获取人才列表
-export const getTalentList = async (data, signal) => {
-	return await request.post({
-		url: '/api/parse/query-kg',
-		data,
-		signal
-	})
-}
-
-// 根据ID获取名片详情
-export const getBusinessCardDetails = async (talent_id) => {
-	return await request.get({
-		url: `/api/parse/get-business-card/${talent_id}`
-	})
-}

+ 0 - 31
src/api/recruit/enterprise/talentMap/tag.js

@@ -1,31 +0,0 @@
-import request from '@/config/axios'
-
-// 获取人才标签列表
-export const getTalentTagList = async () => {
-	return await request.get({
-		url: '/api/parse/get-talent-tag-list'
-	})
-}
-
-// 创建人才标签
-export const createTalentTag = async (data) => {
-	return await request.post({
-		url: '/api/parse/create-talent-tag',
-		data
-	})
-}
-
-// 更新人才标签
-export const updateTalentTag = async (tag_id, data) => {
-	return await request.put({
-		url: `/api/parse/update-talent-tag/${tag_id}`,
-		data
-	})
-}
-
-// 删除人才标签
-export const deleteTalentTag = async (tag_id) => {
-	return await request.delete({
-		url: `/api/parse/delete-talent-tag/${tag_id}`,
-	})
-}

+ 12 - 19
src/api/recruit/enterprise/talentMap/labeling.js → src/api/recruit/enterprise/talentSearch.js

@@ -1,9 +1,18 @@
 import request from '@/config/axios'
 
-// 获取所有名片列表
-export const getCardList = async () => {
+// 根据条件获取人才列表
+export const getTalentList = async (data, signal) => {
+	return await request.post({
+		url: '/api/parse/query-kg',
+		data,
+		signal
+	})
+}
+
+// 根据ID获取名片详情
+export const getBusinessCardDetails = async (talent_id) => {
 	return await request.get({
-		url: '/api/parse/get-business-cards'
+		url: `/api/parse/get-business-card/${talent_id}`
 	})
 }
 
@@ -14,22 +23,6 @@ export const getTalentTagById = async (talent_id) => {
 	})
 }
 
-// 更新人才关联标签
-export const updateTalentTags = async (data) => {
-	return await request.post({
-		url: '/api/parse/talent-update-tags',
-		data
-	})
-}
-
-// 人才启用/禁用
-export const updateTalentStatus = async (talent_id, data) => {
-	return await request.put({
-		url: `/api/parse/update-business-cards/${talent_id}/status`,
-		data
-	})
-}
-
 // 获取人才名片
 export const getTalentCardByImagePath = async (image_path) => {
 	return await request.download({

+ 3 - 3
src/router/modules/components/recruit/enterprise.js

@@ -376,7 +376,7 @@ const enterprise = [
     ]
   },
   {
-    path: '/recruit/enterprise/talentMap',
+    path: '/recruit/enterprise/talentSearch',
     component: Layout,
     name: 'TalentMap',
     meta: {
@@ -386,9 +386,9 @@ const enterprise = [
     },
     children: [
       {
-        path: '/recruit/enterprise/talentMap',
+        path: '/recruit/enterprise/talentSearch',
         show: true,
-        component: () => import('@/views/recruit/enterprise/newTalentMap/search/index.vue')
+        component: () => import('@/views/recruit/enterprise/talentSearch/index.vue')
       }
     ]
   },

+ 0 - 311
src/views/recruit/enterprise/newTalentMap/labeling/index.vue

@@ -1,311 +0,0 @@
-<template>
-	<div>
-		<CtFilter :items="filterItems" :showRefreshBtn="true" @reset="handleReset" @search="handleSearch" @refresh="getList" />
-
-		<v-card elevation="5" class="mt-3">
-			<CtTable
-				:items="items"
-				class="pa-3"
-				:headers="headers"
-				:loading="loading"
-				:disable-sort="true"
-				:elevation="0"
-				:isTools="false"
-				:items-per-page="-1"
-				height="calc(100vh - 233px)"
-				:showFixedLastItem="true"
-				itemKey="id"
-			>
-				<template #title_zh="{ item }">
-          <div v-ellipse-tooltip style="max-width: 250px;">{{ item.title_zh }}</div>
-        </template>
-        <template #hotel_zh="{ item }">
-          <div v-ellipse-tooltip style="max-width: 250px;">{{ item.hotel_zh }}</div>
-        </template>
-				<template #status="{ item }">
-					<v-chip size="small" variant="elevated" :color="item.status === 'active' ? 'primary' : 'error'">{{ item.status === 'active' ? '已启用' : '已禁用' }}</v-chip>
-				</template>
-				<template #actions="{ item }">
-					<v-btn variant="text" color="#007cd6" @click.stop="handleAnnotation(item)">标注</v-btn>
-					<v-btn v-if="item.status === 'active'" variant="text" color="error" @click.stop="handleAction(item.id, 'inactive')">禁用</v-btn>
-					<v-btn v-if="item.status === 'inactive'" variant="text" color="primary" @click.stop="handleAction(item.id, 'active')">启用</v-btn>
-				</template>
-			</CtTable>
-		</v-card>
-
-		<!-- 标注 -->
-		<CtDialog :visible="showDialog" title="人才标注" :footer="false" widthType="1" @close="showDialog = false" style="height: 95vh;">
-			<v-row>
-				<v-col cols="4">
-					<v-card elevation="3" class="pa-3 overflow-y-auto" :height="`calc(95vh - 154px)`">
-						<p :class="{'active': previewUrl}" @click="showPreview = true">
-							名片
-							<v-icon v-if="previewUrl">mdi-magnify-expand</v-icon>
-						</p>
-						<img v-if="previewUrl" width="100%" class="cursor-pointer" :src="previewUrl" @click="showPreview = true" />
-						<p class="mb-3" :class="{'mt-3': !previewUrl}">门墩儿新任命</p>
-						<p>门墩儿用户简历</p>
-					</v-card>
-				</v-col>
-				<v-col cols="8">
-					<v-card elevation="3" class="pa-3 overflow-y-auto" :height="`calc(95vh - 154px)`">
-						<div class="base-info pa-3">
-							<div class="mb-6">
-								{{ talentItem.name_zh }}
-								<span v-if="talentItem.name_en">({{ talentItem.name_en }})</span>
-							</div>
-							<div class="d-flex align-center">
-								<div v-for="(val, index) in talentInfoKeys" :key="index" class="common-width info-item">
-									<p v-ellipse-tooltip>{{ talentItem[val.key] }}</p>
-									<p v-ellipse-tooltip>{{ talentItem[val.value] }}</p>
-								</div>
-							</div>
-							<div class="d-flex align-center my-6">
-								<div class="common-width pr-3" v-ellipse-tooltip>{{ talentItem.mobile }}</div>
-								<div style="flex: 1;">{{ talentItem.email }}</div>
-							</div>
-							<div>{{ talentItem.address_zh }}</div>
-						</div>
-						<div class="my-5">
-							<p>人才标签</p>
-							<div v-if="talentSelectedTags?.length" class="mt-4 px-3 pb-3" style="border: 1px dashed #00B760; border-radius: 4px;">
-								<v-chip
-									v-for="(item, index) in talentSelectedTags" :key="index"
-									class="chip mr-3 mt-3 cursor-pointer"
-									label color="primary"
-								>
-									{{ item.name }}
-									<v-icon size="18" color="primary" style="margin-left: 6px;" @click="closeClick(item)">mdi-close-circle</v-icon>
-								</v-chip>
-							</div>
-							<div :class="{'mt-5': talentSelectedTags?.length > 0}">
-								<v-chip
-									v-for="(item, index) in tagList" :key="index"
-									class="chip mr-3 mt-4 cursor-pointer"
-									label color="#248dbb"
-									:disabled="talentSelectedTags.find(k => k.name === item.name)"
-									@click="handleAdd(item)"
-								>
-									<v-icon icon="mdi-plus" start></v-icon>
-									{{ item.name }}
-								</v-chip>
-							</div>
-						</div>
-						<v-divider></v-divider>
-						<div class="d-flex justify-space-evenly my-5">
-							<v-btn width="120" color="warning" elevation="5" @click="handleClose">取 消</v-btn>
-							<v-btn width="120" color="primary" elevation="5" :loading="updateLoading" @click="handleUpdate">更 新</v-btn>
-						</div>
-					</v-card>
-				</v-col>
-			</v-row>
-		</CtDialog>
-	</div>
-
-	<Loading :visible="annotationLoading"></Loading>
-
-	<PreviewImage v-if="showPreview" :initialIndex="0" :urlList="[previewUrl]" @close="showPreview = !showPreview" />
-</template>
-
-<script setup>
-defineOptions({ name: 'NewTalentMapAnnotation' })
-import { ref } from 'vue'
-import { getCardList, updateTalentStatus, getTalentCardByImagePath, getTalentTagById, updateTalentTags } from '@/api/recruit/enterprise/talentMap/labeling'
-import { getTalentTagList } from '@/api/recruit/enterprise/talentMap/tag'
-import Snackbar from '@/plugins/snackbar'
-import Confirm from '@/plugins/confirm'
-import { useI18n } from '@/hooks/web/useI18n'
-
-const { t } = useI18n()
-const loading = ref(false)
-const showDialog = ref(false)
-const items = ref([])
-const headers = [
-  { title: 'ID', key: 'id', sortable: false },
-  { title: '姓名', key: 'name_zh', sortable: false },
-  // { title: '英文名', key: 'name_en', sortable: false },
-  { title: '职位', key: 'title_zh', sortable: false },
-  { title: '酒店', key: 'hotel_zh', sortable: false },
-  { title: '人才状态', key: 'status', sortable: false },
-  { title: '创建时间', key: 'created_at', sortable: false },
-  { title: '操作', key: 'actions', sortable: false, align: 'center' }
-]
-const filterItems = ref({
-  options: [
-    {
-      type: 'text',
-      key: 'title_zh',
-      value: '',
-      label: '职位',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'hotel_zh',
-      value: '',
-      label: '酒店',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'name_zh',
-      value: '',
-      label: '中文名',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    }
-  ]
-})
-
-// 获取名片列表
-const getList = async () => {
-	loading.value = true
-	try {
-		const data = await getCardList()
-		items.value = data || []
-	} finally {
-		loading.value = false
-	}
-}
-getList()
-
-// 搜索
-const handleSearch = async (obj) => {
-	Snackbar.warning('建设中...')
-	console.log(obj, '搜索')
-	// query.value = obj
-	// getList()
-}
-// 重置
-const handleReset = (obj) => {
-	Snackbar.warning('建设中...')
-	console.log(obj, '重置')
-	// query.value = obj
-	// getList()
-}
-
-// 标注
-const talentItem = ref({})
-const talentInfoKeys = [
-	{ key: 'title_zh', value: 'title_en' },
-	{ key: 'hotel_zh', value: 'hotel_en' },
-	{ key: 'brand_zh', value: 'brand_en' },
-]
-
-// 获取人才标签
-const tagList = ref([])
-const getTagList = async () => {
-	annotationLoading.value = true
-	try {
-		const data = await getTalentTagList()
-		tagList.value = data || []
-	} finally {
-		annotationLoading.value = false
-	}
-}
-
-// 标注
-const talentSelectedTags = ref([])
-const previewUrl = ref(null)
-const showPreview = ref(false)
-const annotationLoading = ref(false)
-const handleAnnotation = async (item) => {
-	if (!item || !item.id) return
-	
-	talentItem.value = item
-	// 获取所有标签列表
-	await getTagList()
-
-	// 获取名片预览
-	if (item.image_path) {
-		const data = await getTalentCardByImagePath(item.image_path)
-		previewUrl.value = URL.createObjectURL(data)
-	}
-
-	// 获取人才标签
-	const tagData = await getTalentTagById(item.id)
-	talentSelectedTags.value = tagData ? tagData.map((i) => {
-		return { id: i.talent, name: i.tag }
-	}) : []
-
-	showDialog.value = true
-}
-
-// 标签删除
-const closeClick = (item) => {
-	const index = talentSelectedTags.value.findIndex((i) => i === item)
-	if (index !== -1) talentSelectedTags.value.splice(index, 1)
-}
-
-// 标签添加
-const handleAdd = (item) => {
-	talentSelectedTags.value.push(item)
-}
-
-// 启用、禁用
-const handleAction = (id, status) => {
-	Confirm(t('common.confirmTitle'), `是否确定${status === 'active' ? '启用' : '禁用'}?`).then(async () => {
-		try {
-			await updateTalentStatus(id, { status })
-			Snackbar.success(t('common.operationSuccessful'))
-			getList()
-		} catch {}
-  })
-}
-
-// 更新人才标签
-const handleClose = () => {
-	showDialog.value = false
-	talentItem.value = {}
-	talentSelectedTags.value = []
-	previewUrl.value = ''
-}
-
-const updateLoading = ref(false)
-const handleUpdate = async () => {
-	if (!talentSelectedTags.value || !talentSelectedTags.value.length) return Snackbar.warning('请选择要更新的人才标签')
-
-	updateLoading.value = true
-	const tags = talentSelectedTags.value.map(e => {
-		return { talent: talentItem.value.id, tag: e.name }
-	})
-
-	try {
-		await updateTalentTags(tags)
-		Snackbar.success('人才标签更新成功')
-		handleClose()
-		getList()
-	} finally {
-		updateLoading.value = false
-	}
-}
-</script>
-
-<style scoped lang="scss">
-.base-info {
-	background-color: #f7f8fa;
-	border-radius: 6px;
-}
-.common-width {
-	width: 33.3%;
-	max-width: 33.3%;
-}
-.info-item {
-	padding-right: 12px;
-	&:nth-child(3n) {
-		padding-right: 0;
-	}
-	p {
-		height: 24px;
-	}
-}
-.active {
-	color: var(--v-primary-base);
-	cursor: pointer;
-}
-</style>

+ 0 - 305
src/views/recruit/enterprise/newTalentMap/newlyAppointed/index.vue

@@ -1,305 +0,0 @@
-<template>
-	<div>
-		<CtFilter :items="formItems" @reset="handleReset" @search="handleSearch" />
-
-		<v-card elevation="5" class="mt-3">
-			<CtTable
-				:items="items"
-				class="pa-3"
-				:headers="headers"
-				:loading="loading"
-				:disable-sort="true"
-				:elevation="0"
-				:isTools="false"
-				height="calc(100vh - 400px)"
-				:showPage="true"
-				:showFixedLastItem="true"
-				:total="total"
-				:pageInfo="query"
-				itemKey="id"
-				@pageHandleChange="handleChangePage"
-			>
-				<template #workTerritory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workTerritory }}
-						<v-tooltip activator="parent" location="top">{{ item.workTerritory }}</v-tooltip>
-					</div>
-				</template>
-				<template #workHistory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workHistory }}
-						<v-tooltip activator="parent" location="top">{{ item.workHistory }}</v-tooltip>
-					</div>
-				</template>
-				<template #actions="{ item }">
-					<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>
-			</CtTable>
-		</v-card>
-
-		<v-navigation-drawer v-model="showDetail" absolute location="right" rounded temporary width="700" class="pa-5">
-			<div style="width: 300px; height: 300px; margin: 0 auto;">
-				<v-img :src="detail?.picUrl" width="300" height="300" />
-			</div>
-			<div class="mt-10" v-if="detail?.detailIntroduction" v-html="detail?.detailIntroduction.replace(/\n/g, '</br>')"></div>
-		</v-navigation-drawer>
-
-		<!-- 无权限提示 -->
-		<CtDialog :visible="showDialog" :widthType="4" :footer="false" titleClass="text-h6" title="系统提示" @close="showDialog = false">
-			<div class="d-flex align-center flex-column">
-				<div class="color-warning">
-					<p>很抱歉,您当前没有权限查看门墩儿新任命的相关信息</p>
-					<p>请用微信扫描下方企业微信联系门墩儿管理员开通权限</p>
-				</div>
-				<div style="width: 150px; height: 150px;">
-					<v-img src="https://minio.menduner.com/dev/menduner/contact.png"></v-img>
-				</div>
-				<div class="text-center ml-5">潘青海先生(Peter Pan)</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>
-	</div>
-</template>
-
-<script setup>
-defineOptions({ name: 'newlyAppointedTable'})
-import { ref, computed } from 'vue'
-import { getNewAppointmentsPage, getNewAppointmentsDetail } from '@/api/recruit/enterprise/newlyAppointed'
-import { useUserStore } from '@/store/user'
-import Snackbar from '@/plugins/snackbar'
-import { getUserAvatar } from '@/utils/avatar'
-import { dealDictObjData } from '@/utils/position'
-
-const store = useUserStore()
-const loading = ref(false)
-const total = ref(10)
-const query = ref({
-  pageSize: 10,
-	pageNo: 1
-})
-const items = ref([])
-const headers = [
-	{ title: '宣布日期', key: 'announceTime', sortable: false },
-  { title: '中文名', key: 'nameChinese', sortable: false },
-  { title: '英文名', key: 'nameEnglish', sortable: false },
-  { title: '性别', key: 'gender', sortable: false },
-  { title: '职位', key: 'position', sortable: false },
-  { title: '任职酒店', key: 'inaugurationHotel', sortable: false },
-  { title: '酒店品牌', key: 'hotelBrand', sortable: false },
-  { title: '工作地域', key: 'workTerritory', sortable: false },
-  { title: '过往工作酒店品牌', key: 'workHistory', sortable: false },
-  { title: '操作', key: 'actions', sortable: false, align: 'center' }
-]
-const formItems = ref({
-  options: [
-		{
-      type: 'text',
-      key: 'nameChinese',
-      value: '',
-      label: '中文名',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'nameEnglish',
-      value: '',
-      label: '英文名',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'position',
-      value: '',
-      label: '职位',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'inaugurationHotel',
-      value: '',
-      label: '任职酒店',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'hotelBrand',
-      value: '',
-      label: '酒店品牌',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'workTerritory',
-      value: '',
-      label: '工作地域',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'workHistory',
-      value: '',
-      label: '过往工作酒店品牌',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    }
-  ]
-})
-const showDialog = ref(false)
-
-// 获取企业权益信息
-const info = ref(localStorage.getItem('entBaseInfo') ? JSON.parse(localStorage.getItem('entBaseInfo')) : {})
-store.$subscribe((mutation, state) => {
-  if (Object.keys(state.entBaseInfo).length) info.value = state.entBaseInfo
-})
-
-// 获取新任命分页
-const getList = async () => {
-	loading.value = true
-	try {
-		const result = await getNewAppointmentsPage(query.value)
-		items.value = result.list
-		total.value = result.total
-	} finally {
-		loading.value = false
-	}
-}
-getList()
-
-// 分页切换
-const handleChangePage = async (e) => {
-	await store.getEnterpriseInfo(true)
-	// 没有权限提示联系门墩儿
-	if (!info.value?.entitlement?.newAppointment) {
-		showDialog.value = true
-		return
-	}
-	query.value.pageNo = e
-	getList()
-}
-
-// 搜索
-const handleSearch = async (obj) => {
-	await store.getEnterpriseInfo(true)
-	// 没有权限提示联系门墩儿
-	if (!info.value?.entitlement?.newAppointment) {
-		showDialog.value = true
-		return
-	}
-	query.value = Object.assign(query.value, obj)
-	query.value.pageNo = 1
-	getList()
-}
-// 重置
-const handleReset = (obj) => {
-	query.value = Object.assign(query.value, obj)
-	query.value.pageNo = 1
-	getList()
-}
-
-// 查看详情
-const showDetail = ref(false)
-const detail = ref({})
-const handleDetail = async (item) => {
-	await store.getEnterpriseInfo(true)
-	// 没有权限提示联系门墩儿
-	if (!info.value?.entitlement?.newAppointment) {
-		showDialog.value = true
-		return
-	}
-	const result = await getNewAppointmentsDetail(item.id)
-	if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~') 
-	detail.value = result
-	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>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 249
src/views/recruit/enterprise/newTalentMap/tag/index.vue

@@ -1,249 +0,0 @@
-<template>
-	<div>
-		<CtFilter :items="filterItems" @reset="handleReset" @search="handleSearch">
-      <template #appendBtn>
-        <v-btn class="ml-3" elevation="5" color="primary" prepend-icon="mdi-plus" @click="handleAdd">新增</v-btn>
-      </template>
-    </CtFilter>
-
-		<v-card elevation="5" class="mt-3">
-			<CtTable
-				:items="items"
-				class="pa-3"
-				:headers="headers"
-				:loading="loading"
-				:disable-sort="true"
-				:elevation="0"
-        :items-per-page="-1"
-				:isTools="false"
-				height="70vh"
-				:showPage="false"
-				:showFixedLastItem="true"
-				itemKey="id"
-			>
-        <template #en_name="{ item }">
-          <div v-ellipse-tooltip style="max-width: 250px;">{{ item.en_name }}</div>
-        </template>
-        <template #description="{ item }">
-          <div v-ellipse-tooltip style="max-width: 250px;">{{ item.description }}</div>
-        </template>
-        <template #status="{ item }">
-          <v-chip :color="item.status === 'active' ? 'primary' : 'error'" variant="elevated" size="small">
-            {{ item.status === 'active' ? '已启用' : '已禁用' }}
-          </v-chip>
-        </template>
-				<template #actions="{ item }">
-					<v-btn variant="text" color="primary" @click.stop="handleEdit(item)">编辑</v-btn>
-					<v-btn variant="text" color="error" @click.stop="handleDelete(item)">删除</v-btn>
-				</template>
-			</CtTable>
-		</v-card>
-
-		<CtDialog 
-      :visible="showDialog" 
-      :widthType="4" 
-      :footer="true" 
-      titleClass="text-h6" 
-      :title="type === 'add' ? '新增' : '编辑'" 
-      @submit="handleSubmit" @close="handleClose"
-    >
-			<CtForm ref="formPageRef" :items="formItems" />
-		</CtDialog>
-	</div>
-</template>
-
-<script setup>
-defineOptions({ name: 'newTalentMapTag'})
-import { ref } from 'vue'
-import Snackbar from '@/plugins/snackbar'
-import Confirm from '@/plugins/confirm'
-import _ from 'lodash'
-import { getTalentTagList, deleteTalentTag, createTalentTag, updateTalentTag } from '@/api/recruit/enterprise/talentMap/tag'
-
-const loading = ref(false)
-const query = ref({})
-const formPageRef = ref()
-const items = ref( [])
-const headers = [
-	{ title: '标签名称', key: 'name', sortable: false },
-  { title: '标签英文名称', key: 'en_name', sortable: false },
-  { title: '标签分类', key: 'category', sortable: false },
-  { title: '标签描述', key: 'description', sortable: false },
-  { title: '标签状态', key: 'status', sortable: false },
-  { title: '更新时间', key: 'time', sortable: false },
-  { title: '操作', key: 'actions', sortable: false, align: 'center' }
-]
-const filterItems = ref({
-  options: [
-    {
-      type: 'text',
-      key: 'name',
-      value: '',
-      label: '标签名称',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'text',
-      key: 'category',
-      value: '',
-      label: '标签分类',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    },
-		{
-      type: 'autocomplete',
-      key: 'status',
-      value: null,
-      label: '标签状态',
-			clearable: true,
-			hideDetails: true,
-			width: 200,
-			items: [{ label: '禁用', value: 'disable' }, { label: '启用', value: 'active' }]
-    }
-  ]
-})
-
-const formItems = ref({
-  options: [
-    {
-      type: 'text',
-      key: 'name',
-      value: '',
-      label: '标签名称 *',
-      rules: [v => !!v || '请输入标签名称']
-    },
-    {
-      type: 'text',
-      key: 'category',
-      value: '人才',
-      defaultValue: '人才',
-      disabled: true,
-      label: '标签分类'
-    },
-    {
-      type: 'textarea',
-      key: 'description',
-      value: null,
-      counter: 2000,
-      rows: 3,
-      label: '描述',
-      outlined: true
-    },
-    {
-      type: 'ifRadio',
-      key: 'status',
-      value: 'active',
-      defaultValue: 'active',
-      label: '标签状态 *',
-      width: 90,
-      items: [
-        { label: '启用', value: 'active' },
-        { label: '禁用', value: 'disable' }
-      ]
-    }
-  ]
-})
-
-// 获取人才标签列表
-const getList = async () => {
-	loading.value = true
-	try {
-		const data = await getTalentTagList()
-    items.value = data || []
-	} finally {
-		loading.value = false
-	}
-}
-getList()
-
-// 搜索
-const handleSearch = async (obj) => {
-	query.value = obj
-	getList()
-}
-// 重置
-const handleReset = (obj) => {
-	query.value = obj
-	getList()
-}
-
-const getValue = () => {
-  return formItems.value.options.reduce((res, item) => {
-    // if (!item.noParam) res[item.key] = item.value
-    res[item.key] = item.value
-    return res
-  }, {})
-}
-
-const setValue = (item) => {
-  formItems.value.options.forEach(e => {
-		e.value = item ? item[e.key] || null : e.default || null
-		// e.hide = !item && e.noParam ? true : false
-  })
-}
-
-const type = ref('add')
-const editId = ref(null)
-const editItemData = ref({})
-const showDialog = ref(false)
-
-// 删除标签
-const handleDelete = async (item) => {
-  if (!item?.id) return Snackbar.warning('数据错误请刷新重试!')
-  Confirm('系统提示', `是否确认删除【${item.name}】标签?`).then(async () => {
-		await deleteTalentTag(item.id)
-		Snackbar.success('删除成功!')
-		getList()
-	}).catch(() => {})
-}
-
-// 新增
-const handleAdd = () => {
-  type.value = 'add'
-  formItems.value.options.forEach(e => e.value = e?.defaultValue || null)
-  showDialog.value = true
-}
-
-// 编辑
-const valueKeys = ['name', 'category', 'status', 'description']
-const handleEdit = async (item) => {
-	type.value = 'edit'
-  editId.value = item.id
-  valueKeys.forEach(key => editItemData.value[key] = item[key])
-	setValue(item)
-	showDialog.value = true
-}
-
-const handleClose = () => {
-  showDialog.value = false
-  editItemData.value = {}
-  editId.value = null
-}
-
-// 新增/编辑-提交
-const handleSubmit = async () => {
-  const { valid } = await formPageRef.value.formRef.validate()
-  if (!valid) return
-  const obj = getValue()
-
-  // 更新标签时,至少需要提供一个要更新的项
-  if (type.value === 'edit') {
-    const isEqual = _.isEqual(obj, editItemData.value)
-    if (isEqual) return Snackbar.warning('请修改任意项后再提交!')
-  }
-
-  try {
-    type.value === 'add' ? await createTalentTag(obj) : await updateTalentTag(editId.value, obj)
-    getList()
-    Snackbar.success(`${type.value === 'add' ? '新增' : '编辑'}成功`)
-    handleClose()
-  } catch {}
-}
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 122
src/views/recruit/enterprise/newTalentMap/talentMatching/index.vue

@@ -1,122 +0,0 @@
-<!-- 人才匹配 -->
-<template>
-  <div>
-		<v-card elevation="5" class="mt-3">
-			<CtTable
-				:items="items"
-				class="pa-3"
-				:headers="headers"
-				:loading="loading"
-				:disable-sort="true"
-				:elevation="0"
-				:isTools="false"
-				height="calc(100vh - 400px)"
-				:showPage="true"
-				:showFixedLastItem="true"
-				:total="total"
-				:pageInfo="query"
-				itemKey="id"
-				@pageHandleChange="handleChangePage"
-			>
-				<template #workTerritory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workTerritory }}
-						<v-tooltip activator="parent" location="top">{{ item.workTerritory }}</v-tooltip>
-					</div>
-				</template>
-				<template #workHistory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workHistory }}
-						<v-tooltip activator="parent" location="top">{{ item.workHistory }}</v-tooltip>
-					</div>
-				</template>
-				<template #actions="{ item }">
-					<v-btn variant="text" color="primary" @click.stop="handleDetail(item)">详 情</v-btn>
-				</template>
-			</CtTable>
-		</v-card>
-
-    <v-navigation-drawer v-model="showDetail" absolute location="right" rounded temporary width="700" class="pa-5">
-      <div style="width: 300px; height: 300px; margin: 0 auto;">
-        <v-img :src="detail?.picUrl" width="300" height="300" />
-      </div>
-      <div class="mt-10" v-if="detail?.detailIntroduction" v-html="detail?.detailIntroduction.replace(/\n/g, '</br>')"></div>
-    </v-navigation-drawer>
-    
-    <knowledge
-      :type="switchValue ? 4 : 3"
-      welcome="我是您的产品助手。请问您需要了解什么内容?"
-      title="产品知识库"
-    >
-      <template #title>
-        <v-switch
-          v-model="switchValue"
-          class="mt-0"
-          hide-details
-          label="RAG对比"
-        ></v-switch>
-      </template>
-    </knowledge>
-
-  </div>
-</template>
-
-<script setup>
-defineOptions({name: 'talent-matching'})
-import { getNewAppointmentsPage, getNewAppointmentsDetail } from '@/api/recruit/enterprise/newlyAppointed'
-import Knowledge from '@/components/Knowledge'
-import { ref } from 'vue'
-
-const loading = ref(false)
-const total = ref(10)
-const query = ref({
-  pageSize: 10,
-	pageNo: 1
-})
-const items = ref([])
-const headers = [
-  { title: '中文名', key: 'nameChinese', sortable: false },
-  { title: '英文名', key: 'nameEnglish', sortable: false },
-  { title: '性别', key: 'gender', sortable: false },
-  { title: '职位', key: 'position', sortable: false },
-  { title: '任职酒店', key: 'inaugurationHotel', sortable: false },
-  { title: '酒店品牌', key: 'hotelBrand', sortable: false },
-  { title: '工作地域', key: 'workTerritory', sortable: false },
-  { title: '过往工作酒店品牌', key: 'workHistory', sortable: false },
-  { title: '操作', key: 'actions', sortable: false, align: 'center' }
-]
-
-// 查看详情
-const showDetail = ref(false)
-const detail = ref({})
-const handleDetail = async (item) => {
-	const result = await getNewAppointmentsDetail(item.id)
-	if (!result || !Object.keys(result).length) return Snackbar.warning('暂无详细信息,去查看其他人的信息吧~') 
-	detail.value = result
-	showDetail.value = true
-}
-
-const getList = async () => {
-	loading.value = true
-	try {
-		const result = await getNewAppointmentsPage(query.value)
-		items.value = result.list
-		total.value = result.total
-	} finally {
-		loading.value = false
-	}
-}
-getList()
-
-// 分页切换
-const handleChangePage = async (e) => {
-	query.value.pageNo = e
-	getList()
-}
-
-// 知识库对话
-const switchValue = ref(false)
-
-</script>
-<style lang="scss" scoped>
-</style>

+ 2 - 8
src/views/recruit/enterprise/newlyAppointed/index.vue

@@ -20,16 +20,10 @@
 				@pageHandleChange="handleChangePage"
 			>
 				<template #workTerritory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workTerritory }}
-						<v-tooltip activator="parent" location="top">{{ item.workTerritory }}</v-tooltip>
-					</div>
+					<div class="ellipsis" style="max-width: 150px;" v-ellipse-tooltip>{{ item.workTerritory }}</div>
 				</template>
 				<template #workHistory="{ item }">
-					<div class="ellipsis" style="max-width: 150px;">
-						{{ item.workHistory }}
-						<v-tooltip activator="parent" location="top">{{ item.workHistory }}</v-tooltip>
-					</div>
+					<div class="ellipsis" style="max-width: 150px;" v-ellipse-tooltip>{{ item.workHistory }}</div>
 				</template>
 				<template #actions="{ item }">
 					<v-btn variant="text" color="primary" @click.stop="handleDetail(item)">详 情</v-btn>

+ 0 - 0
src/views/recruit/enterprise/newTalentMap/search/components/baseInfo.vue → src/views/recruit/enterprise/talentSearch/components/baseInfo.vue


+ 0 - 0
src/views/recruit/enterprise/newTalentMap/search/components/careerPath.vue → src/views/recruit/enterprise/talentSearch/components/careerPath.vue


+ 1 - 2
src/views/recruit/enterprise/newTalentMap/search/index.vue → src/views/recruit/enterprise/talentSearch/index.vue

@@ -56,8 +56,7 @@
 <script setup>
 defineOptions({ name: 'NewTalentMapSearch' })
 import { ref } from 'vue'
-import { getTalentList, getBusinessCardDetails } from '@/api/recruit/enterprise/talentMap/search'
-import { getTalentCardByImagePath, getTalentTagById } from '@/api/recruit/enterprise/talentMap/labeling'
+import { getTalentList, getBusinessCardDetails, getTalentCardByImagePath, getTalentTagById } from '@/api/recruit/enterprise/talentSearch'
 import Snackbar from '@/plugins/snackbar'
 import baseInfo from './components/baseInfo.vue'
 import careerPath from './components/careerPath.vue'