From 47103249ef67a787fc94332e2c55535577664f40 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 11 Apr 2024 20:09:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3=E5=8F=98?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../neQuickSetup/components/StepActivate.vue | 2 +- .../neQuickSetup/components/StepCheck.vue | 14 +++++++------- .../neQuickSetup/components/StepInstall.vue | 19 ++++++++----------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/views/tool/neQuickSetup/components/StepActivate.vue b/src/views/tool/neQuickSetup/components/StepActivate.vue index cc4c8f91..485e468b 100644 --- a/src/views/tool/neQuickSetup/components/StepActivate.vue +++ b/src/views/tool/neQuickSetup/components/StepActivate.vue @@ -183,7 +183,7 @@ function fnVerifyTask() { } const { neType, neId } = licenseState.from; stateNeLicense(neType, neId).then(res => { - if (res.code === RESULT_CODE_SUCCESS) { + if (res.code === RESULT_CODE_SUCCESS && res.data && res.data.sn) { message.success(`${neType} ${neId} 网元激活成功`, 3); verifyState.data = res.data; // 记录当前步骤状态信息 diff --git a/src/views/tool/neQuickSetup/components/StepCheck.vue b/src/views/tool/neQuickSetup/components/StepCheck.vue index 18ca0de9..95980735 100644 --- a/src/views/tool/neQuickSetup/components/StepCheck.vue +++ b/src/views/tool/neQuickSetup/components/StepCheck.vue @@ -140,13 +140,13 @@ function fnCheckInfo() { }); return; } - if (!res.data.sshLink) { - message.warning({ - content: `请配置服务器间免密信任关系,确保服务器间文件传输功能`, - duration: 2, - }); - return; - } + // if (!res.data.sshLink) { + // message.warning({ + // content: `请配置服务器间免密信任关系,确保服务器间文件传输功能`, + // duration: 2, + // }); + // return; + // } message.success({ content: `${form.addr}:${form.port} ${t('views.ne.neHost.testOk')}`, duration: 2, diff --git a/src/views/tool/neQuickSetup/components/StepInstall.vue b/src/views/tool/neQuickSetup/components/StepInstall.vue index 7e7b99f4..02ff11f8 100644 --- a/src/views/tool/neQuickSetup/components/StepInstall.vue +++ b/src/views/tool/neQuickSetup/components/StepInstall.vue @@ -152,15 +152,13 @@ type InstallStateType = { /**步骤 */ setp: 'pkg' | 'preinput' | 'log'; /**步骤日志输出 */ - setpLog: string; - /**主机ID */ - hostId: string; + setpLog: string; /**文件操作类型 上传 or 选择 */ optionType: 'upload' | 'option'; /**表单数据 */ - from: { - /**网元类型 */ + from: { neType: string; + neId: string; name: string; path: string; version: string; @@ -177,11 +175,11 @@ type InstallStateType = { /**安装对象信息状态 */ let installState: InstallStateType = reactive({ setp: 'pkg', - setpLog: '', - hostId: '', + setpLog: '', optionType: 'upload', from: { neType: '', + neId: '', name: '', path: '', version: '', @@ -335,8 +333,7 @@ function fnInstall() { installState.confirmLoading = true; const hide = message.loading(t('common.loading'), 0); const from = toRaw(installState.from); - const preinput = toRaw(installState.preinput); - Object.assign(from, { hostId: installState.hostId }); + const preinput = toRaw(installState.preinput); installNeSoftware({ software: from, preinput: preinput, @@ -373,8 +370,8 @@ onMounted(() => { // 读取步骤:网元信息 const stepPrevFrom = stepState.states[1]; if (stepPrevFrom && stepPrevFrom.from) { - installState.from.neType = stepPrevFrom.from.neType; - installState.hostId = stepPrevFrom.from.hostIds.split(',')[0]; + installState.from.neType = stepPrevFrom.from.neType; + installState.from.neId = stepPrevFrom.from.neId; } });