ソースを参照

门墩儿招聘

lifanagju_citu 2 ヶ月 前
コミット
bce7d7d484

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

@@ -222,7 +222,7 @@ const open = async (task_type, parse_result, task_id, isDetail) => {
   resetData()
   source.value = task_type
   const dataList = results.map(e => {
-    if (source.value === '招聘') e.data = e?.data?.normalized_data?.raw_data || {}
+    if (source.value === '招聘') e.data = e
     // 切换标签
     tagList.value.push({ name: e.data.name_zh, checked: true })
     return e

+ 12 - 4
src/views/menduner/system/talentMap/maintenance/gather/index.vue

@@ -59,7 +59,7 @@
           >解析</el-button>
           <el-button v-else type="warning" link @click="handleStore(scope.row, true)">详情</el-button>
           <el-button
-            v-if="scope.row.task_status === '成功' && scope.row.parse_result"
+            v-if="scope.row.task_status === '成功'"
             link
             type="primary"
             @click="handleStore(scope.row)"
@@ -247,9 +247,17 @@ const handleWebAnalysis = (list) => {
 
 // 入库
 const StorePageRef = ref(null)
-const handleStore = ({ task_type, parse_result, id }, isDetail = false) => {
-  if (!parse_result) return message.warning(isDetail ? '暂无详情查看' : '暂无解析数据可入库')
-  StorePageRef.value.open(task_type, parse_result, id, isDetail)
+const handleStore = ({ task_type, parse_result, id, task_source }, isDetail = false) => {
+  const txt = isDetail ? '暂无详情查看' : '暂无解析数据可入库'
+  const isRecruitment = Boolean(task_type === '招聘')
+  if (isRecruitment) {
+    if (!task_source?.data) return message.warning(txt)
+  } else {
+    if (!parse_result) return message.warning(txt)
+  }
+
+const list = isRecruitment ? { results: JSON.parse(task_source.data) } : parse_result // 解析的人才列表
+  StorePageRef.value.open(task_type, list, id, isDetail)
 }
 
 // 任务解析