62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
import { reactive } from 'vue';
|
|
|
|
/**步骤信息状态类型 */
|
|
type StepStateType = {
|
|
/**步骤名称 */
|
|
stepName: string;
|
|
/**安装网元步骤信息 */
|
|
steps: any[];
|
|
/**安装网元步骤当前选中 */
|
|
current: number;
|
|
/**连接主机 */
|
|
neHost: Record<string, any>;
|
|
/**网元信息 */
|
|
neInfo: Record<string, any>;
|
|
};
|
|
|
|
/**步骤信息状态 */
|
|
export const stepState: StepStateType = reactive({
|
|
stepName: 'Start',
|
|
steps: [
|
|
{
|
|
title: '服务器环境',
|
|
description: '服务端与网元服务',
|
|
},
|
|
{
|
|
title: '配置网元信息',
|
|
description: '网元信息设置',
|
|
},
|
|
{
|
|
title: '网元软件安装',
|
|
description: '软件安装到服务端',
|
|
},
|
|
{
|
|
title: '网元授权激活',
|
|
description: '网元服务授权激活',
|
|
},
|
|
],
|
|
current: 0,
|
|
neHost: {},
|
|
neInfo: {},
|
|
});
|
|
|
|
/**步骤信息状态复位 */
|
|
export function fnRestStepState() {
|
|
stepState.stepName = 'Start';
|
|
stepState.current = 0;
|
|
stepState.neHost = {};
|
|
stepState.neInfo = {};
|
|
}
|
|
|
|
/**跳转步骤组件 */
|
|
export function fnToStepName(stepName: string) {
|
|
stepState.current = [
|
|
'Start',
|
|
'NeInfoConfig',
|
|
'NeInfoSoftwareInstall',
|
|
'NeInfoSoftwareLicense',
|
|
].indexOf(stepName);
|
|
|
|
stepState.stepName = stepName;
|
|
}
|