Merge remote-tracking branch 'origin/main' into practical-training

This commit is contained in:
TsMask
2024-06-28 12:04:57 +08:00
13 changed files with 60 additions and 55 deletions

View File

@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
VITE_APP_CODE = "CN EMS"
# 应用版本
VITE_APP_VERSION = "2.240626"
VITE_APP_VERSION = "2.240627"
# 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api"

View File

@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network EMS"
VITE_APP_CODE = "CN EMS"
# 应用版本
VITE_APP_VERSION = "2.240626"
VITE_APP_VERSION = "2.240627"
# 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api"

View File

@@ -1,6 +1,5 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
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,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
if (result.code === RESULT_CODE_SUCCESS && result.data) {
if (Array.isArray(result.data.data)) {
const rows = result.data.data;
data.total = rows.length;
data.rows = rows;
} else {
Object.assign(data, result.data);
}
}
// 模拟数据
// data.code = RESULT_CODE_SUCCESS;
// data.total = 2;
// data.rows = [
// {
// imsi: 'imsi-460000100000090',

View File

@@ -14,23 +14,26 @@ const { t } = useI18n();
/**显示遮罩 */
const isVisible = computed(() => !['none', 'lock'].includes(maskStore.type));
// 等待指定的时间后触发事件的函数
// 用户无操作一段时间后进行锁屏
function idleTimeout(time: number, callback: Function) {
if (time === 0) return;
let timeoutId: any;
function resetTimer() {
clearTimeout(timeoutId);
timeoutId = setTimeout(callback, time);
let idleTime = 0;
function resetIdleTime() {
idleTime = 0;
}
// 监听浏览器标签是否活动
window.addEventListener('blur', useThrottleFn(resetTimer, 300));
window.addEventListener('focus', useThrottleFn(resetTimer, 300));
document.addEventListener('visibilitychange', useThrottleFn(resetTimer, 300));
// 初始化定时器
resetTimer();
// 监听用户活动事件
document.addEventListener('mousemove', useThrottleFn(resetIdleTime, 1000));
document.addEventListener('keydown', useThrottleFn(resetIdleTime, 1000));
document.addEventListener('click', useThrottleFn(resetIdleTime, 1000));
// 定时检查用户是否长时间无操作
timeoutId = setInterval(() => {
idleTime += 1000;
if (idleTime >= time) {
clearTimeout(timeoutId);
callback();
}
}, 1000);
}
/**组件实例挂载之后调用 */

View File

@@ -572,8 +572,8 @@ export default {
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.)",
smfChargingID: 'Charging ID',
smfSubscriptionIDData: 'Subscriber ID Data',
smfSubscriptionIDType: 'Subscriber ID Type',
smfSubscriptionIDData: 'Subscription ID Data',
smfSubscriptionIDType: 'Subscription ID Type',
smfDataVolumeUplink: 'Data Volume Uplink',
smfDataVolumeDownlink: 'Data Volume Downlink',
smfDataTotalVolume: 'Data Total Volume',
@@ -766,7 +766,7 @@ export default {
licensePath: "License File",
licensePathTip: "Please upload license file",
upload: 'Upload',
uploadBatch: "Upload License",
uploadFile: "Upload License",
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!",
},

View File

@@ -572,8 +572,8 @@ export default {
delTip: "确认删除编号为【{msg}】的数据项?",
exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)",
smfChargingID: '计费ID',
smfSubscriptionIDData: '用户 ID 数据',
smfSubscriptionIDType: '用户 ID 类型',
smfSubscriptionIDData: '订阅 ID 数据',
smfSubscriptionIDType: '订阅 ID 类型',
smfDataVolumeUplink: '数据量上行链路',
smfDataVolumeDownlink: '数据量下行链路',
smfDataTotalVolume: '数据总量',
@@ -766,7 +766,7 @@ export default {
licensePath: "许可证文件",
licensePathTip: "请上传许可证文件",
upload: '上传',
uploadBatch: "上传许可证",
uploadFile: "上传许可证",
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
},

View File

@@ -101,7 +101,7 @@ let tableColumns: ColumnsType = [
},
},
{
title: t('views.dashboard.cdr.smfSubscriptionIDType'), // 用户 ID 类型
title: t('views.dashboard.cdr.smfSubscriptionIDType'), // 订阅 ID 类型
dataIndex: 'cdrJSON',
align: 'left',
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',
align: 'left',
width: 150,

View File

@@ -223,12 +223,6 @@ function fnModalVisibleByEdit(editId: string) {
modalState.confirmLoading = false;
hide();
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);
modalState.title = t('views.ne.neInfo.editTitle');
modalState.visibleByEdit = true;
@@ -292,10 +286,6 @@ function fnModalCancel() {
*/
function fnNeTypeChange(v: any) {
const hostsLen = modalState.from.hosts.length;
// OMC没有telnet
if (hostsLen >= 2 && v === 'OMC') {
modalState.from.hosts.splice(1, hostsLen);
}
// 网元默认只含22和4100
if (hostsLen === 3 && v !== 'UPF') {
modalState.from.hosts.pop();
@@ -626,7 +616,9 @@ onMounted(() => {
</a-divider>
<a-collapse class="collapse" ghost>
<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"
:header="`${host.hostType.toUpperCase()} ${host.port}`"
>

View File

@@ -434,8 +434,13 @@ onMounted(() => {
"
>
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.uploadBatch') }}
{{ tableState.selectedRowOne.neType }}
<template v-if="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
type="default"

View File

@@ -528,8 +528,13 @@ onMounted(() => {
"
>
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.uploadBatch') }}
{{ tableState.selectedRowOne.neType }}
<template v-if="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
type="primary"

View File

@@ -25,7 +25,7 @@ let queryParams = reactive({
/**当前页数 */
pageNum: 1,
/**每页条数 */
pageSize: 20,
pageSize: 50,
});
/**查询参数重置 */
@@ -34,10 +34,10 @@ function fnQueryReset() {
imsi: '',
msisdn: '',
pageNum: 1,
pageSize: 20,
pageSize: 50,
});
tablePagination.current = 1;
tablePagination.pageSize = 20;
tablePagination.pageSize = 50;
fnGetList();
}
@@ -59,7 +59,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: false,
seached: true,
data: [],
selectedRowKeys: [],
});
@@ -130,17 +130,13 @@ let tablePagination = reactive({
/**当前页数 */
current: 1,
/**每页条数 */
pageSize: 20,
/**默认的每页条数 */
defaultPageSize: 20,
/**指定每页可以显示多少条 */
pageSizeOptions: ['10', '20', '50', '100'],
pageSize: 50,
/**只有一页时是否隐藏分页器 */
hideOnSinglePage: false,
/**是否可以快速跳转至某页 */
showQuickJumper: true,
/**是否可以改变 pageSize */
showSizeChanger: true,
showSizeChanger: false,
/**数据总数 */
total: 0,
showTotal: (total: number) => t('common.tablePaginationTotal', { total }),

View File

@@ -284,7 +284,7 @@ onMounted(() => {
"
>
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.uploadBatch') }}
{{ t('views.ne.neSoftware.upload') }}
{{ state.selectedRowOne.neType }}
</a-button>

View File

@@ -296,7 +296,7 @@ onMounted(() => {
@click.prevent="fnModalOpen"
>
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neLicense.uploadBatch') }}
{{ t('views.ne.neLicense.uploadFile') }}
</a-button>
<a-button