fix: 网元授权上传进行重启网元

This commit is contained in:
TsMask
2024-05-27 17:09:39 +08:00
parent 9f2b80718e
commit 8b24bc55b9
2 changed files with 11 additions and 3 deletions

View File

@@ -35,6 +35,11 @@ const props = defineProps({
type: String,
default: '',
},
/**是否重启服务 */
reload: {
type: Boolean,
default: false,
},
});
/**对话框对象信息状态类型 */
@@ -220,6 +225,7 @@ function fnModalVisibleById(id: string) {
if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(modalState.from, res.data);
modalState.from.licensePath = '';
modalState.from.reload = props.reload;
modalState.title = t('views.ne.neLicense.updateTtile');
modalState.visibleByEdit = true;
} else {
@@ -244,6 +250,7 @@ function fnModalVisibleByTypeAndId(neType: string, neId: string) {
if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(modalState.from, res.data);
modalState.from.licensePath = '';
modalState.from.reload = props.reload;
modalState.title = t('views.ne.neLicense.updateTtile');
modalState.visibleByEdit = true;
} else {

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { Modal } from 'ant-design-vue/lib';
import { defineAsyncComponent, onMounted, onUnmounted, reactive } from 'vue';
import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
import { fnRestStepState, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import { codeNeLicense, stateNeLicense } from '@/api/ne/neLicense';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -79,7 +79,7 @@ function fnModalCancel() {
function fnStepEnd() {
Modal.confirm({
title: t('common.tipTitle'),
content: '确认要结束安装吗?',
content: t('views.ne.neQuickSetup.licenseEndTip'),
onOk() {
fnRestStepState();
},
@@ -151,11 +151,12 @@ onUnmounted(() => {
</div>
</a-result>
<!-- 文件上传框 -->
<!-- 许可证上传框 -->
<EditModal
v-model:visible="state.visibleByFile"
:ne-type="state.from.neType"
:ne-id="state.from.neId"
:reload="true"
@ok="fnModalOk"
@cancel="fnModalCancel"
></EditModal>