forked from github/dataease
feat(数据集): 国际化
This commit is contained in:
parent
7f1b1a8b7f
commit
3cffb0a8e3
@ -137,7 +137,21 @@ export default {
|
||||
cannot_be_empty_de_: 'Expression cannot be empty!',
|
||||
copy_a_dataset: 'Copy a dataset',
|
||||
cannot_be_empty_de_field: 'The related field cannot be empty!',
|
||||
dataset_cannot_be: 'The dataset cannot be'
|
||||
dataset_cannot_be: 'The dataset cannot be empty',
|
||||
save_and_return: 'Save and return',
|
||||
select_data_source: 'Select data source',
|
||||
invalid_data_source: 'Invalid data source',
|
||||
be_reported_incorrectly:
|
||||
'You are linking tables across data sources. Please make sure to use the standard syntax and functions of calcite, otherwise the data set will be reported incorrectly',
|
||||
refresh_data: 'Refresh data',
|
||||
convert_to_indicator: 'Convert to indicator',
|
||||
convert_to_dimension: 'Convert to dimension',
|
||||
selected: 'Selected',
|
||||
bar: 'Bar',
|
||||
format_edit: 'Format edit',
|
||||
custom_time_format: 'Custom time format',
|
||||
cannot_be_empty_: 'Filter field cannot be empty',
|
||||
cannot_be_empty_de_ruler: 'Rule condition cannot be empty'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Welcome',
|
||||
|
@ -158,7 +158,21 @@ export default {
|
||||
cannot_be_empty_de_: '表达式不能为空!',
|
||||
copy_a_dataset: '复制数据集',
|
||||
cannot_be_empty_de_field: '关联字段不能为空!',
|
||||
dataset_cannot_be: '数据集不能为'
|
||||
dataset_cannot_be: '数据集不能为空',
|
||||
save_and_return: '保存并返回',
|
||||
select_data_source: '选择数据源',
|
||||
invalid_data_source: '无效数据源',
|
||||
be_reported_incorrectly:
|
||||
'您正在进行跨数据源的表关联,请确保使用calcite的标准语法和函数,否则会导致数据集报错',
|
||||
refresh_data: '刷新数据',
|
||||
convert_to_indicator: '转换为指标',
|
||||
convert_to_dimension: '转换为维度',
|
||||
selected: '已选择',
|
||||
bar: '条',
|
||||
format_edit: '格式编辑',
|
||||
custom_time_format: '自定义时间格式',
|
||||
cannot_be_empty_: '过滤字段不能为空',
|
||||
cannot_be_empty_de_ruler: '规则条件不能为空'
|
||||
},
|
||||
dynamic_time: {
|
||||
set_default: '设置默认值',
|
||||
|
@ -42,12 +42,12 @@ const submit = () => {
|
||||
}
|
||||
const errorDetected = ({ enumValue, deType, filterType, term, value, name }) => {
|
||||
if (!name) {
|
||||
errorMessage.value = '过滤字段不能为空'
|
||||
errorMessage.value = t('data_set.cannot_be_empty_')
|
||||
return
|
||||
}
|
||||
if (filterType === 'logic') {
|
||||
if (!term) {
|
||||
errorMessage.value = '规则条件不能为空'
|
||||
errorMessage.value = t('data_set.cannot_be_empty_de_ruler')
|
||||
return
|
||||
}
|
||||
if (!term.includes('null') && !term.includes('empty') && value === '') {
|
||||
|
@ -224,7 +224,7 @@ let sql = ''
|
||||
|
||||
const save = (cb?: () => void) => {
|
||||
if (!sqlNode.value.tableName.trim()) {
|
||||
ElMessage.error('SQL名字不能为空')
|
||||
ElMessage.error(t('data_set.cannot_be_empty'))
|
||||
return
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ const save = (cb?: () => void) => {
|
||||
sql = codeCom.value.state.doc.toString()
|
||||
sqlNode.value.changeFlag = true
|
||||
if (!sql.trim()) {
|
||||
ElMessage.error('SQL不能为空')
|
||||
ElMessage.error(t('data_set.cannot_be_empty_de'))
|
||||
return
|
||||
}
|
||||
sqlNode.value.sql = Base64.encode(sql)
|
||||
@ -264,7 +264,7 @@ const handleClose = () => {
|
||||
if (changeFlag || sql !== sqlNew || !sqlNew.trim()) {
|
||||
ElMessageBox.confirm(t('chart.tips'), {
|
||||
confirmButtonType: 'primary',
|
||||
tip: '你填写的信息未保存,确认退出吗?',
|
||||
tip: t('data_set.sure_to_exit'),
|
||||
type: 'warning',
|
||||
autofocus: false,
|
||||
showClose: false
|
||||
@ -342,9 +342,9 @@ const dsChange = (val: string) => {
|
||||
const copyInfo = async (value: string) => {
|
||||
try {
|
||||
await toClipboard(value)
|
||||
ElMessage.success('复制成功')
|
||||
ElMessage.success(t('data_set.copied_successfully'))
|
||||
} catch (e) {
|
||||
ElMessage.warning('您的浏览器不支持复制:', e)
|
||||
ElMessage.warning(t('data_set.not_support_copying'), e)
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ const saveVariable = () => {
|
||||
state.variables = JSON.parse(JSON.stringify(state.variablesTmp))
|
||||
showVariableMgm.value = false
|
||||
changeFlagCode.value = true
|
||||
ElMessage.success('参数设置成功')
|
||||
ElMessage.success(t('data_set.parameters_set_successfully'))
|
||||
}
|
||||
const mousedownDrag = () => {
|
||||
document.querySelector('.sql-eidtor').addEventListener('mousemove', calculateWidth)
|
||||
@ -414,7 +414,7 @@ const mousedownDrag = () => {
|
||||
<Icon name="reference-play"></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
运行
|
||||
{{ t('data_set.run') }}
|
||||
</el-button>
|
||||
<el-button @click="referenceSetting()" style="color: #1f2329" text>
|
||||
<template #icon>
|
||||
@ -422,10 +422,10 @@ const mousedownDrag = () => {
|
||||
<Icon name="reference-setting"></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
参数设置
|
||||
{{ t('data_set.parameter_settings') }}
|
||||
</el-button>
|
||||
<el-button :disabled="!changeFlagCode" @click="save(() => {})" type="primary">
|
||||
保存</el-button
|
||||
{{ t('data_set.save') }}</el-button
|
||||
>
|
||||
<el-divider direction="vertical" />
|
||||
<el-icon class="hover-icon" @click="handleClose">
|
||||
@ -454,7 +454,7 @@ const mousedownDrag = () => {
|
||||
>
|
||||
<div class="table-list-top">
|
||||
<p class="select-ds">
|
||||
当前数据源
|
||||
{{ t('data_set.current_data_source') }}
|
||||
<span class="left-outlined">
|
||||
<el-icon style="color: #1f2329" @click="showLeft = false">
|
||||
<Icon name="icon_left_outlined" />
|
||||
@ -500,7 +500,7 @@ const mousedownDrag = () => {
|
||||
class="el-empty__description"
|
||||
style="margin-top: 80px; color: #5e6d82; text-align: center"
|
||||
>
|
||||
没有找到相关内容
|
||||
{{ t('data_set.relevant_content_found') }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="table-checkbox-list">
|
||||
@ -580,7 +580,7 @@ const mousedownDrag = () => {
|
||||
header-cell-class-name="header-cell"
|
||||
:data="gridData"
|
||||
>
|
||||
<el-table-column label="物理字段名">
|
||||
<el-table-column :label="t('data_set.physical_field_name')">
|
||||
<template #default="scope">
|
||||
<div class="flex-align-center icon">
|
||||
<el-icon>
|
||||
@ -647,7 +647,10 @@ const mousedownDrag = () => {
|
||||
:height="height"
|
||||
fixed
|
||||
><template #empty>
|
||||
<empty-background description="暂无数据" img-type="noneWhite" /> </template
|
||||
<empty-background
|
||||
:description="t('data_set.no_data')"
|
||||
img-type="noneWhite"
|
||||
/> </template
|
||||
></el-table-v2>
|
||||
</template>
|
||||
</el-auto-resizer>
|
||||
@ -655,11 +658,11 @@ const mousedownDrag = () => {
|
||||
<template v-else>
|
||||
<empty-background description=" " img-type="noneWhite">
|
||||
<div class="sql-tips flex-align-center">
|
||||
点击上方
|
||||
{{ t('data_set.click_above') }}
|
||||
<el-icon>
|
||||
<icon name="icon_play-round_outlined"></icon>
|
||||
</el-icon>
|
||||
运行,即可查看运行结果
|
||||
{{ t('data_set.see_the_results') }}
|
||||
</div>
|
||||
</empty-background>
|
||||
</template>
|
||||
@ -852,7 +855,7 @@ const mousedownDrag = () => {
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<empty-background description="暂无数据" img-type="noneWhite" />
|
||||
<empty-background :description="t('data_set.no_data')" img-type="noneWhite" />
|
||||
</template>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
|
@ -144,7 +144,8 @@ const createInit = (type, data: Tree, exec, name: string) => {
|
||||
datasetForm.name = ''
|
||||
filterText.value = ''
|
||||
nodeType.value = type
|
||||
placeholder.value = type === 'folder' ? '请输入文件夹名称' : '请输入数据集名称'
|
||||
placeholder.value =
|
||||
type === 'folder' ? t('data_set.a_folder_name') : t('data_set.the_dataset_name')
|
||||
if (type === 'dataset') {
|
||||
union = data.union
|
||||
allfields = data.allfields
|
||||
@ -155,7 +156,7 @@ const createInit = (type, data: Tree, exec, name: string) => {
|
||||
dfs(res as unknown as Tree[])
|
||||
state.tData = (res as unknown as Tree[]) || []
|
||||
if (state.tData.length && state.tData[0].name === 'root' && state.tData[0].id === '0') {
|
||||
state.tData[0].name = '数据集'
|
||||
state.tData[0].name = t('data_set.data_set')
|
||||
}
|
||||
data.id = formatRootMiss(data.id, state.tData)
|
||||
if (exec) {
|
||||
@ -222,7 +223,7 @@ const nodeClick = (data: Tree) => {
|
||||
}
|
||||
const checkPid = pid => {
|
||||
if (pid !== 0 && !pid) {
|
||||
ElMessage.error('请选择目标文件夹')
|
||||
ElMessage.error(t('data_set.the_destination_folder'))
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@ -265,10 +266,10 @@ const saveDataset = () => {
|
||||
emits('finish', res)
|
||||
switch (cmd.value) {
|
||||
case 'move':
|
||||
ElMessage.success('移动成功')
|
||||
ElMessage.success(t('data_set.moved_successfully'))
|
||||
break
|
||||
case 'rename':
|
||||
ElMessage.success('重命名成功')
|
||||
ElMessage.success(t('data_set.rename_successful'))
|
||||
break
|
||||
default:
|
||||
useEmitt().emitter.emit('onDatasetSave')
|
||||
@ -362,7 +363,7 @@ const emits = defineEmits(['finish'])
|
||||
</el-tree>
|
||||
<div v-if="searchEmpty" class="empty-search">
|
||||
<img :src="nothingTree" />
|
||||
<span>没有找到相关内容</span>
|
||||
<span>{{ t('data_set.relevant_content_found') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -364,10 +364,10 @@ const confirmEditUnion = () => {
|
||||
|
||||
if (!!idArr.length) {
|
||||
ElMessageBox.confirm(
|
||||
`字段${allfields.value
|
||||
`${t('data_set.field')}${allfields.value
|
||||
.filter(ele => [...new Set(idArr)].includes(ele.id) && ele.extField !== 2)
|
||||
.map(ele => ele.name)
|
||||
.join(',')}未被选择,其相关的新建字段将被删除,是否继续?`,
|
||||
.join(',')}${t('data_set.want_to_continue')}`,
|
||||
{
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
@ -452,10 +452,10 @@ const handleCommand = (ele, command) => {
|
||||
|
||||
if (!!idArr.length) {
|
||||
ElMessageBox.confirm(
|
||||
`字段${allfields.value
|
||||
`${t('field.want_to_continue')}${allfields.value
|
||||
.filter(ele => [...new Set(idArr)].includes(ele.id) && ele.extField !== 2)
|
||||
.map(ele => ele.name)
|
||||
.join(',')}未被选择,其相关的新建字段将被删除,是否继续?`,
|
||||
.join(',')}${t('data_set.want_to_continue')}`,
|
||||
{
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
@ -534,12 +534,12 @@ const dfsNodeFieldBack = (list, { originName, datasetTableId }) => {
|
||||
const menuList = [
|
||||
{
|
||||
svgName: 'icon_text-box_outlined',
|
||||
label: '字段选择',
|
||||
label: t('data_set.field_selection'),
|
||||
command: 'editerField'
|
||||
},
|
||||
{
|
||||
svgName: 'icon_delete-trash_outlined',
|
||||
label: '删除',
|
||||
label: t('data_set.delete'),
|
||||
command: 'del'
|
||||
}
|
||||
]
|
||||
@ -547,7 +547,7 @@ const menuList = [
|
||||
const sqlMenu = [
|
||||
{
|
||||
svgName: 'icon_edit_outlined',
|
||||
label: '编辑SQL',
|
||||
label: t('data_set.edit_sql'),
|
||||
command: 'editerSql'
|
||||
},
|
||||
{
|
||||
@ -1120,15 +1120,15 @@ const emits = defineEmits(['addComplete', 'joinEditor', 'updateAllfields', 'chan
|
||||
></div>
|
||||
<div class="zero" v-if="!state.nodeList.length">
|
||||
<img :src="zeroNodeImg" alt="" />
|
||||
<p>将左侧的数据表、自定义SQL</p>
|
||||
<p>拖拽到这里创建数据集</p>
|
||||
<p>{{ t('data_set.on_the_left') }}</p>
|
||||
<p>{{ t('data_set.a_data_set') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="dialogRename"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
title="重命名表"
|
||||
:title="t('data_set.rename_table')"
|
||||
width="420px"
|
||||
>
|
||||
<el-form
|
||||
@ -1139,7 +1139,7 @@ const emits = defineEmits(['addComplete', 'joinEditor', 'updateAllfields', 'chan
|
||||
>
|
||||
<el-form-item
|
||||
prop="name"
|
||||
label="表名称"
|
||||
:label="t('data_set.table_name')"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
@ -1171,13 +1171,13 @@ const emits = defineEmits(['addComplete', 'joinEditor', 'updateAllfields', 'chan
|
||||
<template #header v-if="currentNode">
|
||||
<div class="info-content">
|
||||
<div class="info">
|
||||
<span class="label">表名</span>
|
||||
<span class="label">{{ t('data_set.table_name_de') }}</span>
|
||||
<span :title="currentNode.tableName" class="name ellipsis">{{
|
||||
currentNode.tableName
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<span class="label">表备注</span>
|
||||
<span class="label">{{ t('data_set.table_remarks') }}</span>
|
||||
<span :title="currentNode.noteName" style="max-width: 240px" class="name ellipsis">{{
|
||||
currentNode.noteName || '-'
|
||||
}}</span>
|
||||
|
@ -3,6 +3,7 @@ import { ref, computed, nextTick } from 'vue'
|
||||
import { ElCascaderPanel } from 'element-plus-secondary'
|
||||
import { timeTypes } from './util'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
||||
export interface Menu {
|
||||
svgName: string
|
||||
@ -10,6 +11,7 @@ export interface Menu {
|
||||
command: string
|
||||
divided?: boolean
|
||||
}
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps({
|
||||
extField: {
|
||||
@ -27,7 +29,7 @@ const props = defineProps({
|
||||
})
|
||||
const timeTypesChildren = timeTypes.map(ele => {
|
||||
return {
|
||||
label: ele === 'custom' ? '自定义' : ele,
|
||||
label: ele === 'custom' ? t('data_set.customize') : ele,
|
||||
value: ele
|
||||
}
|
||||
})
|
||||
@ -39,55 +41,55 @@ const options = computed(() => {
|
||||
icon: 'icon_switch_outlined'
|
||||
},
|
||||
{
|
||||
label: '更换字段类型',
|
||||
label: t('data_set.change_field_type'),
|
||||
value: 'translateType',
|
||||
icon: 'custom_sort',
|
||||
children: [
|
||||
{
|
||||
label: '文本',
|
||||
label: t('data_set.text'),
|
||||
icon: 'icon_text_outlined',
|
||||
value: 'text'
|
||||
},
|
||||
{
|
||||
label: '时间',
|
||||
label: t('data_set.time'),
|
||||
icon: 'icon_calendar_outlined',
|
||||
value: 'time',
|
||||
children: props.showTime ? timeTypesChildren : []
|
||||
},
|
||||
{
|
||||
label: '地理位置',
|
||||
label: t('data_set.geographical_location'),
|
||||
icon: 'icon_local_outlined',
|
||||
value: 'location'
|
||||
},
|
||||
{
|
||||
label: '数值',
|
||||
label: t('data_set.numerical_value'),
|
||||
icon: 'icon_number_outlined',
|
||||
value: 'value'
|
||||
},
|
||||
{
|
||||
label: '数值 (小数)',
|
||||
label: t('data_set.numeric_value_decimal'),
|
||||
icon: 'icon_number_outlined',
|
||||
value: 'float'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '编辑',
|
||||
label: t('data_set.edit'),
|
||||
value: 'editor',
|
||||
icon: 'icon_edit_outlined'
|
||||
},
|
||||
{
|
||||
label: '重命名',
|
||||
label: t('data_set.rename'),
|
||||
value: 'rename',
|
||||
icon: 'dv-rename'
|
||||
},
|
||||
{
|
||||
label: '复制',
|
||||
label: t('data_set.copy'),
|
||||
value: 'copy',
|
||||
icon: 'icon_copy_outlined'
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
label: t('data_set.delete'),
|
||||
value: 'delete',
|
||||
icon: 'icon_delete-trash_outlined'
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { PropType, ref } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import type { Field } from './UnionFieldList.vue'
|
||||
import type { Field } from '@/api/chart'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
const unionTypeFromParent = ref('left')
|
||||
const { t } = useI18n()
|
||||
|
@ -66,7 +66,7 @@ const editCalcField = ref(false)
|
||||
const calcEdit = ref()
|
||||
const editUnion = ref(false)
|
||||
const datasetDrag = ref()
|
||||
const datasetName = ref('未命名数据集')
|
||||
const datasetName = ref(t('data_set.unnamed_dataset'))
|
||||
const tabActive = ref('preview')
|
||||
const activeName = ref('')
|
||||
const dataSource = ref('')
|
||||
@ -159,7 +159,7 @@ const ruleFormRef = ref<FormInstance>()
|
||||
const ruleFormFieldRef = ref<FormInstance>()
|
||||
|
||||
const rules = {
|
||||
name: [{ required: true, message: '自定义时间格式不能为空', trigger: 'blur' }]
|
||||
name: [{ required: true, message: t('data_set.cannot_be_empty_time'), trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const fieldRules = {
|
||||
@ -169,7 +169,7 @@ const fieldRules = {
|
||||
const sqlNode = reactive<Table>({
|
||||
datasourceId: '',
|
||||
name: '',
|
||||
tableName: '自定义SQL',
|
||||
tableName: t('data_set.custom_sql'),
|
||||
type: 'sql'
|
||||
})
|
||||
|
||||
@ -239,7 +239,7 @@ const pushDataset = () => {
|
||||
|
||||
const backToMain = () => {
|
||||
if (isUpdate) {
|
||||
ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', {
|
||||
ElMessageBox.confirm(t('data_set.want_to_exit'), {
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
showCancelButton: true,
|
||||
@ -332,7 +332,7 @@ const editeSave = () => {
|
||||
})
|
||||
.then(() => {
|
||||
isUpdate = false
|
||||
ElMessage.success('保存成功')
|
||||
ElMessage.success(t('data_set.saved_successfully'))
|
||||
if (willBack) {
|
||||
pushDataset()
|
||||
}
|
||||
@ -551,7 +551,7 @@ const confirmEditCalc = () => {
|
||||
if (val) {
|
||||
calcEdit.value.setFieldForm()
|
||||
if (!calcEdit.value.fieldForm.originName.trim()) {
|
||||
ElMessage.error('表达式不能为空!')
|
||||
ElMessage.error(t('data_set.cannot_be_empty_de_'))
|
||||
return
|
||||
}
|
||||
const obj = cloneDeep(calcEdit.value.fieldForm)
|
||||
@ -641,7 +641,7 @@ const initEdite = async () => {
|
||||
nodeInfo = {
|
||||
id,
|
||||
pid,
|
||||
name: copyId ? '复制数据集' : name
|
||||
name: copyId ? t('data_set.copy_a_dataset') : name
|
||||
}
|
||||
if (copyId) {
|
||||
nodeInfo.id = ''
|
||||
@ -825,7 +825,7 @@ const confirmEditUnion = () => {
|
||||
})
|
||||
|
||||
if (unionFieldsLost) {
|
||||
ElMessage.error('关联字段不能为空!')
|
||||
ElMessage.error(t('data_set.cannot_be_empty_de_field'))
|
||||
return
|
||||
}
|
||||
|
||||
@ -856,10 +856,10 @@ const confirmEditUnion = () => {
|
||||
}, [])
|
||||
|
||||
ElMessageBox.confirm(
|
||||
`字段${allfields.value
|
||||
`${t('data_set.field')}${allfields.value
|
||||
.filter(ele => [...new Set(idArr)].includes(ele.id) && ele.extField !== 2)
|
||||
.map(ele => ele.name)
|
||||
.join(',')}未被选择,其相关的新建字段将被删除,是否继续?`,
|
||||
.join(',')}${t('data_set.want_to_continue')}`,
|
||||
{
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
@ -1052,7 +1052,7 @@ const datasetSave = () => {
|
||||
dfsNodeList(union, datasetDrag.value.getNodeList())
|
||||
const pid = appStore.getIsDataEaseBi ? embeddedStore.datasetPid : route.query.pid || nodeInfo.pid
|
||||
if (!union.length) {
|
||||
ElMessage.error('数据集不能为空')
|
||||
ElMessage.error(t('data_set.dataset_cannot_be'))
|
||||
return
|
||||
}
|
||||
if (nodeInfo.pid && !nodeInfo.id) {
|
||||
@ -1334,10 +1334,12 @@ const getDsIconName = data => {
|
||||
</template>
|
||||
</span>
|
||||
<span class="oprate">
|
||||
<el-button :disabled="showInput" type="primary" @click="datasetSaveAndBack"
|
||||
>保存并返回</el-button
|
||||
>
|
||||
<el-button :disabled="showInput" type="primary" @click="datasetSave">保存</el-button>
|
||||
<el-button :disabled="showInput" type="primary" @click="datasetSaveAndBack">{{
|
||||
t('data_set.save_and_return')
|
||||
}}</el-button>
|
||||
<el-button :disabled="showInput" type="primary" @click="datasetSave">{{
|
||||
t('data_set.save')
|
||||
}}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="container dataset-db" @mouseup="mouseupDrag">
|
||||
@ -1361,7 +1363,7 @@ const getDsIconName = data => {
|
||||
>
|
||||
<div class="table-list-top">
|
||||
<p class="select-ds">
|
||||
选择数据源
|
||||
{{ t('data_set.select_data_source') }}
|
||||
<span class="left-outlined">
|
||||
<el-icon style="color: #1f2329" @click="showLeft = false">
|
||||
<Icon name="icon_left_outlined" />
|
||||
@ -1391,7 +1393,12 @@ const getDsIconName = data => {
|
||||
></icon>
|
||||
</el-icon>
|
||||
<span v-if="!leaf || extraFlag > -1">{{ name }}</span>
|
||||
<el-tooltip effect="dark" v-else :content="`无效数据源:${name}`" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
v-else
|
||||
:content="`${t('data_set.invalid_data_source')}:${name}`"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ name }}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -1424,7 +1431,7 @@ const getDsIconName = data => {
|
||||
class="el-empty__description"
|
||||
style="margin-top: 80px; color: #5e6d82; text-align: center"
|
||||
>
|
||||
没有找到相关内容
|
||||
{{ t('data_set.relevant_content_found') }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="table-checkbox-list">
|
||||
@ -1439,7 +1446,7 @@ const getDsIconName = data => {
|
||||
<el-icon class="icon-color">
|
||||
<Icon name="icon_sql_outlined_1"></Icon>
|
||||
</el-icon>
|
||||
<span class="label">自定义SQL</span>
|
||||
<span class="label">{{ t('data_set.custom_sql') }}</span>
|
||||
</div>
|
||||
<FixedSizeList
|
||||
:itemSize="40"
|
||||
@ -1475,7 +1482,7 @@ const getDsIconName = data => {
|
||||
<el-icon>
|
||||
<Icon name="icon_warning_colorful"></Icon>
|
||||
</el-icon>
|
||||
您正在进行跨数据源的表关联,请确保使用calcite的标准语法和函数,否则会导致数据集报错
|
||||
{{ t('data_set.be_reported_incorrectly') }}
|
||||
</div>
|
||||
<dataset-union
|
||||
@join-editor="joinEditor"
|
||||
@ -1520,7 +1527,7 @@ const getDsIconName = data => {
|
||||
<Icon name="icon_refresh_outlined"></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
刷新数据
|
||||
{{ t('data_set.refresh_data') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -1552,7 +1559,7 @@ const getDsIconName = data => {
|
||||
<div class="operate child">
|
||||
<field-more
|
||||
:extField="data.extField"
|
||||
trans-type="转换为指标"
|
||||
:trans-type="t('data_set.convert_to_indicator')"
|
||||
:show-time="data.deExtractType === 0"
|
||||
@handle-command="type => handleFieldMore(data, type)"
|
||||
></field-more>
|
||||
@ -1582,7 +1589,7 @@ const getDsIconName = data => {
|
||||
<span :title="data.name" class="label-tooltip">{{ data.name }}</span>
|
||||
<div class="operate child">
|
||||
<field-more
|
||||
trans-type="转换为维度"
|
||||
:trans-type="t('data_set.convert_to_dimension')"
|
||||
typeColor="green-color"
|
||||
:show-time="data.deExtractType === 0"
|
||||
:extField="data.extField"
|
||||
@ -1625,7 +1632,7 @@ const getDsIconName = data => {
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<empty-background description="暂无数据" img-type="noneWhite" />
|
||||
<empty-background :description="t('data_set.no_data')" img-type="noneWhite" />
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
@ -1742,7 +1749,11 @@ const getDsIconName = data => {
|
||||
|
||||
<el-table-column fixed="right" :label="t('chart.dimension')">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" content="转换为指标" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="t('data_set.convert_to_indicator')"
|
||||
placement="top"
|
||||
>
|
||||
<template #default>
|
||||
<el-button text @click="handleFieldMore(scope.row, 'translate')">
|
||||
<template #icon>
|
||||
@ -1902,7 +1913,11 @@ const getDsIconName = data => {
|
||||
|
||||
<el-table-column fixed="right" :label="t('chart.quota')">
|
||||
<template #default="scope">
|
||||
<el-tooltip effect="dark" content="转换为维度" placement="top">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="t('data_set.convert_to_dimension')"
|
||||
placement="top"
|
||||
>
|
||||
<template #default>
|
||||
<el-button text @click="handleFieldMore(scope.row, 'translate')">
|
||||
<template #icon>
|
||||
@ -1957,9 +1972,9 @@ const getDsIconName = data => {
|
||||
</div>
|
||||
<div class="batch-operate flex-align-center" v-if="!!deTypeSelection.length">
|
||||
<div class="flex-align-center">
|
||||
已选择
|
||||
{{ t('data_set.selected') }}
|
||||
<span class="num">{{ deTypeSelection.length }}</span>
|
||||
条
|
||||
{{ t('data_set.bar') }}
|
||||
<el-button @click="clearSelection" text style="margin-left: 16px">{{
|
||||
t('commons.clear')
|
||||
}}</el-button>
|
||||
@ -1999,7 +2014,7 @@ const getDsIconName = data => {
|
||||
plain
|
||||
style="margin-left: 200px"
|
||||
>
|
||||
转换为指标
|
||||
{{ t('data_set.convert_to_indicator') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="dqTransArr('d')"
|
||||
@ -2007,7 +2022,7 @@ const getDsIconName = data => {
|
||||
plain
|
||||
style="margin-left: 200px"
|
||||
>
|
||||
转换为维度
|
||||
{{ t('data_set.convert_to_dimension') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -2042,9 +2057,14 @@ const getDsIconName = data => {
|
||||
<el-button type="primary" @click="confirmEditCalc()">{{ t('dataset.confirm') }} </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog class="create-dialog" title="格式编辑" v-model="updateCustomTime" width="1000px">
|
||||
<el-dialog
|
||||
class="create-dialog"
|
||||
:title="t('data_set.format_edit')"
|
||||
v-model="updateCustomTime"
|
||||
width="1000px"
|
||||
>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="currentField" label-width="120px">
|
||||
<el-form-item prop="name" label="自定义时间格式">
|
||||
<el-form-item prop="name" :label="t('data_set.custom_time_format')">
|
||||
<el-input v-model="currentField.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
Loading…
Reference in New Issue
Block a user