Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
TsMask
2024-07-06 15:54:53 +08:00
18 changed files with 75 additions and 51 deletions

View File

@@ -277,6 +277,9 @@ function fnChangeData(data: any[], itemID: string) {
if (men > 100) {
men = +(men / 100).toFixed(2);
}
if (men > 100) {
men = 100;
}
sysMemUsage = men;
}

View File

@@ -45,7 +45,7 @@ let tableColumns: ColumnsType = [
title: t('common.rowId'),
dataIndex: 'num',
width: '50px',
align: 'center',
align: 'left',
customRender(opt) {
const idxNum = (tablePagination.current - 1) * tablePagination.pageSize;
return idxNum + opt.index + 1;
@@ -54,17 +54,17 @@ let tableColumns: ColumnsType = [
{
title: t('views.monitor.online.mettingId'),
dataIndex: 'tokenId',
align: 'center',
align: 'left',
},
{
title: t('views.monitor.online.account'),
dataIndex: 'userName',
align: 'center',
align: 'left',
},
{
title: t('views.monitor.online.host'),
dataIndex: 'ipaddr',
align: 'center',
align: 'left',
},
// {
// title: t('views.monitor.online.loginDes'),
@@ -74,17 +74,17 @@ let tableColumns: ColumnsType = [
{
title: t('views.monitor.online.os'),
dataIndex: 'os',
align: 'center',
align: 'left',
},
{
title: t('views.monitor.online.lib'),
dataIndex: 'browser',
align: 'center',
align: 'left',
},
{
title: t('views.monitor.online.loginTime'),
dataIndex: 'loginTime',
align: 'center',
align: 'left',
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);
@@ -93,7 +93,7 @@ let tableColumns: ColumnsType = [
{
title: t('common.operate'),
key: 'tokenId',
align: 'center',
align: 'left',
},
];

View File

@@ -119,8 +119,8 @@ function fnGetData() {
for (const item of resArr[1].rows) {
switch (item.neType) {
case 'OMC':
state.from.sbi.omc_ip = item.ip;
Object.assign(state.omcInfo, item);
// state.from.sbi.omc_ip = item.ip;
Object.assign(state.omcInfo, item); // 主动改OMC_IP
break;
case 'IMS':
state.from.sbi.ims_ip = item.ip;
@@ -204,6 +204,13 @@ onMounted(() => {
<template>
<PageContainer>
<template #content>
{{ t('views.ne.neConfPara5G.headerTip') }}
<RouterLink :to="{ name: 'NeQuickSetup_2142' }">
{{ t('views.ne.neConfPara5G.headerTipToPage') }}
</RouterLink>
</template>
<a-card :bordered="false">
<!-- 公共参数表单 -->
<Para5GForm v-model:data="state.from" :ne="state.hasNE"></Para5GForm>

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

@@ -220,6 +220,12 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
* 进行表达规则校验
*/
function fnModalEditOk(from: Record<string, any>) {
// 新增时刷新列表
if (!from.id) {
fnGetList();
return;
}
// 编辑时局部更新信息
stateNeInfo(from.neType, from.neId)
.then(res => {
// 找到编辑更新的网元

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

@@ -1314,7 +1314,7 @@ onMounted(() => {
<a-form-item :label="t('views.neUser.sub.neType')" name="neId ">
<a-select
v-model:value="queryParams.neId"
:options="dict.udmSubCNType"
:options="neOtions"
:placeholder="t('common.selectPlease')"
/>
</a-form-item>

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

View File

@@ -184,7 +184,7 @@ type ModalStateType = {
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
visibleBySelectUser: false,
title: t('views.system.role.selectUser'),
title: t('views.system.role.distributeUser'),
});
/**

View File

@@ -237,7 +237,6 @@ watch(
<template>
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:forceFullscreen="true"
:title="props.title"
@@ -302,7 +301,7 @@ watch(
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:scroll="{ scrollToFirstRowOnChange: true, y: 400, x: 600 }"
:scroll="{ scrollToFirstRowOnChange: true }"
:pagination="tablePagination"
:row-selection="{
type: 'checkbox',