From 8214175890eabb56037dfa8bfe2f8c3b60288553 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 15 Jan 2025 17:12:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9F=BA=E7=AB=99=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BF=BB=E8=AF=91=E5=92=8C=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 28 +++++- src/i18n/locales/zh-CN.ts | 20 +++++ .../ne-data/base-station/components/list.vue | 69 ++++++++------- .../base-station/components/topology.vue | 85 ++++++++++++++----- src/views/ne-data/base-station/index.vue | 23 ++++- 5 files changed, 168 insertions(+), 57 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 36229c93..03072e79 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -706,6 +706,26 @@ export default { licenseTip2: '2. Clicking [Finish] will end the installation process.', }, }, + neData: { + baseStation: { + list: "List", + topology: "Topology", + nbName: "Equipment Name", + topologyTitle: "Radio State Graph", + name: "Radio Name", + namePlease: "text content length 0~64", + position: "Radio Address", + positionPlease: "location description. Prohibition of spaces, length of text content 0-64", + address: "IP Address", + addressPlease: "text content length 0~64", + state: "Radio State", + online: "Online", + offline: "Offline", + time: "Change Time", + addRadio: "Add Radio Info", + editRadio: "Edit Radio Info", + }, + }, neUser: { auth: { authInfo:' Authentication Info', @@ -956,10 +976,10 @@ export default { }, kpiOverView:{ "kpiName":"NE Metrics Name", - "maxValue":"Max Value", - "minValue":"Min Value", - "avgValue":"Average Value", - "totalValue":"Worth Value", + "maxValue":"Max", + "minValue":"Min", + "avgValue":"Avg", + "totalValue":"Total", "kpiChartTitle":"Overview of NE metrics", "changeLine":"Change to Line Charts", "changeBar":"Change to Bar Charts", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 4966eec9..9c22b727 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -706,6 +706,26 @@ export default { licenseTip2: '2. 点击【结束】将结束安装过程', }, }, + neData: { + baseStation: { + list: "列表", + topology: "拓扑图", + nbName: "设备名称", + topologyTitle: "基站状态关系图", + name: "基站名称", + namePlease: "文本内容长度0~64", + position: "基站位置", + positionPlease: "位置描述。禁止空格,文本内容长度0-64", + address: "IP地址", + addressPlease: "文本内容长度0~64", + state: "基站状态", + online: "在线", + offline: "离线", + time: "变更时间", + addRadio: "添加基站信息", + editRadio: "更新基站信息", + }, + }, neUser: { auth: { authInfo:'鉴权信息', diff --git a/src/views/ne-data/base-station/components/list.vue b/src/views/ne-data/base-station/components/list.vue index 64769c9c..d823cd1e 100644 --- a/src/views/ne-data/base-station/components/list.vue +++ b/src/views/ne-data/base-station/components/list.vue @@ -20,13 +20,13 @@ const route = useRoute(); const nbState = ref([ { value: 'ON', - label: 'Online', + label: t('views.neData.baseStation.online'), tagType: 'green', tagClass: '', }, { value: 'OFF', - label: 'Offline', + label: t('views.neData.baseStation.offline'), tagType: 'red', tagClass: '', }, @@ -75,48 +75,55 @@ let tableState: TabeStateType = reactive({ /**表格字段列 */ let tableColumns = ref([ { - title: 'Index', + title: t('common.rowId'), dataIndex: 'index', align: 'left', width: 80, }, { - title: 'Name', + title: t('views.neData.baseStation.name'), dataIndex: 'name', align: 'left', width: 150, ellipsis: true, }, { - title: 'Position', + title: t('views.neData.baseStation.position'), dataIndex: 'position', align: 'left', width: 150, ellipsis: true, }, { - title: 'Address', + title: t('views.neData.baseStation.address'), dataIndex: 'address', align: 'left', width: 100, }, { - title: 'State', + title: t('views.neData.baseStation.nbName'), + dataIndex: 'nbName', + align: 'left', + width: 80, + }, + { + title: t('views.neData.baseStation.state'), dataIndex: 'state', key: 'state', align: 'left', width: 80, }, { - title: 'Time', + title: t('views.neData.baseStation.time'), align: 'left', width: 150, customRender(opt) { const record = opt.value; + console.log(opt) if (record.state === 'OFF') { - return record.offTime; + return record.offTime || '-'; } - return record.onTime; + return record.onTime || '-'; }, }, ]); @@ -277,13 +284,14 @@ let modalState: ModalStateType = reactive({ const modalStateFrom = Form.useForm( modalState.from, reactive({ - address: [{ required: true, message: `text content length 0~64` }], - name: [{ required: true, message: `text content length 0~64` }], + address: [ + { required: true, message: t('views.neData.baseStation.addressPlease') }, + ], + name: [ + { required: true, message: t('views.neData.baseStation.namePlease') }, + ], position: [ - { - required: true, - message: `location description. Prohibition of spaces, length of text content 0-64`, - }, + { required: true, message: t('views.neData.baseStation.positionPlease') }, ], }) ); @@ -295,7 +303,7 @@ const modalStateFrom = Form.useForm( function fnModalVisibleByEdit(edit?: string | number) { if (!edit) { modalStateFrom.resetFields(); //重置表单 - modalState.title = 'Add Radio Info'; + modalState.title = t('views.neData.baseStation.addRadio'); modalState.openByEdit = true; // 获取最大index if (tableState.data.length <= 0) { @@ -312,7 +320,7 @@ function fnModalVisibleByEdit(edit?: string | number) { }); modalStateFrom.resetFields(); //重置表单 Object.assign(modalState.from, row); - modalState.title = 'Edit Radio Info'; + modalState.title = t('views.neData.baseStation.editRadio'); modalState.openByEdit = true; } } @@ -427,8 +435,11 @@ onMounted(() => { /> - - + + { :labelWrap="true" > @@ -558,24 +569,24 @@ onMounted(() => { diff --git a/src/views/ne-data/base-station/components/topology.vue b/src/views/ne-data/base-station/components/topology.vue index 673b7b39..1c54a012 100644 --- a/src/views/ne-data/base-station/components/topology.vue +++ b/src/views/ne-data/base-station/components/topology.vue @@ -1,6 +1,6 @@