修正分页器异常
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
} from '@/api/configManage/backupManage';
|
||||
import { saveAs } from 'file-saver';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import {updateBackInfo } from '@/api/configManage/backupManage';
|
||||
import { updateBackInfo } from '@/api/configManage/backupManage';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -151,7 +151,10 @@ function fnTableSize({ key }: MenuInfo) {
|
||||
function fnDownloadFile(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.backupManage.totalSure',{oper:t('common.downloadText'),id:row.id}),
|
||||
content: t('views.configManage.backupManage.totalSure', {
|
||||
oper: t('common.downloadText'),
|
||||
id: row.id,
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'downloadNeBackup';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
@@ -182,7 +185,10 @@ function fnDownloadFile(row: Record<string, any>) {
|
||||
function fnRecordDelete(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.backupManage.totalSure',{oper:t('common.deleteText'),id:row.id}),
|
||||
content: t('views.configManage.backupManage.totalSure', {
|
||||
oper: t('common.deleteText'),
|
||||
id: row.id,
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'delNeBackup';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
@@ -221,6 +227,10 @@ function fnGetList(pageNum?: number) {
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
}
|
||||
tableState.loading = false;
|
||||
});
|
||||
@@ -243,7 +253,7 @@ let modalState: ModalStateType = reactive({
|
||||
visibleByEdit: false,
|
||||
title: '任务设置',
|
||||
from: {
|
||||
id:0,
|
||||
id: 0,
|
||||
backupInfo: '',
|
||||
},
|
||||
confirmLoading: false,
|
||||
@@ -265,7 +275,13 @@ function fnModalVisibleByEdit(row: Record<string, any>) {
|
||||
const modalStateFrom = Form.useForm(
|
||||
modalState.from,
|
||||
reactive({
|
||||
backupInfo: [{ required: true, message: t('views.configManage.backupManage.remark') + t('common.unableNull') }],
|
||||
backupInfo: [
|
||||
{
|
||||
required: true,
|
||||
message:
|
||||
t('views.configManage.backupManage.remark') + t('common.unableNull'),
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
/**
|
||||
@@ -295,7 +311,6 @@ function fnModalOk() {
|
||||
duration: 3,
|
||||
});
|
||||
fnGetList();
|
||||
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
@@ -141,6 +141,10 @@ function fnGetList(pageNum?: number) {
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
}
|
||||
tableState.loading = false;
|
||||
});
|
||||
|
||||
@@ -713,6 +713,10 @@ function fnGetList(pageNum?: number) {
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
}
|
||||
tableState.loading = false;
|
||||
});
|
||||
|
||||
@@ -167,6 +167,10 @@ function fnGetList(pageNum?: number) {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
}
|
||||
tableState.loading = false;
|
||||
});
|
||||
|
||||
@@ -403,6 +403,12 @@ function fnGetList(pageNum?: number) {
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
debugger
|
||||
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
}
|
||||
tableState.loading = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user