diff --git a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue index 426e707421..cbe65812e3 100644 --- a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue +++ b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue @@ -106,17 +106,21 @@ const saveSelfSubject = () => {
- + {{ $t('commons.save') }} - + - + { :background-border-select-width="197" /> - + @@ -147,7 +155,7 @@ const saveSelfSubject = () => { diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index cc4e1a459b..938f1baa45 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -106,7 +106,7 @@ const closeEditCanvasName = () => { return } if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) { - ElMessage.warning('名称字段长度1-64个字符') + ElMessage.warning(t('components.length_1_64_characters')) editCanvasName() return } @@ -134,7 +134,7 @@ const previewInner = () => { const previewOuter = () => { if (!dvInfo.value.id) { - ElMessage.warning('请先保存当前页面') + ElMessage.warning(t('components.current_page_first')) return } canvasSave(() => { @@ -174,11 +174,11 @@ const resourceOptFinish = param => { const saveCanvasWithCheck = () => { if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) { - ElMessageBox.confirm('已切换至新组织,无权保存其他组织的资源', { + ElMessageBox.confirm(t('components.from_other_organizations'), { confirmButtonType: 'primary', type: 'warning', - confirmButtonText: '关闭页面', - cancelButtonText: '取消', + confirmButtonText: t('components.close_the_page'), + cancelButtonText: t('common.cancel'), autofocus: false, showClose: false }).then(() => { @@ -218,7 +218,7 @@ const saveResource = () => { try { canvasSave(() => { snapshotStore.resetStyleChangeTimes() - ElMessage.success('保存成功') + ElMessage.success(t('common.save_success')) let url = window.location.href url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`) window.history.replaceState(null, '', url) @@ -251,7 +251,7 @@ const backToMain = () => { url = url + '?dvId=' + dvInfo.value.id } if (styleChangeTimes.value > 0) { - ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', { + ElMessageBox.confirm(t('components.sure_to_exit'), { confirmButtonType: 'primary', type: 'warning', autofocus: false, @@ -300,7 +300,7 @@ const openDataBoardSetting = () => { const openMobileSetting = () => { if (!dvInfo.value.id || dvInfo.value.dataState === 'prepare') { - ElMessage.warning('请先保存当前页面') + ElMessage.warning(t('components.current_page_first')) return } useEmitt().emitter.emit('mobileConfig') @@ -366,11 +366,11 @@ const batchOptStatusChange = value => { const openOuterParamsSet = () => { if (componentData.value.length === 0) { - ElMessage.warning('当前仪表板为空,请先添加组件') + ElMessage.warning(t('components.add_components_first')) return } if (!dvInfo.value.id) { - ElMessage.warning('请先保存当前页面') + ElMessage.warning(t('components.current_page_first')) return } //设置需要先触发保存 @@ -418,7 +418,7 @@ const saveLinkageSetting = () => { linkageInfo: targetLinkageInfo.value } saveLinkage(request).then(() => { - ElMessage.success('保存成功') + ElMessage.success(t('save_success.common')) // 刷新联动信息 getPanelAllLinkageInfo(dvInfo.value.id).then(rsp => { dvMainStore.setNowPanelTrackInfo(rsp.data) @@ -497,7 +497,7 @@ const initOpenHandler = newWindow => {
- 已选 {{ curBatchOptComponents.length }} 项 + {{ t('user.selection_info', [curBatchOptComponents.length]) }}
@@ -507,7 +507,7 @@ const initOpenHandler = newWindow => { is-label :icon-name="dvView" themes="light" - title="图表" + :title="t('chart.datalist')" > @@ -517,7 +517,7 @@ const initOpenHandler = newWindow => { is-label themes="light" :icon-name="dvFilter" - title="查询组件" + :title="t('visualization.filter_component')" > @@ -526,7 +526,7 @@ const initOpenHandler = newWindow => { themes="light" :base-width="115" :icon-name="dvText" - title="富文本" + :title="t('components.rich_text')" > @@ -536,7 +536,7 @@ const initOpenHandler = newWindow => { placement="bottom" :base-width="328" :icon-name="dvMedia" - title="媒体" + :title="t('components.media')" > @@ -549,13 +549,13 @@ const initOpenHandler = newWindow => { is-label :base-width="115" :icon-name="dvMoreCom" - title="更多" + :title="'visualization.more'" > @@ -564,32 +564,45 @@ const initOpenHandler = newWindow => {