forked from github/dataease
feat: 国际化
This commit is contained in:
parent
a34a5a9258
commit
0b1e49aede
@ -106,17 +106,21 @@ const saveSelfSubject = () => {
|
|||||||
<div class="attr-container">
|
<div class="attr-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-collapse v-model="canvasAttrActiveNames">
|
<el-collapse v-model="canvasAttrActiveNames">
|
||||||
<el-collapse-item title="仪表板风格" name="style">
|
<el-collapse-item :title="t('components.dashboard_style')" name="style">
|
||||||
<de-slider ref="slider" />
|
<de-slider ref="slider" />
|
||||||
<el-button class="button-panel__style" text size="small" @click="saveSelfSubject">
|
<el-button class="button-panel__style" text size="small" @click="saveSelfSubject">
|
||||||
{{ $t('commons.save') }}
|
{{ $t('commons.save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="整体配置" name="overallSetting">
|
<el-collapse-item :title="t('components.overall_configuration')" name="overallSetting">
|
||||||
<overall-setting @onThemeColorChange="themeColorChange" />
|
<overall-setting @onThemeColorChange="themeColorChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
|
||||||
<el-collapse-item title="仪表板背景" name="background" class="content-no-padding-bottom">
|
<el-collapse-item
|
||||||
|
:title="t('components.dashboard_background')"
|
||||||
|
name="background"
|
||||||
|
class="content-no-padding-bottom"
|
||||||
|
>
|
||||||
<canvas-background themes="light"></canvas-background>
|
<canvas-background themes="light"></canvas-background>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
@ -133,7 +137,11 @@ const saveSelfSubject = () => {
|
|||||||
:background-border-select-width="197"
|
:background-border-select-width="197"
|
||||||
/>
|
/>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item :title="'图表配色'" name="graphical" class="no-padding no-border-bottom">
|
<el-collapse-item
|
||||||
|
:title="t('components.chart_color')"
|
||||||
|
name="graphical"
|
||||||
|
class="no-padding no-border-bottom"
|
||||||
|
>
|
||||||
<component-color-selector v-if="state.collapseShow" @onColorChange="onColorChange" />
|
<component-color-selector v-if="state.collapseShow" @onColorChange="onColorChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item :title="t('visualization.chart_title')" name="viewTitle">
|
<el-collapse-item :title="t('visualization.chart_title')" name="viewTitle">
|
||||||
@ -147,7 +155,7 @@ const saveSelfSubject = () => {
|
|||||||
<filter-style-simple-selector />
|
<filter-style-simple-selector />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
title="高级样式设置"
|
:title="t('components.advanced_style_settings')"
|
||||||
name="seniorStyleSetting"
|
name="seniorStyleSetting"
|
||||||
class="no-padding no-border-bottom"
|
class="no-padding no-border-bottom"
|
||||||
>
|
>
|
||||||
|
@ -106,7 +106,7 @@ const closeEditCanvasName = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
|
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
|
||||||
ElMessage.warning('名称字段长度1-64个字符')
|
ElMessage.warning(t('components.length_1_64_characters'))
|
||||||
editCanvasName()
|
editCanvasName()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ const previewInner = () => {
|
|||||||
|
|
||||||
const previewOuter = () => {
|
const previewOuter = () => {
|
||||||
if (!dvInfo.value.id) {
|
if (!dvInfo.value.id) {
|
||||||
ElMessage.warning('请先保存当前页面')
|
ElMessage.warning(t('components.current_page_first'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
canvasSave(() => {
|
canvasSave(() => {
|
||||||
@ -174,11 +174,11 @@ const resourceOptFinish = param => {
|
|||||||
|
|
||||||
const saveCanvasWithCheck = () => {
|
const saveCanvasWithCheck = () => {
|
||||||
if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) {
|
if (userStore.getOid && wsCache.get('user.oid') && userStore.getOid !== wsCache.get('user.oid')) {
|
||||||
ElMessageBox.confirm('已切换至新组织,无权保存其他组织的资源', {
|
ElMessageBox.confirm(t('components.from_other_organizations'), {
|
||||||
confirmButtonType: 'primary',
|
confirmButtonType: 'primary',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '关闭页面',
|
confirmButtonText: t('components.close_the_page'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: t('common.cancel'),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
showClose: false
|
showClose: false
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
@ -218,7 +218,7 @@ const saveResource = () => {
|
|||||||
try {
|
try {
|
||||||
canvasSave(() => {
|
canvasSave(() => {
|
||||||
snapshotStore.resetStyleChangeTimes()
|
snapshotStore.resetStyleChangeTimes()
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success(t('common.save_success'))
|
||||||
let url = window.location.href
|
let url = window.location.href
|
||||||
url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`)
|
url = url.replace(/\?opt=create/, `?resourceId=${dvInfo.value.id}`)
|
||||||
window.history.replaceState(null, '', url)
|
window.history.replaceState(null, '', url)
|
||||||
@ -251,7 +251,7 @@ const backToMain = () => {
|
|||||||
url = url + '?dvId=' + dvInfo.value.id
|
url = url + '?dvId=' + dvInfo.value.id
|
||||||
}
|
}
|
||||||
if (styleChangeTimes.value > 0) {
|
if (styleChangeTimes.value > 0) {
|
||||||
ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', {
|
ElMessageBox.confirm(t('components.sure_to_exit'), {
|
||||||
confirmButtonType: 'primary',
|
confirmButtonType: 'primary',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
@ -300,7 +300,7 @@ const openDataBoardSetting = () => {
|
|||||||
|
|
||||||
const openMobileSetting = () => {
|
const openMobileSetting = () => {
|
||||||
if (!dvInfo.value.id || dvInfo.value.dataState === 'prepare') {
|
if (!dvInfo.value.id || dvInfo.value.dataState === 'prepare') {
|
||||||
ElMessage.warning('请先保存当前页面')
|
ElMessage.warning(t('components.current_page_first'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useEmitt().emitter.emit('mobileConfig')
|
useEmitt().emitter.emit('mobileConfig')
|
||||||
@ -366,11 +366,11 @@ const batchOptStatusChange = value => {
|
|||||||
|
|
||||||
const openOuterParamsSet = () => {
|
const openOuterParamsSet = () => {
|
||||||
if (componentData.value.length === 0) {
|
if (componentData.value.length === 0) {
|
||||||
ElMessage.warning('当前仪表板为空,请先添加组件')
|
ElMessage.warning(t('components.add_components_first'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!dvInfo.value.id) {
|
if (!dvInfo.value.id) {
|
||||||
ElMessage.warning('请先保存当前页面')
|
ElMessage.warning(t('components.current_page_first'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//设置需要先触发保存
|
//设置需要先触发保存
|
||||||
@ -418,7 +418,7 @@ const saveLinkageSetting = () => {
|
|||||||
linkageInfo: targetLinkageInfo.value
|
linkageInfo: targetLinkageInfo.value
|
||||||
}
|
}
|
||||||
saveLinkage(request).then(() => {
|
saveLinkage(request).then(() => {
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success(t('save_success.common'))
|
||||||
// 刷新联动信息
|
// 刷新联动信息
|
||||||
getPanelAllLinkageInfo(dvInfo.value.id).then(rsp => {
|
getPanelAllLinkageInfo(dvInfo.value.id).then(rsp => {
|
||||||
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
||||||
@ -497,7 +497,7 @@ const initOpenHandler = newWindow => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="left-area" v-if="batchOptStatus">
|
<div class="left-area" v-if="batchOptStatus">
|
||||||
<el-col class="adapt-count">
|
<el-col class="adapt-count">
|
||||||
<span>已选 {{ curBatchOptComponents.length }} 项</span>
|
<span>{{ t('user.selection_info', [curBatchOptComponents.length]) }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
</div>
|
||||||
<div class="middle-area" v-if="!batchOptStatus && !linkageSettingStatus">
|
<div class="middle-area" v-if="!batchOptStatus && !linkageSettingStatus">
|
||||||
@ -507,7 +507,7 @@ const initOpenHandler = newWindow => {
|
|||||||
is-label
|
is-label
|
||||||
:icon-name="dvView"
|
:icon-name="dvView"
|
||||||
themes="light"
|
themes="light"
|
||||||
title="图表"
|
:title="t('chart.datalist')"
|
||||||
>
|
>
|
||||||
<user-view-group themes="light" :dv-model="dvModel"></user-view-group>
|
<user-view-group themes="light" :dv-model="dvModel"></user-view-group>
|
||||||
</component-group>
|
</component-group>
|
||||||
@ -517,7 +517,7 @@ const initOpenHandler = newWindow => {
|
|||||||
is-label
|
is-label
|
||||||
themes="light"
|
themes="light"
|
||||||
:icon-name="dvFilter"
|
:icon-name="dvFilter"
|
||||||
title="查询组件"
|
:title="t('visualization.filter_component')"
|
||||||
>
|
>
|
||||||
<query-group themes="light" :dv-model="dvModel"></query-group>
|
<query-group themes="light" :dv-model="dvModel"></query-group>
|
||||||
</component-group>
|
</component-group>
|
||||||
@ -526,7 +526,7 @@ const initOpenHandler = newWindow => {
|
|||||||
themes="light"
|
themes="light"
|
||||||
:base-width="115"
|
:base-width="115"
|
||||||
:icon-name="dvText"
|
:icon-name="dvText"
|
||||||
title="富文本"
|
:title="t('components.rich_text')"
|
||||||
>
|
>
|
||||||
<text-group themes="light" :dv-model="dvModel"></text-group>
|
<text-group themes="light" :dv-model="dvModel"></text-group>
|
||||||
</component-group>
|
</component-group>
|
||||||
@ -536,7 +536,7 @@ const initOpenHandler = newWindow => {
|
|||||||
placement="bottom"
|
placement="bottom"
|
||||||
:base-width="328"
|
:base-width="328"
|
||||||
:icon-name="dvMedia"
|
:icon-name="dvMedia"
|
||||||
title="媒体"
|
:title="t('components.media')"
|
||||||
>
|
>
|
||||||
<media-group themes="light" :dv-model="dvModel"></media-group>
|
<media-group themes="light" :dv-model="dvModel"></media-group>
|
||||||
</component-group>
|
</component-group>
|
||||||
@ -549,13 +549,13 @@ const initOpenHandler = newWindow => {
|
|||||||
is-label
|
is-label
|
||||||
:base-width="115"
|
:base-width="115"
|
||||||
:icon-name="dvMoreCom"
|
:icon-name="dvMoreCom"
|
||||||
title="更多"
|
:title="'visualization.more'"
|
||||||
>
|
>
|
||||||
<db-more-com-group themes="light" :dv-model="dvModel"></db-more-com-group>
|
<db-more-com-group themes="light" :dv-model="dvModel"></db-more-com-group>
|
||||||
</component-group>
|
</component-group>
|
||||||
<component-button-label
|
<component-button-label
|
||||||
:icon-name="icon_copy_filled"
|
:icon-name="icon_copy_filled"
|
||||||
title="复用"
|
:title="t('visualization.multiplexing')"
|
||||||
is-label
|
is-label
|
||||||
@customClick="multiplexingCanvasOpen"
|
@customClick="multiplexingCanvasOpen"
|
||||||
></component-button-label>
|
></component-button-label>
|
||||||
@ -564,32 +564,45 @@ const initOpenHandler = newWindow => {
|
|||||||
|
|
||||||
<div class="right-area" v-if="!batchOptStatus && !linkageSettingStatus">
|
<div class="right-area" v-if="!batchOptStatus && !linkageSettingStatus">
|
||||||
<template v-if="editMode !== 'preview'">
|
<template v-if="editMode !== 'preview'">
|
||||||
<el-tooltip effect="dark" content="外部参数设置" placement="bottom">
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
:content="t('visualization.outer_param_set')"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<component-button
|
<component-button
|
||||||
tips="外部参数设置"
|
:tips="t('visualization.outer_param_set')"
|
||||||
@custom-click="openOuterParamsSet"
|
@custom-click="openOuterParamsSet"
|
||||||
:icon-name="icon_params_setting"
|
:icon-name="icon_params_setting"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="批量操作" placement="bottom">
|
<el-tooltip effect="dark" :content="t('visualization.batch_opt')" placement="bottom">
|
||||||
<component-button
|
<component-button
|
||||||
tips="批量操作"
|
:tips="t('visualization.batch_opt')"
|
||||||
@custom-click="batchOptStatusChange(true)"
|
@custom-click="batchOptStatusChange(true)"
|
||||||
:icon-name="dvBatch"
|
:icon-name="dvBatch"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-tooltip effect="dark" content="仪表板配置" placement="bottom">
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
:content="t('components.dashboard_configuration')"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<component-button
|
<component-button
|
||||||
tips="仪表板配置"
|
:tips="t('components.dashboard_configuration')"
|
||||||
@custom-click="openDataBoardSetting"
|
@custom-click="openDataBoardSetting"
|
||||||
:icon-name="dvDashboard"
|
:icon-name="dvDashboard"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<el-tooltip :offset="14" effect="dark" content="切换至移动端布局" placement="bottom">
|
<el-tooltip
|
||||||
|
:offset="14"
|
||||||
|
effect="dark"
|
||||||
|
:content="t('components.to_mobile_layout')"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<component-button
|
<component-button
|
||||||
tips="切换至移动端布局"
|
:tips="t('components.to_mobile_layout')"
|
||||||
@custom-click="openMobileSetting"
|
@custom-click="openMobileSetting"
|
||||||
:icon-name="icon_phone_outlined"
|
:icon-name="icon_phone_outlined"
|
||||||
/>
|
/>
|
||||||
@ -598,7 +611,7 @@ const initOpenHandler = newWindow => {
|
|||||||
|
|
||||||
<el-dropdown v-if="editMode === 'edit'" trigger="hover">
|
<el-dropdown v-if="editMode === 'edit'" trigger="hover">
|
||||||
<el-button class="preview-button" style="float: right; margin-right: 12px">
|
<el-button class="preview-button" style="float: right; margin-right: 12px">
|
||||||
预览
|
{{ t('visualization.preview') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="drop-style">
|
<el-dropdown-menu class="drop-style">
|
||||||
@ -606,13 +619,13 @@ const initOpenHandler = newWindow => {
|
|||||||
<el-icon style="margin-right: 8px; font-size: 16px">
|
<el-icon style="margin-right: 8px; font-size: 16px">
|
||||||
<Icon name="icon_pc_fullscreen"><icon_pc_fullscreen class="svg-icon" /></Icon>
|
<Icon name="icon_pc_fullscreen"><icon_pc_fullscreen class="svg-icon" /></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
全屏预览
|
{{ t('visualization.fullscreen_preview') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click="previewOuter()">
|
<el-dropdown-item @click="previewOuter()">
|
||||||
<el-icon style="margin-right: 8px; font-size: 16px">
|
<el-icon style="margin-right: 8px; font-size: 16px">
|
||||||
<Icon name="dv-preview-outer"><dvPreviewOuter class="svg-icon" /></Icon>
|
<Icon name="dv-preview-outer"><dvPreviewOuter class="svg-icon" /></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
新页面预览
|
{{ t('work_branch.new_page_preview') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
@ -625,7 +638,7 @@ const initOpenHandler = newWindow => {
|
|||||||
@click="edit()"
|
@click="edit()"
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
编辑
|
{{ t('data_set.edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
@ -635,7 +648,7 @@ const initOpenHandler = newWindow => {
|
|||||||
style="float: right; margin-right: 12px"
|
style="float: right; margin-right: 12px"
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
保存
|
{{ t('data_set.save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -648,7 +661,7 @@ const initOpenHandler = newWindow => {
|
|||||||
:disabled="curBatchOptComponents.length === 0"
|
:disabled="curBatchOptComponents.length === 0"
|
||||||
style="float: right; margin-right: 12px"
|
style="float: right; margin-right: 12px"
|
||||||
>
|
>
|
||||||
复制</el-button
|
{{ t('data_set.copy') }}</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
@ -659,11 +672,14 @@ const initOpenHandler = newWindow => {
|
|||||||
:disabled="curBatchOptComponents.length === 0"
|
:disabled="curBatchOptComponents.length === 0"
|
||||||
style="float: right; margin-right: 12px"
|
style="float: right; margin-right: 12px"
|
||||||
>
|
>
|
||||||
删除</el-button
|
{{ t('data_set.delete') }}</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button @click="saveBatchChange" style="float: right; margin-right: 12px" type="primary"
|
<el-button
|
||||||
>完成</el-button
|
@click="saveBatchChange"
|
||||||
|
style="float: right; margin-right: 12px"
|
||||||
|
type="primary"
|
||||||
|
>{{ t('components.complete') }}</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -673,13 +689,13 @@ const initOpenHandler = newWindow => {
|
|||||||
@click="cancelLinkageSetting()"
|
@click="cancelLinkageSetting()"
|
||||||
style="float: right; margin-right: 12px"
|
style="float: right; margin-right: 12px"
|
||||||
>
|
>
|
||||||
取消</el-button
|
{{ t('userimport.cancel') }}</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@click="saveLinkageSetting"
|
@click="saveLinkageSetting"
|
||||||
style="float: right; margin-right: 12px"
|
style="float: right; margin-right: 12px"
|
||||||
type="primary"
|
type="primary"
|
||||||
>确定</el-button
|
>{{ t('userimport.sure') }}</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -159,7 +159,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="分页器配色" class="form-item">
|
<el-form-item :label="t('components.pager_color')" class="form-item">
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
:trigger-width="colorPickerWidth"
|
:trigger-width="colorPickerWidth"
|
||||||
v-model="seniorForm.pagerColor"
|
v-model="seniorForm.pagerColor"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div style="width: 100%; padding: 16px 8px 0">
|
<div style="width: 100%; padding: 16px 8px 0">
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item class="form-item" label="标题水平位置">
|
<el-form-item class="form-item" :label="t('components.title_horizontal_position')">
|
||||||
<el-tooltip effect="dark" placement="top">
|
<el-tooltip effect="dark" placement="top">
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ t('chart.text_pos_left') }}
|
{{ t('chart.text_pos_left') }}
|
||||||
@ -50,7 +50,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item class="form-item" label="标题显示位置">
|
<el-form-item class="form-item" :label="t('components.title_display_position')">
|
||||||
<el-tooltip effect="dark" placement="top">
|
<el-tooltip effect="dark" placement="top">
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ t('chart.text_pos_top') }}
|
{{ t('chart.text_pos_top') }}
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item class="form-item" label="标题颜色">
|
<el-form-item class="form-item" :label="t('components.title_color')">
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
v-model="filterStyle.titleColor"
|
v-model="filterStyle.titleColor"
|
||||||
:trigger-width="197"
|
:trigger-width="197"
|
||||||
@ -93,7 +93,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item class="form-item" label="标签颜色">
|
<el-form-item class="form-item" :label="t('components.label_color')">
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
v-model="filterStyle.labelColor"
|
v-model="filterStyle.labelColor"
|
||||||
:trigger-width="197"
|
:trigger-width="197"
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
title="输入框样式"
|
:title="t('components.input_box_style')"
|
||||||
name="input_style_filter_selector"
|
name="input_style_filter_selector"
|
||||||
class="inner-collapse"
|
class="inner-collapse"
|
||||||
>
|
>
|
||||||
|
@ -79,11 +79,11 @@
|
|||||||
v-model="canvasStyleData.refreshBrowserEnable"
|
v-model="canvasStyleData.refreshBrowserEnable"
|
||||||
@change="themeChange"
|
@change="themeChange"
|
||||||
>
|
>
|
||||||
整体刷新
|
{{ t('components.overall_refresh') }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-tooltip class="item" :effect="toolTip" placement="bottom">
|
<el-tooltip class="item" :effect="toolTip" placement="bottom">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div>仅公共链接和新Tab预览生效</div>
|
<div>{{ t('components.previews_take_effect') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="hint-icon"
|
class="hint-icon"
|
||||||
@ -229,7 +229,9 @@ const toolTip = computed(() => {
|
|||||||
return props.themes === 'dark' ? 'ndark' : 'dark'
|
return props.themes === 'dark' ? 'ndark' : 'dark'
|
||||||
})
|
})
|
||||||
|
|
||||||
const resourceType = computed(() => (dvInfo.value.type === 'dashboard' ? '仪表板' : '数据大屏'))
|
const resourceType = computed(() =>
|
||||||
|
dvInfo.value.type === 'dashboard' ? t('dashboard.dashboard') : t('dashboard.big_data_screen')
|
||||||
|
)
|
||||||
|
|
||||||
const onRefreshChange = val => {
|
const onRefreshChange = val => {
|
||||||
if (val === '' || parseFloat(val).toString() === 'NaN' || parseFloat(val) < 1) {
|
if (val === '' || parseFloat(val).toString() === 'NaN' || parseFloat(val) < 1) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:effect="themes"
|
:effect="themes"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:class="'form-item-' + themes"
|
:class="'form-item-' + themes"
|
||||||
label="联动、钻取、跳转的图标颜色"
|
:label="t('components.jump_icon_color')"
|
||||||
>
|
>
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
:effect="themes"
|
:effect="themes"
|
||||||
@ -24,7 +24,7 @@
|
|||||||
:effect="themes"
|
:effect="themes"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:class="'form-item-' + themes"
|
:class="'form-item-' + themes"
|
||||||
label="钻取层级展示颜色"
|
:label="t('components.level_display_color')"
|
||||||
>
|
>
|
||||||
<el-color-picker
|
<el-color-picker
|
||||||
v-model="seniorStyleSetting.drillLayerColor"
|
v-model="seniorStyleSetting.drillLayerColor"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row class="custom-row">
|
<el-row class="custom-row">
|
||||||
<el-row><span class="custom-item-text">文本</span> </el-row>
|
<el-row
|
||||||
|
><span class="custom-item-text">{{ t('chart.text') }}</span>
|
||||||
|
</el-row>
|
||||||
<el-row style="margin-top: 8px">
|
<el-row style="margin-top: 8px">
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<el-form-item class="form-item no-margin-bottom" :class="'form-item-' + themes">
|
<el-form-item class="form-item no-margin-bottom" :class="'form-item-' + themes">
|
||||||
@ -19,7 +21,7 @@
|
|||||||
style="width: 56px"
|
style="width: 56px"
|
||||||
:title="t('chart.text_fontsize')"
|
:title="t('chart.text_fontsize')"
|
||||||
v-model="titleForm.fontSize"
|
v-model="titleForm.fontSize"
|
||||||
:placeholder="'大小'"
|
:placeholder="t('chart.size')"
|
||||||
size="small"
|
size="small"
|
||||||
@change="changeTitleStyle('fontSize')"
|
@change="changeTitleStyle('fontSize')"
|
||||||
>
|
>
|
||||||
|
@ -206,6 +206,7 @@ const dvMainStore = dvMainStoreWithOut()
|
|||||||
const { canvasStyleData } = storeToRefs(dvMainStore)
|
const { canvasStyleData } = storeToRefs(dvMainStore)
|
||||||
const emit = defineEmits(['reload'])
|
const emit = defineEmits(['reload'])
|
||||||
import { guid } from '@/views/visualized/data/dataset/form/util.js'
|
import { guid } from '@/views/visualized/data/dataset/form/util.js'
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import SubjectEditDialog from '@/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue'
|
import SubjectEditDialog from '@/components/dashboard/subject-setting/pre-subject/SubjectEditDialog.vue'
|
||||||
|
|
||||||
const subjectEditDialogRef = ref(null)
|
const subjectEditDialogRef = ref(null)
|
||||||
@ -221,7 +222,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const { initialSpeed } = toRefs(props)
|
const { initialSpeed } = toRefs(props)
|
||||||
|
const { t } = useI18n()
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
temp: null,
|
temp: null,
|
||||||
sliders: [],
|
sliders: [],
|
||||||
@ -264,7 +265,7 @@ const querySubjectWithGroup = () => {
|
|||||||
|
|
||||||
const subjectDelete = id => {
|
const subjectDelete = id => {
|
||||||
deleteSubject(id).then(() => {
|
deleteSubject(id).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success(t('chart.delete_success'))
|
||||||
querySubjectWithGroup()
|
querySubjectWithGroup()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -274,7 +275,7 @@ const subjectEditFinish = subjectItem => {
|
|||||||
saveOrUpdateSubject(subjectItem)
|
saveOrUpdateSubject(subjectItem)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
subjectEditDialogRef.value.resetForm()
|
subjectEditDialogRef.value.resetForm()
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success(t('dataset.save_success'))
|
||||||
querySubjectWithGroup()
|
querySubjectWithGroup()
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -295,7 +296,7 @@ const saveSelfSubject = () => {
|
|||||||
const canvasStyle = deepCopy(canvasStyleData.value)
|
const canvasStyle = deepCopy(canvasStyleData.value)
|
||||||
canvasStyle.themeId = guid()
|
canvasStyle.themeId = guid()
|
||||||
const subjectItemNew = {
|
const subjectItemNew = {
|
||||||
name: '新建主题',
|
name: t('components.a_new_theme'),
|
||||||
coverUrl: null,
|
coverUrl: null,
|
||||||
details: JSON.stringify(canvasStyle)
|
details: JSON.stringify(canvasStyle)
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ const rules = {
|
|||||||
coverUrl: [
|
coverUrl: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请上传封面',
|
message: t('components.upload_a_cover'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -36,7 +36,9 @@ const resetForm = () => {
|
|||||||
subjectDialogShow.value = false
|
subjectDialogShow.value = false
|
||||||
}
|
}
|
||||||
const subjectForm = ref(null)
|
const subjectForm = ref(null)
|
||||||
const title = computed(() => (optType.value === 'new' ? '新建主题' : '编辑主题'))
|
const title = computed(() =>
|
||||||
|
optType.value === 'new' ? t('components.a_new_theme') : t('components.edit_theme')
|
||||||
|
)
|
||||||
|
|
||||||
const optInit = (subjectItem, opt) => {
|
const optInit = (subjectItem, opt) => {
|
||||||
optType.value = opt
|
optType.value = opt
|
||||||
@ -80,20 +82,20 @@ const onImgChange = imgUrl => {
|
|||||||
>
|
>
|
||||||
<el-form-item class="form-item" prop="name">
|
<el-form-item class="form-item" prop="name">
|
||||||
<template #label>
|
<template #label>
|
||||||
<label class="m-label"> 名称 </label>
|
<label class="m-label"> {{ t('common.name') }} </label>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="subjectForm.name" />
|
<el-input v-model="subjectForm.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="form-item" prop="coverUrl">
|
<el-form-item class="form-item" prop="coverUrl">
|
||||||
<template #label>
|
<template #label>
|
||||||
<label class="m-label"> 封面 </label>
|
<label class="m-label"> {{ t('components.cover') }} </label>
|
||||||
</template>
|
</template>
|
||||||
<de-upload themes="light" :img-url="subjectForm.coverUrl" @onImgChange="onImgChange" />
|
<de-upload themes="light" :img-url="subjectForm.coverUrl" @onImgChange="onImgChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button secondary @click="resetForm()">取消</el-button>
|
<el-button secondary @click="resetForm()">{{ t('common.cancel') }}</el-button>
|
||||||
<el-button type="primary" @click="saveSubject()">确认</el-button>
|
<el-button type="primary" @click="saveSubject()">{{ t('chart.confirm') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
@ -59,6 +59,7 @@ import { adaptCurThemeCommonStyleAll } from '@/utils/canvasStyle'
|
|||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const snapshotStore = snapshotStoreWithOut()
|
const snapshotStore = snapshotStoreWithOut()
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
|
||||||
const { canvasStyleData } = storeToRefs(dvMainStore)
|
const { canvasStyleData } = storeToRefs(dvMainStore)
|
||||||
|
|
||||||
@ -67,6 +68,7 @@ const state = reactive({
|
|||||||
subjectItemDetails: null,
|
subjectItemDetails: null,
|
||||||
canEdit: false
|
canEdit: false
|
||||||
})
|
})
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
subjectItem: {
|
subjectItem: {
|
||||||
@ -83,7 +85,7 @@ const themeSelected = computed(() => {
|
|||||||
})
|
})
|
||||||
const emit = defineEmits(['subjectDelete', 'onSubjectChange', 'subjectEdit'])
|
const emit = defineEmits(['subjectDelete', 'onSubjectChange', 'subjectEdit'])
|
||||||
const subjectDelete = () => {
|
const subjectDelete = () => {
|
||||||
ElMessageBox.confirm('确定删除[' + subjectItem.value.name + ']吗?', {
|
ElMessageBox.confirm(t('components.to_delete_', [subjectItem.value.name]), {
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
|
@ -36,6 +36,40 @@ export default {
|
|||||||
delete_success: 'Delete success',
|
delete_success: 'Delete success',
|
||||||
no_auth_tips: 'Missing menu permissions, please contact the administrator'
|
no_auth_tips: 'Missing menu permissions, please contact the administrator'
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
dashboard_style: 'Dashboard style',
|
||||||
|
overall_configuration: 'Overall configuration',
|
||||||
|
dashboard_background: 'Dashboard background',
|
||||||
|
chart_color: 'Chart color',
|
||||||
|
advanced_style_settings: 'Advanced style settings',
|
||||||
|
length_1_64_characters: 'Name field length 1-64 characters',
|
||||||
|
current_page_first: 'Please save the current page first',
|
||||||
|
from_other_organizations:
|
||||||
|
'Switch to new organization, no permission to save resources from other organizations',
|
||||||
|
close_the_page: 'Close the page',
|
||||||
|
sure_to_exit: 'Current changes have not been saved, are you sure to exit?',
|
||||||
|
add_components_first: 'The current dashboard is empty, please add components first',
|
||||||
|
rich_text: 'Rich text',
|
||||||
|
media: 'Media',
|
||||||
|
dashboard_configuration: 'Dashboard configuration',
|
||||||
|
to_mobile_layout: 'Switch to mobile layout',
|
||||||
|
complete: 'Complete',
|
||||||
|
pager_color: 'Pager color',
|
||||||
|
title_horizontal_position: 'Title horizontal position',
|
||||||
|
title_display_position: 'Title display position',
|
||||||
|
title_color: 'Title color',
|
||||||
|
label_color: 'Label color',
|
||||||
|
input_box_style: 'Input box style',
|
||||||
|
overall_refresh: 'Overall refresh',
|
||||||
|
previews_take_effect: 'Only public links and new tab previews take effect',
|
||||||
|
jump_icon_color: 'Link, drill, jump icon color',
|
||||||
|
level_display_color: 'Drill level display color',
|
||||||
|
a_new_theme: 'Create a new theme',
|
||||||
|
upload_a_cover: 'Please upload a cover',
|
||||||
|
edit_theme: 'Edit theme',
|
||||||
|
cover: 'Cover',
|
||||||
|
to_delete_: 'Are you sure to delete [100]?'
|
||||||
|
},
|
||||||
work_branch: {
|
work_branch: {
|
||||||
recommended_dashboard: 'Recommended dashboard',
|
recommended_dashboard: 'Recommended dashboard',
|
||||||
template_market_official:
|
template_market_official:
|
||||||
|
@ -393,6 +393,39 @@ export default {
|
|||||||
role: '角色',
|
role: '角色',
|
||||||
addUser: '@:common.add@:system.user'
|
addUser: '@:common.add@:system.user'
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
dashboard_style: '仪表板风格',
|
||||||
|
overall_configuration: '整体配置',
|
||||||
|
dashboard_background: '仪表板背景',
|
||||||
|
chart_color: '图表配色',
|
||||||
|
advanced_style_settings: '高级样式设置',
|
||||||
|
length_1_64_characters: '名称字段长度1-64个字符',
|
||||||
|
current_page_first: '请先保存当前页面',
|
||||||
|
from_other_organizations: '已切换至新组织,无权保存其他组织的资源',
|
||||||
|
close_the_page: '关闭页面',
|
||||||
|
sure_to_exit: '当前的更改尚未保存,确定退出吗?',
|
||||||
|
add_components_first: '当前仪表板为空,请先添加组件',
|
||||||
|
rich_text: '富文本',
|
||||||
|
media: '媒体',
|
||||||
|
dashboard_configuration: '仪表板配置',
|
||||||
|
to_mobile_layout: '切换至移动端布局',
|
||||||
|
complete: '完成',
|
||||||
|
pager_color: '分页器配色',
|
||||||
|
title_horizontal_position: '标题水平位置',
|
||||||
|
title_display_position: '标题显示位置',
|
||||||
|
title_color: '标题颜色',
|
||||||
|
label_color: '标签颜色',
|
||||||
|
input_box_style: '输入框样式',
|
||||||
|
overall_refresh: '整体刷新',
|
||||||
|
previews_take_effect: '仅公共链接和新Tab预览生效',
|
||||||
|
jump_icon_color: '联动、钻取、跳转的图标颜色',
|
||||||
|
level_display_color: '钻取层级展示颜色',
|
||||||
|
a_new_theme: '新建主题',
|
||||||
|
upload_a_cover: '请上传封面',
|
||||||
|
edit_theme: '编辑主题',
|
||||||
|
cover: '封面',
|
||||||
|
to_delete_: '确定删除[{0}]吗?'
|
||||||
|
},
|
||||||
user: {
|
user: {
|
||||||
change_password: '修改密码',
|
change_password: '修改密码',
|
||||||
select_users: '请选择用户',
|
select_users: '请选择用户',
|
||||||
|
Loading…
Reference in New Issue
Block a user