Merge remote-tracking branch 'origin/main' into practical-training
This commit is contained in:
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
|
|||||||
VITE_APP_CODE = "CN EMS"
|
VITE_APP_CODE = "CN EMS"
|
||||||
|
|
||||||
# 应用版本
|
# 应用版本
|
||||||
VITE_APP_VERSION = "2.240626"
|
VITE_APP_VERSION = "2.240627"
|
||||||
|
|
||||||
# 接口基础URL地址-不带/后缀
|
# 接口基础URL地址-不带/后缀
|
||||||
VITE_API_BASE_URL = "/omc-api"
|
VITE_API_BASE_URL = "/omc-api"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
|
|||||||
VITE_APP_CODE = "CN EMS"
|
VITE_APP_CODE = "CN EMS"
|
||||||
|
|
||||||
# 应用版本
|
# 应用版本
|
||||||
VITE_APP_VERSION = "2.240626"
|
VITE_APP_VERSION = "2.240627"
|
||||||
|
|
||||||
# 接口基础URL地址-不带/后缀
|
# 接口基础URL地址-不带/后缀
|
||||||
VITE_API_BASE_URL = "/omc-api"
|
VITE_API_BASE_URL = "/omc-api"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { request } from '@/plugins/http-fetch';
|
import { request } from '@/plugins/http-fetch';
|
||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
@@ -21,14 +20,19 @@ export async function listUEInfoBySMF(query: Record<string, any>) {
|
|||||||
msg: result.msg,
|
msg: result.msg,
|
||||||
};
|
};
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && result.data) {
|
||||||
const rows = parseObjLineToHump(result.data.data);
|
if (Array.isArray(result.data.data)) {
|
||||||
data.total = rows.length;
|
const rows = result.data.data;
|
||||||
data.rows = rows;
|
data.total = rows.length;
|
||||||
|
data.rows = rows;
|
||||||
|
} else {
|
||||||
|
Object.assign(data, result.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 模拟数据
|
// 模拟数据
|
||||||
// data.code = RESULT_CODE_SUCCESS;
|
// data.code = RESULT_CODE_SUCCESS;
|
||||||
|
// data.total = 2;
|
||||||
// data.rows = [
|
// data.rows = [
|
||||||
// {
|
// {
|
||||||
// imsi: 'imsi-460000100000090',
|
// imsi: 'imsi-460000100000090',
|
||||||
|
|||||||
@@ -14,23 +14,26 @@ const { t } = useI18n();
|
|||||||
/**显示遮罩 */
|
/**显示遮罩 */
|
||||||
const isVisible = computed(() => !['none', 'lock'].includes(maskStore.type));
|
const isVisible = computed(() => !['none', 'lock'].includes(maskStore.type));
|
||||||
|
|
||||||
// 等待指定的时间后触发事件的函数
|
// 用户无操作一段时间后进行锁屏
|
||||||
function idleTimeout(time: number, callback: Function) {
|
function idleTimeout(time: number, callback: Function) {
|
||||||
if (time === 0) return;
|
if (time === 0) return;
|
||||||
let timeoutId: any;
|
let timeoutId: any;
|
||||||
|
let idleTime = 0;
|
||||||
function resetTimer() {
|
function resetIdleTime() {
|
||||||
clearTimeout(timeoutId);
|
idleTime = 0;
|
||||||
timeoutId = setTimeout(callback, time);
|
|
||||||
}
|
}
|
||||||
|
// 监听用户活动事件
|
||||||
// 监听浏览器标签是否活动
|
document.addEventListener('mousemove', useThrottleFn(resetIdleTime, 1000));
|
||||||
window.addEventListener('blur', useThrottleFn(resetTimer, 300));
|
document.addEventListener('keydown', useThrottleFn(resetIdleTime, 1000));
|
||||||
window.addEventListener('focus', useThrottleFn(resetTimer, 300));
|
document.addEventListener('click', useThrottleFn(resetIdleTime, 1000));
|
||||||
document.addEventListener('visibilitychange', useThrottleFn(resetTimer, 300));
|
// 定时检查用户是否长时间无操作
|
||||||
|
timeoutId = setInterval(() => {
|
||||||
// 初始化定时器
|
idleTime += 1000;
|
||||||
resetTimer();
|
if (idleTime >= time) {
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**组件实例挂载之后调用 */
|
/**组件实例挂载之后调用 */
|
||||||
|
|||||||
@@ -572,8 +572,8 @@ export default {
|
|||||||
delTip: "Confirm deletion of the data item numbered [{msg}]?",
|
delTip: "Confirm deletion of the data item numbered [{msg}]?",
|
||||||
exportTip: "Do you confirm to export the current query conditions of the CDR data? (Maximum 10,000 items can be exported.)",
|
exportTip: "Do you confirm to export the current query conditions of the CDR data? (Maximum 10,000 items can be exported.)",
|
||||||
smfChargingID: 'Charging ID',
|
smfChargingID: 'Charging ID',
|
||||||
smfSubscriptionIDData: 'Subscriber ID Data',
|
smfSubscriptionIDData: 'Subscription ID Data',
|
||||||
smfSubscriptionIDType: 'Subscriber ID Type',
|
smfSubscriptionIDType: 'Subscription ID Type',
|
||||||
smfDataVolumeUplink: 'Data Volume Uplink',
|
smfDataVolumeUplink: 'Data Volume Uplink',
|
||||||
smfDataVolumeDownlink: 'Data Volume Downlink',
|
smfDataVolumeDownlink: 'Data Volume Downlink',
|
||||||
smfDataTotalVolume: 'Data Total Volume',
|
smfDataTotalVolume: 'Data Total Volume',
|
||||||
@@ -766,7 +766,7 @@ export default {
|
|||||||
licensePath: "License File",
|
licensePath: "License File",
|
||||||
licensePathTip: "Please upload license file",
|
licensePathTip: "Please upload license file",
|
||||||
upload: 'Upload',
|
upload: 'Upload',
|
||||||
uploadBatch: "Upload License",
|
uploadFile: "Upload License",
|
||||||
uploadChangeOk: 'Network Element renewed license successfully and is being calibrated in the background!',
|
uploadChangeOk: 'Network Element renewed license successfully and is being calibrated in the background!',
|
||||||
uploadChangeFail: "Some network elements failed to update the license, please check whether the service terminal environment is available!",
|
uploadChangeFail: "Some network elements failed to update the license, please check whether the service terminal environment is available!",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -572,8 +572,8 @@ export default {
|
|||||||
delTip: "确认删除编号为【{msg}】的数据项?",
|
delTip: "确认删除编号为【{msg}】的数据项?",
|
||||||
exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)",
|
exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)",
|
||||||
smfChargingID: '计费ID',
|
smfChargingID: '计费ID',
|
||||||
smfSubscriptionIDData: '用户 ID 数据',
|
smfSubscriptionIDData: '订阅 ID 数据',
|
||||||
smfSubscriptionIDType: '用户 ID 类型',
|
smfSubscriptionIDType: '订阅 ID 类型',
|
||||||
smfDataVolumeUplink: '数据量上行链路',
|
smfDataVolumeUplink: '数据量上行链路',
|
||||||
smfDataVolumeDownlink: '数据量下行链路',
|
smfDataVolumeDownlink: '数据量下行链路',
|
||||||
smfDataTotalVolume: '数据总量',
|
smfDataTotalVolume: '数据总量',
|
||||||
@@ -766,7 +766,7 @@ export default {
|
|||||||
licensePath: "许可证文件",
|
licensePath: "许可证文件",
|
||||||
licensePathTip: "请上传许可证文件",
|
licensePathTip: "请上传许可证文件",
|
||||||
upload: '上传',
|
upload: '上传',
|
||||||
uploadBatch: "上传许可证",
|
uploadFile: "上传许可证",
|
||||||
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
|
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
|
||||||
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
|
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.smfSubscriptionIDType'), // 用户 ID 类型
|
title: t('views.dashboard.cdr.smfSubscriptionIDType'), // 订阅 ID 类型
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 150,
|
width: 150,
|
||||||
@@ -111,7 +111,7 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.smfSubscriptionIDData'), // 用户 ID 数据
|
title: t('views.dashboard.cdr.smfSubscriptionIDData'), // 订阅 ID 数据
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|||||||
@@ -223,12 +223,6 @@ function fnModalVisibleByEdit(editId: string) {
|
|||||||
modalState.confirmLoading = false;
|
modalState.confirmLoading = false;
|
||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// OMC没有telnet
|
|
||||||
if (res.data.neType === 'OMC') {
|
|
||||||
res.data.hosts = res.data.hosts.filter(
|
|
||||||
(s: any) => s.hostType === 'ssh'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Object.assign(modalState.from, res.data);
|
Object.assign(modalState.from, res.data);
|
||||||
modalState.title = t('views.ne.neInfo.editTitle');
|
modalState.title = t('views.ne.neInfo.editTitle');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
@@ -292,10 +286,6 @@ function fnModalCancel() {
|
|||||||
*/
|
*/
|
||||||
function fnNeTypeChange(v: any) {
|
function fnNeTypeChange(v: any) {
|
||||||
const hostsLen = modalState.from.hosts.length;
|
const hostsLen = modalState.from.hosts.length;
|
||||||
// OMC没有telnet
|
|
||||||
if (hostsLen >= 2 && v === 'OMC') {
|
|
||||||
modalState.from.hosts.splice(1, hostsLen);
|
|
||||||
}
|
|
||||||
// 网元默认只含22和4100
|
// 网元默认只含22和4100
|
||||||
if (hostsLen === 3 && v !== 'UPF') {
|
if (hostsLen === 3 && v !== 'UPF') {
|
||||||
modalState.from.hosts.pop();
|
modalState.from.hosts.pop();
|
||||||
@@ -626,7 +616,9 @@ onMounted(() => {
|
|||||||
</a-divider>
|
</a-divider>
|
||||||
<a-collapse class="collapse" ghost>
|
<a-collapse class="collapse" ghost>
|
||||||
<a-collapse-panel
|
<a-collapse-panel
|
||||||
v-for="host in modalState.from.hosts"
|
v-for="host in modalState.from.hosts.filter(
|
||||||
|
(s:any) => !(s.hostType === 'telnet' && modalState.from.neType === 'OMC')
|
||||||
|
)"
|
||||||
:key="host.title"
|
:key="host.title"
|
||||||
:header="`${host.hostType.toUpperCase()} ${host.port}`"
|
:header="`${host.hostType.toUpperCase()} ${host.port}`"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -434,8 +434,13 @@ onMounted(() => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('views.ne.neSoftware.uploadBatch') }}
|
<template v-if="tableState.selectedRowOne.neType">
|
||||||
{{ tableState.selectedRowOne.neType }}
|
{{ t('views.ne.neSoftware.upload') }}
|
||||||
|
{{ tableState.selectedRowOne.neType }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ t('views.ne.neSoftware.uploadBatch') }}
|
||||||
|
</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="default"
|
type="default"
|
||||||
|
|||||||
@@ -528,8 +528,13 @@ onMounted(() => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('views.ne.neSoftware.uploadBatch') }}
|
<template v-if="tableState.selectedRowOne.neType">
|
||||||
{{ tableState.selectedRowOne.neType }}
|
{{ t('views.ne.neSoftware.upload') }}
|
||||||
|
{{ tableState.selectedRowOne.neType }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ t('views.ne.neSoftware.uploadBatch') }}
|
||||||
|
</template>
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ let queryParams = reactive({
|
|||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
pageSize: 20,
|
pageSize: 50,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**查询参数重置 */
|
/**查询参数重置 */
|
||||||
@@ -34,10 +34,10 @@ function fnQueryReset() {
|
|||||||
imsi: '',
|
imsi: '',
|
||||||
msisdn: '',
|
msisdn: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 50,
|
||||||
});
|
});
|
||||||
tablePagination.current = 1;
|
tablePagination.current = 1;
|
||||||
tablePagination.pageSize = 20;
|
tablePagination.pageSize = 50;
|
||||||
fnGetList();
|
fnGetList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ type TabeStateType = {
|
|||||||
let tableState: TabeStateType = reactive({
|
let tableState: TabeStateType = reactive({
|
||||||
loading: false,
|
loading: false,
|
||||||
size: 'middle',
|
size: 'middle',
|
||||||
seached: false,
|
seached: true,
|
||||||
data: [],
|
data: [],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
});
|
});
|
||||||
@@ -130,17 +130,13 @@ let tablePagination = reactive({
|
|||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
current: 1,
|
current: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
pageSize: 20,
|
pageSize: 50,
|
||||||
/**默认的每页条数 */
|
|
||||||
defaultPageSize: 20,
|
|
||||||
/**指定每页可以显示多少条 */
|
|
||||||
pageSizeOptions: ['10', '20', '50', '100'],
|
|
||||||
/**只有一页时是否隐藏分页器 */
|
/**只有一页时是否隐藏分页器 */
|
||||||
hideOnSinglePage: false,
|
hideOnSinglePage: false,
|
||||||
/**是否可以快速跳转至某页 */
|
/**是否可以快速跳转至某页 */
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
/**是否可以改变 pageSize */
|
/**是否可以改变 pageSize */
|
||||||
showSizeChanger: true,
|
showSizeChanger: false,
|
||||||
/**数据总数 */
|
/**数据总数 */
|
||||||
total: 0,
|
total: 0,
|
||||||
showTotal: (total: number) => t('common.tablePaginationTotal', { total }),
|
showTotal: (total: number) => t('common.tablePaginationTotal', { total }),
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ onMounted(() => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('views.ne.neSoftware.uploadBatch') }}
|
{{ t('views.ne.neSoftware.upload') }}
|
||||||
{{ state.selectedRowOne.neType }}
|
{{ state.selectedRowOne.neType }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ onMounted(() => {
|
|||||||
@click.prevent="fnModalOpen"
|
@click.prevent="fnModalOpen"
|
||||||
>
|
>
|
||||||
<template #icon><UploadOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('views.ne.neLicense.uploadBatch') }}
|
{{ t('views.ne.neLicense.uploadFile') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<a-button
|
<a-button
|
||||||
|
|||||||
Reference in New Issue
Block a user