2
0

取消勾选后重置

This commit is contained in:
lai
2024-12-30 16:44:40 +08:00
parent 6860c035c6
commit 0a1f0d94d8
3 changed files with 20 additions and 12 deletions

View File

@@ -133,6 +133,10 @@ async function handleBatchDelete() {
const { error } = await doDeleteLog(checkedRowKeys.value); const { error } = await doDeleteLog(checkedRowKeys.value);
if (!error) { if (!error) {
onBatchDeleted(); onBatchDeleted();
// 取消勾选
if (checkedRowKeys.value.length > 0) {
checkedRowKeys.value = [];
}
} }
} }

View File

@@ -183,6 +183,10 @@ async function handleBatchDelete() {
const { error } = await doDeleteLog(checkedRowKeys.value); const { error } = await doDeleteLog(checkedRowKeys.value);
if (!error) { if (!error) {
onBatchDeleted(); onBatchDeleted();
// 取消勾选
if (checkedRowKeys.value.length > 0) {
checkedRowKeys.value = [];
}
} }
} }
}) })
@@ -327,7 +331,6 @@ function fnRunTask(jobId: any) {
/**跳转任务日志页面 */ /**跳转任务日志页面 */
function fnJobLogView(jobId: string | number = '0') { function fnJobLogView(jobId: string | number = '0') {
console.log(`${routePath}/log/${jobId}`)
router.push(`${routePath}/log?jobId=${jobId}`); router.push(`${routePath}/log?jobId=${jobId}`);
} }
@@ -336,9 +339,6 @@ function fnJobLogView(jobId: string | number = '0') {
* @param row 任务信息对象 * @param row 任务信息对象
*/ */
function fnRecordStatus(row: Record<string, string>) { function fnRecordStatus(row: Record<string, string>) {
doGetType(row.jobId).then((res: any) => {
console.log(res);
})
const sysJobStatus = [ const sysJobStatus = [
{ {
"label": t('common.normal'), "label": t('common.normal'),

View File

@@ -4,7 +4,7 @@ import type { Key } from 'ant-design-vue/es/_util/type';
import { useTable, useTableOperate } from '@/hooks/common/table'; import { useTable, useTableOperate } from '@/hooks/common/table';
import { SimpleScrollbar } from '~/packages/materials/src'; import { SimpleScrollbar } from '~/packages/materials/src';
import { useI18n } from "vue-i18n"; 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 { enableStatusOptions } from '@/constants/business';
import { saveAs } from 'file-saver'; import { saveAs } from 'file-saver';
@@ -158,6 +158,10 @@ async function handleBatchDelete() {
const { error } = await doDeleteJobLog(checkedRowKeys.value); const { error } = await doDeleteJobLog(checkedRowKeys.value);
if (!error) { if (!error) {
onDeleted(); onDeleted();
// 取消勾选
if (checkedRowKeys.value.length > 0) {
checkedRowKeys.value = [];
}
} }
} }
}) })
@@ -175,7 +179,7 @@ function fnTest() {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}); });
}else{ } else {
searchParams.value = Object.assign(searchParams, { searchParams.value = Object.assign(searchParams, {
jobId: '', jobId: '',
jobName: '', jobName: '',
@@ -302,7 +306,7 @@ onMounted(() => {
<ARow :gutter="[16, 16]" wrap> <ARow :gutter="[16, 16]" wrap>
<ACol :lg="6" :md="12" :xs="24" v-if="jobId !== '0'"> <ACol :lg="6" :md="12" :xs="24" v-if="jobId !== '0'">
<AFormItem label="Name" name="jobName" class="m-0"> <AFormItem label="Name" name="jobName" class="m-0">
<AInput v-model:value="searchParams.jobName" :disabled="jobId !== '0'"/> <AInput v-model:value="searchParams.jobName" :disabled="jobId !== '0'" />
</AFormItem> </AFormItem>
</ACol> </ACol>