fix: 系统配置重置操作多语言翻译

This commit is contained in:
TsMask
2024-05-08 16:09:39 +08:00
parent 165b28bab1
commit fa4be253f7
4 changed files with 20 additions and 7 deletions

View File

@@ -1520,6 +1520,9 @@ export default {
i18nOpen: "Display Switch", i18nOpen: "Display Switch",
i18nDefault: "Default Languages", i18nDefault: "Default Languages",
i18nInstruction: 'Whether to display the internationalization switch and set the system default language', i18nInstruction: 'Whether to display the internationalization switch and set the system default language',
reset: "System Reset",
resetInstruction: "System reset will destroy all data in the current system, please operate with caution.",
resetTipContent: 'System reset will destroy all data in the current system. Are you sure you want to continue?',
}, },
role:{ role:{
allScopeOptions:'All data permissions', allScopeOptions:'All data permissions',

View File

@@ -1520,6 +1520,9 @@ export default {
i18nOpen: "显示切换", i18nOpen: "显示切换",
i18nDefault: "默认语言", i18nDefault: "默认语言",
i18nInstruction: '是否显示国际化切换,设置系统默认语言', i18nInstruction: '是否显示国际化切换,设置系统默认语言',
reset: "系统重置",
resetInstruction: "系统重置将会销毁当前系统内所有数据,请谨慎操作。",
resetTipContent: '系统重置将会销毁当前系统内所有数据,确认要继续吗?',
}, },
role:{ role:{
allScopeOptions:'全部数据权限', allScopeOptions:'全部数据权限',

View File

@@ -44,7 +44,7 @@ function fnModalOk() {
.then(res => { .then(res => {
state.confirmLoading = false; state.confirmLoading = false;
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
fnModalCancel() fnModalCancel();
lockedStore.fnLock('reload'); lockedStore.fnLock('reload');
} else { } else {
message.error(res.msg, 3); message.error(res.msg, 3);
@@ -69,23 +69,28 @@ function fnModalCancel() {
<template> <template>
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24" style="margin-bottom: 30px"> <a-col :lg="12" :md="12" :xs="24" style="margin-bottom: 30px">
<a-button type="dashed" danger @click="fnModalVisible()"> 重置 </a-button> <a-button type="dashed" danger @click="fnModalVisible()">
{{ t('common.reset') }}
</a-button>
</a-col> </a-col>
<a-modal <a-modal
:mask-closable="false"
v-model:visible="state.visible" v-model:visible="state.visible"
title="Prompt" :title="t('common.tipTitle')"
:ok-text="state.count > 0 ? `确认 ${state.count}` : '确认'" :ok-text="
state.count > 0 ? `${t('common.ok')} ${state.count}` : t('common.ok')
"
:confirmLoading="state.count > 0 || state.confirmLoading" :confirmLoading="state.count > 0 || state.confirmLoading"
@ok="fnModalOk()" @ok="fnModalOk()"
@cancel="fnModalCancel()" @cancel="fnModalCancel()"
> >
系统重置将会销毁当前系统内所有数据,确认要继续吗? {{ t('views.system.setting.resetTipContent') }}
</a-modal> </a-modal>
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-typography> <a-typography>
<a-typography-paragraph> <a-typography-paragraph>
系统重置将会销毁当前系统内所有数据,请谨慎操作。 {{ t('views.system.setting.resetInstruction') }}
</a-typography-paragraph> </a-typography-paragraph>
</a-typography> </a-typography>
</a-col> </a-col>

View File

@@ -45,7 +45,9 @@ const { t } = useI18n();
</a-divider> </a-divider>
<ChangeI18n></ChangeI18n> <ChangeI18n></ChangeI18n>
</div> </div>
<a-divider orientation="left"> 系统重置 </a-divider> <a-divider orientation="left">
{{ t('views.system.setting.reset') }}
</a-divider>
<SystemReset></SystemReset> <SystemReset></SystemReset>
</a-card> </a-card>
</PageContainer> </PageContainer>