diff --git a/src/views/job/batch/index.vue b/src/views/job/batch/index.vue index 053afd4..707f906 100644 --- a/src/views/job/batch/index.vue +++ b/src/views/job/batch/index.vue @@ -17,6 +17,7 @@ const detailData = ref(); /** 详情页可见状态 */ const { bool: detailVisible, setTrue: openDetail } = useBoolean(false); const jobName = history.state.jobName; +const jobId = history.state.jobId; const taskBatchStatus = history.state.taskBatchStatus; const { columnChecks, columns, data, getData, loading, mobilePagination, searchParams, resetSearchParams } = useTable({ @@ -27,9 +28,11 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP groupName: null, jobName: null, taskBatchStatus: null, + jobId: null, datetimeRange: monthRangeISO8601() }, searchParams: { + jobId, jobName, taskBatchStatus }, diff --git a/src/views/job/batch/modules/job-batch-search.vue b/src/views/job/batch/modules/job-batch-search.vue index b5b7ddb..c359b60 100644 --- a/src/views/job/batch/modules/job-batch-search.vue +++ b/src/views/job/batch/modules/job-batch-search.vue @@ -15,8 +15,6 @@ interface Emits { (e: 'search'): void; } -const keywords = ref(''); - const noSearchFlag = ref(false); const emit = defineEmits(); @@ -25,6 +23,7 @@ const emit = defineEmits(); const jobList = ref([]); const model = defineModel('model', { required: true }); +const keywords = ref(model.value.jobName as string); function reset() { keywords.value = ''; diff --git a/src/views/job/task/index.vue b/src/views/job/task/index.vue index f75ce89..72724e6 100644 --- a/src/views/job/task/index.vue +++ b/src/views/job/task/index.vue @@ -251,7 +251,7 @@ async function handleTriggerJob(id: string) { function goToBatch(jobId: string) { const findItem = data.value.find(item => item.id === jobId)!; - routerPushByKey('job_batch', { state: { jobName: findItem.jobName } }); + routerPushByKey('job_batch', { state: { jobId, jobName: findItem.jobName } }); } function body(): Api.Job.ExportJob {