From bd256d7006a56a2718fe91742defeeb28e5903b3 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Wed, 17 Jan 2024 10:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=88=86=E9=A1=B5=E5=99=A8?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/configManage/backupManage/index.vue | 27 +++++-- src/views/configManage/license/index.vue | 4 + src/views/configManage/neManage/index.vue | 4 + .../components/software-history.vue | 4 + .../configManage/softwareManage/index.vue | 6 ++ src/views/faultManage/active-alarm/index.vue | 9 ++- src/views/faultManage/history-alarm/index.vue | 4 + src/views/logManage/alarm/index.vue | 4 + src/views/logManage/forwarding/index.vue | 4 + src/views/logManage/mml/index.vue | 4 + src/views/logManage/neFile/index.vue | 4 + src/views/logManage/operation/index.vue | 4 + src/views/logManage/security/index.vue | 4 + src/views/monitor/job/index.vue | 6 +- src/views/monitor/job/log.vue | 8 +- src/views/monitor/session/index.vue | 4 + src/views/neUser/auth/index.vue | 4 + src/views/neUser/base5G/index.vue | 4 + src/views/neUser/ims/index.vue | 4 + src/views/neUser/sub/index.vue | 80 +++++++------------ src/views/neUser/ue/index.vue | 6 +- src/views/perfManage/customTarget/index.vue | 4 + src/views/perfManage/perfData/index.vue | 4 + src/views/perfManage/perfReport/index.vue | 4 + src/views/perfManage/perfSet/index.vue | 4 + src/views/perfManage/perfThreshold/index.vue | 4 + src/views/perfManage/taskManage/index.vue | 4 + src/views/system/config/index.vue | 4 + src/views/system/dict/data.vue | 4 + src/views/system/dict/index.vue | 4 + src/views/system/log/operate/index.vue | 4 + src/views/system/post/index.vue | 4 + src/views/system/role/auth-user.vue | 4 + .../role/components/auth-user-select.vue | 4 + src/views/system/role/index.vue | 4 + src/views/traceManage/analysis/index.vue | 4 + src/views/traceManage/task/index.vue | 4 + 37 files changed, 201 insertions(+), 61 deletions(-) diff --git a/src/views/configManage/backupManage/index.vue b/src/views/configManage/backupManage/index.vue index de488894..f3da708c 100644 --- a/src/views/configManage/backupManage/index.vue +++ b/src/views/configManage/backupManage/index.vue @@ -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) { 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) { function fnRecordDelete(row: Record) { 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) { 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(() => { diff --git a/src/views/configManage/license/index.vue b/src/views/configManage/license/index.vue index 258a075a..f93ec4eb 100644 --- a/src/views/configManage/license/index.vue +++ b/src/views/configManage/license/index.vue @@ -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; }); diff --git a/src/views/configManage/neManage/index.vue b/src/views/configManage/neManage/index.vue index aa9d85ec..aca1b61e 100644 --- a/src/views/configManage/neManage/index.vue +++ b/src/views/configManage/neManage/index.vue @@ -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; }); diff --git a/src/views/configManage/softwareManage/components/software-history.vue b/src/views/configManage/softwareManage/components/software-history.vue index 34e5de31..67a44c95 100644 --- a/src/views/configManage/softwareManage/components/software-history.vue +++ b/src/views/configManage/softwareManage/components/software-history.vue @@ -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; }); diff --git a/src/views/configManage/softwareManage/index.vue b/src/views/configManage/softwareManage/index.vue index 8607cbbf..20f33625 100644 --- a/src/views/configManage/softwareManage/index.vue +++ b/src/views/configManage/softwareManage/index.vue @@ -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; }); diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue index bbe6f857..611c4fb5 100644 --- a/src/views/faultManage/active-alarm/index.vue +++ b/src/views/faultManage/active-alarm/index.vue @@ -692,14 +692,21 @@ function fnGetList(pageNum?: number) { : ''; filterState.sql = sql; } - listAct(toRaw(queryParams), filterState.sql).then(res => { + listAct(toRaw(queryParams), filterState.sql).then((res: any) => { + console.log(res); if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { + // 取消勾选 if (state.selectedRowKeys.length > 0) { state.selectedRowKeys = []; } +//// 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) + } } else { tablePagination.total = 0; tableState.data = []; diff --git a/src/views/faultManage/history-alarm/index.vue b/src/views/faultManage/history-alarm/index.vue index 0ed64e3f..b9049f0f 100644 --- a/src/views/faultManage/history-alarm/index.vue +++ b/src/views/faultManage/history-alarm/index.vue @@ -494,6 +494,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); + } } else { tablePagination.total = 0; tableState.data = []; diff --git a/src/views/logManage/alarm/index.vue b/src/views/logManage/alarm/index.vue index cec99bde..3d351f19 100644 --- a/src/views/logManage/alarm/index.vue +++ b/src/views/logManage/alarm/index.vue @@ -182,6 +182,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; }); diff --git a/src/views/logManage/forwarding/index.vue b/src/views/logManage/forwarding/index.vue index 79ce2680..ac5c9376 100644 --- a/src/views/logManage/forwarding/index.vue +++ b/src/views/logManage/forwarding/index.vue @@ -193,6 +193,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; }); diff --git a/src/views/logManage/mml/index.vue b/src/views/logManage/mml/index.vue index 7c74057c..b216fc70 100644 --- a/src/views/logManage/mml/index.vue +++ b/src/views/logManage/mml/index.vue @@ -161,6 +161,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; }); diff --git a/src/views/logManage/neFile/index.vue b/src/views/logManage/neFile/index.vue index f5cb9b12..62bbdb32 100644 --- a/src/views/logManage/neFile/index.vue +++ b/src/views/logManage/neFile/index.vue @@ -235,6 +235,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; }); diff --git a/src/views/logManage/operation/index.vue b/src/views/logManage/operation/index.vue index c850d88a..04cc9bf3 100644 --- a/src/views/logManage/operation/index.vue +++ b/src/views/logManage/operation/index.vue @@ -187,6 +187,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; }); diff --git a/src/views/logManage/security/index.vue b/src/views/logManage/security/index.vue index 828b414b..baf25c89 100644 --- a/src/views/logManage/security/index.vue +++ b/src/views/logManage/security/index.vue @@ -176,6 +176,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; }); diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue index f7ef985d..3a990035 100644 --- a/src/views/monitor/job/index.vue +++ b/src/views/monitor/job/index.vue @@ -559,8 +559,12 @@ function fnGetList(pageNum?: number) { } tablePagination.total = res.total; tableState.data = res.rows; - tableState.loading = false; + if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) { + tableState.loading = false; + fnGetList(queryParams.pageNum - 1); + } } + tableState.loading = false; }); } diff --git a/src/views/monitor/job/log.vue b/src/views/monitor/job/log.vue index cf6ac3c7..80b65646 100644 --- a/src/views/monitor/job/log.vue +++ b/src/views/monitor/job/log.vue @@ -380,8 +380,12 @@ function fnGetList(pageNum?: number) { } tablePagination.total = res.total; tableState.data = res.rows; - tableState.loading = false; - } + if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) { + tableState.loading = false; + fnGetList(queryParams.pageNum - 1); + } + } + tableState.loading = false; }); } diff --git a/src/views/monitor/session/index.vue b/src/views/monitor/session/index.vue index cf8b2e63..3b06e2a0 100644 --- a/src/views/monitor/session/index.vue +++ b/src/views/monitor/session/index.vue @@ -189,6 +189,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; }); diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue index ca20f912..98f42ee7 100644 --- a/src/views/neUser/auth/index.vue +++ b/src/views/neUser/auth/index.vue @@ -640,6 +640,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; }); diff --git a/src/views/neUser/base5G/index.vue b/src/views/neUser/base5G/index.vue index 0e654932..bc163708 100644 --- a/src/views/neUser/base5G/index.vue +++ b/src/views/neUser/base5G/index.vue @@ -144,6 +144,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; }); diff --git a/src/views/neUser/ims/index.vue b/src/views/neUser/ims/index.vue index eee2e2f3..c33ec0b1 100644 --- a/src/views/neUser/ims/index.vue +++ b/src/views/neUser/ims/index.vue @@ -162,6 +162,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); + } } else { tablePagination.total = 0; tableState.data = []; diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue index d5529254..e63c47f6 100644 --- a/src/views/neUser/sub/index.vue +++ b/src/views/neUser/sub/index.vue @@ -888,13 +888,17 @@ function fnGetList(pageNum?: number) { if (tableState.selectedRowKeys.length > 0) { tableState.selectedRowKeys = []; } - + 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) - } + if ( + tablePagination.total <= + (queryParams.pageNum - 1) * tablePagination.pageSize && + queryParams.pageNum !== 1 + ) { + tableState.loading = false; + fnGetList(queryParams.pageNum - 1); + } } tableState.loading = false; }); @@ -1336,7 +1340,7 @@ onMounted(() => {