|
@@ -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)"
|
|
@@ -166,7 +166,7 @@
|
|
|
</template>
|
|
|
</Dialog>
|
|
|
|
|
|
- <StorePage ref="StorePageRef" @refresh="getList" />
|
|
|
+ <StorePage ref="StorePageRef" @refresh="handleQuery" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
@@ -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)
|
|
|
}
|
|
|
|
|
|
// 任务解析
|
|
@@ -275,7 +283,7 @@ const handleAnalysis = async ({ task_type, id, task_source, task_name }) => {
|
|
|
try {
|
|
|
const { results } = await talentGatherApi.taskAnalysis(params)
|
|
|
message.success('解析成功')
|
|
|
- getList()
|
|
|
+ handleQuery()
|
|
|
|
|
|
StorePageRef.value.open(task_type, { results }, id)
|
|
|
|
|
@@ -297,7 +305,7 @@ const handleCreateTask = async (query) => {
|
|
|
try {
|
|
|
await talentGatherApi.createTask(query)
|
|
|
message.success('任务创建成功')
|
|
|
- getList()
|
|
|
+ handleQuery()
|
|
|
} finally {
|
|
|
analysisLoading.value = false
|
|
|
webOriginList.value = []
|