|
@@ -43,6 +43,7 @@
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true">
|
|
|
+ <el-table-column label="任务ID" align="center" prop="id" />
|
|
|
<el-table-column label="任务名称" align="center" prop="task_name" />
|
|
|
<el-table-column label="任务类型" align="center" prop="task_type" />
|
|
|
<el-table-column label="任务状态" align="center" prop="task_status" />
|
|
@@ -56,6 +57,7 @@
|
|
|
type="success"
|
|
|
@click="handleAnalysis(scope.row)"
|
|
|
>解析</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"
|
|
|
link
|
|
@@ -207,7 +209,7 @@ const taskType = [
|
|
|
{ label: '门墩儿招聘', value: '招聘' },
|
|
|
{ label: '杂项', value: '杂项' }
|
|
|
]
|
|
|
-const taskStatus = ['待解析', '成功']
|
|
|
+const taskStatus = ['待解析', '成功', '已入库']
|
|
|
const itemData = ref({})
|
|
|
|
|
|
const SearchRef = ref(null)
|
|
@@ -245,15 +247,9 @@ const handleWebAnalysis = (list) => {
|
|
|
|
|
|
// 入库
|
|
|
const StorePageRef = ref(null)
|
|
|
-const handleStore = async (row) => {
|
|
|
- const { task_type, task_name, parse_result } = row
|
|
|
- // const { results } = parse_result
|
|
|
- // if (!results || !results.length) return message.warning('该任务无解析数据,无法入库')
|
|
|
-
|
|
|
- // StorePageRef.value.open(task_type, results, { summary, processed_time })
|
|
|
-
|
|
|
- // if (!row?.task_name) return message.warning('该任务无解析数据,无法入库')
|
|
|
- StorePageRef.value.open(task_type, parse_result)
|
|
|
+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)
|
|
|
}
|
|
|
|
|
|
// 任务解析
|
|
@@ -281,7 +277,7 @@ const handleAnalysis = async ({ task_type, id, task_source, task_name }) => {
|
|
|
message.success('解析成功')
|
|
|
getList()
|
|
|
|
|
|
- StorePageRef.value.open(task_type, { results })
|
|
|
+ StorePageRef.value.open(task_type, { results }, id)
|
|
|
|
|
|
} finally {
|
|
|
loading.close()
|