style: 快速开站多语言翻译
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/lib';
|
||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||
import { defineAsyncComponent, h, onMounted, reactive, ref } from 'vue';
|
||||
import { fnToStepName, stepState } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
@@ -23,32 +23,32 @@ let dictStatus = ref<DictType[]>([]);
|
||||
/**表格字段列 */
|
||||
let tableColumns = ref<TableColumnsType>([
|
||||
{
|
||||
title: 'neType',
|
||||
title: t('views.ne.common.neType'),
|
||||
dataIndex: 'neType',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'neId',
|
||||
title: t('views.ne.common.neId'),
|
||||
dataIndex: 'neId',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'status',
|
||||
title: t('views.ne.neLicense.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'serialNum',
|
||||
title: t('views.ne.common.serialNum'),
|
||||
dataIndex: 'serialNum',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'expiryDate',
|
||||
title: t('views.ne.common.expiryDate'),
|
||||
dataIndex: 'expiryDate',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
@@ -115,7 +115,7 @@ function fnModalOpen() {
|
||||
function fnRecordState() {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `check refresh license state?`,
|
||||
content: t('views.system.quickStart.stepLicenseReloadTip'),
|
||||
onOk: async () => {
|
||||
if (state.confirmLoading) return;
|
||||
state.confirmLoading = true;
|
||||
@@ -149,7 +149,7 @@ function fnRecordState() {
|
||||
function fnRecordCode() {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `check download license activation code file?`,
|
||||
content: t('views.system.quickStart.stepLicenseDownCodeTip'),
|
||||
onOk: async () => {
|
||||
if (state.confirmLoading) return;
|
||||
state.confirmLoading = true;
|
||||
@@ -168,7 +168,7 @@ function fnRecordCode() {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
const activationRequestCode = res.data;
|
||||
row.activationRequestCode = activationRequestCode;
|
||||
codeArr.push(`[${row.neType} ${row.neId}]:${activationRequestCode}`);
|
||||
codeArr.push(`[${row.neType} ${row.neId}]: ${activationRequestCode}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ function fnRecordCode() {
|
||||
const blob = new Blob([codeArr.join('\r\n')], {
|
||||
type: 'text/plain',
|
||||
});
|
||||
saveAs(blob, `CheckRecordActivationCode_${new Date().getTime()}.txt`);
|
||||
saveAs(blob, `Activation_Request_Code_${new Date().getTime()}.txt`);
|
||||
}
|
||||
|
||||
hide();
|
||||
@@ -210,7 +210,7 @@ function fnGetList() {
|
||||
function fnStepPrev() {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: '确认要放弃当前变更返回上一步吗?',
|
||||
content: t('views.system.quickStart.stepLicenseStepPrev'),
|
||||
onOk() {
|
||||
fnToStepName('NeInfoSoftwareInstall');
|
||||
},
|
||||
@@ -222,7 +222,14 @@ function fnStepNext(stepName: 'Done') {
|
||||
if (stepName === 'Done') {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: '确认要结束网元安装吗?',
|
||||
content: h('div', {}, [
|
||||
h('p', t('views.system.quickStart.stepLicenseStepNext')),
|
||||
h(
|
||||
'div',
|
||||
{ style: { color: '#ff4d4f' } },
|
||||
t('views.system.quickStart.stepLicenseStepNext2')
|
||||
),
|
||||
]),
|
||||
onOk() {
|
||||
stepState.setupNE = true;
|
||||
fnToStepName('Done');
|
||||
@@ -280,35 +287,42 @@ onMounted(() => {
|
||||
|
||||
<div class="ne-oper">
|
||||
<a-space direction="horizontal" :size="18">
|
||||
<a-button @click="fnStepPrev()"> 上一步 </a-button>
|
||||
<a-button @click="fnStepPrev()">
|
||||
{{ t('views.system.quickStart.stepPrev') }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="primary" @click.prevent="fnModalOpen">
|
||||
<a-button type="dashed" @click.prevent="fnModalOpen">
|
||||
<template #icon><UploadOutlined /></template>
|
||||
Upload License
|
||||
{{ t('views.ne.neLicense.uploadBatch') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="default"
|
||||
danger
|
||||
type="primary"
|
||||
ghost
|
||||
:disabled="state.selectedRowKeys.length <= 0"
|
||||
:loading="state.confirmLoading"
|
||||
@click.prevent="fnRecordState()"
|
||||
>
|
||||
<template #icon><ReloadOutlined /></template>
|
||||
Refresh State
|
||||
<template #icon><SecurityScanOutlined /></template>
|
||||
{{ t('views.system.quickStart.stepLicenseReload') }}
|
||||
{{ state.selectedRowKeys.length || '' }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="ghost"
|
||||
type="primary"
|
||||
ghost
|
||||
:disabled="state.selectedRowKeys.length <= 0"
|
||||
:loading="state.confirmLoading"
|
||||
@click.prevent="fnRecordCode()"
|
||||
>
|
||||
<template #icon><DownloadOutlined /></template>
|
||||
Download Activation Code
|
||||
{{ t('views.system.quickStart.stepLicenseDownCode') }}
|
||||
{{ state.selectedRowKeys.length || '' }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="dashed" @click="fnStepNext('Done')"> 结束 </a-button>
|
||||
<a-button type="primary" @click="fnStepNext('Done')">
|
||||
{{ t('views.system.quickStart.stepLicenseEnd') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user