RAT Type:
diff --git a/src/views/dashboard/smfCDR/index.vue b/src/views/dashboard/smfCDR/index.vue
index deb1731e..f1e3bf98 100644
--- a/src/views/dashboard/smfCDR/index.vue
+++ b/src/views/dashboard/smfCDR/index.vue
@@ -19,7 +19,7 @@ import {
import { OptionsType, WS } from '@/plugins/ws-websocket';
import PQueue from 'p-queue';
import saveAs from 'file-saver';
-import dayjs, { Dayjs } from 'dayjs';
+import dayjs, { type Dayjs } from 'dayjs';
import { useClipboard } from '@vueuse/core';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
@@ -59,7 +59,7 @@ let queryParams = reactive({
sortField: 'timestamp',
sortOrder: 'desc',
/**开始时间 */
- startTime: undefined as undefined | number,
+ beginTime: undefined as undefined | number,
/**结束时间 */
endTime: undefined as undefined | number,
/**当前页数 */
@@ -362,22 +362,24 @@ function fnGetList(pageNum?: number) {
Array.isArray(queryRangePicker.value) &&
queryRangePicker.value.length > 0
) {
- queryParams.startTime = queryRangePicker.value[0].valueOf();
+ queryParams.beginTime = queryRangePicker.value[0].valueOf();
queryParams.endTime = queryRangePicker.value[1].valueOf();
} else {
- queryParams.startTime = undefined;
+ queryParams.beginTime = undefined;
queryParams.endTime = undefined;
}
listSMFDataCDR(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ // tableState.data = rows;
// 遍历处理cdr字符串数据
- tableState.data = res.rows.map(item => {
+ tableState.data = rows.map((item: any) => {
let cdrJSON = item.cdrJSON;
if (!cdrJSON) {
Reflect.set(item, 'cdrJSON', {});
@@ -508,12 +510,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record
[] = [];
- res.data.forEach(i => {
- if (i.neType === 'SMF') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'SMF') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue
index dea8bf0b..0e975023 100644
--- a/src/views/dashboard/smfCDRByIMSI/index.vue
+++ b/src/views/dashboard/smfCDRByIMSI/index.vue
@@ -229,7 +229,7 @@ function fnRanderChart() {
// 创建 ResizeObserver 实例 监听图表容器大小变化,并在变化时调整图表大小
var observer = new ResizeObserver(entries => {
- if (cdrChart) {
+ if (cdrChart && !cdrChart.isDisposed) {
cdrChart.resize();
}
});
@@ -271,7 +271,7 @@ let queryParams = reactive({
sortField: 'timestamp',
sortOrder: 'desc',
/**开始时间 */
- startTime: undefined as undefined | number,
+ beginTime: undefined as undefined | number,
/**结束时间 */
endTime: undefined as undefined | number,
/**当前页数 */
@@ -321,20 +321,20 @@ function fnGetList(pageNum?: number) {
Array.isArray(queryRangePicker.value) &&
queryRangePicker.value.length > 0
) {
- queryParams.startTime = queryRangePicker.value[0].valueOf();
+ queryParams.beginTime = queryRangePicker.value[0].valueOf();
queryParams.endTime = queryRangePicker.value[1].valueOf();
} else {
- queryParams.startTime = undefined;
+ queryParams.beginTime = undefined;
queryParams.endTime = undefined;
}
listSMFDataCDR(toRaw(queryParams))
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
state.total = res.total;
// 遍历处理cdr字符串数据
state.data = res.rows
- .map(item => {
+ .map((item: any) => {
let cdrJSON = item.cdrJSON;
if (!cdrJSON) {
Reflect.set(item, 'cdrJSON', {});
@@ -546,12 +546,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'SMF') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'SMF') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue
index da009f54..2cf576da 100644
--- a/src/views/dashboard/smscCDR/index.vue
+++ b/src/views/dashboard/smscCDR/index.vue
@@ -310,14 +310,16 @@ 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 && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ // tableState.data = rows;
// 遍历处理cdr字符串数据
- tableState.data = res.rows.map(item => {
+ tableState.data = rows.map((item:any) => {
let cdrJSON = item.cdrJSON;
if (!cdrJSON) {
Reflect.set(item, 'cdrJSON', {});
@@ -454,12 +456,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'SMSC') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v:any) => {
+ if (v.neType === 'SMSC') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue
index d2b8bd36..6456cd95 100644
--- a/src/views/faultManage/active-alarm/index.vue
+++ b/src/views/faultManage/active-alarm/index.vue
@@ -24,6 +24,7 @@ import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils';
+import { parseDateToStr } from '@/utils/date-utils';
const neInfoStore = useNeInfoStore();
const { getDict } = useDictStore();
const { t, currentLocale } = useI18n();
@@ -168,6 +169,12 @@ let tableColumns: ColumnsType = [
align: 'center',
sorter: (a: any, b: any) => 1,
width: 5,
+ customRender(opt) {
+ if (typeof opt.value === 'number') {
+ return parseDateToStr(+opt.value);
+ }
+ return opt.value;
+ },
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
@@ -734,14 +741,14 @@ function fnGetList(pageNum?: number) {
filterState.sql = sql;
}
listAct(toRaw(queryParams), filterState.sql).then((res: any) => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
- ////
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -1199,7 +1206,7 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.eventTime')"
name="eventTime"
>
- {{ modalState.from.eventTime }}
+ {{ parseDateToStr(modalState.from.eventTime) }}
@@ -1210,7 +1217,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.alarmType')"
name="alarmType"
>
- {{ modalState.from.alarmType }}
+
@@ -1247,7 +1257,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.origLevel')"
name="origSeverity"
>
- {{ modalState.from.origSeverity }}
+
diff --git a/src/views/faultManage/event/index.vue b/src/views/faultManage/event/index.vue
index 5ab00d49..27395abd 100644
--- a/src/views/faultManage/event/index.vue
+++ b/src/views/faultManage/event/index.vue
@@ -130,12 +130,6 @@ let tableColumns: ColumnsType = [
align: 'center',
width: 5,
},
- {
- title: t('views.faultManage.activeAlarm.neName'),
- dataIndex: 'neName',
- align: 'center',
- width: 5,
- },
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
@@ -161,12 +155,6 @@ let tableColumns: ColumnsType = [
sorter: (a: any, b: any) => 1,
width: 5,
},
- {
- title: t('views.faultManage.activeAlarm.pvFlag'),
- dataIndex: 'pvFlag',
- align: 'center',
- width: 5,
- },
{
title: t('common.operate'),
key: 'alarm_id',
@@ -403,14 +391,15 @@ function fnGetList(pageNum?: number) {
queryParams.endTime = queryRangePicker.value[1];
listAct(toRaw(queryParams)).then((res: any) => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
////
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -735,14 +724,6 @@ onMounted(() => {
{{ modalState.from.neId }}
-
-
- {{ modalState.from.neName }}
-
-
@@ -791,25 +772,6 @@ onMounted(() => {
{{ modalState.from.locationInfo }}
-
-
-
- {{ modalState.from.province }}
-
-
-
-
- {{ modalState.from.alarmType }}
-
-
-
-
{
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/logManage/alarm/index.vue b/src/views/logManage/alarm/index.vue
index 50079f63..5212d58a 100644
--- a/src/views/logManage/alarm/index.vue
+++ b/src/views/logManage/alarm/index.vue
@@ -179,9 +179,10 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listAlarm(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
diff --git a/src/views/logManage/exportFile/index.vue b/src/views/logManage/exportFile/index.vue
index b43cafee..b39391db 100644
--- a/src/views/logManage/exportFile/index.vue
+++ b/src/views/logManage/exportFile/index.vue
@@ -238,9 +238,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
getBakFileList(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- tablePagination.total = res.total;
- tableState.data = res.data;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -260,7 +261,7 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
getBakFile().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
res.data.forEach((item: any) => {
fileList.value.push({
value: item.tableName,
diff --git a/src/views/logManage/forwarding/index.vue b/src/views/logManage/forwarding/index.vue
index a0c04193..27737f56 100644
--- a/src/views/logManage/forwarding/index.vue
+++ b/src/views/logManage/forwarding/index.vue
@@ -82,19 +82,19 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.logManage.forwarding.alarmInter'),
- dataIndex: 'interface',
+ dataIndex: 'type',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmObj'),
- dataIndex: 'toUser',
+ dataIndex: 'target',
align: 'center',
width: 5,
},
{
title: t('views.logManage.forwarding.alarmInfo'),
- dataIndex: 'operResult',
+ dataIndex: 'result',
align: 'center',
width: 6,
},
@@ -140,7 +140,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.logManage.forwarding.logTime'),
- dataIndex: 'logTime',
+ dataIndex: 'createdAt',
align: 'center',
customRender(opt) {
if (!opt.value) return '';
@@ -196,9 +196,10 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listForwarding(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
diff --git a/src/views/logManage/mml/index.vue b/src/views/logManage/mml/index.vue
index 89341948..5931820d 100644
--- a/src/views/logManage/mml/index.vue
+++ b/src/views/logManage/mml/index.vue
@@ -158,9 +158,10 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listMML(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/logManage/neFile/index.vue b/src/views/logManage/neFile/index.vue
index a65223d5..3f62684b 100644
--- a/src/views/logManage/neFile/index.vue
+++ b/src/views/logManage/neFile/index.vue
@@ -238,9 +238,10 @@ function fnGetList(pageNum?: number) {
}
queryParams.path = nePathArr.value.join('/');
listNeFiles(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -280,7 +281,7 @@ function fnDrawerOpen(row: Record) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length === 0) {
message.warning({
content: t('common.noData'),
diff --git a/src/views/mmlManage/neOperate/index.vue b/src/views/mmlManage/neOperate/index.vue
index eb179489..b09077b2 100644
--- a/src/views/mmlManage/neOperate/index.vue
+++ b/src/views/mmlManage/neOperate/index.vue
@@ -354,7 +354,7 @@ function fnGetList() {
const neType = state.neType[0];
state.mmlNeType = neType;
getMMLByNE(neType).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 构建自动完成筛选结构
const autoCompleteArr: Record[] = [];
// 构建树结构
@@ -539,7 +539,7 @@ function fnAutoCompleteKeydown(evt: any) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
diff --git a/src/views/mmlManage/omcOperate/index.vue b/src/views/mmlManage/omcOperate/index.vue
index c6f99365..7f094110 100644
--- a/src/views/mmlManage/omcOperate/index.vue
+++ b/src/views/mmlManage/omcOperate/index.vue
@@ -342,7 +342,7 @@ function ruleVerification(
/**查询可选命令列表 */
function fnGetList() {
getMMLByOMC().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 构建自动完成筛选结构
const autoCompleteArr: Record[] = [];
// 构建树结构
@@ -508,7 +508,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 获取可用OMC
const omcArr = useNeInfoStore().getNeSelectOtions.find(
diff --git a/src/views/mmlManage/udmOperate/index.vue b/src/views/mmlManage/udmOperate/index.vue
index 72a1c856..25645ed1 100644
--- a/src/views/mmlManage/udmOperate/index.vue
+++ b/src/views/mmlManage/udmOperate/index.vue
@@ -342,7 +342,7 @@ function ruleVerification(
/**查询可选命令列表 */
function fnGetList() {
getMMLByUDM().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 构建自动完成筛选结构
const autoCompleteArr: Record[] = [];
// 构建树结构
@@ -508,7 +508,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 获取可用UDM
const udmArr = useNeInfoStore().getNeSelectOtions.find(
diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue
index 0f13439c..da729e0f 100644
--- a/src/views/monitor/job/index.vue
+++ b/src/views/monitor/job/index.vue
@@ -550,8 +550,9 @@ function fnGetList(pageNum?: number) {
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/monitor/job/log.vue b/src/views/monitor/job/log.vue
index 30089bc6..ac1edf9a 100644
--- a/src/views/monitor/job/log.vue
+++ b/src/views/monitor/job/log.vue
@@ -372,8 +372,9 @@ function fnGetList(pageNum?: number) {
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/monitor/monitor/index.vue b/src/views/monitor/monitor/index.vue
index 71715741..da47edba 100644
--- a/src/views/monitor/monitor/index.vue
+++ b/src/views/monitor/monitor/index.vue
@@ -64,22 +64,22 @@ let rangePicker = reactive({
/**查询全部资源数据列表 */
function fnGetList() {
- let startTime = null;
+ let beginTime = null;
let endTime = null;
const dateNumber = rangePicker.all;
if (dateNumber[0]) {
- startTime = dateNumber[0];
+ beginTime = dateNumber[0];
endTime = dateNumber[1];
} else {
const now = new Date();
now.setHours(0, 0, 0, 0);
- startTime = `${now.getTime()}`;
+ beginTime = `${now.getTime()}`;
endTime = `${new Date().getTime()}`;
}
getLoad({
type: 'all',
- startTime: startTime,
+ beginTime: beginTime,
endTime: endTime,
neType: '#',
neId: '#',
@@ -94,7 +94,7 @@ function fnGetList() {
});
// 设置初始时间段
- const initRangePicker: [string, string] = [startTime, endTime];
+ const initRangePicker: [string, string] = [beginTime, endTime];
rangePicker.all = initRangePicker;
rangePicker.load = initRangePicker;
rangePicker.cpu = initRangePicker;
@@ -357,11 +357,11 @@ function fnGetQuery(
if (!dateString[0]) {
return;
}
- const startTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
+ const beginTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
const endTime = parseStrToDate(dateString[1], YYYY_MM_DD_HH_MM_SS);
getLoad({
type: type,
- startTime: startTime.getTime(),
+ beginTime: beginTime.getTime(),
endTime: endTime.getTime(),
neType: '#',
neId: '#',
@@ -385,11 +385,11 @@ function fnGetQueryIO(v: any, dateString: [string, string]) {
if (!v) {
return;
}
- const startTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
+ const beginTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
const endTime = parseStrToDate(dateString[1], YYYY_MM_DD_HH_MM_SS);
getLoad({
type: 'io',
- startTime: startTime.getTime(),
+ beginTime: beginTime.getTime(),
endTime: endTime.getTime(),
neType: '#',
neId: '#',
@@ -405,11 +405,11 @@ function fnGetQueryNetwork(v: any, dateString: [string, string]) {
if (!v) {
return;
}
- const startTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
+ const beginTime = parseStrToDate(dateString[0], YYYY_MM_DD_HH_MM_SS);
const endTime = parseStrToDate(dateString[1], YYYY_MM_DD_HH_MM_SS);
getLoad({
type: 'network',
- startTime: startTime.getTime(),
+ beginTime: beginTime.getTime(),
endTime: endTime.getTime(),
neType: '#',
neId: '#',
diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 19f34301..73df7c3f 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -14,7 +14,7 @@ const { t } = useI18n();
/**查询参数 */
let queryParams = reactive({
/**登录主机 */
- ipaddr: '',
+ loginIp: '',
/**登录账号 */
userName: '',
});
@@ -63,7 +63,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.monitor.online.host'),
- dataIndex: 'ipaddr',
+ dataIndex: 'loginIp',
align: 'left',
},
// {
@@ -129,7 +129,7 @@ function fnTableSize({ key }: MenuInfo) {
/**查询参数重置 */
function fnQueryReset() {
- queryParams.ipaddr = '';
+ queryParams.loginIp = '';
queryParams.userName = '';
tablePagination.current = 1;
tablePagination.pageSize = 20;
@@ -141,8 +141,10 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listOnline(queryParams).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
}
tableState.loading = false;
});
@@ -209,7 +211,7 @@ onMounted(() => {
diff --git a/src/views/monitor/topologyBuild/index.vue b/src/views/monitor/topologyBuild/index.vue
index f94a617e..b4046211 100644
--- a/src/views/monitor/topologyBuild/index.vue
+++ b/src/views/monitor/topologyBuild/index.vue
@@ -51,7 +51,7 @@ function fnGraphGroupChange(value: any) {
function fnGraphDataGroups(reload: boolean = false) {
getGraphGroups()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
graphState.groupOptions = res.data.map(str => {
return { label: str, value: str };
});
diff --git a/src/views/ne-data/base-station/components/history.vue b/src/views/ne-data/base-station/components/history.vue
index 42211893..4d8b453f 100644
--- a/src/views/ne-data/base-station/components/history.vue
+++ b/src/views/ne-data/base-station/components/history.vue
@@ -245,14 +245,15 @@ function fnGetList(pageNum?: number) {
}
listNBState(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/ne-data/base-station/list.vue b/src/views/ne-data/base-station/list.vue
index 44b9c955..2fa1e01c 100644
--- a/src/views/ne-data/base-station/list.vue
+++ b/src/views/ne-data/base-station/list.vue
@@ -277,7 +277,7 @@ function fnGetList() {
return;
}
req.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
@@ -656,7 +656,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
useNeInfoStore().neCascaderOptions.forEach(item => {
diff --git a/src/views/ne/neConfig/index.vue b/src/views/ne/neConfig/index.vue
index 5ab607b0..7afd6fe6 100644
--- a/src/views/ne/neConfig/index.vue
+++ b/src/views/ne/neConfig/index.vue
@@ -66,7 +66,7 @@ async function fnSelectNeType(_: any, info: any) {
neId: v.neId,
paramName: `${treeState.data[0].key}`,
});
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
ne.disabled = !res.data.length;
} else {
ne.disabled = true;
@@ -227,7 +227,7 @@ async function fnGetNeConfig(neType: string) {
treeState.loading = true;
// 获取数据
const res = await getAllNeConfig(neType);
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
const arr = [];
for (const v of res.data) {
const item = JSON.parse(JSON.stringify(v));
@@ -304,7 +304,7 @@ function fnGetNeConfigData(
// 获取网元端的配置数据
getNeConfigData({ neType, neId, paramName }).then(res => {
// 数据处理
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
const ruleArr: Record[] = JSON.parse(
JSON.stringify(param.paramData)
);
@@ -478,12 +478,12 @@ watch(
val => {
// SMF需要选择配置的UPF id
if (val && neTypeSelect.value[0] === 'SMF') {
- if (neTypeSelect.value[1].startsWith('SYNC')) {
- smfByUPFIdLoadData(neTypeSelect.value[1]);
- return;
- } else {
- smfByUPFIdLoadData(neTypeSelect.value[1]);
+ let neId = neTypeSelect.value[1];
+ // 无neId时取首个可连接的
+ if (neId.startsWith('SYNC')) {
+ neId = neIdSelect.value[0];
}
+ smfByUPFIdLoadData(neId);
}
}
);
@@ -537,7 +537,7 @@ const {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
diff --git a/src/views/ne/neConfigBackup/index.vue b/src/views/ne/neConfigBackup/index.vue
index e45e50c0..66cd6865 100644
--- a/src/views/ne/neConfigBackup/index.vue
+++ b/src/views/ne/neConfigBackup/index.vue
@@ -179,9 +179,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeConfigBackup(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -372,7 +373,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
diff --git a/src/views/ne/neHost/index.vue b/src/views/ne/neHost/index.vue
index 98fbff28..e67f7722 100644
--- a/src/views/ne/neHost/index.vue
+++ b/src/views/ne/neHost/index.vue
@@ -188,9 +188,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeHost(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/ne/neHostCommand/index.vue b/src/views/ne/neHostCommand/index.vue
index 954f0124..4b655a09 100644
--- a/src/views/ne/neHostCommand/index.vue
+++ b/src/views/ne/neHostCommand/index.vue
@@ -161,9 +161,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeHostCmd(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/ne/neInfo/components/BackConfModal.vue b/src/views/ne/neInfo/components/BackConfModal.vue
index 367e76d9..5199a00e 100644
--- a/src/views/ne/neInfo/components/BackConfModal.vue
+++ b/src/views/ne/neInfo/components/BackConfModal.vue
@@ -50,9 +50,9 @@ function backupSearch(name?: string) {
pageNum: 1,
pageSize: 20,
}).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
importState.backupData = [];
- res.rows.forEach((item: any) => {
+ res.data.rows.forEach((item: any) => {
importState.backupData.push({
label: item.name,
value: item.path,
diff --git a/src/views/ne/neInfo/index.vue b/src/views/ne/neInfo/index.vue
index c24e2aa0..30bb0d41 100644
--- a/src/views/ne/neInfo/index.vue
+++ b/src/views/ne/neInfo/index.vue
@@ -364,14 +364,15 @@ function fnGetList(pageNum?: number) {
}
listNeInfo(toRaw(queryParams))
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
// 遍历处理资源情况数值
- tableState.data = res.rows.map(item => {
+ tableState.data = rows.map((item:any) => {
let resouresUsage = {
sysDiskUsage: 0,
sysMemUsage: 0,
diff --git a/src/views/ne/neLicense/index.vue b/src/views/ne/neLicense/index.vue
index 42d32688..068341bf 100644
--- a/src/views/ne/neLicense/index.vue
+++ b/src/views/ne/neLicense/index.vue
@@ -186,9 +186,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeLicense(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows.filter(s => s.neType !== 'OMC');
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows.filter((s:any) => s.neType !== 'OMC');
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -328,7 +329,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
diff --git a/src/views/ne/neQuickSetup/components/NeInfoSoftwareInstall.vue b/src/views/ne/neQuickSetup/components/NeInfoSoftwareInstall.vue
index 52cd89a8..d1890f6c 100644
--- a/src/views/ne/neQuickSetup/components/NeInfoSoftwareInstall.vue
+++ b/src/views/ne/neQuickSetup/components/NeInfoSoftwareInstall.vue
@@ -132,14 +132,14 @@ function fnGetList(pageNum?: number) {
tableState.queryParams.pageNum = pageNum;
}
listNeSoftware(toRaw(tableState.queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- // 遍历处理资源情况数值
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
}
tableState.loading = false;
});
diff --git a/src/views/ne/neSoftware/index.vue b/src/views/ne/neSoftware/index.vue
index f919222e..bfefb2d3 100644
--- a/src/views/ne/neSoftware/index.vue
+++ b/src/views/ne/neSoftware/index.vue
@@ -191,9 +191,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeSoftware(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -342,7 +343,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
diff --git a/src/views/ne/neVersion/index.vue b/src/views/ne/neVersion/index.vue
index abe7fe3f..f8883469 100644
--- a/src/views/ne/neVersion/index.vue
+++ b/src/views/ne/neVersion/index.vue
@@ -214,13 +214,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeVersion(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -442,7 +443,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
neOtions.value = useNeInfoStore().getNeSelectOtions;
} else {
message.warning({
diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue
index f2524022..a1cea9db 100644
--- a/src/views/neUser/auth/index.vue
+++ b/src/views/neUser/auth/index.vue
@@ -563,13 +563,14 @@ function fnGetList(pageNum?: number) {
tablePagination.current = pageNum;
}
listUDMAuth(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -721,12 +722,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'UDM') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'UDM') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/neUser/base5G/index.vue b/src/views/neUser/base5G/index.vue
index 857a91cb..9843b1f5 100644
--- a/src/views/neUser/base5G/index.vue
+++ b/src/views/neUser/base5G/index.vue
@@ -4,11 +4,12 @@ import { PageContainer } from 'antdv-pro-layout';
import { TableColumnsType, message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
-import { listBase5G } from '@/api/neUser/base5G';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import { useRoute } from 'vue-router';
+import { listAMFNblist } from '@/api/neData/amf';
+import { listMMENblist } from '@/api/neData/mme';
const neInfoStore = useNeInfoStore();
const route = useRoute();
const { t } = useI18n();
@@ -152,24 +153,34 @@ function fnGetList(pageNum?: number) {
promises.value = [];
//同时获取45G基站信息 且在每条信息中添加45G字段(原始数据没有) 已经筛选后的
neCascaderOptions.value.map((item: any) => {
- item.children.forEach((child: any) => {
- promises.value.push(
- listBase5G({
- neId: child.neId,
- neType: child.neType,
- nbId: queryParams.id,
- pageNum: queryParams.pageNum,
- pageSize: 10000,
- }).then(res => {
- // 添加 neName 字段到每一项数据
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- res.rows.forEach(row => {
- row.neName = `${child.neType}_${child.neId}`;
- });
- }
- return res;
- })
- );
+ item.children.forEach((child: any) => {
+ let resq = null;
+ let s = {
+ neId: child.neId,
+ neType: child.neType,
+ nbId: queryParams.id,
+ pageNum: queryParams.pageNum,
+ pageSize: 10000,
+ };
+ if (child.neType === '5G' || child.neType === 'AMF') {
+ resq = listAMFNblist(s);
+ }
+ if (child.neType === '4G' || child.neType === 'MME') {
+ resq = listMMENblist(s);
+ }
+ if (resq !== null) {
+ promises.value.push(
+ resq.then(res => {
+ // 添加 neName 字段到每一项数据
+ if (res.code === RESULT_CODE_SUCCESS) {
+ res.data.forEach((row: any) => {
+ row.neName = `${child.neType}_${child.neId}`;
+ });
+ }
+ return res;
+ })
+ );
+ }
});
});
@@ -212,16 +223,25 @@ function fnGetList(pageNum?: number) {
pageNum: queryParams.pageNum,
pageSize: queryParams.pageSize,
};
- listBase5G(toRaw(toBack)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ let resq = null;
+ if (queryParams.neType[0] === '5G' || queryParams.neType[0] === 'AMF') {
+ resq = listAMFNblist(toRaw(toBack));
+ }
+ if (queryParams.neType[0] === '4G' || queryParams.neType[0] === 'MME') {
+ resq = listMMENblist(toRaw(toBack));
+ }
+ if (resq === null) return;
+ resq.then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
- res.rows.forEach((item: any) => {
+ tablePagination.total = res.data.length;
+ tableState.data = res.data;
+
+ res.data.forEach((item: any) => {
item.neName = queryParams.neType.join('_');
});
@@ -247,7 +267,7 @@ onMounted(() => {
neInfoStore
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
diff --git a/src/views/neUser/ims/index.vue b/src/views/neUser/ims/index.vue
index 72643c0d..1a13dcef 100644
--- a/src/views/neUser/ims/index.vue
+++ b/src/views/neUser/ims/index.vue
@@ -9,6 +9,7 @@ import { listUEInfoByIMS } from '@/api/neUser/ims';
import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
+import { listIMSSessionList } from '@/api/neData/ims';
const { t } = useI18n();
/**网元参数 */
@@ -146,14 +147,14 @@ function fnGetList(pageNum?: number) {
if (pageNum) {
queryParams.pageNum = pageNum;
}
- listUEInfoByIMS(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ listIMSSessionList(toRaw(queryParams)).then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ tablePagination.total = res.data.length;
+ tableState.data = res.data;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -175,12 +176,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'IMS') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'IMS') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/neUser/n3iwf/index.vue b/src/views/neUser/n3iwf/index.vue
index f6e967b4..513bf7e9 100644
--- a/src/views/neUser/n3iwf/index.vue
+++ b/src/views/neUser/n3iwf/index.vue
@@ -92,8 +92,9 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listN3iwf(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tableState.data = rows;
} else {
tableState.data = [];
}
@@ -106,12 +107,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'N3IWF') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'N3IWF') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
@@ -246,5 +247,4 @@ onMounted(() => {
-
+
diff --git a/src/views/neUser/nssf/index.vue b/src/views/neUser/nssf/index.vue
index f2922252..f1a738af 100644
--- a/src/views/neUser/nssf/index.vue
+++ b/src/views/neUser/nssf/index.vue
@@ -69,12 +69,13 @@ function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
listNSSF().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tableState.data = rows;
} else {
tableState.data = [];
}
diff --git a/src/views/neUser/nssfAmf/index.vue b/src/views/neUser/nssfAmf/index.vue
index 9a32d73d..a8152998 100644
--- a/src/views/neUser/nssfAmf/index.vue
+++ b/src/views/neUser/nssfAmf/index.vue
@@ -58,12 +58,13 @@ function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
listNSSFAMF().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tableState.data = rows;
} else {
tableState.data = [];
}
diff --git a/src/views/neUser/pcf/index.vue b/src/views/neUser/pcf/index.vue
index 94771746..ff882e37 100644
--- a/src/views/neUser/pcf/index.vue
+++ b/src/views/neUser/pcf/index.vue
@@ -549,12 +549,14 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listRules(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
} else {
tableState.data = [];
}
@@ -640,12 +642,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'PCF') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'PCF') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue
index 69fc2855..f944fd96 100644
--- a/src/views/neUser/sub/index.vue
+++ b/src/views/neUser/sub/index.vue
@@ -942,14 +942,15 @@ function fnGetList(pageNum?: number) {
tablePagination.current = pageNum;
}
listUDMSub(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -1115,12 +1116,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'UDM') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'UDM') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/neUser/ue/index.vue b/src/views/neUser/ue/index.vue
index 61918cfe..00e81220 100644
--- a/src/views/neUser/ue/index.vue
+++ b/src/views/neUser/ue/index.vue
@@ -225,9 +225,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listSMFSubList(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -249,12 +250,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record[] = [];
- res.data.forEach(i => {
- if (i.neType === 'SMF') {
- arr.push({ value: i.neId, label: i.neName });
+ res.data.forEach((v: any) => {
+ if (v.neType === 'SMF') {
+ arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
diff --git a/src/views/perfManage/customTarget/index.vue b/src/views/perfManage/customTarget/index.vue
index 655b7490..84652f85 100644
--- a/src/views/perfManage/customTarget/index.vue
+++ b/src/views/perfManage/customTarget/index.vue
@@ -106,6 +106,12 @@ let tableColumns: ColumnsType = [
key: 'status',
align: 'left',
width: 100,
+ customRender: ({ text }) => {
+ if (text === '1') {
+ return 'Active';
+ }
+ return 'Inactive';
+ },
},
{
title: t('common.operate'),
@@ -190,13 +196,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listCustom(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.data;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
@@ -247,7 +254,7 @@ let modalState: ModalStateType = reactive({
neType: 'UDM',
title: '',
expression: '',
- status: 'Active',
+ status: '1',
unit: '',
description: '',
},
@@ -316,7 +323,7 @@ function fnSelectPerformanceInit(value: any) {
if (language === 'zh') language = 'cn';
// 获取表头文字
getKPITitle(value).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
for (const item of res.data) {
const kpiDisplay = item[`${language}Title`];
const kpiValue = item[`kpiId`];
@@ -622,12 +629,12 @@ onMounted(() => {
:options="[
{
label: t('views.perfManage.customTarget.active'),
- value: 'Active',
+ value: '1',
tagType: 'success',
},
{
label: t('views.perfManage.customTarget.inactive'),
- value: 'Inactive',
+ value: '0',
tagType: 'error',
},
]"
@@ -685,11 +692,11 @@ onMounted(() => {
:options="[
{
label: t('views.perfManage.customTarget.active'),
- value: 'Active',
+ value: '1',
},
{
label: t('views.perfManage.customTarget.inactive'),
- value: 'Inactive',
+ value: '0',
},
]"
:placeholder="t('common.selectPlease')"
diff --git a/src/views/perfManage/goldTarget/index.vue b/src/views/perfManage/goldTarget/index.vue
index f56dfd12..f84175c5 100644
--- a/src/views/perfManage/goldTarget/index.vue
+++ b/src/views/perfManage/goldTarget/index.vue
@@ -25,6 +25,7 @@ import {
h,
watch,
} from 'vue';
+import dayjs, { Dayjs } from 'dayjs';
import { PageContainer } from 'antdv-pro-layout';
import { message, Modal, TableColumnType } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
@@ -61,14 +62,6 @@ echarts.use([
UniversalTransition,
]);
-type EChartsOption = echarts.ComposeOption<
- | TooltipComponentOption
- | GridComponentOption
- | LegendComponentOption
- | DataZoomComponentOption
- | LineSeriesOption
->;
-
/**图DOM节点实例对象 */
const kpiChartDom = ref(undefined);
@@ -78,8 +71,26 @@ const kpiChart = ref(null);
/**网元参数 */
let neCascaderOptions = ref[]>([]);
-/**记录开始结束时间 */
-let queryRangePicker = ref<[string, string]>(['', '']);
+/**开始结束时间 */
+let queryRangePicker = ref<[Dayjs, Dayjs] | undefined>([
+ dayjs().startOf('hour'),
+ dayjs().endOf('hour'),
+]);
+/**时间范围 */
+let rangePickerPresets = ref([
+ {
+ label: 'Now hour',
+ value: [dayjs().startOf('hour'), dayjs().endOf('hour')],
+ },
+ { label: 'Today', value: [dayjs().startOf('day'), dayjs().endOf('day')] },
+ {
+ label: 'Yesterday',
+ value: [
+ dayjs().subtract(1, 'day').startOf('day'),
+ dayjs().subtract(1, 'day').endOf('day'),
+ ],
+ },
+]);
/**表格字段列 */
let tableColumns = ref([]);
@@ -150,9 +161,9 @@ let queryParams: any = reactive({
/**颗粒度 */
interval: 900,
/**开始时间 */
- startTime: '',
+ beginTime: undefined as undefined | number,
/**结束时间 */
- endTime: '',
+ endTime: undefined as undefined | number,
/**排序字段 */
sortField: 'timeGroup',
/**排序方式 */
@@ -314,7 +325,7 @@ function fnGetListTitle() {
getKPITitle(state.neType[0])
.then(res => {
//处理getKPITitle返回的结果
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
//检查值
tableColumns.value = []; //设为空数组
const columns: any[] = []; //初始化,构建新表头
@@ -374,12 +385,23 @@ function fnGetList() {
tableState.loading = true;
queryParams.neType = state.neType[0];
queryParams.neId = state.neType[1];
- queryParams.startTime = queryRangePicker.value[0];
- queryParams.endTime = queryRangePicker.value[1];
+
+ // 时间范围
+ if (
+ Array.isArray(queryRangePicker.value) &&
+ queryRangePicker.value.length > 0
+ ) {
+ queryParams.beginTime = queryRangePicker.value[0].valueOf();
+ queryParams.endTime = queryRangePicker.value[1].valueOf();
+ } else {
+ queryParams.beginTime = undefined;
+ queryParams.endTime = undefined;
+ }
+
listKPIData(toRaw(queryParams))
.then(res => {
tableState.loading = false;
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
tablePagination.total = res.data.length;
tableState.data = res.data;
@@ -804,7 +826,7 @@ onMounted(() => {
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
@@ -836,17 +858,6 @@ onMounted(() => {
queryParams.neId = info.neId;
}
- // 查询当前小时
- const now = new Date();
- now.setMinutes(0, 0, 0);
- // 设置起始时间为整点前一小时
- const startTime = new Date(now);
- startTime.setHours(now.getHours() - 1);
- queryRangePicker.value[0] = `${startTime.getTime()}`;
- // 设置结束时间为整点
- const endTime = new Date(now);
- endTime.setMinutes(59, 59, 59);
- queryRangePicker.value[1] = `${endTime.getTime()}`;
fnGetListTitle();
// 绘图
fnRanderChart();
@@ -892,12 +903,12 @@ onBeforeUnmount(() => {
>
diff --git a/src/views/perfManage/kpiCReport/index.vue b/src/views/perfManage/kpiCReport/index.vue
index 7a321384..820fd15a 100644
--- a/src/views/perfManage/kpiCReport/index.vue
+++ b/src/views/perfManage/kpiCReport/index.vue
@@ -329,10 +329,10 @@ function fnGetListTitle() {
if (!state.neType[0]) return false;
// 获取表头文字
- listCustom({ neType: state.neType[0], status: 'Active' })
+ listCustom({ neType: state.neType[0], status: '1' })
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- if (res.data.length === 0) {
+ if (res.code === RESULT_CODE_SUCCESS) {
+ if (res.data.rows.length === 0) {
message.error({
content: t('views.perfManage.customTarget.kpiIdTip'),
duration: 2,
@@ -346,7 +346,7 @@ function fnGetListTitle() {
}
tableColumns.value = [];
const columns: any[] = [];
- for (const item of res.data) {
+ for (const item of res.data.rows) {
const kpiDisplay = item[`unit`]
? item[`title`] + `(${item['unit']})`
: item[`title`];
@@ -407,7 +407,7 @@ function fnGetList() {
listCustomData(toRaw(queryParams))
.then(res => {
tableState.loading = false;
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
tablePagination.total = res.data.length;
tableState.data = res.data;
if (!res.data.length) {
@@ -834,9 +834,9 @@ watch(
onMounted(() => {
// 目前支持的 AMF AUSF MME MOCNGW NSSF SMF UDM UPF PCF
// 获取网元网元列表
- listCustom({ status: 'Active' }).then((res: any) => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- if (!res.data.length) {
+ listCustom({ status: '1' }).then((res: any) => {
+ if (res.code === RESULT_CODE_SUCCESS) {
+ if (!res.data.rows.length) {
message.warning({
content: '无可用的自定义指标,请先添加自定义指标',
duration: 2,
@@ -844,12 +844,12 @@ onMounted(() => {
return false;
}
let typeArr: any = [];
- res.data.forEach((item: any) => {
+ res.data.rows.forEach((item: any) => {
typeArr.push(item.neType);
});
typeArr = Array.from(new Set(typeArr));
- neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ neInfoStore.fnNelist().then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter(
diff --git a/src/views/perfManage/kpiKeyTarget/index.vue b/src/views/perfManage/kpiKeyTarget/index.vue
index 2b3931e2..fe50af51 100644
--- a/src/views/perfManage/kpiKeyTarget/index.vue
+++ b/src/views/perfManage/kpiKeyTarget/index.vue
@@ -301,14 +301,9 @@ const chartStates: Record<
> = Object.fromEntries(
networkElementTypes.value.map(type => [type, createChartState(type)])
) as Record>;
-
-//期择器
-interface RangePicker extends Record {
- placeholder: [string, string];
-}
-
+
// 日期选择器状态
-const rangePicker = reactive({
+const rangePicker = reactive({
...(Object.fromEntries(
networkElementTypes.value.map(type => [
type,
@@ -533,18 +528,18 @@ const fetchData = async (type: AllChartType) => {
try {
const dateRange = rangePicker[type] as [string, string];
- const [startTime, endTime] = dateRange;
+ const [beginTime, endTime] = dateRange;
const res = await listKPIData({
neType: type.toUpperCase(),
neId: '001',
- startTime,
+ beginTime,
endTime,
sortField: 'timeGroup',
sortOrder: 'desc',
interval: 60 * 15,
});
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
state.tableState.data = res.data;
await renderChart(type);
}
@@ -810,7 +805,7 @@ const fetchKPITitle = async (type: AllChartType) => {
: currentLocale.value.split('_')[0];
try {
const res = await getKPITitle(type.toUpperCase());
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 保存现有的颜色映
const existingColors = new Map(chartStates[type].seriesColors);
@@ -827,7 +822,7 @@ const fetchKPITitle = async (type: AllChartType) => {
return dayjs(Number(text)).format('YYYY-MM-DD HH:mm:ss');
},
},
- ...res.data.map(item => {
+ ...res.data.map((item:any) => {
const kpiId = item.kpiId;
// 如果没有现有的颜色,生成新的颜色
if (!existingColors.has(kpiId)) {
diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue
index 28f3b692..5c43a449 100644
--- a/src/views/perfManage/kpiOverView/index.vue
+++ b/src/views/perfManage/kpiOverView/index.vue
@@ -83,9 +83,9 @@ const ranges = ref([
},
]);
//日期范围响应式变量
-const dateRange = ref<[string, string]>([
- dayjs().subtract(1, 'hour').startOf('hour').valueOf().toString(), // 上一小时开始
- dayjs().startOf('hour').add(1, 'hour').valueOf().toString(), // 当前小时结束
+const dateRange = ref<[Dayjs, Dayjs] | undefined>([
+ dayjs().subtract(1, 'hour').startOf('hour'), // 上一小时开始
+ dayjs().startOf('hour').add(1, 'hour'), // 当前小时结束
]);
//实时数据状态
const isRealtime = ref(false);
@@ -108,10 +108,7 @@ const handleDateChange = (
return;
}
- dateRange.value = [
- dayjs(dateStrings[0]).valueOf().toString(),
- dayjs(dateStrings[1]).valueOf().toString(),
- ];
+ dateRange.value = [dayjs(dateStrings[0]), dayjs(dateStrings[1])];
fetchChartData();
};
@@ -226,8 +223,14 @@ const fetchChartData = async () => {
tableLoading.value = true;
rangeLoading.value = true;
try {
- const [startTime, endTime] = dateRange.value;
- if (!startTime || !endTime) {
+ let beginTime = 0;
+ let endTime = 0;
+ // 时间范围
+ if (Array.isArray(dateRange.value) && dateRange.value.length > 0) {
+ beginTime = dateRange.value[0].valueOf();
+ endTime = dateRange.value[1].valueOf();
+ }
+ if (beginTime == 0 || endTime == 0) {
console.warn('Invalid date range:', dateRange.value);
return;
}
@@ -237,8 +240,8 @@ const fetchChartData = async () => {
const params = {
neType,
neId: '001',
- startTime: String(startTime),
- endTime: String(endTime),
+ beginTime: beginTime,
+ endTime: endTime,
sortField: 'timeGroup',
sortOrder: 'asc',
interval: 60 * 15,
@@ -247,7 +250,7 @@ const fetchChartData = async () => {
try {
const res = await listKPIData(params);
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
return res.data;
}
return [];
@@ -651,8 +654,8 @@ const fetchSpecificKPI = async () => {
for (const neType of ALL_NE_TYPES) {
const res = await getKPITitle(neType.toUpperCase());
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- const formattedKPIs = res.data.map(item => ({
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const formattedKPIs = res.data.map((item: any) => ({
title: item[`${language}Title`],
dataIndex: item.kpiId,
key: item.kpiId,
diff --git a/src/views/perfManage/perfData/index.vue b/src/views/perfManage/perfData/index.vue
index 9d3ce85a..e46eb883 100644
--- a/src/views/perfManage/perfData/index.vue
+++ b/src/views/perfManage/perfData/index.vue
@@ -190,9 +190,10 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listperfData(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
diff --git a/src/views/perfManage/perfThreshold/index.vue b/src/views/perfManage/perfThreshold/index.vue
index 30d13694..99c4ad7e 100644
--- a/src/views/perfManage/perfThreshold/index.vue
+++ b/src/views/perfManage/perfThreshold/index.vue
@@ -189,13 +189,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listPerfThreshold(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/perfManage/taskManage/index.vue b/src/views/perfManage/taskManage/index.vue
index 9cebecc4..70b07665 100644
--- a/src/views/perfManage/taskManage/index.vue
+++ b/src/views/perfManage/taskManage/index.vue
@@ -222,13 +222,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listPerfTask(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index 96f3159b..d2eba896 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -445,13 +445,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listConfig(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index b51faeb4..762e3ecd 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -36,20 +36,20 @@ let queryParams = reactive({
/**部门名称 */
deptName: '',
/**部门状态 */
- status: undefined,
+ statusFlag: undefined,
});
/**查询参数重置 */
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
deptName: '',
- status: undefined,
+ statusFlag: undefined,
});
fnGetList();
}
/**表格全展开行key */
-let expandedRowKeys: string[] = [];
+let expandedRowKeys: number[] = [];
/**表格状态类型 */
type TabeStateType = {
@@ -93,15 +93,15 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.dept.classSort'),
- dataIndex: 'orderNum',
+ dataIndex: 'deptSort',
align: 'left',
width: 200,
},
{
title: t('views.system.dept.status'),
- dataIndex: 'status',
- key: 'status',
- align: 'center',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
+ align: 'left',
width: 150,
},
{
@@ -165,12 +165,12 @@ let modalState: ModalStateType = reactive({
deptName: '',
email: '',
leader: '',
- orderNum: 0,
+ deptSort: 0,
parentId: '100',
ancestors: '',
parentName: null,
phone: '',
- status: '0',
+ statusFlag: '0',
},
confirmLoading: false,
treeData: [],
@@ -386,14 +386,15 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listDept(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
const treeData = parseDataToTree(res.data, 'deptId');
// 初始上级部门和展开编号key
if (treeDataAll.length <= 0) {
// 转换树状数据
treeDataAll = treeData;
// 展开编号key
- expandedRowKeys = [...new Set(res.data.map(item => item.parentId))];
+ const parentIds: number[] = res.data.map((item: any) => item.parentId);
+ expandedRowKeys = [...new Set(parentIds)];
fnTableExpandedRowsAll(tableState.expandedRowAll);
}
tableState.data = treeData;
@@ -436,9 +437,12 @@ onMounted(() => {
-
+
@@ -547,8 +551,11 @@ onMounted(() => {
@expandedRowsChange="fnTableExpandedRowsChange"
>
-
-
+
+
@@ -582,7 +589,7 @@ onMounted(() => {
-
+
{{
t('views.system.dept.addClass')
}}
@@ -643,19 +650,22 @@ onMounted(() => {
- {{ modalState.from.orderNum }}
+ {{ modalState.from.deptSort }}
-
+
@@ -755,9 +765,12 @@ onMounted(() => {
-
+
@@ -767,10 +780,10 @@ onMounted(() => {
import { useRoute, useRouter } from 'vue-router';
-import { getLocalColor, changePrimaryColor } from '@/hooks/useTheme';
import { reactive, ref, onMounted, toRaw } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { ProModal } from 'antdv-pro-modal';
@@ -16,7 +15,7 @@ import {
addData,
updateData,
} from '@/api/system/dict/data';
-import { getDictOptionselect, getType } from '@/api/system/dict/type';
+import { getDictOption, getType } from '@/api/system/dict/type';
import { saveAs } from 'file-saver';
import { parseDateToStr } from '@/utils/date-utils';
import useTabsStore from '@/store/modules/tabs';
@@ -34,18 +33,6 @@ const dictId = route.params && (route.params.dictId as string);
const zh = currentLocale.value === 'zh_CN';
-let color = ref(getLocalColor());
-/**改变主题色 */
-function fnColorChange(e: Event) {
- const target = e.target as HTMLInputElement;
- if (target.nodeName === 'INPUT') {
- changePrimaryColor(target.value ?? '#1890ff');
- } else {
- changePrimaryColor();
- }
- color.value = getLocalColor();
-}
-
/**标签类型数据固定项 */
const tagTypeOptions = ref([
{ value: '', label: zh ? '普通文本' : 'Plain text' },
@@ -85,9 +72,9 @@ let queryParams = reactive({
/**字典名称 */
dictType: '',
/**数据标签 */
- dictLabel: '',
+ dataLabel: '',
/**数据状态 */
- status: undefined,
+ statusFlag: undefined,
/**当前页数 */
pageNum: 1,
/**每页条数 */
@@ -98,16 +85,16 @@ let queryParams = reactive({
function fnQueryReset() {
if (dictId && dictId !== '0') {
queryParams = Object.assign(queryParams, {
- dictLabel: '',
- status: undefined,
+ dataLabel: '',
+ statusFlag: undefined,
pageNum: 1,
pageSize: 20,
});
} else {
queryParams = Object.assign(queryParams, {
dictType: '',
- dictLabel: '',
- status: undefined,
+ dataLabel: '',
+ statusFlag: undefined,
pageNum: 1,
pageSize: 20,
});
@@ -143,33 +130,33 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
- title: t('views.system.dictData.dictCode'),
- dataIndex: 'dictCode',
+ title: t('views.system.dictData.dataId'),
+ dataIndex: 'dataId',
align: 'left',
width: 100,
},
{
- title: t('views.system.dictData.dictLabel'),
- dataIndex: 'dictLabel',
+ title: t('views.system.dictData.dataLabel'),
+ dataIndex: 'dataLabel',
align: 'left',
width: 200,
},
{
- title: t('views.system.dictData.dictValue'),
- dataIndex: 'dictValue',
+ title: t('views.system.dictData.dataValue'),
+ dataIndex: 'dataValue',
align: 'left',
width: 200,
},
{
- title: t('views.system.dictData.dictSort'),
- dataIndex: 'dictSort',
+ title: t('views.system.dictData.dataSort'),
+ dataIndex: 'dataSort',
align: 'left',
width: 100,
},
{
- title: t('views.system.dictData.status'),
- dataIndex: 'status',
- key: 'status',
+ title: t('views.system.dictData.statusFlag'),
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
align: 'left',
width: 100,
},
@@ -185,7 +172,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('common.operate'),
- key: 'dictCode',
+ key: 'dataId',
align: 'left',
},
];
@@ -249,15 +236,15 @@ let modalState: ModalStateType = reactive({
openByEdit: false,
title: '字典数据',
from: {
- dictCode: undefined,
- dictLabel: '',
- dictSort: 0,
+ dataId: undefined,
+ dataLabel: '',
+ dataSort: 0,
dictType: 'sys_oper_type',
- dictValue: '',
+ dataValue: '',
tagClass: '',
tagType: '',
remark: '',
- status: '0',
+ statusFlag: '0',
createTime: 0,
createBy: undefined,
},
@@ -268,20 +255,26 @@ let modalState: ModalStateType = reactive({
const modalStateFrom = Form.useForm(
modalState.from,
reactive({
- dictLabel: [
+ dictType: [
{
required: true,
- min: 1,
- max: 50,
- message: t('views.system.dictData.dictLabelPleac'),
+ message: t('common.selectPlease'),
},
],
- dictValue: [
+ dataLabel: [
{
required: true,
min: 1,
max: 50,
- message: t('views.system.dictData.dictValuePleac'),
+ message: t('views.system.dictData.dataLabelPleac'),
+ },
+ ],
+ dataValue: [
+ {
+ required: true,
+ min: 1,
+ max: 50,
+ message: t('views.system.dictData.dataValuePleac'),
},
],
})
@@ -299,10 +292,10 @@ function fnModalVisibleByVive(row: Record) {
/**
* 对话框弹出显示为 新增或者修改
- * @param dictCode 数据编号id, 不传为新增
+ * @param dataId 数据编号id, 不传为新增
*/
-function fnModalVisibleByEdit(dictCode?: string | number, record?: any) {
- if (!dictCode) {
+function fnModalVisibleByEdit(dataId?: string | number, record?: any) {
+ if (!dataId) {
modalStateFrom.resetFields();
modalState.from.dictType = queryParams.dictType;
modalState.title = t('views.system.dictData.addInfo');
@@ -311,7 +304,7 @@ function fnModalVisibleByEdit(dictCode?: string | number, record?: any) {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
- getData(dictCode).then(res => {
+ getData(dataId).then(res => {
modalState.confirmLoading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -335,7 +328,7 @@ function fnModalOk() {
.then(() => {
modalState.confirmLoading = true;
const from = toRaw(modalState.from);
- const dictData = from.dictCode ? updateData(from) : addData(from);
+ const dictData = from.dataId ? updateData(from) : addData(from);
const key = 'dictData';
message.loading({ content: t('common.loading'), key });
dictData
@@ -378,19 +371,19 @@ function fnModalCancel() {
/**
* 字典删除
- * @param dictCode 字典代码
+ * @param dataId 字典代码
*/
-function fnRecordDelete(dictCode: string = '0') {
- if (dictCode === '0') {
- dictCode = tableState.selectedRowKeys.join(',');
+function fnRecordDelete(dataId: string = '0') {
+ if (dataId === '0') {
+ dataId = tableState.selectedRowKeys.join(',');
}
Modal.confirm({
title: t('common.tipTitle'),
- content: t('views.system.dictData.delTip', { txt: dictCode }),
+ content: t('views.system.dictData.delTip', { txt: dataId }),
onOk() {
const key = 'delData';
message.loading({ content: t('common.loading'), key });
- delData(dictCode).then(res => {
+ delData(dataId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('views.system.dictData.delOk'),
@@ -456,13 +449,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listData(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -478,20 +472,19 @@ function fnGetList(pageNum?: number) {
onMounted(() => {
// 初始字典数据
- Promise.allSettled([
- getDict('sys_normal_disable'),
- getDictOptionselect(),
- ]).then(resArr => {
- if (resArr[0].status === 'fulfilled') {
- dict.sysNormalDisable = resArr[0].value;
- }
- if (resArr[1].status === 'fulfilled') {
- const dicts = resArr[1].value;
- if (dicts.code === RESULT_CODE_SUCCESS) {
- dict.sysDictType = dicts.data;
+ Promise.allSettled([getDict('sys_normal_disable'), getDictOption()]).then(
+ resArr => {
+ if (resArr[0].status === 'fulfilled') {
+ dict.sysNormalDisable = resArr[0].value;
+ }
+ if (resArr[1].status === 'fulfilled') {
+ const dicts = resArr[1].value;
+ if (dicts.code === RESULT_CODE_SUCCESS) {
+ dict.sysDictType = dicts.data;
+ }
}
}
- });
+ );
// 指定字典id列表数据
if (dictId && dictId !== '0') {
getType(dictId).then(res => {
@@ -535,11 +528,11 @@ onMounted(() => {
@@ -547,11 +540,11 @@ onMounted(() => {
{
{
}"
>
-
-
+
+
-
+
{{ t('common.viewText') }}
@@ -695,7 +691,7 @@ onMounted(() => {
{{ t('common.editText') }}
@@ -705,7 +701,7 @@ onMounted(() => {
{{ t('common.deleteText') }}
@@ -753,20 +749,20 @@ onMounted(() => {
- {{ modalState.from.dictCode }}
+ {{ modalState.from.dataId }}
@@ -774,18 +770,18 @@ onMounted(() => {
- {{ modalState.from.dictLabel }}
+ {{ modalState.from.dataLabel }}
- {{ modalState.from.dictValue }}
+ {{ modalState.from.dataValue }}
@@ -818,16 +814,16 @@ onMounted(() => {
>
- {{ modalState.from.dictSort }}
+ {{ modalState.from.dataSort }}
@@ -875,24 +871,25 @@ onMounted(() => {
{
@@ -965,11 +962,11 @@ onMounted(() => {
{
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -513,10 +514,10 @@ onMounted(() => {
@@ -669,8 +670,8 @@ onMounted(() => {
}"
>
-
-
+
+
@@ -740,10 +741,10 @@ onMounted(() => {
{{ modalState.from.dictType }}
-
+
@@ -800,9 +801,9 @@ onMounted(() => {
allow-clear
>
-
+
diff --git a/src/views/system/log/login/index.vue b/src/views/system/log/login/index.vue
index ee1e0ee7..8e001542 100644
--- a/src/views/system/log/login/index.vue
+++ b/src/views/system/log/login/index.vue
@@ -34,11 +34,11 @@ let queryRangePicker = ref<[string, string]>(['', '']);
/**查询参数 */
let queryParams = reactive({
/**登录地址 */
- ipaddr: '',
+ loginIp: '',
/**登录账号 */
userName: '',
/**登录状态 */
- status: undefined,
+ statusFlag: undefined,
/**开始时间 */
beginTime: '',
/**结束时间 */
@@ -52,9 +52,9 @@ let queryParams = reactive({
/**查询参数重置 */
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
- ipaddr: '',
+ loginIp: '',
userName: '',
- status: undefined,
+ statusFlag: undefined,
beginTime: '',
endTime: '',
pageNum: 1,
@@ -96,7 +96,7 @@ let tableState: TabeStateType = reactive({
let tableColumns: ColumnsType = [
{
title: t('views.system.log.login.operId'),
- dataIndex: 'loginId',
+ dataIndex: 'id',
align: 'left',
width: 100,
},
@@ -108,7 +108,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.log.login.loginIp'),
- dataIndex: 'ipaddr',
+ dataIndex: 'loginIp',
align: 'left',
width: 150,
},
@@ -132,8 +132,8 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.log.login.status'),
- dataIndex: 'status',
- key: 'status',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
align: 'center',
width: 100,
},
@@ -193,7 +193,7 @@ function fnTableSelectedRows(
_: (string | number)[],
rows: Record[]
) {
- tableState.selectedRowKeys = rows.map(item => item.loginId);
+ tableState.selectedRowKeys = rows.map(item => item.id);
// 针对单个登录账号解锁
if (rows.length === 1) {
tableState.selectedUserName = rows[0].userName;
@@ -332,13 +332,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listSysLogLogin(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
}
tableState.loading = false;
});
@@ -369,10 +370,10 @@ onMounted(() => {
@@ -393,10 +394,10 @@ onMounted(() => {
@@ -528,7 +529,7 @@ onMounted(() => {
{
}"
>
-
-
+
+
diff --git a/src/views/system/log/operate/index.vue b/src/views/system/log/operate/index.vue
index 12831990..56bb228d 100644
--- a/src/views/system/log/operate/index.vue
+++ b/src/views/system/log/operate/index.vue
@@ -39,11 +39,11 @@ let queryParams = reactive({
/**操作模块 */
title: '',
/**操作人员 */
- operName: '',
+ operaBy: '',
/**业务类型 */
businessType: undefined,
/**操作状态 */
- status: undefined,
+ statusFlag: undefined,
/**开始时间 */
beginTime: '',
/**结束时间 */
@@ -58,9 +58,9 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
title: '',
- operName: '',
+ operaBy: '',
businessType: undefined,
- status: undefined,
+ statusFlag: undefined,
beginTime: '',
endTime: '',
pageNum: 1,
@@ -99,8 +99,8 @@ let tableState: TabeStateType = reactive({
let tableColumns: ColumnsType = [
{
title: t('views.system.log.operate.operId'),
- dataIndex: 'operId',
- align: 'center',
+ dataIndex: 'id',
+ align: 'left',
width: 100,
},
{
@@ -118,33 +118,33 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.log.operate.operUser'),
- dataIndex: 'operName',
+ dataIndex: 'operaBy',
align: 'left',
width: 120,
},
// {
// title: t('views.system.log.operate.requestMe'),
- // dataIndex: 'requestMethod',
+ // dataIndex: 'operaUrlMethod',
// align: 'left',
// width: 150,
// },
{
title: t('views.system.log.operate.host'),
- dataIndex: 'operIp',
- align: 'center',
+ dataIndex: 'operaIp',
+ align: 'left',
width: 150,
},
{
title: t('views.system.log.operate.operStatus'),
- dataIndex: 'status',
- key: 'status',
- align: 'center',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
+ align: 'left',
width: 150,
},
{
title: t('views.system.log.operate.operDate'),
- dataIndex: 'operTime',
- align: 'center',
+ dataIndex: 'operaTime',
+ align: 'left',
width: 150,
customRender(opt) {
if (+opt.value <= 0) return '';
@@ -163,7 +163,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('common.operate'),
- key: 'operId',
+ key: 'id',
align: 'left',
},
];
@@ -221,20 +221,19 @@ let modalState: ModalStateType = reactive({
openByView: false,
title: '操作日志',
from: {
- operId: undefined,
+ id: undefined,
businessType: 0,
deptName: '',
- method: '',
- operIp: '',
- operLocation: '',
- operMsg: '',
- operName: '',
- operParam: '',
- operTime: 0,
- operUrl: '',
- operType: 1,
- requestMethod: 'PUT',
- status: 1,
+ operaMethod: '',
+ operaIp: '',
+ operaLocation: '',
+ operaMsg: '',
+ operaBy: '',
+ operaParam: '',
+ operaTime: 0,
+ operaUrl: '',
+ operaUrlMethod: 'PUT',
+ statusFlag: 1,
title: '',
},
});
@@ -356,13 +355,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listSysLogOperate(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -415,10 +415,10 @@ onMounted(() => {
@@ -439,10 +439,10 @@ onMounted(() => {
@@ -565,7 +565,7 @@ onMounted(() => {
{
:value="record.businessType"
/>
-
-
+
+
-
+
{{ t('common.viewText') }}
@@ -619,22 +622,22 @@ onMounted(() => {
- {{ modalState.from.operId }}
+ {{ modalState.from.id }}
-
+
{{
[
t('views.system.log.operate.fail'),
t('views.system.log.operate.suss'),
- ][+modalState.from.status]
+ ][+modalState.from.statusFlag]
}}
@@ -656,9 +659,9 @@ onMounted(() => {
- {{ modalState.from.operName }} / {{ modalState.from.operIp }}
+ {{ modalState.from.operaBy }} / {{ modalState.from.operaIp }}
@@ -666,19 +669,19 @@ onMounted(() => {
- {{ modalState.from.requestMethod }} -
- {{ modalState.from.operUrl }}
+ {{ modalState.from.operaUrlMethod }} -
+ {{ modalState.from.operaUrl }}
-
- {{ parseDateToStr(+modalState.from.operTime) }}
+
+ {{ parseDateToStr(+modalState.from.operaTime) }}
@@ -695,32 +698,32 @@ onMounted(() => {
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index 91506c13..855bbf99 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -61,14 +61,14 @@ let queryParams = reactive({
/**菜单名称 */
menuName: undefined,
/**状态 */
- status: undefined,
+ statusFlag: undefined,
});
/**查询参数重置 */
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
menuName: '',
- status: undefined,
+ statusFlag: undefined,
});
fnGetList();
}
@@ -126,7 +126,7 @@ let tableColumns: ColumnsType = [
title: t('views.system.menu.menuTitle'),
dataIndex: 'icon',
key: 'icon',
- align: 'center',
+ align: 'left',
width: 100,
},
{
@@ -143,22 +143,22 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.menu.status'),
- dataIndex: 'visible',
- key: 'visible',
+ dataIndex: 'visibleFlag',
+ key: 'visibleFlag',
align: 'center',
width: 120,
},
{
title: t('views.system.menu.menuStatus'),
- dataIndex: 'status',
- key: 'status',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
align: 'center',
width: 120,
},
{
title: t('views.system.menu.createTime'),
dataIndex: 'createTime',
- align: 'center',
+ align: 'left',
width: 150,
customRender(opt) {
if (+opt.value <= 0) return '';
@@ -239,13 +239,13 @@ let modalState: ModalStateType = reactive({
menuSort: 0,
menuType: MENU_TYPE_BUTTON,
component: '',
- path: '',
+ menuPath: '',
icon: '#',
perms: '',
- isFrame: '1',
- isCache: '0',
- visible: '0',
- status: '0',
+ frameFlag: '1',
+ cacheFlag: '0',
+ visibleFlag: '0',
+ statusFlag: '0',
createTime: 0,
remark: '',
parentType: '', // 标记禁止菜单类型添加目录和菜单
@@ -280,7 +280,7 @@ const modalStateFrom = Form.useForm(
message: t('views.system.menu.formLoc') + t('common.unableNull'),
},
],
- path: [
+ menuPath: [
{
required: true,
min: 1,
@@ -370,11 +370,11 @@ function fnModalVisibleByEdit(
function fnModalOk() {
let validateNames = ['parentId', 'menuName'];
if (modalState.from.menuType === MENU_TYPE_DIR) {
- validateNames.push('path');
+ validateNames.push('menuPath');
}
if (modalState.from.menuType === MENU_TYPE_MENU) {
validateNames.push('component');
- validateNames.push('path');
+ validateNames.push('menuPath');
validateNames.push('perms');
}
if (modalState.from.menuType === MENU_TYPE_BUTTON) {
@@ -463,9 +463,7 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listMenu(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- // 过滤旧前端菜单
- res.data = res.data.filter(i => i.perms !== 'page');
+ if (res.code === RESULT_CODE_SUCCESS) {
menuListData = JSON.parse(JSON.stringify(res.data));
// 初始上级菜单和展开编号key
if (treeDataAll.length <= 0) {
@@ -533,10 +531,10 @@ onMounted(() => {
@@ -648,17 +646,20 @@ onMounted(() => {
-
-
+
+
{{
[t('views.system.menu.hidden'), t('views.system.menu.show')][
- +record.visible
+ +record.visibleFlag
]
}}
-
-
+
+
@@ -812,8 +813,8 @@ onMounted(() => {
:xs="24"
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
>
-
- {{ modalState.from.path }}
+
+ {{ modalState.from.menuPath }}
{
-
+
{{
[t('views.system.menu.no'), t('views.system.menu.yes')][
- +modalState.from.isFrame
+ +modalState.from.frameFlag
]
}}
@@ -846,24 +847,27 @@ onMounted(() => {
{{
[
t('views.system.menu.noCache'),
t('views.system.menu.cache'),
- ][+modalState.from.isCache]
+ ][+modalState.from.cacheFlag]
}}
-
+
{{
[t('views.system.menu.hidden'), t('views.system.menu.show')][
- +modalState.from.visible
+ +modalState.from.visibleFlag
]
}}
@@ -872,11 +876,11 @@ onMounted(() => {
@@ -1033,10 +1037,10 @@ onMounted(() => {
-
+
@@ -1057,9 +1061,9 @@ onMounted(() => {
-
+
{{
@@ -1074,10 +1078,10 @@ onMounted(() => {
{{
@@ -1090,9 +1094,12 @@ onMounted(() => {
-
+
{{
@@ -1107,10 +1114,10 @@ onMounted(() => {
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index baf5ce60..9ded7022 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -37,7 +37,7 @@ let queryParams = reactive({
/**岗位名称 */
postName: '',
/**岗位状态 */
- status: undefined,
+ statusFlag: undefined,
/**当前页数 */
pageNum: 1,
/**每页条数 */
@@ -49,7 +49,7 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
postCode: '',
postName: '',
- status: undefined,
+ statusFlag: undefined,
pageNum: 1,
pageSize: 20,
});
@@ -109,9 +109,9 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.post.positionStatus'),
- dataIndex: 'status',
- key: 'status',
- align: 'center',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
+ align: 'left',
width: 150,
},
{
@@ -193,7 +193,7 @@ let modalState: ModalStateType = reactive({
postName: '',
postCode: '',
postSort: 0,
- status: '0',
+ statusFlag: '0',
remark: '',
createTime: 0,
},
@@ -400,13 +400,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listPost(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -467,10 +468,10 @@ onMounted(() => {
@@ -590,8 +591,8 @@ onMounted(() => {
}"
>
-
-
+
+
@@ -672,11 +673,11 @@ onMounted(() => {
@@ -754,10 +755,10 @@ onMounted(() => {
diff --git a/src/views/system/quick-start/components/NeInfoConfig.vue b/src/views/system/quick-start/components/NeInfoConfig.vue
index 7c6022aa..00176881 100644
--- a/src/views/system/quick-start/components/NeInfoConfig.vue
+++ b/src/views/system/quick-start/components/NeInfoConfig.vue
@@ -481,7 +481,7 @@ function fnGetList() {
listAllNeInfo({
bandHost: true,
}).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
tabState.panes = [];
res.data.forEach((item: any, index: any) => {
if (item.neType === 'OMC' || !Array.isArray(item.hosts)) return;
diff --git a/src/views/system/quick-start/components/NeInfoConfigPara5G.vue b/src/views/system/quick-start/components/NeInfoConfigPara5G.vue
index caa88525..72aa69cf 100644
--- a/src/views/system/quick-start/components/NeInfoConfigPara5G.vue
+++ b/src/views/system/quick-start/components/NeInfoConfigPara5G.vue
@@ -81,7 +81,7 @@ function fnGetList() {
getPara5GFilee(),
listNeInfo({
pageNum: 1,
- pageSize: 20,
+ pageSize: 100,
}),
]).then(resArr => {
// 已保存的配置
@@ -89,11 +89,9 @@ function fnGetList() {
state.from = resArr[0].data;
}
// 填充固定网元类型的ip
- if (
- resArr[1].code === RESULT_CODE_SUCCESS &&
- Array.isArray(resArr[1].rows)
- ) {
- for (const item of resArr[1].rows) {
+ if (resArr[1].code === RESULT_CODE_SUCCESS) {
+ const { rows } = resArr[1].data;
+ for (const item of rows) {
switch (item.neType) {
case 'OMC':
state.from.sbi.omc_ip = item.ip;
diff --git a/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue b/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue
index 625991e0..2f8129f9 100644
--- a/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue
+++ b/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue
@@ -206,13 +206,13 @@ function fnGetList() {
pageNum: 1,
pageSize: 20,
}).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
state.selectedRowOne = { neType: '' };
}
- state.data = res.rows.filter(s => s.neType !== 'OMC');
+ state.data = res.data.rows.filter((s: any) => s.neType !== 'OMC');
}
state.loading = false;
});
diff --git a/src/views/system/quick-start/components/NeInfoSoftwareLicense.vue b/src/views/system/quick-start/components/NeInfoSoftwareLicense.vue
index ecbf574e..5d4962d9 100644
--- a/src/views/system/quick-start/components/NeInfoSoftwareLicense.vue
+++ b/src/views/system/quick-start/components/NeInfoSoftwareLicense.vue
@@ -194,12 +194,12 @@ function fnGetList() {
pageNum: 1,
pageSize: 20,
}).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
- state.data = res.rows.filter(s => s.neType !== 'OMC');
+ state.data = res.data.rows.filter((s: any) => s.neType !== 'OMC');
}
state.loading = false;
});
diff --git a/src/views/system/role/auth-user.vue b/src/views/system/role/auth-user.vue
index 194a5068..317a8bfd 100644
--- a/src/views/system/role/auth-user.vue
+++ b/src/views/system/role/auth-user.vue
@@ -7,7 +7,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import AuthUserSelect from './components/auth-user-select.vue';
-import { authUserAllocatedList, authUserChecked } from '@/api/system/role';
+import { authUserList, authUserChecked } from '@/api/system/role';
import { parseDateToStr } from '@/utils/date-utils';
import useTabsStore from '@/store/modules/tabs';
import useDictStore from '@/store/modules/dict';
@@ -36,7 +36,7 @@ let queryParams = reactive({
/**登录账号 */
userName: '',
/**手机号码 */
- phonenumber: '',
+ phone: '',
/**用户状态 */
status: undefined,
/**角色ID */
@@ -53,7 +53,7 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
userName: '',
- phonenumber: '',
+ phone: '',
status: undefined,
pageNum: 1,
pageSize: 20,
@@ -105,7 +105,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.role.phone'),
- dataIndex: 'phonenumber',
+ dataIndex: 'phone',
align: 'left',
},
{
@@ -285,14 +285,15 @@ function fnGetList(pageNum?: number) {
if (pageNum) {
queryParams.pageNum = pageNum;
}
- authUserAllocatedList(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ authUserList(toRaw(queryParams)).then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
@@ -347,10 +348,10 @@ onMounted(() => {
diff --git a/src/views/system/role/components/auth-user-select.vue b/src/views/system/role/components/auth-user-select.vue
index a3c55a9e..f1ddb51d 100644
--- a/src/views/system/role/components/auth-user-select.vue
+++ b/src/views/system/role/components/auth-user-select.vue
@@ -4,7 +4,7 @@ import { message } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { ColumnsType } from 'ant-design-vue/es/table';
import { ProModal } from 'antdv-pro-modal';
-import { authUserAllocatedList } from '@/api/system/role';
+import { authUserList } from '@/api/system/role';
import { parseDateToStr } from '@/utils/date-utils';
import useDictStore from '@/store/modules/dict';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -40,7 +40,7 @@ let queryParams = reactive({
/**登录账号 */
userName: '',
/**手机号码 */
- phonenumber: '',
+ phone: '',
/**用户状态 */
status: undefined,
/**角色ID */
@@ -57,7 +57,7 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
userName: '',
- phonenumber: '',
+ phone: '',
status: undefined,
pageNum: 1,
pageSize: 20,
@@ -106,7 +106,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.role.phone'),
- dataIndex: 'phonenumber',
+ dataIndex: 'phone',
align: 'left',
},
{
@@ -176,14 +176,15 @@ function fnGetList(pageNum?: number) {
if (pageNum) {
queryParams.pageNum = pageNum;
}
- authUserAllocatedList(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ authUserList(toRaw(queryParams)).then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -260,9 +261,9 @@ watch(
-
+
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 3f14810f..c882b42e 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -17,8 +17,8 @@ import {
listRole,
updateRole,
} from '@/api/system/role';
-import { roleMenuTreeSelect, menuTreeSelect } from '@/api/system/menu';
-import { roleDeptTreeSelect } from '@/api/system/dept';
+import { menuTreeSelectRole, menuTreeSelect } from '@/api/system/menu';
+import { deptTreeRole } from '@/api/system/dept';
import { saveAs } from 'file-saver';
import { parseDateToStr } from '@/utils/date-utils';
import useDictStore from '@/store/modules/dict';
@@ -56,7 +56,7 @@ let queryParams = reactive({
/**角色键值 */
roleKey: '',
/**角色状态 */
- status: undefined,
+ statusFlag: undefined,
/**记录开始时间 */
beginTime: '',
/**记录结束时间 */
@@ -72,7 +72,7 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
roleName: '',
roleKey: '',
- status: undefined,
+ statusFlag: undefined,
beginTime: '',
endTime: '',
pageNum: 1,
@@ -135,8 +135,8 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.role.roleStatus'),
- dataIndex: 'status',
- key: 'status',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
align: 'center',
width: 100,
},
@@ -258,7 +258,7 @@ let modalState: ModalStateType = reactive({
roleName: '',
roleKey: '',
roleSort: 0,
- status: '0',
+ statusFlag: '0',
menuIds: [],
deptIds: [],
remark: '',
@@ -320,7 +320,7 @@ function fnModalVisibleByVive(roleId: string | number) {
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询菜单下拉树结构
- Promise.all([getRole(roleId), roleMenuTreeSelect(roleId)]).then(resArr => {
+ Promise.all([getRole(roleId), menuTreeSelectRole(roleId)]).then(resArr => {
modalState.confirmLoading = false;
hide();
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
@@ -366,7 +366,7 @@ function fnModalVisibleByEdit(roleId?: string | number) {
menuTreeSelect().then(res => {
modalState.confirmLoading = false;
hide();
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
menuTree.checkedKeys = parseTreeKeys(res.data, 'id');
menuTree.expandedKeys = parseTreeNodeKeys(res.data, 'id');
menuTree.treeData = res.data;
@@ -382,7 +382,7 @@ function fnModalVisibleByEdit(roleId?: string | number) {
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询菜单下拉树结构
- Promise.all([getRole(roleId), roleMenuTreeSelect(roleId)]).then(resArr => {
+ Promise.all([getRole(roleId), menuTreeSelectRole(roleId)]).then(resArr => {
modalState.confirmLoading = false;
hide();
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
@@ -570,7 +570,7 @@ function fnRecordDataScope(roleId: string | number) {
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
// 查询角色详细同时根据角色ID查询部门树结构
- Promise.all([getRole(roleId), roleDeptTreeSelect(roleId)])
+ Promise.all([getRole(roleId), deptTreeRole(roleId)])
.then(resArr => {
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
modalState.from = Object.assign(modalState.from, resArr[0].data);
@@ -619,7 +619,7 @@ function fnRecordAuthUser(row: Record) {
*/
function fnRecordStatus(row: Record) {
const text =
- row.status === '1'
+ row.statusFlag === '1'
? t('views.system.role.open')
: t('views.system.role.close');
Modal.confirm({
@@ -630,7 +630,7 @@ function fnRecordStatus(row: Record) {
}),
onOk() {
const hide = message.loading(t('common.loading'), 0);
- changeRoleStatus(row.roleId, row.status).then(res => {
+ changeRoleStatus(row.roleId, row.statusFlag).then(res => {
hide();
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -650,7 +650,7 @@ function fnRecordStatus(row: Record) {
});
},
onCancel() {
- row.status = row.status === '1' ? '0' : '1';
+ row.statusFlag = row.statusFlag === '1' ? '0' : '1';
},
});
}
@@ -732,13 +732,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listRole(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -796,10 +797,10 @@ onMounted(() => {
@@ -935,14 +936,14 @@ onMounted(() => {
}"
>
-
+
{
@@ -968,7 +969,7 @@ onMounted(() => {
-
+
{{ t('common.editText') }}
{
-
+
{{ t('common.deleteText') }}
{
-
+
{{
t('views.system.role.distribute')
}}
@@ -1000,7 +1001,7 @@ onMounted(() => {
-
+
{{
t('views.system.role.distributeUser')
}}
@@ -1057,11 +1058,11 @@ onMounted(() => {
@@ -1157,10 +1158,10 @@ onMounted(() => {
@@ -1315,11 +1316,11 @@ onMounted(() => {
diff --git a/src/views/system/setting/components/change-home-index.vue b/src/views/system/setting/components/change-home-index.vue
index 82255bf9..f4ec03d7 100644
--- a/src/views/system/setting/components/change-home-index.vue
+++ b/src/views/system/setting/components/change-home-index.vue
@@ -58,9 +58,7 @@ function fnEdit(v: boolean) {
onMounted(() => {
listMenu(toRaw({ status: 1 })).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
- // 过滤旧前端菜单以及不是菜单类型以及路径为空
- res.data = res.data.filter(i => i.perms !== 'page' && i.menuType !== 'B');
+ if (res.code === RESULT_CODE_SUCCESS) {
state.options = parseDataToTree(res.data, 'menuId');
const setDisabledAndComponent = (item:any) => {
if (!item.component) {
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 8593c275..c8153e5b 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -19,7 +19,7 @@ import {
updateUser,
addUser,
} from '@/api/system/user';
-import { deptTreeSelect } from '@/api/system/dept';
+import { deptTree } from '@/api/system/dept';
import { saveAs } from 'file-saver';
import useI18n from '@/hooks/useI18n';
import { parseDateToStr } from '@/utils/date-utils';
@@ -34,6 +34,7 @@ import useDictStore from '@/store/modules/dict';
import useUserStore from '@/store/modules/user';
import { DataNode } from 'ant-design-vue/es/tree';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
+import { uploadFile } from '@/api/tool/file';
const { getDict } = useDictStore();
const userStore = useUserStore();
const { t } = useI18n();
@@ -57,11 +58,11 @@ let queryParams = reactive({
/**登录账号 */
userName: '',
/**手机号 */
- phonenumber: '',
+ phone: '',
/**部门ID */
deptId: undefined,
/**用户状态 */
- status: undefined,
+ statusFlag: undefined,
/**记录开始时间 */
beginTime: '',
/**记录结束时间 */
@@ -76,9 +77,9 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
userName: '',
- phonenumber: '',
+ phone: '',
deptId: undefined,
- status: undefined,
+ statusFlag: undefined,
beginTime: '',
endTime: '',
pageNum: 1,
@@ -155,7 +156,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.user.loginTime'),
- dataIndex: 'loginDate',
+ dataIndex: 'loginTime',
align: 'left',
width: 150,
customRender(opt) {
@@ -165,8 +166,8 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.system.user.status'),
- dataIndex: 'status',
- key: 'status',
+ dataIndex: 'statusFlag',
+ key: 'statusFlag',
align: 'left',
width: 100,
},
@@ -253,14 +254,14 @@ let modalState: ModalStateType = reactive({
password: '',
deptId: '100',
email: '',
- loginDate: 0,
+ loginTime: 0,
loginIp: '',
nickName: '',
- phonenumber: '',
+ phone: '',
postIds: [],
roleIds: [],
sex: '0',
- status: '0',
+ statusFlag: '0',
remark: '',
createTime: 0,
},
@@ -303,7 +304,7 @@ const modalStateFrom = Form.useForm(
message: t('views.system.user.emailTip'),
},
],
- phonenumber: [
+ phone: [
{
required: false,
pattern: regExpMobile,
@@ -330,12 +331,12 @@ function fnModalVisibleByVive(userId: string | number) {
hide();
if (res.code === RESULT_CODE_SUCCESS && res.data) {
const roles = res.data.roles.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
const posts = res.data.posts.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
@@ -371,12 +372,12 @@ function fnModalVisibleByEdit(userId?: string | number) {
hide();
if (res.code === RESULT_CODE_SUCCESS && res.data) {
const roles = res.data.roles.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
const posts = res.data.posts.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
@@ -403,12 +404,12 @@ function fnModalVisibleByEdit(userId?: string | number) {
hide();
if (res.code === RESULT_CODE_SUCCESS && res.data) {
const roles = res.data.roles.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
const posts = res.data.posts.map((m: Record) => {
- const disabled = m.status === '0';
+ const disabled = m.statusFlag === '0';
Reflect.set(m, 'disabled', disabled);
return m;
});
@@ -433,7 +434,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
* 进行表达规则校验
*/
function fnModalOk() {
- let validateName = ['nickName', 'email', 'phonenumber'];
+ let validateName = ['nickName', 'email', 'phone'];
if (!modalState.from.userId) {
validateName.push('userName', 'password');
}
@@ -542,7 +543,7 @@ function fnRecordResetPwd(row: Record) {
*/
function fnRecordStatus(row: Record) {
const text =
- row.status === '1'
+ row.statusFlag === '1'
? t('views.system.user.start')
: t('views.system.user.stop');
Modal.confirm({
@@ -554,7 +555,7 @@ function fnRecordStatus(row: Record) {
onOk() {
const key = 'changeUserStatus';
message.loading({ content: t('common.loading'), key });
- changeUserStatus(row.userId, row.status).then(res => {
+ changeUserStatus(row.userId, row.statusFlag).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `${row.userName} ${t('common.msgSuccess', { msg: text })}`,
@@ -572,7 +573,7 @@ function fnRecordStatus(row: Record) {
});
},
onCancel() {
- row.status = row.status === '1' ? '0' : '1';
+ row.statusFlag = row.statusFlag === '1' ? '0' : '1';
},
});
}
@@ -617,26 +618,27 @@ function fnExportList() {
title: t('common.tipTitle'),
content: t('views.system.user.exportSure'),
onOk() {
- const key = 'exportUser';
- message.loading({ content: t('common.loading'), key });
- exportUser(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS) {
- message.success({
- content: t('common.msgSuccess', {
- msg: t('views.system.user.export'),
- }),
- key,
- duration: 2,
- });
- saveAs(res.data, `user_${Date.now()}.xlsx`);
- } else {
- message.error({
- content: `${res.msg}`,
- key,
- duration: 2,
- });
- }
- });
+ const hide = message.loading(t('common.loading'), 0);
+ exportUser(toRaw(queryParams))
+ .then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
+ message.success({
+ content: t('common.msgSuccess', {
+ msg: t('views.system.user.export'),
+ }),
+ duration: 3,
+ });
+ saveAs(res.data, `user_${Date.now()}.xlsx`);
+ } else {
+ message.error({
+ content: `${res.msg}`,
+ duration: 3,
+ });
+ }
+ })
+ .finally(() => {
+ hide();
+ });
},
});
}
@@ -681,17 +683,30 @@ function fnModalUploadImportClose() {
/**对话框表格信息导入上传 */
function fnModalUploadImportUpload(file: File) {
+ // 发送请求
const hide = message.loading(t('common.loading'), 0);
uploadImportState.loading = true;
let formData = new FormData();
formData.append('file', file);
- formData.append('updateSupport', `${uploadImportState.updateSupport}`);
- importData(formData)
+ formData.append('subPath', 'import');
+ uploadFile(formData)
.then(res => {
- uploadImportState.msg = res.msg?.replaceAll(/
+/g, '\r');
+ if (res.code === RESULT_CODE_SUCCESS) {
+ return res.data.filePath;
+ }
+ return '';
})
- .catch((err: { code: number; msg: string }) => {
- message.error(` ${err.msg}`);
+ .then(filePath => {
+ if (filePath === '') return undefined;
+ return importData(filePath, uploadImportState.updateSupport);
+ })
+ .then(res => {
+ if (res === undefined) return;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ uploadImportState.msg = res.msg?.replaceAll(/
+/g, '\r');
+ } else {
+ message.error(res.msg, 3);
+ }
})
.finally(() => {
hide();
@@ -738,13 +753,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listUser(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
}
tableState.loading = false;
});
@@ -756,8 +772,8 @@ let deptTreeData = ref([]);
/**查询部门下拉树结构 */
function fnGetDeptTree() {
if (deptTreeData.value.length > 0) return;
- deptTreeSelect().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ deptTree().then(res => {
+ if (res.code === RESULT_CODE_SUCCESS) {
deptTreeData.value = res.data;
}
});
@@ -849,10 +865,10 @@ onMounted(() => {
{
-
+
{
{{ record.dept?.deptName }}
-
+
{
/>
-
+
{{ t('common.viewText') }}
{
-
- {{ parseDateToStr(+modalState.from.loginDate) }}
+
+ {{ parseDateToStr(+modalState.from.loginTime) }}
@@ -1154,10 +1170,10 @@ onMounted(() => {
-
+
@@ -1167,9 +1183,9 @@ onMounted(() => {
- {{ modalState.from.phonenumber }}
+ {{ modalState.from.phone }}
@@ -1361,11 +1377,11 @@ onMounted(() => {
{
:md="12"
:xs="24"
v-if="
- modalState.from.userId !== '1' &&
+ modalState.from.userId !== 1 &&
modalState.from.userId !== userStore.userId
"
>
-
+
) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
diff --git a/src/views/tool/ping/index.vue b/src/views/tool/ping/index.vue
index 260ee5ec..9190eb17 100644
--- a/src/views/tool/ping/index.vue
+++ b/src/views/tool/ping/index.vue
@@ -188,7 +188,7 @@ function fnMessage(res: Record) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
for (const item of neInfoStore.getNeCascaderOptions) {
diff --git a/src/views/tool/terminal/components/hostList.vue b/src/views/tool/terminal/components/hostList.vue
index a11331ea..8c1b08ae 100644
--- a/src/views/tool/terminal/components/hostList.vue
+++ b/src/views/tool/terminal/components/hostList.vue
@@ -144,9 +144,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listNeHost(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
diff --git a/src/views/tool/terminal/index.vue b/src/views/tool/terminal/index.vue
index 54b9252b..9dd562ec 100644
--- a/src/views/tool/terminal/index.vue
+++ b/src/views/tool/terminal/index.vue
@@ -67,7 +67,7 @@ function fnGetHostList(pageNum?: number) {
}
listNeHost(toRaw(hostState.params)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
hostState.total = res.total;
hostState.data = hostState.data.concat(res.rows);
// 页数+
diff --git a/src/views/traceManage/analysis/index.vue b/src/views/traceManage/analysis/index.vue
index f7b196b6..a2dce3df 100644
--- a/src/views/traceManage/analysis/index.vue
+++ b/src/views/traceManage/analysis/index.vue
@@ -10,7 +10,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver';
import useI18n from '@/hooks/useI18n';
-import { getTraceRawInfo, listTraceData } from '@/api/trace/analysis';
+import { listTraceData } from '@/api/trace/analysis';
const { t } = useI18n();
/**查询参数 */
@@ -156,9 +156,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listTraceData(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -485,11 +486,7 @@ onMounted(() => {
{{ t('views.traceManage.analysis.signalData') }}
-
+
{{ v.row }}
{{ v.code }}
{{ v.asciiText }}
diff --git a/src/views/traceManage/pcap/file.vue b/src/views/traceManage/pcap/file.vue
index 6503ecc6..0dd11e07 100644
--- a/src/views/traceManage/pcap/file.vue
+++ b/src/views/traceManage/pcap/file.vue
@@ -253,9 +253,10 @@ function fnGetList(pageNum?: number) {
}
queryParams.path = nePathArr.value.join('/');
listNeFiles(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ if (res.code === RESULT_CODE_SUCCESS) {
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -295,7 +296,7 @@ function fnDrawerOpen(row: Record) {
onMounted(() => {
// 获取网元网元列表
neInfoStore.fnNelist().then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length === 0) {
message.warning({
content: t('common.noData'),
diff --git a/src/views/traceManage/task-hlr/index.vue b/src/views/traceManage/task-hlr/index.vue
index c986e840..581e618e 100644
--- a/src/views/traceManage/task-hlr/index.vue
+++ b/src/views/traceManage/task-hlr/index.vue
@@ -212,13 +212,14 @@ function fnGetList(pageNum?: number) {
queryParams.startTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listTaskHLR(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -729,7 +730,7 @@ onMounted(() => {
{{ t('views.traceManage.task.imsiTip') }}
-
+
@@ -749,7 +750,7 @@ onMounted(() => {
{{ t('views.traceManage.task.msisdnTip') }}
-
+
diff --git a/src/views/traceManage/task/index.vue b/src/views/traceManage/task/index.vue
index 9ce96c24..1be6f3e6 100644
--- a/src/views/traceManage/task/index.vue
+++ b/src/views/traceManage/task/index.vue
@@ -246,13 +246,14 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listTraceTask(toRaw(queryParams)).then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
- tablePagination.total = res.total;
- tableState.data = res.rows;
+ const { total, rows } = res.data;
+ tablePagination.total = total;
+ tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -314,7 +315,7 @@ let modalState: ModalStateType = reactive({
neTypeInterfaceSelect: [],
timeRangePicker: ['', ''],
from: {
- id: '',
+ id: undefined,
neType: '',
neId: '',
traceId: '',
@@ -573,7 +574,7 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
- if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
+ if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
// 过滤不可用的网元
neCascaderOptions.value = neInfoStore.getNeSelectOtions.filter(
@@ -918,7 +919,7 @@ onMounted(() => {
{{ t('views.traceManage.task.signalPortTip') }}
-
+
@@ -941,7 +942,9 @@ onMounted(() => {
{{ t('views.traceManage.task.srcIpTip') }}
-
+
@@ -964,7 +967,9 @@ onMounted(() => {
{{ t('views.traceManage.task.dstIpTip') }}
-
+
@@ -990,7 +995,7 @@ onMounted(() => {
{{ t('views.traceManage.task.imsiTip') }}
-
+
@@ -1010,7 +1015,7 @@ onMounted(() => {
{{ t('views.traceManage.task.msisdnTip') }}
-
+