forked from github/dataease
refactor: 整理国际化
This commit is contained in:
parent
a843a01b77
commit
87d7b56a8e
@ -498,7 +498,6 @@ export default {
|
||||
folder_name: 'Folder Name',
|
||||
folder: 'Folder',
|
||||
edit_folder: 'Edit Folder',
|
||||
new_folder: 'New Folder',
|
||||
name_already_exists: 'Folder name already exists',
|
||||
data_preview: 'Data preview',
|
||||
original_name: 'Original Name',
|
||||
@ -512,8 +511,6 @@ export default {
|
||||
expression_syntax_error: 'Field expression syntax error',
|
||||
create_dashboard: 'Create Dashboard',
|
||||
cannot_be_empty: 'SQL cannot be empty',
|
||||
to_run_query: 'Click to run query',
|
||||
the_running_results: 'You can view the running results',
|
||||
data_reference: 'Data Reference',
|
||||
want_to_replace: 'Replacement may affect custom dataset, associated dataset, dashboard, etc. Do you want to replace?',
|
||||
replace_the_data: 'Are you sure to replace the data?',
|
||||
@ -1793,7 +1790,7 @@ export default {
|
||||
driver_name: 'Driver name:',
|
||||
drive_type: 'Drive type',
|
||||
add_driver: 'Add driver',
|
||||
on_the_left: 'Please select drive on the left',
|
||||
diver_on_the_left: 'Please select drive on the left',
|
||||
no_data_table: 'No data table',
|
||||
on_the_left: 'Please select the data source on the left',
|
||||
table_name: 'Table name:',
|
||||
|
@ -498,7 +498,6 @@ export default {
|
||||
folder_name: '資料夾名稱',
|
||||
folder: '所屬資料夾',
|
||||
edit_folder: '編輯資料夾',
|
||||
new_folder: '新建資料夾',
|
||||
name_already_exists: '資料夾名稱已存在',
|
||||
data_preview: '數據預覽',
|
||||
original_name: '原始名稱',
|
||||
@ -512,8 +511,6 @@ export default {
|
||||
expression_syntax_error: '欄位運算式語法錯誤',
|
||||
create_dashboard: '創建儀表板',
|
||||
cannot_be_empty: 'SQL不能為空',
|
||||
to_run_query: '點擊運行査詢',
|
||||
the_running_results: '即可查看運行結果',
|
||||
data_reference: '數據參攷',
|
||||
want_to_replace: '替換可能會影響自定義數据集、關聯數据集、儀表板等,是否替換?',
|
||||
replace_the_data: '確定替換數據嗎?',
|
||||
@ -1793,7 +1790,7 @@ export default {
|
||||
driver_name: '驅動名稱',
|
||||
drive_type: '驅動類型',
|
||||
add_driver: '添加驅動',
|
||||
on_the_left: '請在左側選擇驅動',
|
||||
diver_on_the_left: '請在左側選擇驅動',
|
||||
no_data_table: '暫無資料表',
|
||||
on_the_left: '請在左側選擇資料來源',
|
||||
table_name: '表名稱',
|
||||
|
@ -497,7 +497,6 @@ export default {
|
||||
folder_name: '文件夹名称',
|
||||
folder: '所属文件夹',
|
||||
edit_folder: '编辑文件夹',
|
||||
new_folder: '新建文件夹',
|
||||
name_already_exists: '文件夹名称已存在',
|
||||
data_preview: '数据预览',
|
||||
original_name: '原始名称',
|
||||
@ -511,8 +510,6 @@ export default {
|
||||
expression_syntax_error: '字段表达式语法错误',
|
||||
create_dashboard: '创建仪表板',
|
||||
cannot_be_empty: 'SQL不能为空',
|
||||
to_run_query: '点击运行查询',
|
||||
the_running_results: '即可查看运行结果',
|
||||
data_reference: '数据参考',
|
||||
want_to_replace: '替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?',
|
||||
replace_the_data: '确定替换数据吗?',
|
||||
@ -1792,7 +1789,7 @@ export default {
|
||||
driver_name: '驱动名称',
|
||||
drive_type: '驱动类型',
|
||||
add_driver: '添加驱动',
|
||||
on_the_left: '请在左侧选择驱动',
|
||||
diver_on_the_left: '请在左侧选择驱动',
|
||||
no_data_table: '暂无数据表',
|
||||
on_the_left: '请在左侧选择数据源',
|
||||
table_name: '表名称',
|
||||
|
@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<div
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
class="de-ds-container"
|
||||
:class="[{ 'is-driver-mgm': currentMgm === 'driverMgm' }]"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
>
|
||||
<div v-if="currentMgm === 'driverMgm'" class="dsr-route-title">
|
||||
<div>
|
||||
<i class="el-icon-arrow-left back-button" @click="jump" />
|
||||
<span>{{ $t('driver.mgm') }}</span>
|
||||
</div>
|
||||
<deBtn type="primary" @click="addDriver" icon="el-icon-plus"
|
||||
>{{ $t("driver.add") }}
|
||||
<deBtn
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addDriver"
|
||||
>{{ $t("driver.add") }}
|
||||
</deBtn>
|
||||
</div>
|
||||
<de-aside-container
|
||||
@ -18,14 +21,13 @@
|
||||
type="datasource"
|
||||
>
|
||||
<ds-tree
|
||||
@switch-mgm="switchMgm"
|
||||
ref="dsTree"
|
||||
:datasource="datasource"
|
||||
@switch-mgm="switchMgm"
|
||||
@switch-main="switchMain"
|
||||
/>
|
||||
</de-aside-container>
|
||||
<de-main-container
|
||||
>
|
||||
<de-main-container>
|
||||
<component
|
||||
:is="component"
|
||||
v-if="!!component"
|
||||
@ -35,20 +37,20 @@
|
||||
@refresh-type="refreshType"
|
||||
@switch-component="switchMain"
|
||||
/>
|
||||
<el-empty v-else :image-size="125" :description="$t(`datasource.${swTips}`)" :image="image"></el-empty>
|
||||
<el-empty v-else :image-size="125" :description="$t(`datasource.${swTips}`)" :image="image" />
|
||||
</de-main-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DeMainContainer from "@/components/dataease/DeMainContainer";
|
||||
import DeAsideContainer from "@/components/dataease/DeAsideContainer";
|
||||
import DsTree from "./DsTree";
|
||||
import DsForm from "./DsForm";
|
||||
import dsTable from "./dsTable";
|
||||
import DriverForm from "./DriverFormDetail";
|
||||
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
||||
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
||||
import DsTree from './DsTree'
|
||||
import DsForm from './DsForm'
|
||||
import dsTable from './dsTable'
|
||||
import DriverForm from './DriverFormDetail'
|
||||
export default {
|
||||
name: "DsMain",
|
||||
name: 'DsMain',
|
||||
components: { DeMainContainer, DeAsideContainer, DsTree },
|
||||
data() {
|
||||
return {
|
||||
@ -57,65 +59,65 @@ export default {
|
||||
datasource: {},
|
||||
param: null,
|
||||
tData: null,
|
||||
currentMgm: "dsMgm",
|
||||
dsTypes: [],
|
||||
};
|
||||
currentMgm: 'dsMgm',
|
||||
dsTypes: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
swTips() {
|
||||
return this.currentMgm === 'driverMgm' ? 'on_the_left' : 'on_the_left';
|
||||
return this.currentMgm === 'driverMgm' ? 'diver_on_the_left' : 'on_the_left'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump() {
|
||||
this.$refs.dsTree.dsMgm();
|
||||
this.switchMgm('dsMgm');
|
||||
this.$refs.dsTree.dsMgm()
|
||||
this.switchMgm('dsMgm')
|
||||
},
|
||||
switchMgm(type) {
|
||||
this.currentMgm = type;
|
||||
this.currentMgm = type
|
||||
},
|
||||
addDriver() {
|
||||
this.$refs.dsTree.addDriver();
|
||||
this.$refs.dsTree.addDriver()
|
||||
},
|
||||
// 切换main区内容
|
||||
switchMain(param) {
|
||||
const { component, componentParam, tData, dsTypes } = param;
|
||||
this.component = '';
|
||||
this.param = null;
|
||||
const { component, componentParam, tData, dsTypes } = param
|
||||
this.component = ''
|
||||
this.param = null
|
||||
this.$nextTick(() => {
|
||||
switch (component) {
|
||||
case "DsForm":
|
||||
this.component = DsForm;
|
||||
this.param = componentParam;
|
||||
this.tData = tData;
|
||||
this.dsTypes = dsTypes;
|
||||
break;
|
||||
case "DriverForm":
|
||||
this.component = DriverForm;
|
||||
this.param = componentParam;
|
||||
this.tData = tData;
|
||||
this.dsTypes = dsTypes;
|
||||
break;
|
||||
case "dsTable":
|
||||
this.component = dsTable;
|
||||
this.param = componentParam;
|
||||
break;
|
||||
case 'DsForm':
|
||||
this.component = DsForm
|
||||
this.param = componentParam
|
||||
this.tData = tData
|
||||
this.dsTypes = dsTypes
|
||||
break
|
||||
case 'DriverForm':
|
||||
this.component = DriverForm
|
||||
this.param = componentParam
|
||||
this.tData = tData
|
||||
this.dsTypes = dsTypes
|
||||
break
|
||||
case 'dsTable':
|
||||
this.component = dsTable
|
||||
this.param = componentParam
|
||||
break
|
||||
default:
|
||||
this.component = '';
|
||||
this.param = null;
|
||||
break;
|
||||
this.component = ''
|
||||
this.param = null
|
||||
break
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
refreshType(datasource) {
|
||||
this.datasource = datasource;
|
||||
this.$refs.dsTree && this.$refs.dsTree.refreshType(datasource);
|
||||
this.datasource = datasource
|
||||
this.$refs.dsTree && this.$refs.dsTree.refreshType(datasource)
|
||||
},
|
||||
msg2Current(sourceParam) {
|
||||
this.$refs.dsTree && this.$refs.dsTree.markInvalid(sourceParam);
|
||||
},
|
||||
},
|
||||
};
|
||||
this.$refs.dsTree && this.$refs.dsTree.markInvalid(sourceParam)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@ -160,4 +162,4 @@ export default {
|
||||
padding: 24px 0 70px 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user