feat: 开站网元安装步骤进度的显示
This commit is contained in:
@@ -4,9 +4,13 @@ import { reactive } from 'vue';
|
||||
type StepStateType = {
|
||||
/**步骤名称 */
|
||||
stepName: string;
|
||||
/**是否安装网元 */
|
||||
setupNE: boolean;
|
||||
/**安装网元步骤信息 */
|
||||
neSteps: any[];
|
||||
/**安装网元步骤当前选中 */
|
||||
neStepsCurrent: number;
|
||||
|
||||
/**当前选中 */
|
||||
current: number;
|
||||
/**步骤项 */
|
||||
steps: {
|
||||
title: string;
|
||||
@@ -21,8 +25,27 @@ type StepStateType = {
|
||||
/**步骤信息状态 */
|
||||
export const stepState: StepStateType = reactive({
|
||||
stepName: 'Start',
|
||||
setupNE: false,
|
||||
neSteps: [
|
||||
{
|
||||
title: '配置网元信息',
|
||||
description: '服务端与网元服务',
|
||||
},
|
||||
{
|
||||
title: '网元公共参数',
|
||||
description: '全局公共参数配置',
|
||||
},
|
||||
{
|
||||
title: '网元软件安装',
|
||||
description: '软件安装到服务端',
|
||||
},
|
||||
{
|
||||
title: '网元授权激活',
|
||||
description: '网元服务授权激活',
|
||||
},
|
||||
],
|
||||
neStepsCurrent: -1,
|
||||
|
||||
current: 0,
|
||||
steps: [
|
||||
{
|
||||
title: '版权声明',
|
||||
@@ -56,23 +79,21 @@ export const stepState: StepStateType = reactive({
|
||||
/**步骤信息状态复位 */
|
||||
export function fnRestStepState() {
|
||||
stepState.stepName = 'Start';
|
||||
stepState.setupNE = false;
|
||||
stepState.neStepsCurrent = -1;
|
||||
|
||||
stepState.current = 0;
|
||||
stepState.stepNext = false;
|
||||
stepState.states = [];
|
||||
}
|
||||
|
||||
/**跳转步骤组件 */
|
||||
export function fnToStepName(stepName: string) {
|
||||
stepState.neStepsCurrent = [
|
||||
'NeInfoConfig',
|
||||
'NeInfoConfigPara5G',
|
||||
'NeInfoSoftwareInstall',
|
||||
'NeInfoSoftwareLicense',
|
||||
].indexOf(stepName);
|
||||
|
||||
stepState.stepName = stepName;
|
||||
}
|
||||
|
||||
export function fnStepNext() {
|
||||
stepState.current++;
|
||||
stepState.stepNext = false;
|
||||
}
|
||||
|
||||
export function fnStepPrev() {
|
||||
stepState.current--;
|
||||
stepState.stepNext = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user