fix: 开站页面同步公共参数配置,优化页面样式
This commit is contained in:
@@ -72,23 +72,22 @@ function fnTabClose(key: string) {
|
||||
|
||||
/**新建网元信息 */
|
||||
function fnTabCreate() {
|
||||
const neType = 'NE';
|
||||
const neId = '001' + new Date().getMilliseconds();
|
||||
const neId = `${new Date().getMilliseconds()}`.padStart(3, '0');
|
||||
tabState.panes.push({
|
||||
key: `${neType}@${neId}`,
|
||||
key: `New@${neId}`,
|
||||
data: {
|
||||
id: undefined,
|
||||
neId: neId,
|
||||
neType: neType,
|
||||
neName: '',
|
||||
neType: '',
|
||||
neName: `New_${neId}`,
|
||||
ip: '',
|
||||
port: 33030,
|
||||
pvFlag: 'PNF',
|
||||
rmUid: `4400HX1${neType}001`,
|
||||
rmUid: `0000XXNew${neId}`,
|
||||
neAddress: '',
|
||||
dn: '',
|
||||
vendorName: '',
|
||||
province: '',
|
||||
dn: '-',
|
||||
vendorName: '-',
|
||||
province: '-',
|
||||
// 主机
|
||||
hosts: [
|
||||
{
|
||||
@@ -121,7 +120,7 @@ function fnTabCreate() {
|
||||
},
|
||||
status: false,
|
||||
});
|
||||
tabState.activeKey = `${neType}@${neId}`;
|
||||
tabState.activeKey = `New@${neId}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,6 +219,8 @@ function fnSaveFinish(pane: any) {
|
||||
console.log('Success:', pane);
|
||||
tabState.confirmLoading = true;
|
||||
const from = toRaw(pane);
|
||||
from.rmUid = `0000XX${from.neType}${from.neId}`; // 4400HX1AMF001
|
||||
from.neName = `${from.neType}_${from.neId}`; // AMF_001
|
||||
const result = from.id ? updateNeInfo(from) : addNeInfo(from);
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
result
|
||||
@@ -228,12 +229,13 @@ function fnSaveFinish(pane: any) {
|
||||
if (res.data) {
|
||||
pane.id = res.data;
|
||||
}
|
||||
tabState.panes.findIndex;
|
||||
|
||||
const tabItem = tabState.panes.find(
|
||||
tab => tab.key === tabState.activeKey
|
||||
);
|
||||
if (tabItem) {
|
||||
tabItem.status = false;
|
||||
tabItem.data.neName = from.neName;
|
||||
tabItem.status = true;
|
||||
}
|
||||
message.success({
|
||||
@@ -245,6 +247,8 @@ function fnSaveFinish(pane: any) {
|
||||
tab => tab.key === tabState.activeKey
|
||||
);
|
||||
if (tabItem) {
|
||||
tabItem.status = true;
|
||||
tabItem.data.neName = from.neName;
|
||||
tabItem.status = false;
|
||||
}
|
||||
message.error({
|
||||
@@ -365,7 +369,7 @@ onMounted(() => {
|
||||
<template #tab>
|
||||
<a-badge
|
||||
:status="pane.status ? 'success' : 'default'"
|
||||
:text="`${pane.data.neType}@${pane.data.neId}`"
|
||||
:text="pane.data.neName"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -414,28 +418,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"
|
||||
>
|
||||
<a-select v-model:value="pane.data.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')"
|
||||
@@ -449,25 +431,16 @@ onMounted(() => {
|
||||
v-model:value="pane.data.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"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请输入网元名称',
|
||||
}"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="pane.data.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>
|
||||
@@ -534,35 +507,6 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item
|
||||
:label="t('views.configManage.neManage.uid')"
|
||||
name="rmUid"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请输入资源唯一标识',
|
||||
}"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="pane.data.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>
|
||||
@@ -736,7 +680,7 @@ onMounted(() => {
|
||||
<style lang="less" scoped>
|
||||
.neinfo-tabs :deep(.ant-tabs-tabpane) {
|
||||
padding: 24px;
|
||||
height: 65vh;
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
// margin-bottom: 24px;
|
||||
@@ -745,7 +689,7 @@ onMounted(() => {
|
||||
|
||||
.ne {
|
||||
padding-top: 12px;
|
||||
height: 78vh;
|
||||
// height: 78vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user