fix: 网元安装接口参数变更
This commit is contained in:
@@ -108,7 +108,8 @@ function fnCheckInfo() {
|
|||||||
const validateArr = ['addr', 'port', 'user'];
|
const validateArr = ['addr', 'port', 'user'];
|
||||||
if (form.authMode === '0') {
|
if (form.authMode === '0') {
|
||||||
validateArr.push('password');
|
validateArr.push('password');
|
||||||
} else {
|
}
|
||||||
|
if (form.authMode === '1') {
|
||||||
validateArr.push('privateKey');
|
validateArr.push('privateKey');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,11 +152,11 @@ type InstallStateType = {
|
|||||||
/**步骤 */
|
/**步骤 */
|
||||||
setp: 'pkg' | 'preinput' | 'log';
|
setp: 'pkg' | 'preinput' | 'log';
|
||||||
/**步骤日志输出 */
|
/**步骤日志输出 */
|
||||||
setpLog: string;
|
setpLog: string;
|
||||||
/**文件操作类型 上传 or 选择 */
|
/**文件操作类型 上传 or 选择 */
|
||||||
optionType: 'upload' | 'option';
|
optionType: 'upload' | 'option';
|
||||||
/**表单数据 */
|
/**表单数据 */
|
||||||
from: {
|
from: {
|
||||||
neType: string;
|
neType: string;
|
||||||
neId: string;
|
neId: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -175,7 +175,7 @@ type InstallStateType = {
|
|||||||
/**安装对象信息状态 */
|
/**安装对象信息状态 */
|
||||||
let installState: InstallStateType = reactive({
|
let installState: InstallStateType = reactive({
|
||||||
setp: 'pkg',
|
setp: 'pkg',
|
||||||
setpLog: '',
|
setpLog: '',
|
||||||
optionType: 'upload',
|
optionType: 'upload',
|
||||||
from: {
|
from: {
|
||||||
neType: '',
|
neType: '',
|
||||||
@@ -333,11 +333,10 @@ function fnInstall() {
|
|||||||
installState.confirmLoading = true;
|
installState.confirmLoading = true;
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
const from = toRaw(installState.from);
|
const from = toRaw(installState.from);
|
||||||
const preinput = toRaw(installState.preinput);
|
const preinput = toRaw(installState.preinput);
|
||||||
installNeSoftware({
|
installNeSoftware({
|
||||||
software: from,
|
software: from,
|
||||||
preinput: preinput,
|
preinput: preinput,
|
||||||
action: 'install',
|
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
@@ -370,8 +369,8 @@ onMounted(() => {
|
|||||||
// 读取步骤:网元信息
|
// 读取步骤:网元信息
|
||||||
const stepPrevFrom = stepState.states[1];
|
const stepPrevFrom = stepState.states[1];
|
||||||
if (stepPrevFrom && stepPrevFrom.from) {
|
if (stepPrevFrom && stepPrevFrom.from) {
|
||||||
installState.from.neType = stepPrevFrom.from.neType;
|
installState.from.neType = stepPrevFrom.from.neType;
|
||||||
installState.from.neId = stepPrevFrom.from.neId;
|
installState.from.neId = stepPrevFrom.from.neId;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ function fnNeInfo() {
|
|||||||
content: `${from.neType} 可使用网元标识:${from.neId}`,
|
content: `${from.neType} 可使用网元标识:${from.neId}`,
|
||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
|
from.id = undefined;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ export const stepState: StepStateType = reactive({
|
|||||||
states: [],
|
states: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**步骤信息状态复位 */
|
||||||
|
export function fnRestStepState() {
|
||||||
|
stepState.current = 0;
|
||||||
|
stepState.stepNext = false;
|
||||||
|
stepState.states = [];
|
||||||
|
}
|
||||||
|
|
||||||
export function fnStepNext() {
|
export function fnStepNext() {
|
||||||
stepState.current++;
|
stepState.current++;
|
||||||
stepState.stepNext = false;
|
stepState.stepNext = false;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PageContainer } from 'antdv-pro-layout';
|
import { PageContainer } from 'antdv-pro-layout';
|
||||||
import { message } from 'ant-design-vue/lib';
|
import { message } from 'ant-design-vue/lib';
|
||||||
import { defineAsyncComponent, watch, shallowRef } from 'vue';
|
import { defineAsyncComponent, watch, shallowRef, onMounted } from 'vue';
|
||||||
import { stepState, fnStepPrev, fnStepNext } from './hooks/useStep';
|
import { stepState, fnStepPrev, fnStepNext, fnRestStepState } from './hooks/useStep';
|
||||||
|
|
||||||
// 异步加载组件
|
// 异步加载组件
|
||||||
const StepCheck = defineAsyncComponent(
|
const StepCheck = defineAsyncComponent(
|
||||||
@@ -70,6 +70,10 @@ watch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
fnRestStepState()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user