diff --git a/src/views/tool/neQuickSetup/components/StepCheck.vue b/src/views/tool/neQuickSetup/components/StepCheck.vue
index 95980735..19981ce1 100644
--- a/src/views/tool/neQuickSetup/components/StepCheck.vue
+++ b/src/views/tool/neQuickSetup/components/StepCheck.vue
@@ -108,7 +108,8 @@ function fnCheckInfo() {
const validateArr = ['addr', 'port', 'user'];
if (form.authMode === '0') {
validateArr.push('password');
- } else {
+ }
+ if (form.authMode === '1') {
validateArr.push('privateKey');
}
diff --git a/src/views/tool/neQuickSetup/components/StepInstall.vue b/src/views/tool/neQuickSetup/components/StepInstall.vue
index 02ff11f8..21612dab 100644
--- a/src/views/tool/neQuickSetup/components/StepInstall.vue
+++ b/src/views/tool/neQuickSetup/components/StepInstall.vue
@@ -152,11 +152,11 @@ type InstallStateType = {
/**步骤 */
setp: 'pkg' | 'preinput' | 'log';
/**步骤日志输出 */
- setpLog: string;
+ setpLog: string;
/**文件操作类型 上传 or 选择 */
optionType: 'upload' | 'option';
/**表单数据 */
- from: {
+ from: {
neType: string;
neId: string;
name: string;
@@ -175,7 +175,7 @@ type InstallStateType = {
/**安装对象信息状态 */
let installState: InstallStateType = reactive({
setp: 'pkg',
- setpLog: '',
+ setpLog: '',
optionType: 'upload',
from: {
neType: '',
@@ -333,11 +333,10 @@ function fnInstall() {
installState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
const from = toRaw(installState.from);
- const preinput = toRaw(installState.preinput);
+ const preinput = toRaw(installState.preinput);
installNeSoftware({
software: from,
preinput: preinput,
- action: 'install',
})
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -370,8 +369,8 @@ onMounted(() => {
// 读取步骤:网元信息
const stepPrevFrom = stepState.states[1];
if (stepPrevFrom && stepPrevFrom.from) {
- installState.from.neType = stepPrevFrom.from.neType;
- installState.from.neId = stepPrevFrom.from.neId;
+ installState.from.neType = stepPrevFrom.from.neType;
+ installState.from.neId = stepPrevFrom.from.neId;
}
});
diff --git a/src/views/tool/neQuickSetup/components/StepNeInfo.vue b/src/views/tool/neQuickSetup/components/StepNeInfo.vue
index 6431d213..8128d87c 100644
--- a/src/views/tool/neQuickSetup/components/StepNeInfo.vue
+++ b/src/views/tool/neQuickSetup/components/StepNeInfo.vue
@@ -136,6 +136,7 @@ function fnNeInfo() {
content: `${from.neType} 可使用网元标识:${from.neId}`,
duration: 3,
});
+ from.id = undefined;
return false;
}
})
diff --git a/src/views/tool/neQuickSetup/hooks/useStep.ts b/src/views/tool/neQuickSetup/hooks/useStep.ts
index 7ba5be6c..8316afdf 100644
--- a/src/views/tool/neQuickSetup/hooks/useStep.ts
+++ b/src/views/tool/neQuickSetup/hooks/useStep.ts
@@ -48,6 +48,13 @@ export const stepState: StepStateType = reactive({
states: [],
});
+/**步骤信息状态复位 */
+export function fnRestStepState() {
+ stepState.current = 0;
+ stepState.stepNext = false;
+ stepState.states = [];
+}
+
export function fnStepNext() {
stepState.current++;
stepState.stepNext = false;
diff --git a/src/views/tool/neQuickSetup/index.vue b/src/views/tool/neQuickSetup/index.vue
index 8a216c5a..232d34d8 100644
--- a/src/views/tool/neQuickSetup/index.vue
+++ b/src/views/tool/neQuickSetup/index.vue
@@ -1,8 +1,8 @@