mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
refactor(数据大屏): 国际化适配
This commit is contained in:
parent
9224959a11
commit
06600f0b6c
@ -63,7 +63,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span :title="data.sourceFieldName">
|
||||||
<span class="tree-select-field">
|
<span class="tree-select-field">
|
||||||
<el-icon style="margin-right: 4px">
|
<el-icon style="margin-right: 4px">
|
||||||
<Icon
|
<Icon
|
||||||
@ -380,7 +380,7 @@
|
|||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="state.linkJumpCurFilterFieldArray.length === 0">
|
<template v-else-if="state.linkJumpCurFilterFieldArray.length === 0">
|
||||||
<span>当前图表无绑定的查询条件</span>
|
<span>{{ t('visualization.jump_no_banding_tips') }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="state.currentOutParams.length > 0">
|
<template v-else-if="state.currentOutParams.length > 0">
|
||||||
<el-row style="margin-bottom: 8px" :gutter="8">
|
<el-row style="margin-bottom: 8px" :gutter="8">
|
||||||
@ -867,7 +867,7 @@ const save = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (subCheckCount > 0) {
|
if (subCheckCount > 0) {
|
||||||
ElMessage.error('字段【' + linkJumpInfo.sourceFieldName + '】存在空配置,请先完善配置!')
|
ElMessage.error(t('visualization.delete_warn', [linkJumpInfo.sourceFieldName]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -878,7 +878,7 @@ const save = () => {
|
|||||||
updateJumpSet(state.linkJump)
|
updateJumpSet(state.linkJump)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
snapshotStore.recordSnapshotCache('updateJumpSet')
|
snapshotStore.recordSnapshotCache('updateJumpSet')
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success(t('common.save_success'))
|
||||||
// 刷新跳转信息
|
// 刷新跳转信息
|
||||||
queryVisualizationJumpInfo(dvInfo.value.id).then(rsp => {
|
queryVisualizationJumpInfo(dvInfo.value.id).then(rsp => {
|
||||||
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
||||||
@ -1503,6 +1503,7 @@ span {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-content-details {
|
.label-content-details {
|
||||||
|
@ -70,7 +70,8 @@ const dvMainStore = dvMainStoreWithOut()
|
|||||||
const { canvasViewInfo, mobileInPc } = storeToRefs(dvMainStore)
|
const { canvasViewInfo, mobileInPc } = storeToRefs(dvMainStore)
|
||||||
const isError = ref(false)
|
const isError = ref(false)
|
||||||
const appearanceStore = useAppearanceStoreWithOut()
|
const appearanceStore = useAppearanceStoreWithOut()
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
const { t } = useI18n()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
scale: {
|
scale: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@ -147,7 +148,7 @@ const curFontFamily = () => {
|
|||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
const outerPlaceholder = t('visualization.component_input_tips')
|
||||||
const init = ref({
|
const init = ref({
|
||||||
selector: '#' + tinymceId,
|
selector: '#' + tinymceId,
|
||||||
toolbar_items_size: 'small',
|
toolbar_items_size: 'small',
|
||||||
@ -168,7 +169,7 @@ const init = ref({
|
|||||||
'12px 14px 16px 18px 20px 22px 24px 28px 32px 36px 42px 48px 56px 72px 80px 90px 100px 110px 120px 140px 150px 170px 190px 210px', // 字体大小
|
'12px 14px 16px 18px 20px 22px 24px 28px 32px 36px 42px 48px 56px 72px 80px 90px 100px 110px 120px 140px 150px 170px 190px 210px', // 字体大小
|
||||||
menubar: false,
|
menubar: false,
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
outer_placeholder: '双击输入文字',
|
outer_placeholder: outerPlaceholder,
|
||||||
inline: true, // 开启内联模式
|
inline: true, // 开启内联模式
|
||||||
branding: false,
|
branding: false,
|
||||||
icons: 'vertical-content',
|
icons: 'vertical-content',
|
||||||
|
@ -2794,6 +2794,12 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
|
|||||||
column_name: 'Field name'
|
column_name: 'Field name'
|
||||||
},
|
},
|
||||||
visualization: {
|
visualization: {
|
||||||
|
jump_null_tips:
|
||||||
|
'The field [{0}] has empty configuration. Please complete the configuration first!',
|
||||||
|
jump_no_banding_tips: 'The current chart has no bound query conditions.',
|
||||||
|
set_as_tips: 'Set as',
|
||||||
|
rich_text_tips: 'Double click to enter text',
|
||||||
|
save_conflict_tips: 'has been updated by others, overwrite and save?',
|
||||||
text_decoration: 'underline',
|
text_decoration: 'underline',
|
||||||
select_target_resource: 'Please select the target resource',
|
select_target_resource: 'Please select the target resource',
|
||||||
target_dashboard_dataV: 'Target Dashboard/Screen',
|
target_dashboard_dataV: 'Target Dashboard/Screen',
|
||||||
|
@ -2726,6 +2726,11 @@ export default {
|
|||||||
column_name: '欄位名稱'
|
column_name: '欄位名稱'
|
||||||
},
|
},
|
||||||
visualization: {
|
visualization: {
|
||||||
|
jump_null_tips: '欄位【{0}】存在空配置,請先完善配置!',
|
||||||
|
jump_no_banding_tips: '當前圖表無綁定的查詢條件',
|
||||||
|
set_as_tips: '置為',
|
||||||
|
rich_text_tips: '雙擊輸入文字',
|
||||||
|
save_conflict_tips: '已被他人更新,是否要覆蓋並儲存?',
|
||||||
text_decoration: '下劃線',
|
text_decoration: '下劃線',
|
||||||
select_target_resource: '請選擇目標資源',
|
select_target_resource: '請選擇目標資源',
|
||||||
target_dashboard_dataV: '目標儀表板/數據大屏',
|
target_dashboard_dataV: '目標儀表板/數據大屏',
|
||||||
|
@ -2728,6 +2728,11 @@ export default {
|
|||||||
column_name: '字段名称'
|
column_name: '字段名称'
|
||||||
},
|
},
|
||||||
visualization: {
|
visualization: {
|
||||||
|
jump_null_tips: '字段【{0}】存在空配置,请先完善配置!',
|
||||||
|
jump_no_banding_tips: '当前图表无绑定的查询条件',
|
||||||
|
set_as_tips: '置为',
|
||||||
|
rich_text_tips: '双击输入文字',
|
||||||
|
save_conflict_tips: '已被他人更新,是否覆盖保存?',
|
||||||
text_decoration: '下滑线',
|
text_decoration: '下滑线',
|
||||||
select_target_resource: '请选择目标资源',
|
select_target_resource: '请选择目标资源',
|
||||||
target_dashboard_dataV: '目标仪表板/数据大屏',
|
target_dashboard_dataV: '目标仪表板/数据大屏',
|
||||||
|
@ -11,7 +11,9 @@ import {
|
|||||||
} from '@/custom-component/component-list'
|
} from '@/custom-component/component-list'
|
||||||
import { createGroupStyle, getComponentRotatedStyle } from '@/utils/style'
|
import { createGroupStyle, getComponentRotatedStyle } from '@/utils/style'
|
||||||
import eventBus from '@/utils/eventBus'
|
import eventBus from '@/utils/eventBus'
|
||||||
import { canvasIdMapCheck, checkJoinGroup, isMainCanvas, isTabCanvas } from '@/utils/canvasUtils'
|
import { canvasIdMapCheck, checkJoinGroup, isTabCanvas } from '@/utils/canvasUtils'
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { curComponent, componentData, curOriginThemes } = storeToRefs(dvMainStore)
|
const { curComponent, componentData, curOriginThemes } = storeToRefs(dvMainStore)
|
||||||
@ -173,8 +175,8 @@ export const composeStore = defineStore('compose', {
|
|||||||
id: newId,
|
id: newId,
|
||||||
component: 'Group',
|
component: 'Group',
|
||||||
canvasActive: false,
|
canvasActive: false,
|
||||||
name: '组合',
|
name: t('visualization.view_group'),
|
||||||
label: '组合',
|
label: t('visualization.view_group'),
|
||||||
icon: 'group',
|
icon: 'group',
|
||||||
expand: true,
|
expand: true,
|
||||||
commonBackground: {
|
commonBackground: {
|
||||||
|
@ -516,7 +516,7 @@ export function checkCanvasChangePre(callBack) {
|
|||||||
const tips =
|
const tips =
|
||||||
(dvInfo.value.type === 'dashboard'
|
(dvInfo.value.type === 'dashboard'
|
||||||
? t('work_branch.dashboard')
|
? t('work_branch.dashboard')
|
||||||
: t('work_branch.big_data_screen')) + '已被他人更新,是否覆盖保存?'
|
: t('work_branch.big_data_screen')) + t('work_branch.save_conflict_tips')
|
||||||
checkCanvasChange(params).then(rsp => {
|
checkCanvasChange(params).then(rsp => {
|
||||||
if (rsp && rsp.data === 'Repeat') {
|
if (rsp && rsp.data === 'Repeat') {
|
||||||
ElMessageBox.confirm(tips, {
|
ElMessageBox.confirm(tips, {
|
||||||
|
@ -195,9 +195,11 @@ onMounted(() => {
|
|||||||
@change="changeFunctionCfg"
|
@change="changeFunctionCfg"
|
||||||
>
|
>
|
||||||
<el-radio :effect="themes" :label="'breakLine'">
|
<el-radio :effect="themes" :label="'breakLine'">
|
||||||
{{ isRichText ? '置为"-"' : t('chart.break_line') }}
|
{{ isRichText ? t('visualization.set_as_tips') + '"-"' : t('chart.break_line') }}
|
||||||
|
</el-radio>
|
||||||
|
<el-radio v-if="isRichText" :effect="themes" :label="'custom'">
|
||||||
|
{{ t('visualization.custom') }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<el-radio v-if="isRichText" :effect="themes" :label="'custom'"> 自定义 </el-radio>
|
|
||||||
<template v-if="!isRichText">
|
<template v-if="!isRichText">
|
||||||
<el-radio v-if="!isCirclePacking" :effect="themes" :label="'setZero'">{{
|
<el-radio v-if="!isCirclePacking" :effect="themes" :label="'setZero'">{{
|
||||||
t('chart.set_zero')
|
t('chart.set_zero')
|
||||||
|
@ -3361,7 +3361,7 @@ const deleteChartFieldItem = id => {
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-icon
|
<el-icon
|
||||||
:title="'数据集'"
|
:title="$t('visualization.dataset')"
|
||||||
class="custom-icon"
|
class="custom-icon"
|
||||||
size="20px"
|
size="20px"
|
||||||
@click="collapseChange('datasetAreaCollapse')"
|
@click="collapseChange('datasetAreaCollapse')"
|
||||||
@ -3414,7 +3414,11 @@ const deleteChartFieldItem = id => {
|
|||||||
<div class="dataset-search-label" :class="{ dark: themes === 'dark' }">
|
<div class="dataset-search-label" :class="{ dark: themes === 'dark' }">
|
||||||
<span>{{ t('chart.field') }}</span>
|
<span>{{ t('chart.field') }}</span>
|
||||||
<span>
|
<span>
|
||||||
<el-tooltip :effect="toolTip" content="刷新" placement="top">
|
<el-tooltip
|
||||||
|
:effect="toolTip"
|
||||||
|
:content="$t('visualization.refresh')"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="field-search-icon-btn"
|
class="field-search-icon-btn"
|
||||||
:class="{ dark: themes === 'dark' }"
|
:class="{ dark: themes === 'dark' }"
|
||||||
@ -3444,7 +3448,7 @@ const deleteChartFieldItem = id => {
|
|||||||
:effect="themes"
|
:effect="themes"
|
||||||
class="dataset-search-input"
|
class="dataset-search-input"
|
||||||
:class="{ dark: themes === 'dark' }"
|
:class="{ dark: themes === 'dark' }"
|
||||||
:placeholder="t('chart.search') + t('chart.field')"
|
:placeholder="t('chart.search') + ' ' + t('chart.field')"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
|
Loading…
Reference in New Issue
Block a user