From 20c197e5f67ee0ddd542065f53728033460aac21 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 10 Dec 2025 09:39:34 +0800
Subject: [PATCH] feat:更新历史任务详情功能

---
 src/views/job/components/TaskAlgorithmBusiness.vue |   10 +++++-----
 src/views/job/components/JobRelatedEvents.vue      |    5 ++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/views/job/components/JobRelatedEvents.vue b/src/views/job/components/JobRelatedEvents.vue
index 5afd1ad..8dc20b1 100644
--- a/src/views/job/components/JobRelatedEvents.vue
+++ b/src/views/job/components/JobRelatedEvents.vue
@@ -30,7 +30,7 @@
 			</div> -->
 			<div class="item">
 				<div class="itemchild">关联算法:</div>
-				<TaskAlgorithmBusiness :setWidth="186" :showAlgorithm="true" @algorithmChange="algorithmChange" />
+				<TaskAlgorithmBusiness ref="algorithmRef" :setWidth="186" :showAlgorithm="true" @algorithmChange="algorithmChange" />
 			</div>
 		</div>
 		<div class="search-btn">
@@ -126,6 +126,8 @@
 const emit = defineEmits(['refresh'])
 const props = defineProps(['jobTimes', 'batchNo', 'waylineJobId','detailName','isShowExportTheTask'])
 const taskData = ref('')
+const algorithmRef = ref()
+
 const algorithmChange = val => {
 	params.value.ai_types = val
   handleSearch()
@@ -203,6 +205,7 @@
 	params.value.end_date = null
 	params.value.start_date = null
 	taskData.value = ''
+  algorithmRef.value?.handleClear()
 	algorithmChange([])
 	// getList()
 }
diff --git a/src/views/job/components/TaskAlgorithmBusiness.vue b/src/views/job/components/TaskAlgorithmBusiness.vue
index 682cc2d..fbfe8d3 100644
--- a/src/views/job/components/TaskAlgorithmBusiness.vue
+++ b/src/views/job/components/TaskAlgorithmBusiness.vue
@@ -11,7 +11,7 @@
 			collapse-tags-tooltip
 			placeholder="支持多项选择"
 			clearable
-    @clear="clear"
+    @clear="handleClear"
 			@change="handleAlgorithmChange"
 		>
 			<el-option v-for="item in taskAlgorithm" :key="item.id" :label="item.dictValue" :value="item.dictKey" />
@@ -78,13 +78,13 @@
 	emit('businessChange', value)
 }
 
-const clear = () => {
-	ai_types.value = [] // 清空算法选择
-	handleAlgorithmChange(ai_types.value)
+function handleClear() {
+  ai_types.value = []
+  emit('algorithmChange', [])
 }
 
 defineExpose({
-	clear,
+  handleClear,
 })
 
 onMounted(() => {

--
Gitblit v1.9.3