diff --git a/src/views/dashboard/amfUE/index.vue b/src/views/dashboard/amfUE/index.vue index ee102e61..3628605e 100644 --- a/src/views/dashboard/amfUE/index.vue +++ b/src/views/dashboard/amfUE/index.vue @@ -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,18 +466,21 @@ onMounted(() => { useNeInfoStore() .fnNelist() .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - if (res.data.length > 0) { - let arr: Record[] = []; - res.data.forEach((v:any) => { - if (v.neType === 'AMF') { - arr.push({ value: v.neId, label: v.neName }); - } - }); - neOtions.value = arr; - if (arr.length > 0) { - queryParams.neId = arr[0].value; + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + let arr: Record[] = []; + res.data.forEach((v: any) => { + if (v.neType === 'AMF') { + arr.push({ value: v.neId, label: v.neName }); } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } } else { message.warning({ diff --git a/src/views/dashboard/imsCDR/index.vue b/src/views/dashboard/imsCDR/index.vue index fe8af518..ad0842e0 100644 --- a/src/views/dashboard/imsCDR/index.vue +++ b/src/views/dashboard/imsCDR/index.vue @@ -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 = []; diff --git a/src/views/dashboard/mmeUE/index.vue b/src/views/dashboard/mmeUE/index.vue index 641adc8e..b3fa5210 100644 --- a/src/views/dashboard/mmeUE/index.vue +++ b/src/views/dashboard/mmeUE/index.vue @@ -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,18 +474,21 @@ onMounted(() => { useNeInfoStore() .fnNelist() .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - if (res.data.length > 0) { - let arr: Record[] = []; - res.data.forEach((v: any) => { - if (v.neType === 'MME') { - arr.push({ value: v.neId, label: v.neName }); - } - }); - neOtions.value = arr; - if (arr.length > 0) { - queryParams.neId = arr[0].value; + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + let arr: Record[] = []; + res.data.forEach((v: any) => { + if (v.neType === 'MME') { + arr.push({ value: v.neId, label: v.neName }); } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } } else { message.warning({ @@ -569,7 +572,7 @@ onBeforeUnmount(() => { :label="t('views.dashboard.cdr.time')" name="queryRangePicker" > - { - 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,18 +483,21 @@ onMounted(() => { useNeInfoStore() .fnNelist() .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - if (res.data.length > 0) { - let arr: Record[] = []; - res.data.forEach((v: any) => { - if (v.neType === 'SGWC') { - arr.push({ value: v.neId, label: v.neName }); - } - }); - neOtions.value = arr; - if (arr.length > 0) { - queryParams.neId = arr[0].value; + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + let arr: Record[] = []; + res.data.forEach((v: any) => { + if (v.neType === 'SGWC') { + arr.push({ value: v.neId, label: v.neName }); } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } } else { message.warning({ diff --git a/src/views/dashboard/smfCDR/index.vue b/src/views/dashboard/smfCDR/index.vue index f1e3bf98..9506a454 100644 --- a/src/views/dashboard/smfCDR/index.vue +++ b/src/views/dashboard/smfCDR/index.vue @@ -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 = []; diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 2cf576da..48f60073 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -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 = []; @@ -319,7 +319,7 @@ function fnGetList(pageNum?: number) { tablePagination.total = total; // tableState.data = rows; // 遍历处理cdr字符串数据 - tableState.data = rows.map((item:any) => { + tableState.data = rows.map((item: any) => { let cdrJSON = item.cdrJSON; if (!cdrJSON) { Reflect.set(item, 'cdrJSON', {}); @@ -456,18 +456,21 @@ onMounted(() => { useNeInfoStore() .fnNelist() .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - if (res.data.length > 0) { - let arr: Record[] = []; - res.data.forEach((v:any) => { - if (v.neType === 'SMSC') { - arr.push({ value: v.neId, label: v.neName }); - } - }); - neOtions.value = arr; - if (arr.length > 0) { - queryParams.neId = arr[0].value; + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + let arr: Record[] = []; + res.data.forEach((v: any) => { + if (v.neType === 'SMSC') { + arr.push({ value: v.neId, label: v.neName }); } + }); + neOtions.value = arr; + if (arr.length > 0) { + queryParams.neId = arr[0].value; + } else { + message.warning({ + content: t('common.noData'), + duration: 2, + }); } } else { message.warning({ diff --git a/src/views/ne/neInfo/index.vue b/src/views/ne/neInfo/index.vue index 30bb0d41..a106dc2a 100644 --- a/src/views/ne/neInfo/index.vue +++ b/src/views/ne/neInfo/index.vue @@ -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 = []; @@ -372,7 +372,7 @@ function fnGetList(pageNum?: number) { const { total, rows } = res.data; tablePagination.total = total; // 遍历处理资源情况数值 - tableState.data = rows.map((item:any) => { + tableState.data = rows.map((item: any) => { let resouresUsage = { sysDiskUsage: 0, sysMemUsage: 0, diff --git a/src/views/neUser/ims/index.vue b/src/views/neUser/ims/index.vue index 1a13dcef..1777a2a7 100644 --- a/src/views/neUser/ims/index.vue +++ b/src/views/neUser/ims/index.vue @@ -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 = [];