style: 快速开站多语言翻译
This commit is contained in:
@@ -1583,7 +1583,7 @@ export default {
|
|||||||
userWork:'User position',
|
userWork:'User position',
|
||||||
userWorkPlease: 'Please select user post',
|
userWorkPlease: 'Please select user post',
|
||||||
userTip:'User Description',
|
userTip:'User Description',
|
||||||
loginPwd:'Login password',
|
loginPwd:'Password',
|
||||||
updateSure:'Do you want to update existing data',
|
updateSure:'Do you want to update existing data',
|
||||||
downloadObj:'Download Tpl',
|
downloadObj:'Download Tpl',
|
||||||
importTitle:'User Import',
|
importTitle:'User Import',
|
||||||
@@ -1866,6 +1866,37 @@ export default {
|
|||||||
exportOk: "Completed export",
|
exportOk: "Completed export",
|
||||||
typeDataErr: "Failed to get dictionary type information",
|
typeDataErr: "Failed to get dictionary type information",
|
||||||
},
|
},
|
||||||
|
quickStart: {
|
||||||
|
start: 'Start Setup',
|
||||||
|
skip: 'Skip',
|
||||||
|
finish: 'Complete Setup',
|
||||||
|
stepPrev: 'Previous',
|
||||||
|
stepNext: 'Next',
|
||||||
|
|
||||||
|
sysTitle: 'System Configuration',
|
||||||
|
sysAdmin: 'Administrator',
|
||||||
|
sysInfo: 'System Info',
|
||||||
|
sysLogo: 'System Logo',
|
||||||
|
sysLogoTip: 'Show the image to the system logo area to see the effect, please use a transparent background, the size of the proportion to adapt to the size of the area',
|
||||||
|
sysName: 'System Name',
|
||||||
|
sysNameTip: 'Limit system name to 20 characters in length',
|
||||||
|
sysUploadLogo: 'Confirmation of uploading the system logo file?',
|
||||||
|
sysUploadOk: 'File uploaded successfully, please save the information',
|
||||||
|
sysSave: 'Save',
|
||||||
|
sysSaveOk: 'Info saved successfully!',
|
||||||
|
sysPrevTip: 'Confirmed to go back to the previous step?',
|
||||||
|
sysNextNe: 'Confirming that you want to do a network element installation?',
|
||||||
|
sysNextDone: 'Confirmed to skip the network element installation?',
|
||||||
|
|
||||||
|
doneTitle: "Completing the Configuration",
|
||||||
|
doneTip: 'Please enter the system and configure it as appropriate.',
|
||||||
|
doneNETitle: 'Configuration of the network element installation has been performed',
|
||||||
|
doneNEDesc: 'If there are some abnormal network elements, please enter the system and configure it by yourself.',
|
||||||
|
doneSkipTitle: 'No installation configuration of network elements',
|
||||||
|
doneSkipDesc: 'The system will default to the initial network element information, you can modify the information yourself',
|
||||||
|
donePrevTip: 'Confirmed to go back to the previous step?',
|
||||||
|
doneOkTip: 'Confirm that you have completed the setup and started using it?',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mmlManage: {
|
mmlManage: {
|
||||||
cmdTitle: "Command Navigator",
|
cmdTitle: "Command Navigator",
|
||||||
|
|||||||
@@ -1583,7 +1583,7 @@ export default {
|
|||||||
userWork:'用户岗位',
|
userWork:'用户岗位',
|
||||||
userWorkPlease: '请选择用户岗位',
|
userWorkPlease: '请选择用户岗位',
|
||||||
userTip:'用户说明',
|
userTip:'用户说明',
|
||||||
loginPwd:'登入密码',
|
loginPwd:'登录密码',
|
||||||
updateSure:'是否更新已经存在的数据',
|
updateSure:'是否更新已经存在的数据',
|
||||||
downloadObj:'下载模板',
|
downloadObj:'下载模板',
|
||||||
importTitle:'用户导入',
|
importTitle:'用户导入',
|
||||||
@@ -1866,6 +1866,37 @@ export default {
|
|||||||
exportOk: "已完成导出",
|
exportOk: "已完成导出",
|
||||||
typeDataErr: "获取字典类型信息失败",
|
typeDataErr: "获取字典类型信息失败",
|
||||||
},
|
},
|
||||||
|
quickStart: {
|
||||||
|
start: '开始设置',
|
||||||
|
skip: '跳过',
|
||||||
|
finish: '完成设置',
|
||||||
|
stepPrev: '上一步',
|
||||||
|
stepNext: '下一步',
|
||||||
|
|
||||||
|
sysTitle: '系统配置',
|
||||||
|
sysAdmin: '管理员',
|
||||||
|
sysInfo: '系统信息',
|
||||||
|
sysLogo: '系统LOGO',
|
||||||
|
sysLogoTip: '将图片展示到系统LOGO区域查看效果,请使用透明背景,尺寸比例适应区域大小',
|
||||||
|
sysName: '系统名称',
|
||||||
|
sysNameTip: '系统名称限制20个字符长度',
|
||||||
|
sysUploadLogo: '确认要上传系统LOGO文件吗?',
|
||||||
|
sysUploadOk: '文件上传成功,请进行保存信息',
|
||||||
|
sysSave: '保存',
|
||||||
|
sysSaveOk: '信息保存成功!',
|
||||||
|
sysPrevTip: '确认要返回上一个步骤吗?',
|
||||||
|
sysNextNe: '确认要进行网元安装吗?',
|
||||||
|
sysNextDone: '确认要跳过网元安装吗?',
|
||||||
|
|
||||||
|
doneTitle: "完成配置",
|
||||||
|
doneTip: '请进入系统后,根据情况进行更多相关配置',
|
||||||
|
doneNETitle: '已经进行网元安装配置',
|
||||||
|
doneNEDesc: '如有部分异常网元请进入系统后自行配置',
|
||||||
|
doneSkipTitle: '未进行安装配置网元',
|
||||||
|
doneSkipDesc: '系统将会默认初始网元信息,可自行修改信息',
|
||||||
|
donePrevTip: '确认要返回上一个步骤吗?',
|
||||||
|
doneOkTip: '确认完成设置并开始使用吗?',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mmlManage: {
|
mmlManage: {
|
||||||
cmdTitle: "命令导航",
|
cmdTitle: "命令导航",
|
||||||
|
|||||||
@@ -19,16 +19,16 @@ function fnGetList() {
|
|||||||
if (!stepState.setupNE) {
|
if (!stepState.setupNE) {
|
||||||
infoList.value.push({
|
infoList.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
title: '未进行安装配置网元',
|
title: t('views.system.quickStart.doneSkipTitle'),
|
||||||
description: '系统将会默认初始网元信息,可自行修改信息',
|
description: t('views.system.quickStart.doneSkipDesc'),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
infoList.value.push({
|
infoList.value.push({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
title: '已经进行网元安装配置',
|
title: t('views.system.quickStart.doneNETitle'),
|
||||||
description: '如有部分异常网元请进入系统后自行配置',
|
description: t('views.system.quickStart.doneNEDesc'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ function fnGetList() {
|
|||||||
function fnStepPrev() {
|
function fnStepPrev() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: '确认要返回上一步吗?',
|
content: t('views.system.quickStart.donePrevTip'),
|
||||||
onOk() {
|
onOk() {
|
||||||
let stepName = 'NeInfoSoftwareLicense';
|
let stepName = 'NeInfoSoftwareLicense';
|
||||||
if (!stepState.setupNE) {
|
if (!stepState.setupNE) {
|
||||||
@@ -51,7 +51,7 @@ function fnStepPrev() {
|
|||||||
function fnGuideDone() {
|
function fnGuideDone() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: '确认开始使用吗?',
|
content: t('views.system.quickStart.doneOkTip'),
|
||||||
onOk() {
|
onOk() {
|
||||||
bootloaderDone()
|
bootloaderDone()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -75,16 +75,16 @@ onMounted(() => {
|
|||||||
<template>
|
<template>
|
||||||
<a-result
|
<a-result
|
||||||
status="success"
|
status="success"
|
||||||
title="完成配置"
|
:title="t('views.system.quickStart.doneTitle')"
|
||||||
sub-title="请进入系统后,根据情况进行更多相关配置"
|
:sub-title="t('views.system.quickStart.doneTip')"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<a-space direction="vertical" style="width: 40%">
|
<a-space direction="vertical" style="width: 40%">
|
||||||
<a-button block type="primary" @click="fnGuideDone()">
|
<a-button block type="primary" @click="fnGuideDone()">
|
||||||
开始使用
|
{{ t('views.system.quickStart.finish') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button block type="default" @click="fnStepPrev()">
|
<a-button block type="default" @click="fnStepPrev()">
|
||||||
返回上一步
|
{{ t('views.system.quickStart.stepPrev') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { fnToStepName } from '../hooks/useStep';
|
import { useRouter } from 'vue-router';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { TOKEN_RESPONSE_FIELD } from '@/constants/token-constants';
|
import { TOKEN_RESPONSE_FIELD } from '@/constants/token-constants';
|
||||||
import { getToken, setToken } from '@/plugins/auth-token';
|
import { getToken, setToken } from '@/plugins/auth-token';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import useI18n from '@/hooks/useI18n';
|
|
||||||
import { bootloaderStart } from '@/api/system/quick-start/bootloader';
|
import { bootloaderStart } from '@/api/system/quick-start/bootloader';
|
||||||
|
import useI18n from '@/hooks/useI18n';
|
||||||
|
import { fnToStepName } from '../hooks/useStep';
|
||||||
const { t, changeLocale, optionsLocale } = useI18n();
|
const { t, changeLocale, optionsLocale } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ onMounted(() => {
|
|||||||
<div class="ne-main">
|
<div class="ne-main">
|
||||||
<a-space direction="vertical" style="width: 30%">
|
<a-space direction="vertical" style="width: 30%">
|
||||||
<a-button block type="primary" @click="fnToStepName('SystemConfig')">
|
<a-button block type="primary" @click="fnToStepName('SystemConfig')">
|
||||||
开始
|
{{ t('views.system.quickStart.start') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,14 +67,11 @@ function fnBeforeUpload(file: FileType) {
|
|||||||
if (state.confirmLoading) return false;
|
if (state.confirmLoading) return false;
|
||||||
const isJpgOrPng = ['image/jpeg', 'image/png'].includes(file.type);
|
const isJpgOrPng = ['image/jpeg', 'image/png'].includes(file.type);
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
message.error(
|
message.error(`${t('components.UploadModal.onlyAllow')} jpg、png`, 3);
|
||||||
t('views.system.setting.uploadFormat', { format: 'jpg、png' }),
|
|
||||||
3
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
message.error(t('views.system.setting.uploadSize', { size: 2 }), 3);
|
message.error(`${t('components.UploadModal.allowFilter')} 2MB`, 3);
|
||||||
}
|
}
|
||||||
return isJpgOrPng && isLt2M;
|
return isJpgOrPng && isLt2M;
|
||||||
}
|
}
|
||||||
@@ -83,7 +80,7 @@ function fnBeforeUpload(file: FileType) {
|
|||||||
function fnUpload(up: UploadRequestOption) {
|
function fnUpload(up: UploadRequestOption) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: t('views.system.setting.sysLogoTipContentUpload'),
|
content: t('views.system.quickStart.sysUploadLogo'),
|
||||||
onOk() {
|
onOk() {
|
||||||
// 发送请求
|
// 发送请求
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
@@ -95,7 +92,7 @@ function fnUpload(up: UploadRequestOption) {
|
|||||||
state.confirmLoading = false;
|
state.confirmLoading = false;
|
||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success(t('views.system.setting.uploadSuccess'), 3);
|
message.success(t('views.system.quickStart.sysUploadOk'), 3);
|
||||||
state.filePath = res.data.fileName;
|
state.filePath = res.data.fileName;
|
||||||
// 兼容旧前端可改配置文件
|
// 兼容旧前端可改配置文件
|
||||||
const baseUrl = import.meta.env.PROD
|
const baseUrl = import.meta.env.PROD
|
||||||
@@ -122,7 +119,7 @@ function fnSaveAcount() {
|
|||||||
bootloaderAccount(state.username, state.password).then(res => {
|
bootloaderAccount(state.username, state.password).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success('保存成功!');
|
message.success(t('common.operateOk'));
|
||||||
} else {
|
} else {
|
||||||
message.warning(res.msg);
|
message.warning(res.msg);
|
||||||
}
|
}
|
||||||
@@ -162,7 +159,7 @@ function fnSaveSystem() {
|
|||||||
state.confirmLoading = true;
|
state.confirmLoading = true;
|
||||||
Promise.all(reqArr).then(resArr => {
|
Promise.all(reqArr).then(resArr => {
|
||||||
console.log(resArr);
|
console.log(resArr);
|
||||||
message.success('保存成功!');
|
message.success(t('views.system.quickStart.sysSaveOk'));
|
||||||
state.confirmLoading = false;
|
state.confirmLoading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -171,7 +168,7 @@ function fnSaveSystem() {
|
|||||||
function fnStepPrev() {
|
function fnStepPrev() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: '确认要返回上一步吗?',
|
content: t('views.system.quickStart.sysPrevTip'),
|
||||||
onOk() {
|
onOk() {
|
||||||
fnToStepName('Start');
|
fnToStepName('Start');
|
||||||
},
|
},
|
||||||
@@ -183,7 +180,7 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
if (stepName === 'NeInfoConfig') {
|
if (stepName === 'NeInfoConfig') {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: '确认要进行网元快速安装吗?',
|
content: t('views.system.quickStart.sysNextNe'),
|
||||||
onOk() {
|
onOk() {
|
||||||
fnToStepName('NeInfoConfig');
|
fnToStepName('NeInfoConfig');
|
||||||
},
|
},
|
||||||
@@ -192,7 +189,7 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
if (stepName === 'Done') {
|
if (stepName === 'Done') {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: '确认要直接使用核心网管理平台吗?',
|
content: t('views.system.quickStart.sysNextDone'),
|
||||||
onOk() {
|
onOk() {
|
||||||
stepState.setupNE = false;
|
stepState.setupNE = false;
|
||||||
fnToStepName('Done');
|
fnToStepName('Done');
|
||||||
@@ -204,7 +201,7 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="ne">
|
<div class="ne">
|
||||||
<h2>系统配置</h2>
|
<h2>{{ t('views.system.quickStart.sysTitle') }}</h2>
|
||||||
|
|
||||||
<a-form
|
<a-form
|
||||||
:label-col="{ span: 4 }"
|
:label-col="{ span: 4 }"
|
||||||
@@ -212,7 +209,9 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
:wrapper-col="{ span: 10 }"
|
:wrapper-col="{ span: 10 }"
|
||||||
style="flex: 1"
|
style="flex: 1"
|
||||||
>
|
>
|
||||||
<a-divider orientation="left">管理员账号</a-divider>
|
<a-divider orientation="left">
|
||||||
|
{{ t('views.system.quickStart.sysAdmin') }}
|
||||||
|
</a-divider>
|
||||||
<a-form-item :label="t('views.system.user.account')" name="username">
|
<a-form-item :label="t('views.system.user.account')" name="username">
|
||||||
<a-input v-model:value="state.username" :maxlength="30">
|
<a-input v-model:value="state.username" :maxlength="30">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@@ -233,14 +232,16 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
:loading="state.confirmLoading"
|
:loading="state.confirmLoading"
|
||||||
@click="fnSaveAcount()"
|
@click="fnSaveAcount()"
|
||||||
>
|
>
|
||||||
保存
|
{{ t('views.system.quickStart.sysSave') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-divider orientation="left">系统信息</a-divider>
|
<a-divider orientation="left">
|
||||||
|
{{ t('views.system.quickStart.sysInfo') }}
|
||||||
|
</a-divider>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="系统LOGO"
|
:label="t('views.system.quickStart.sysLogo')"
|
||||||
help="将整张图片展示到系统LOGO区域,请使用透明背景,尺寸比例适应区域大小"
|
:help="t('views.system.quickStart.sysLogoTip')"
|
||||||
:wrapper-col="{ span: 18 }"
|
:wrapper-col="{ span: 18 }"
|
||||||
>
|
>
|
||||||
<a-space direction="horizontal" :size="18">
|
<a-space direction="horizontal" :size="18">
|
||||||
@@ -282,7 +283,10 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="系统名称" help="系统名称限制20个字符长度">
|
<a-form-item
|
||||||
|
:label="t('views.system.quickStart.sysName')"
|
||||||
|
:help="t('views.system.quickStart.sysNameTip')"
|
||||||
|
>
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="state.title"
|
v-model:value="state.title"
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -307,19 +311,23 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
|
|||||||
:loading="state.confirmLoading"
|
:loading="state.confirmLoading"
|
||||||
@click="fnSaveSystem()"
|
@click="fnSaveSystem()"
|
||||||
>
|
>
|
||||||
保存
|
{{ t('views.system.quickStart.sysSave') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<div class="ne-oper">
|
<div class="ne-oper">
|
||||||
<a-space direction="horizontal" :size="18">
|
<a-space direction="horizontal" :size="18">
|
||||||
<a-button @click="fnStepPrev()"> 上一步 </a-button>
|
<a-button @click="fnStepPrev()">
|
||||||
|
{{ t('views.system.quickStart.stepPrev') }}
|
||||||
<a-button type="dashed" @click="fnStepNext('NeInfoConfig')">
|
</a-button>
|
||||||
下一步
|
|
||||||
|
<a-button type="primary" @click="fnStepNext('NeInfoConfig')">
|
||||||
|
{{ t('views.system.quickStart.stepNext') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button type="dashed" @click="fnStepNext('Done')">
|
||||||
|
{{ t('views.system.quickStart.skip') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="ghost" @click="fnStepNext('Done')"> 跳过 </a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user