fix: hostId 变更类型和字段名
This commit is contained in:
@@ -58,7 +58,7 @@ let modalState: ModalStateType = reactive({
|
||||
// 主机
|
||||
hosts: [
|
||||
{
|
||||
hostId: undefined,
|
||||
id: undefined,
|
||||
hostType: 'ssh',
|
||||
groupId: '1',
|
||||
title: 'SSH_NE_22',
|
||||
@@ -72,7 +72,7 @@ let modalState: ModalStateType = reactive({
|
||||
remark: '',
|
||||
},
|
||||
{
|
||||
hostId: undefined,
|
||||
id: undefined,
|
||||
hostType: 'telnet',
|
||||
groupId: '1',
|
||||
title: 'Telnet_NE_4100',
|
||||
@@ -154,8 +154,8 @@ function fnModalOk() {
|
||||
from.hostIds = res.data.hostIds;
|
||||
const hostIds = res.data.hostIds.split(',');
|
||||
if (hostIds.length == 2) {
|
||||
from.hosts[0].hostId = hostIds[0];
|
||||
from.hosts[1].hostId = hostIds[1];
|
||||
from.hosts[0].id = parseInt(hostIds[0]);
|
||||
from.hosts[1].id = parseInt(hostIds[1]);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -163,7 +163,7 @@ function fnModalOk() {
|
||||
from.id = undefined;
|
||||
from.hostIds = '';
|
||||
for (let index = 0; index < from.hosts.length; index++) {
|
||||
from.hosts[index].hostId = undefined;
|
||||
from.hosts[index].id = undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ function fnModalOk() {
|
||||
from.id = undefined;
|
||||
from.hostIds = '';
|
||||
for (let index = 0; index < from.hosts.length; index++) {
|
||||
from.hosts[index].hostId = undefined;
|
||||
from.hosts[index].id = undefined;
|
||||
}
|
||||
},
|
||||
onOk: () => {
|
||||
@@ -237,7 +237,7 @@ function fnNeTypeChange(v: any) {
|
||||
// UPF标准版本可支持5002
|
||||
if (hostsLen === 2 && v === 'UPF') {
|
||||
modalState.from.hosts.push({
|
||||
hostId: undefined,
|
||||
id: undefined,
|
||||
hostType: 'telnet',
|
||||
groupId: '1',
|
||||
title: 'Telnet_NE_5002',
|
||||
@@ -252,7 +252,7 @@ function fnNeTypeChange(v: any) {
|
||||
// UDM可支持6379
|
||||
if (hostsLen === 2 && v === 'UDM') {
|
||||
modalState.from.hosts.push({
|
||||
hostId: undefined,
|
||||
id: undefined,
|
||||
hostType: 'redis',
|
||||
groupId: '1',
|
||||
title: 'REDIS_NE_6379',
|
||||
|
||||
@@ -43,7 +43,7 @@ let state: StateType = reactive({
|
||||
sudo: false,
|
||||
},
|
||||
from: {
|
||||
hostId: undefined,
|
||||
id: undefined,
|
||||
hostType: 'ssh',
|
||||
groupId: '1',
|
||||
title: 'SSH_NE_22',
|
||||
|
||||
Reference in New Issue
Block a user