fix: CDR/UE数据空关闭loading
This commit is contained in:
@@ -297,7 +297,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listAMFDataUE(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -466,18 +466,21 @@ onMounted(() => {
|
|||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
.fnNelist()
|
.fnNelist()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
if (res.data.length > 0) {
|
let arr: Record<string, any>[] = [];
|
||||||
let arr: Record<string, any>[] = [];
|
res.data.forEach((v: any) => {
|
||||||
res.data.forEach((v:any) => {
|
if (v.neType === 'AMF') {
|
||||||
if (v.neType === 'AMF') {
|
arr.push({ value: v.neId, label: v.neName });
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
neOtions.value = arr;
|
||||||
|
if (arr.length > 0) {
|
||||||
|
queryParams.neId = arr[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.warning({
|
message.warning({
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listIMSDataCDR(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listMMEDataUE(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -474,18 +474,21 @@ onMounted(() => {
|
|||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
.fnNelist()
|
.fnNelist()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
if (res.data.length > 0) {
|
let arr: Record<string, any>[] = [];
|
||||||
let arr: Record<string, any>[] = [];
|
res.data.forEach((v: any) => {
|
||||||
res.data.forEach((v: any) => {
|
if (v.neType === 'MME') {
|
||||||
if (v.neType === 'MME') {
|
arr.push({ value: v.neId, label: v.neName });
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
neOtions.value = arr;
|
||||||
|
if (arr.length > 0) {
|
||||||
|
queryParams.neId = arr[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.warning({
|
message.warning({
|
||||||
@@ -569,7 +572,7 @@ onBeforeUnmount(() => {
|
|||||||
:label="t('views.dashboard.cdr.time')"
|
:label="t('views.dashboard.cdr.time')"
|
||||||
name="queryRangePicker"
|
name="queryRangePicker"
|
||||||
>
|
>
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
v-model:value="queryRangePicker"
|
v-model:value="queryRangePicker"
|
||||||
:presets="rangePickerPresets"
|
:presets="rangePickerPresets"
|
||||||
:bordered="true"
|
:bordered="true"
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listSGWCDataCDR(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -483,18 +483,21 @@ onMounted(() => {
|
|||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
.fnNelist()
|
.fnNelist()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
if (res.data.length > 0) {
|
let arr: Record<string, any>[] = [];
|
||||||
let arr: Record<string, any>[] = [];
|
res.data.forEach((v: any) => {
|
||||||
res.data.forEach((v: any) => {
|
if (v.neType === 'SGWC') {
|
||||||
if (v.neType === 'SGWC') {
|
arr.push({ value: v.neId, label: v.neName });
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
neOtions.value = arr;
|
||||||
|
if (arr.length > 0) {
|
||||||
|
queryParams.neId = arr[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.warning({
|
message.warning({
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listSMFDataCDR(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.startTime = queryRangePicker.value[0];
|
queryParams.startTime = queryRangePicker.value[0];
|
||||||
queryParams.endTime = queryRangePicker.value[1];
|
queryParams.endTime = queryRangePicker.value[1];
|
||||||
listSMSCDataCDR(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -319,7 +319,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
// tableState.data = rows;
|
// tableState.data = rows;
|
||||||
// 遍历处理cdr字符串数据
|
// 遍历处理cdr字符串数据
|
||||||
tableState.data = rows.map((item:any) => {
|
tableState.data = rows.map((item: any) => {
|
||||||
let cdrJSON = item.cdrJSON;
|
let cdrJSON = item.cdrJSON;
|
||||||
if (!cdrJSON) {
|
if (!cdrJSON) {
|
||||||
Reflect.set(item, 'cdrJSON', {});
|
Reflect.set(item, 'cdrJSON', {});
|
||||||
@@ -456,18 +456,21 @@ onMounted(() => {
|
|||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
.fnNelist()
|
.fnNelist()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
if (res.data.length > 0) {
|
let arr: Record<string, any>[] = [];
|
||||||
let arr: Record<string, any>[] = [];
|
res.data.forEach((v: any) => {
|
||||||
res.data.forEach((v:any) => {
|
if (v.neType === 'SMSC') {
|
||||||
if (v.neType === 'SMSC') {
|
arr.push({ value: v.neId, label: v.neName });
|
||||||
arr.push({ value: v.neId, label: v.neName });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
neOtions.value = arr;
|
|
||||||
if (arr.length > 0) {
|
|
||||||
queryParams.neId = arr[0].value;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
neOtions.value = arr;
|
||||||
|
if (arr.length > 0) {
|
||||||
|
queryParams.neId = arr[0].value;
|
||||||
|
} else {
|
||||||
|
message.warning({
|
||||||
|
content: t('common.noData'),
|
||||||
|
duration: 2,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.warning({
|
message.warning({
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
listNeInfo(toRaw(queryParams))
|
listNeInfo(toRaw(queryParams))
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data.rows)) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
@@ -372,7 +372,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
// 遍历处理资源情况数值
|
// 遍历处理资源情况数值
|
||||||
tableState.data = rows.map((item:any) => {
|
tableState.data = rows.map((item: any) => {
|
||||||
let resouresUsage = {
|
let resouresUsage = {
|
||||||
sysDiskUsage: 0,
|
sysDiskUsage: 0,
|
||||||
sysMemUsage: 0,
|
sysMemUsage: 0,
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listIMSSessionList(toRaw(queryParams)).then(res => {
|
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) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user