feat: 网元信息表单多语言翻译

This commit is contained in:
TsMask
2024-05-20 16:10:13 +08:00
parent 1ad2ed2d26
commit c1a9497b77
6 changed files with 59 additions and 50 deletions

View File

@@ -78,7 +78,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
seached: false,
data: [],
});
@@ -135,7 +135,7 @@ let tableColumns: ColumnsType = [
width: 100,
},
{
title: t('views.ne.neHost.createTime'),
title: t('common.createTime'),
dataIndex: 'createTime',
align: 'left',
width: 150,
@@ -798,7 +798,7 @@ onMounted(() => {
</template>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
name="remark"
:label-col="{ span: 3 }"
:label-wrap="true"

View File

@@ -71,7 +71,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
seached: false,
data: [],
});
@@ -103,7 +103,7 @@ let tableColumns: ColumnsType = [
width: 100,
},
{
title: t('views.ne.neHostCmd.createTime'),
title: t('common.createTime'),
dataIndex: 'createTime',
align: 'left',
width: 150,
@@ -572,7 +572,7 @@ onMounted(() => {
</a-form-item>
<a-form-item
:label="t('views.ne.neHostCmd.remark')"
:label="t('common.remark')"
name="remark"
:label-col="{ span: 3 }"
:label-wrap="true"
@@ -582,6 +582,7 @@ onMounted(() => {
:auto-size="{ minRows: 4, maxRows: 6 }"
:maxlength="450"
:show-count="true"
:placeholder="t('common.inputPlease')"
/>
</a-form-item>
</a-form>

View File

@@ -70,7 +70,7 @@ function fnHostAuthorized(row: Record<string, any>) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.ne.neHost.authorizedRSA'),
content: t('views.ne.neHost.authRSATip'),
onOk: () => {
modalState.confirmLoading = true;
neHostAuthorizedRSA(row).then(res => {
@@ -369,7 +369,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neType')"
:label="t('views.ne.common.neType')"
name="neType"
v-bind="modalStateFrom.validateInfos.neType"
>
@@ -386,7 +386,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.configManage.neManage.neTypeTip') }}
{{ t('views.ne.common.neTypeTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -397,7 +397,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.pvflag')"
:label="t('views.ne.neInfo.pvflag')"
name="pvFlag"
v-bind="modalStateFrom.validateInfos.pvFlag"
>
@@ -405,10 +405,10 @@ onMounted(() => {
v-model:value="modalState.from.pvFlag"
default-value="PNF"
>
<a-select-opt-group :label="t('views.configManage.neManage.pnf')">
<a-select-opt-group :label="t('views.ne.neInfo.pnf')">
<a-select-option value="PNF">PNF</a-select-option>
</a-select-opt-group>
<a-select-opt-group :label="t('views.configManage.neManage.vnf')">
<a-select-opt-group :label="t('views.ne.neInfo.vnf')">
<a-select-option value="VNF">VNF</a-select-option>
</a-select-opt-group>
</a-select>
@@ -419,7 +419,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neId')"
:label="t('views.ne.common.neId')"
name="neId"
v-bind="modalStateFrom.validateInfos.neId"
>
@@ -433,7 +433,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neName')"
:label="t('views.ne.common.neName')"
name="neName"
v-bind="modalStateFrom.validateInfos.neName"
>
@@ -451,7 +451,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.ip')"
:label="t('views.ne.common.ipAddr')"
name="ip"
v-bind="modalStateFrom.validateInfos.ip"
>
@@ -466,7 +466,7 @@ onMounted(() => {
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.neInfo.ipAddr') }}
{{ t('views.ne.common.ipAddrTip') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
@@ -477,7 +477,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.port')"
:label="t('views.ne.common.port')"
name="port"
v-bind="modalStateFrom.validateInfos.port"
>
@@ -492,7 +492,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>{{ t('views.configManage.neManage.portTip') }}</div>
<div>{{ t('views.ne.common.portTip') }}</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -503,7 +503,7 @@ onMounted(() => {
</a-row>
<a-form-item
:label="t('views.configManage.neManage.uid')"
:label="t('views.ne.common.rmUid')"
name="rmUid"
v-bind="modalStateFrom.validateInfos.rmUid"
:label-col="{ span: 3 }"
@@ -519,7 +519,7 @@ onMounted(() => {
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.neInfo.rmUID') }}
{{ t('views.ne.common.rmUidTip') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
@@ -530,10 +530,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.mac')"
name="neAddress"
>
<a-form-item :label="t('views.ne.neInfo.neAddress')" name="neAddress">
<a-input
v-model:value="modalState.from.neAddress"
allow-clear
@@ -543,7 +540,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>{{ t('views.configManage.neManage.macTip') }}</div>
<div>{{ t('views.ne.neInfo.neAddressTip') }}</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -552,7 +549,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.configManage.neManage.dn')" name="dn">
<a-form-item :label="t('views.ne.neInfo.dn')" name="dn">
<a-input
v-model:value="modalState.from.dn"
allow-clear
@@ -566,7 +563,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.vendorName')"
:label="t('views.ne.neInfo.vendorName')"
name="vendorName"
>
<a-input
@@ -579,10 +576,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.province')"
name="province"
>
<a-form-item :label="t('views.ne.neInfo.province')" name="province">
<a-input
v-model:value="modalState.from.province"
allow-clear
@@ -594,7 +588,7 @@ onMounted(() => {
</a-row>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
:label-col="{ span: 3 }"
:label-wrap="true"
>
@@ -712,7 +706,7 @@ onMounted(() => {
</template>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
:label-col="{ span: 3 }"
:label-wrap="true"
>
@@ -746,7 +740,7 @@ onMounted(() => {
:loading="modalState.confirmLoading"
v-if="host.hostType === 'ssh' && host.authMode !== '2'"
>
免密授权
{{ t('views.ne.neHost.authRSA') }}
</a-button>
</a-form-item>
</a-collapse-panel>

View File

@@ -501,7 +501,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }"
:scroll="{ x: tableColumns.length * 150 }"
:row-selection="{
type: 'checkbox',
columnWidth: '48px',