pref: 网元快速安装页面重构

This commit is contained in:
TsMask
2024-05-07 10:33:52 +08:00
parent ed4d556384
commit 0cae26a1ee
15 changed files with 117 additions and 3288 deletions

View File

@@ -1,15 +1,11 @@
<script setup lang="ts">
import { Form, Modal, message } from 'ant-design-vue/lib';
import { onMounted, reactive, toRaw } from 'vue';
import {
addNeInfo,
getNeInfoByTypeAndID,
updateNeInfo,
} from '@/api/ne/neInfo';
import { addNeInfo, getNeInfoByTypeAndID, updateNeInfo } from '@/api/ne/neInfo';
import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { fnToStepName, stepState } from '../hooks/useStep';
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict';
import useNeInfoStore from '@/store/modules/neinfo';
@@ -308,6 +304,18 @@ function fnNeIPChange(e: any) {
}
}
/**返回上一步 */
function fnStepPrev() {
Modal.confirm({
title: t('common.tipTitle'),
content: '确认要放弃当前变更返回上一步吗?',
onOk() {
fnRestStepState();
fnToStepName('Start');
},
});
}
/**下一步操作 */
function fnStepNext() {
if (!modalState.stepNext) return;
@@ -671,6 +679,8 @@ onMounted(() => {
<div class="ne-oper">
<a-space direction="horizontal" :size="18">
<a-button @click="fnStepPrev()"> 上一步 </a-button>
<a-button
type="primary"
@click="fnModalOk()"