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,18 +466,21 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
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<string, any>[] = [];
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({