fix: CDR/UE数据空关闭loading

This commit is contained in:
TsMask
2025-02-27 15:31:58 +08:00
parent 6b81ea000b
commit 82d328e974
8 changed files with 67 additions and 55 deletions

View File

@@ -297,7 +297,7 @@ function fnGetList(pageNum?: number) {
}
listAMFDataUE(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -466,8 +466,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'AMF') {
@@ -477,7 +476,11 @@ onMounted(() => {
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({

View File

@@ -361,7 +361,7 @@ function fnGetList(pageNum?: number) {
}
listIMSDataCDR(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];

View File

@@ -298,7 +298,7 @@ function fnGetList(pageNum?: number) {
}
listMMEDataUE(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -474,8 +474,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'MME') {
@@ -485,7 +484,11 @@ onMounted(() => {
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({

View File

@@ -343,7 +343,7 @@ function fnGetList(pageNum?: number) {
}
listSGWCDataCDR(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -483,8 +483,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SGWC') {
@@ -494,7 +493,11 @@ onMounted(() => {
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({

View File

@@ -370,7 +370,7 @@ function fnGetList(pageNum?: number) {
}
listSMFDataCDR(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];

View File

@@ -310,7 +310,7 @@ function fnGetList(pageNum?: number) {
queryParams.startTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listSMSCDataCDR(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -456,8 +456,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
let arr: Record<string, any>[] = [];
res.data.forEach((v: any) => {
if (v.neType === 'SMSC') {
@@ -467,7 +466,11 @@ onMounted(() => {
neOtions.value = arr;
if (arr.length > 0) {
queryParams.neId = arr[0].value;
}
} else {
message.warning({
content: t('common.noData'),
duration: 2,
});
}
} else {
message.warning({

View File

@@ -364,7 +364,7 @@ function fnGetList(pageNum?: number) {
}
listNeInfo(toRaw(queryParams))
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];

View File

@@ -148,7 +148,7 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listIMSSessionList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];