Bläddra i källkod

兼容门墩儿招聘数据格式

lifanagju_citu 2 månader sedan
förälder
incheckning
f304c6ff44

+ 9 - 3
src/views/menduner/system/talentMap/maintenance/gather/components/store.vue

@@ -148,8 +148,8 @@ const dealData = async (type, data) => {
   if (type === '简历') fileUrl.value = data.minio_path
   
   if (type === '招聘') { // 门墩儿招聘-人员信息在组件中通过id和userId获取
-    personId.value = data?.id || ''
-    userId.value = data?.userId || ''
+    personId.value = data?.data?.id || ''
+    userId.value = data?.data?.userId || ''
     activeName.value = 'info'
     // return
   }
@@ -203,8 +203,14 @@ const resetData = () => {
 const open = async (type, list) => {
   resetData()
   source.value = type
-
   const dataList = list.map(e => {
+    if (source.value === '招聘') {
+      return {
+        ...e,
+        data: e?.data?.normalized_data?.raw_data || {},
+        checked: true
+      }
+    }
     return { ...e, checked: true }
   })
   originData.value = dataList

+ 2 - 0
src/views/menduner/system/talentMap/maintenance/gather/index.vue

@@ -273,6 +273,8 @@ const handleAnalysis = async ({ task_type, id, task_source }) => {
   }
   if (task_type === '杂项') params.process_type = 'table'
   if (task_type === '新任命') params.publish_time = '2025-07-17'
+  // 招聘数据未返回,params.data设置为测试数据
+  if (task_type === '招聘' && !params.data?.length) params.data = [{"id":"1843906600113389570","userId":"598525227328212992","name":"尹世丹","name_zh":"尹世丹"},{"id":"1942125259693166593","userId":"1942124499676893185","name":"陈梅","name_zh":"陈梅"}]
   try {
     await talentGatherApi.taskAnalysis(params)
     message.success('操作成功,任务解析中')