fix: 网元快速安装页面初始表单简化

This commit is contained in:
TsMask
2024-05-09 19:24:51 +08:00
parent d8059341fe
commit c65cda1468

View File

@@ -44,17 +44,17 @@ let modalState: ModalStateType = reactive({
title: '网元',
from: {
id: undefined,
neId: '001',
neType: 'AMF',
neId: '',
neType: '',
neName: '',
ip: '',
port: 33030,
pvFlag: 'PNF',
rmUid: '4400HX1AMF001',
rmUid: '0000XX1AMF001',
neAddress: '',
dn: '',
vendorName: '',
province: '',
dn: '-',
vendorName: '-',
province: '-',
// 主机
hosts: [
{
@@ -104,22 +104,16 @@ const modalStateFrom = Form.useForm(
message: '请输入网元标识',
},
],
rmUid: [
{
required: true,
message: '请输入资源唯一标识',
},
],
ip: [
{
required: true,
message: '请输入网元IP地址',
},
],
neName: [
port: [
{
required: true,
message: '请输入网元名称',
message: '请输入网元IP端口',
},
],
})
@@ -231,6 +225,8 @@ function fnModalOk() {
}
},
onOk: () => {
from.rmUid = `0000XX${from.neType}${from.neId}`; // 4400HX1AMF001
from.neName = `${from.neType}_${from.neId}`; // AMF_001
const hide = message.loading(t('common.loading'), 0);
const result =
isUpdate && from.id ? updateNeInfo(from) : addNeInfo(from);
@@ -283,7 +279,7 @@ function fnNeTypeChange(v: any) {
hostType: 'telnet',
groupId: '1',
title: 'Telnet_NE_5002',
addr: '',
addr: modalState.from.ip,
port: 5002,
user: 'user',
authMode: '0',
@@ -399,28 +395,6 @@ onMounted(() => {
</a-auto-complete>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.pvflag')"
name="pvFlag"
v-bind="modalStateFrom.validateInfos.pvFlag"
>
<a-select
v-model:value="modalState.from.pvFlag"
default-value="PNF"
>
<a-select-opt-group :label="t('views.configManage.neManage.pnf')">
<a-select-option value="PNF">PNF</a-select-option>
</a-select-opt-group>
<a-select-opt-group :label="t('views.configManage.neManage.vnf')">
<a-select-option value="VNF">VNF</a-select-option>
</a-select-opt-group>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neId')"
@@ -431,22 +405,16 @@ onMounted(() => {
v-model:value="modalState.from.neId"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="32"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neName')"
name="neName"
v-bind="modalStateFrom.validateInfos.neName"
>
<a-input
v-model:value="modalState.from.neName"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="64"
:maxlength="24"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.configManage.neManage.neIdTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
</a-form-item>
</a-col>
@@ -465,6 +433,7 @@ onMounted(() => {
:placeholder="t('common.inputPlease')"
:maxlength="128"
@change="fnNeIPChange"
:disabled="true"
>
<template #prefix>
<a-tooltip placement="topLeft">
@@ -505,32 +474,6 @@ onMounted(() => {
</a-col>
</a-row>
<a-form-item
:label="t('views.configManage.neManage.uid')"
name="rmUid"
v-bind="modalStateFrom.validateInfos.rmUid"
:label-col="{ span: 3 }"
:labelWrap="true"
>
<a-input
v-model:value="modalState.from.rmUid"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="40"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.neInfo.rmUID') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
</template>
</a-input>
</a-form-item>
<a-divider orientation="left">
{{ t('views.ne.neInfo.hostConfig') }}
</a-divider>