From 0a1f0d94d8ce8c8418d36bab4a35c0bdf78ebcec Mon Sep 17 00:00:00 2001 From: lai <10633968+laiyujun1@user.noreply.gitee.com> Date: Mon, 30 Dec 2024 16:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/log/index.vue | 4 ++++ src/views/manage/task/index.vue | 8 ++++---- src/views/manage/task/log/index.vue | 20 ++++++++++++-------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/views/manage/log/index.vue b/src/views/manage/log/index.vue index 60a18c2..a5bbd2f 100644 --- a/src/views/manage/log/index.vue +++ b/src/views/manage/log/index.vue @@ -133,6 +133,10 @@ async function handleBatchDelete() { const { error } = await doDeleteLog(checkedRowKeys.value); if (!error) { onBatchDeleted(); + // 取消勾选 + if (checkedRowKeys.value.length > 0) { + checkedRowKeys.value = []; + } } } diff --git a/src/views/manage/task/index.vue b/src/views/manage/task/index.vue index 7166e84..cfd3f72 100644 --- a/src/views/manage/task/index.vue +++ b/src/views/manage/task/index.vue @@ -183,6 +183,10 @@ async function handleBatchDelete() { const { error } = await doDeleteLog(checkedRowKeys.value); if (!error) { onBatchDeleted(); + // 取消勾选 + if (checkedRowKeys.value.length > 0) { + checkedRowKeys.value = []; + } } } }) @@ -327,7 +331,6 @@ function fnRunTask(jobId: any) { /**跳转任务日志页面 */ function fnJobLogView(jobId: string | number = '0') { - console.log(`${routePath}/log/${jobId}`) router.push(`${routePath}/log?jobId=${jobId}`); } @@ -336,9 +339,6 @@ function fnJobLogView(jobId: string | number = '0') { * @param row 任务信息对象 */ function fnRecordStatus(row: Record) { - doGetType(row.jobId).then((res: any) => { - console.log(res); - }) const sysJobStatus = [ { "label": t('common.normal'), diff --git a/src/views/manage/task/log/index.vue b/src/views/manage/task/log/index.vue index f19037c..5393afa 100644 --- a/src/views/manage/task/log/index.vue +++ b/src/views/manage/task/log/index.vue @@ -4,7 +4,7 @@ import type { Key } from 'ant-design-vue/es/_util/type'; import { useTable, useTableOperate } from '@/hooks/common/table'; import { SimpleScrollbar } from '~/packages/materials/src'; import { useI18n } from "vue-i18n"; -import { SyncOutlined, SearchOutlined, ProfileOutlined, CloseOutlined,ExportOutlined,DeleteOutlined } from '@ant-design/icons-vue'; +import { SyncOutlined, SearchOutlined, ProfileOutlined, CloseOutlined, ExportOutlined, DeleteOutlined } from '@ant-design/icons-vue'; import { enableStatusOptions } from '@/constants/business'; import { saveAs } from 'file-saver'; @@ -64,7 +64,7 @@ const scrollConfig = computed(() => { }; }); -const { columns, data, loading, getData, mobilePagination, searchParams, resetSearchParams } = useTable({ +const { columns, data, loading, getData, mobilePagination, searchParams, resetSearchParams } = useTable({ apiFn: doGetjobLogList, apiParams: { pageNum: 1, @@ -158,6 +158,10 @@ async function handleBatchDelete() { const { error } = await doDeleteJobLog(checkedRowKeys.value); if (!error) { onDeleted(); + // 取消勾选 + if (checkedRowKeys.value.length > 0) { + checkedRowKeys.value = []; + } } } }) @@ -175,7 +179,7 @@ function fnTest() { pageNum: 1, pageSize: 10, }); - }else{ + } else { searchParams.value = Object.assign(searchParams, { jobId: '', jobName: '', @@ -275,15 +279,15 @@ function fnClose(this: any) { } onMounted(() => { - // 指定任务id数据列表 - if (jobId && jobId !== '0') { - doGetjobInfo(jobId).then(res => { + // 指定任务id数据列表 + if (jobId && jobId !== '0') { + doGetjobInfo(jobId).then(res => { if (!res.error) { console.log(res.data); searchParams.jobId = res.data.jobId; searchParams.jobName = res.data.jobName; searchParams.jobGroup = res.data.jobGroup; - getData(); + getData(); } }); } else { @@ -302,7 +306,7 @@ onMounted(() => { - +