fix: 网元信息新增OMC配置应该没有telnet

This commit is contained in:
TsMask
2024-06-28 11:11:41 +08:00
parent 946139facb
commit c5f62e8d76

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}`"
>