Bladeren bron

人才标注页面调整

Xiao_123 1 week geleden
bovenliggende
commit
1f965e24e6

+ 9 - 0
src/api/recruit/enterprise/talentMap/labeling/index.js

@@ -0,0 +1,9 @@
+import request from '@/config/axios'
+
+// 根据条件获取人才列表
+export const getLabelingList = async (data) => {
+  return await request.post({
+    url: '/api/data_parse/query-kg',
+    data
+	})
+}

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

@@ -428,14 +428,14 @@ const enterprise = [
         },
         },
         component: () => import('@/views/recruit/enterprise/newTalentMap/newlyAppointed/index.vue')
         component: () => import('@/views/recruit/enterprise/newTalentMap/newlyAppointed/index.vue')
       },
       },
-      {
-        path: '/recruit/enterprise/talentMap/talentMatching',
-        meta: {
-          title:'骐骥之才',
-          enName: 'Talent matching'
-        },
-        component: () => import('@/views/recruit/enterprise/newTalentMap/talentMatching/index.vue')
-      },
+      // {
+      //   path: '/recruit/enterprise/talentMap/talentMatching',
+      //   meta: {
+      //     title:'骐骥之才',
+      //     enName: 'Talent matching'
+      //   },
+      //   component: () => import('@/views/recruit/enterprise/newTalentMap/talentMatching/index.vue')
+      // },
       {
       {
         path: '/recruit/enterprise/talentMap/tagManagement',
         path: '/recruit/enterprise/talentMap/tagManagement',
         meta: {
         meta: {

+ 72 - 113
src/views/recruit/enterprise/newTalentMap/labeling/index.vue

@@ -1,6 +1,13 @@
 <template>
 <template>
 	<div>
 	<div>
-		<CtFilter :items="formItems" @reset="handleReset" @search="handleSearch" />
+		<v-card elevation="5" class="pa-10">
+			<TextInput
+        v-model="content"
+        :item="textItem"
+        @enter="handleSearch"
+        @appendInnerClick="handleSearch"
+      ></TextInput>
+		</v-card>
 
 
 		<v-card elevation="5" class="mt-3">
 		<v-card elevation="5" class="mt-3">
 			<CtTable
 			<CtTable
@@ -11,13 +18,11 @@
 				:disable-sort="true"
 				:disable-sort="true"
 				:elevation="0"
 				:elevation="0"
 				:isTools="false"
 				:isTools="false"
+				:noDataText="!content ? '请先输入您的描述信息定位人才' : '暂无数据'"
+				:items-per-page="-1"
 				height="calc(100vh - 400px)"
 				height="calc(100vh - 400px)"
-				:showPage="true"
 				:showFixedLastItem="true"
 				:showFixedLastItem="true"
-				:total="total"
-				:pageInfo="query"
 				itemKey="id"
 				itemKey="id"
-				@pageHandleChange="handleChangePage"
 			>
 			>
 				<template #actions="{ item }">
 				<template #actions="{ item }">
 					<v-btn variant="text" color="primary" @click.stop="handleAnnotation(item)">标注</v-btn>
 					<v-btn variant="text" color="primary" @click.stop="handleAnnotation(item)">标注</v-btn>
@@ -28,20 +33,6 @@
 			</CtTable>
 			</CtTable>
 		</v-card>
 		</v-card>
 
 
-		<!-- 无权限提示 -->
-		<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="showAnnotationDialog" title="人才标注" :footer="false" widthType="1" @close="showAnnotationDialog = false">
 		<CtDialog :visible="showAnnotationDialog" title="人才标注" :footer="false" widthType="1" @close="showAnnotationDialog = false">
 			<v-row>
 			<v-row>
@@ -85,8 +76,8 @@
 								class="chip mx-2 mt-4 cursor-pointer"
 								class="chip mx-2 mt-4 cursor-pointer"
 								label color="primary"
 								label color="primary"
 							>
 							>
-								{{ item }}
-								<v-icon size="18" color="primary" style="margin-left: 6px;" @click="closeClick(index, 'manualAnnotationTags')">mdi-close-circle</v-icon>
+								{{ item.name }}
+								<v-icon size="18" color="primary" style="margin-left: 6px;" @click="closeClick(item, 'manualAnnotationTags')">mdi-close-circle</v-icon>
 							</v-chip>
 							</v-chip>
 
 
 							<div class="mt-5">
 							<div class="mt-5">
@@ -98,13 +89,13 @@
 									@click="handleAdd(item)"
 									@click="handleAdd(item)"
 								>
 								>
 									<v-icon icon="mdi-plus" start></v-icon>
 									<v-icon icon="mdi-plus" start></v-icon>
-									{{ item }}
+									{{ item.name }}
 								</v-chip>
 								</v-chip>
 							</div>
 							</div>
 						</div>
 						</div>
 						<v-divider class="mt-5"></v-divider>
 						<v-divider class="mt-5"></v-divider>
 						<div class="d-flex justify-space-evenly my-5">
 						<div class="d-flex justify-space-evenly my-5">
-							<v-btn variant="outlined" width="120" color="primary" elevation="5" @click="handleClose">取 消</v-btn>
+							<v-btn width="120" color="warning" elevation="5" @click="handleClose">取 消</v-btn>
 							<v-btn width="120" color="primary" elevation="5" @click="handleSave">保 存</v-btn>
 							<v-btn width="120" color="primary" elevation="5" @click="handleSave">保 存</v-btn>
 						</div>
 						</div>
 					</v-card>
 					</v-card>
@@ -112,126 +103,75 @@
 			</v-row>
 			</v-row>
 		</CtDialog>
 		</CtDialog>
 	</div>
 	</div>
+
+	<Loading :visible="annotationLoading"></Loading>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
 defineOptions({ name: 'NewTalentMapAnnotation' })
 defineOptions({ name: 'NewTalentMapAnnotation' })
 import { ref } from 'vue'
 import { ref } from 'vue'
-import { getNewAppointmentsPage } from '@/api/recruit/enterprise/newlyAppointed'
-import { useUserStore } from '@/store/user'
+import { getLabelingList } from '@/api/recruit/enterprise/talentMap/labeling'
+import { getTalentTagList } from '@/api/recruit/enterprise/talentMap/tag'
 import Snackbar from '@/plugins/snackbar'
 import Snackbar from '@/plugins/snackbar'
 import Confirm from '@/plugins/confirm'
 import Confirm from '@/plugins/confirm'
 import { useI18n } from '@/hooks/web/useI18n'
 import { useI18n } from '@/hooks/web/useI18n'
-import { timesTampChange } from '@/utils/date'
 
 
 const { t } = useI18n()
 const { t } = useI18n()
-const store = useUserStore()
 const loading = ref(false)
 const loading = ref(false)
-const showDialog = ref(false)
 const showAnnotationDialog = ref(false)
 const showAnnotationDialog = ref(false)
-const total = ref(10)
-const query = ref({
-  pageSize: 10,
-	pageNo: 1
-})
-const items = ref([])
+const content = ref('查找所有在上海的五星级酒店担任总经理职位的人才')
+const items = ref([
+  {
+    "姓名": "张三",
+    "邮箱": "zhang@example.com",
+    "职位": "总经理",
+    "酒店名称": "上海四季酒店"
+  },
+  {
+    "姓名": "李四",
+    "邮箱": "li@example.com",
+    "职位": "执行总经理",
+    "酒店名称": "上海浦东丽思卡尔顿酒店"
+  }
+])
 const headers = [
 const headers = [
-  { title: '姓名', key: 'nameChinese', sortable: false },
-  { title: '职位', key: 'position', sortable: false },
-  { title: '酒店', key: 'inaugurationHotel', sortable: false },
-  { title: '标签数量', key: 'tagNum', sortable: false },
-  { title: '人才状态', key: 'tagNum', sortable: false },
-  { title: '创建时间', key: 'createTime', sortable: false, value: item => timesTampChange(item.createTime) },
-  { title: '创建人', key: 'createUser', sortable: false },
-  { title: '修改时间', key: 'updateTime', sortable: false, value: item => timesTampChange(item.updateTime) },
-  { title: '修改人', key: 'updateUser', sortable: false },
+  { title: '姓名', key: '姓名', sortable: false },
+  { title: '酒店名称', key: '酒店名称', sortable: false },
+  { title: '职位', key: '职位', sortable: false },
+  { title: '邮箱', key: '邮箱', sortable: false },
   { title: '操作', key: 'actions', sortable: false, align: 'center' }
   { title: '操作', key: 'actions', sortable: false, align: 'center' }
 ]
 ]
-const formItems = ref({
-  options: [
-		{
-      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: 'nameChinese',
-      value: '',
-      label: '姓名',
-			clearable: true,
-			hideDetails: true,
-			width: 200
-    }
-  ]
+const textItem = ref({
+  type: 'text',
+  value: '',
+  label: '请输入您的描述信息定位人才',
+  placeholder: '回车开始人才匹配',
+  clearable: true,
+	hideDetails: true,
+  appendInnerIcon: 'mdi-magnify'
 })
 })
 
 
-// 获取企业权益信息
-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 () => {
 const getList = async () => {
 	loading.value = true
 	loading.value = true
 	try {
 	try {
-		const result = await getNewAppointmentsPage(query.value)
-		items.value = result.list
-		total.value = result.total
+		const data = await getLabelingList({ query_requirement: content.value })
+		console.log(data, '列表========')
+		items.value = data || []
 	} finally {
 	} finally {
 		loading.value = false
 		loading.value = false
 	}
 	}
 }
 }
 getList()
 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
+const handleSearch = async () => {
+	console.log('搜索', content.value)
+	if (!content.value) return Snackbar.warning('请输入您的描述信息定位人才')
 	getList()
 	getList()
 }
 }
 
 
 // 标注
 // 标注
-const tagList = ['富强', '民主', '文明', '和谐', '自由', '平等', '公正', '法治', '爱国', '敬业', '诚信', '友善']
 const talentItem = ref({
 const talentItem = ref({
 	name: '张三',
 	name: '张三',
 	enName: 'Tom',
 	enName: 'Tom',
@@ -253,13 +193,32 @@ const talentInfoKeys = [
 	{ key: 'inaugurationHotel', value: 'enInaugurationHotel' },
 	{ key: 'inaugurationHotel', value: 'enInaugurationHotel' },
 	{ key: 'groupName', value: 'enGroupName' },
 	{ key: 'groupName', value: 'enGroupName' },
 ]
 ]
-const handleAnnotation = (item) => {
-	console.log(item, '标注')
+
+// 获取人才标签
+const tagList = ref([])
+const getTagList = async () => {
+	annotationLoading.value = true
+	try {
+		const data = await getTalentTagList()
+		tagList.value = data || []
+	} finally {
+		annotationLoading.value = false
+	}
+}
+
+// 标注
+const annotationLoading = ref(false)
+const handleAnnotation = async (item) => {
+	await getTagList()
 	showAnnotationDialog.value = true
 	showAnnotationDialog.value = true
 }
 }
 
 
 // 删除
 // 删除
 const closeClick = (index, dataKey) => {
 const closeClick = (index, dataKey) => {
+	if (dataKey === 'manualAnnotationTags') {
+		const dataIndex = talentItem.value[dataKey].findIndex((i) => i === index)
+		if (dataIndex !== -1) index = dataIndex
+	}
 	talentItem.value[dataKey].splice(index, 1)
 	talentItem.value[dataKey].splice(index, 1)
 }
 }