forked from github/dataease
feat: 数据源分类的改进 #3983
This commit is contained in:
parent
be5ced54f5
commit
195fd7c21e
@ -279,7 +279,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
...
|
...
|
||||||
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
||||||
position: 'relative'
|
position: 'relative'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
//首次加载且非编辑状态新复制的视图,使用外部filter
|
// 首次加载且非编辑状态新复制的视图,使用外部filter
|
||||||
initLoad() {
|
initLoad() {
|
||||||
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
|
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
|
||||||
},
|
},
|
||||||
@ -1269,7 +1269,6 @@ export default {
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.mobile-dialog-css ::v-deep .el-dialog__headerbtn {
|
.mobile-dialog-css ::v-deep .el-dialog__headerbtn {
|
||||||
top: 7px
|
top: 7px
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,10 @@ export default {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
options: {},
|
options: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
width: {
|
width: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
|
@ -180,7 +180,10 @@ export default {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
options: {},
|
options: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
width: {
|
width: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
|
@ -1923,6 +1923,7 @@ export default {
|
|||||||
field_description: 'Field description',
|
field_description: 'Field description',
|
||||||
table_description: 'Table description',
|
table_description: 'Table description',
|
||||||
relational_database: 'Relational database',
|
relational_database: 'Relational database',
|
||||||
|
data_warehouse_lake: 'Data Warehouse/Data Lake',
|
||||||
non_relational_database: 'Non relational database',
|
non_relational_database: 'Non relational database',
|
||||||
all: 'All',
|
all: 'All',
|
||||||
other: 'other',
|
other: 'other',
|
||||||
|
@ -1917,6 +1917,7 @@ export default {
|
|||||||
field_description: '欄位描述',
|
field_description: '欄位描述',
|
||||||
table_description: '表描述',
|
table_description: '表描述',
|
||||||
relational_database: '關係型數據庫',
|
relational_database: '關係型數據庫',
|
||||||
|
data_warehouse_lake: '數倉/數據湖',
|
||||||
non_relational_database: '非關係型數據庫',
|
non_relational_database: '非關係型數據庫',
|
||||||
all: '所有',
|
all: '所有',
|
||||||
other: '其他',
|
other: '其他',
|
||||||
|
@ -1916,6 +1916,7 @@ export default {
|
|||||||
field_description: '字段描述',
|
field_description: '字段描述',
|
||||||
table_description: '表描述',
|
table_description: '表描述',
|
||||||
relational_database: '关系型数据库',
|
relational_database: '关系型数据库',
|
||||||
|
data_warehouse_lake: '数仓/数据湖',
|
||||||
non_relational_database: '非关系型数据库',
|
non_relational_database: '非关系型数据库',
|
||||||
all: '所有',
|
all: '所有',
|
||||||
other: '其他',
|
other: '其他',
|
||||||
|
@ -36,7 +36,10 @@
|
|||||||
:span="6"
|
:span="6"
|
||||||
style="padding-top: 5px"
|
style="padding-top: 5px"
|
||||||
>
|
>
|
||||||
<el-checkbox v-model="commonBackground.backgroundColorSelect" @change="themeChange('backgroundColorSelect')">
|
<el-checkbox
|
||||||
|
v-model="commonBackground.backgroundColorSelect"
|
||||||
|
@change="themeChange('backgroundColorSelect')"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
$t('chart.color')
|
$t('chart.color')
|
||||||
}}
|
}}
|
||||||
@ -75,9 +78,12 @@
|
|||||||
:span="4"
|
:span="4"
|
||||||
style="padding-top: 5px"
|
style="padding-top: 5px"
|
||||||
>
|
>
|
||||||
<el-checkbox v-model="commonBackground.enable" @change="themeChange('enable')">{{
|
<el-checkbox
|
||||||
$t('panel.background')
|
v-model="commonBackground.enable"
|
||||||
}}
|
@change="themeChange('enable')"
|
||||||
|
>{{
|
||||||
|
$t('panel.background')
|
||||||
|
}}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
@ -113,7 +119,7 @@
|
|||||||
:http-request="upload"
|
:http-request="upload"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus"/>
|
<i class="el-icon-plus" />
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
top="25vh"
|
top="25vh"
|
||||||
@ -189,6 +195,7 @@ import BackgroundItemOverall from '@/views/background/BackgroundItemOverall'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BackgroundOverall',
|
name: 'BackgroundOverall',
|
||||||
|
// eslint-disable-next-line
|
||||||
components: { BackgroundItemOverall, BackgroundItem },
|
components: { BackgroundItemOverall, BackgroundItem },
|
||||||
props: {
|
props: {
|
||||||
position: {
|
position: {
|
||||||
|
@ -127,9 +127,9 @@
|
|||||||
value="0"
|
value="0"
|
||||||
/>
|
/>
|
||||||
<el-option
|
<el-option
|
||||||
|
v-if="engineMode !== 'simple'"
|
||||||
:label="$t('dataset.sync_data')"
|
:label="$t('dataset.sync_data')"
|
||||||
value="1"
|
value="1"
|
||||||
v-if="engineMode !== 'simple'"
|
|
||||||
:disabled="disabledSync"
|
:disabled="disabledSync"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="$t('dataset.sync_now')"
|
|
||||||
v-if="engineMode !== 'simple'"
|
v-if="engineMode !== 'simple'"
|
||||||
|
:label="$t('dataset.sync_now')"
|
||||||
value="sync_now"
|
value="sync_now"
|
||||||
:disabled="engineMode === 'simple'"
|
:disabled="engineMode === 'simple'"
|
||||||
/>
|
/>
|
||||||
|
@ -279,7 +279,7 @@ export default {
|
|||||||
},
|
},
|
||||||
datasetParams: {
|
datasetParams: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: () => []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
style="border-bottom: 1px solid;border-bottom-color:#E6E6E6;"
|
style="border-bottom: 1px solid;border-bottom-color:#E6E6E6;"
|
||||||
>
|
>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%;">
|
||||||
<share-head/>
|
<share-head />
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row
|
<el-row
|
||||||
@ -76,7 +76,7 @@
|
|||||||
width="400"
|
width="400"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<panel-detail-info/>
|
<panel-detail-info />
|
||||||
<i
|
<i
|
||||||
slot="reference"
|
slot="reference"
|
||||||
class="el-icon-warning-outline icon-class"
|
class="el-icon-warning-outline icon-class"
|
||||||
@ -489,7 +489,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
downLoadApp(appAttachInfo) {
|
downLoadApp(appAttachInfo) {
|
||||||
this.downLoadToApp(appAttachInfo)
|
this.downLoadToApp(appAttachInfo)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="theme-slider-main">
|
<div class="theme-slider-main">
|
||||||
{{ $t('panel.dashboard_theme') }}
|
{{ $t('panel.dashboard_theme') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="theme-slider-position"/>
|
<div class="theme-slider-position" />
|
||||||
<div>
|
<div>
|
||||||
<slider
|
<slider
|
||||||
v-if="sliderShow"
|
v-if="sliderShow"
|
||||||
@ -25,38 +25,38 @@
|
|||||||
name="panel"
|
name="panel"
|
||||||
>
|
>
|
||||||
<el-row class="selector-div">
|
<el-row class="selector-div">
|
||||||
<overall-setting/>
|
<overall-setting />
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:title="$t('panel.panel_background')"
|
:title="$t('panel.panel_background')"
|
||||||
name="panelBackground"
|
name="panelBackground"
|
||||||
>
|
>
|
||||||
<background-selector/>
|
<background-selector />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:title="$t('panel.view_style')"
|
:title="$t('panel.view_style')"
|
||||||
name="componentStyle"
|
name="componentStyle"
|
||||||
>
|
>
|
||||||
<background-overall></background-overall>
|
<background-overall />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:title="$t('panel.view_color_setting')"
|
:title="$t('panel.view_color_setting')"
|
||||||
name="graphical"
|
name="graphical"
|
||||||
>
|
>
|
||||||
<panel-color-selector @onColorChange="onColorChange"/>
|
<panel-color-selector @onColorChange="onColorChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:title="$t('panel.chart_title')"
|
:title="$t('panel.chart_title')"
|
||||||
name="table"
|
name="table"
|
||||||
>
|
>
|
||||||
<view-title @onTextChange="onTextChange"/>
|
<view-title @onTextChange="onTextChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:title="$t('panel.filter_component')"
|
:title="$t('panel.filter_component')"
|
||||||
name="filterComponent"
|
name="filterComponent"
|
||||||
>
|
>
|
||||||
<FilterStyleSelector/>
|
<FilterStyleSelector />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
</div>
|
</div>
|
||||||
@ -81,8 +81,10 @@ import BackgroundOverall from '@/views/background/BackgroundOverall'
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
BackgroundOverall,
|
BackgroundOverall,
|
||||||
|
// eslint-disable-next-line
|
||||||
Background,
|
Background,
|
||||||
FilterStyleSelector,
|
FilterStyleSelector,
|
||||||
|
// eslint-disable-next-line
|
||||||
ComponentStyle,
|
ComponentStyle,
|
||||||
ViewTitle,
|
ViewTitle,
|
||||||
slider,
|
slider,
|
||||||
|
@ -71,8 +71,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="de-row-rules">
|
<div class="de-row-rules">
|
||||||
<span>{{
|
<span>{{
|
||||||
positionCheck('appMarket') ? $t('app_template.datasource_info') : $t('datasource.basic_info')
|
positionCheck('appMarket') ? $t('app_template.datasource_info') : $t('datasource.basic_info')
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="historyDsForm"
|
ref="historyDsForm"
|
||||||
@ -802,16 +802,16 @@ export default {
|
|||||||
},
|
},
|
||||||
saveAppMarketHistory() {
|
saveAppMarketHistory() {
|
||||||
this.$refs.historyDsForm.validate(valid => {
|
this.$refs.historyDsForm.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
const appApplyForm = {
|
|
||||||
...this.attachForm,
|
|
||||||
...this.historyDsForm
|
|
||||||
}
|
|
||||||
const method = this.formType === 'add' ? appApply : appEdit
|
|
||||||
this.appApplyMethod(method, appApplyForm)
|
|
||||||
}
|
}
|
||||||
|
const appApplyForm = {
|
||||||
|
...this.attachForm,
|
||||||
|
...this.historyDsForm
|
||||||
|
}
|
||||||
|
const method = this.formType === 'add' ? appApply : appEdit
|
||||||
|
this.appApplyMethod(method, appApplyForm)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
@ -957,10 +957,10 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.positionCheck('appMarket')) {
|
if (this.positionCheck('appMarket')) {
|
||||||
this.$refs.attachParamsForm.validate(valid => {
|
this.$refs.attachParamsForm.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.$refs.dsForm.validate((valid) => {
|
this.$refs.dsForm.validate((valid) => {
|
||||||
@ -1105,10 +1105,10 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.positionCheck('appMarket')) {
|
if (this.positionCheck('appMarket')) {
|
||||||
this.$refs.attachParamsForm.validate(valid => {
|
this.$refs.attachParamsForm.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.$refs.dsForm.validate((valid) => {
|
this.$refs.dsForm.validate((valid) => {
|
||||||
|
@ -265,12 +265,16 @@
|
|||||||
@tab-click="handleClick"
|
@tab-click="handleClick"
|
||||||
>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('datasource.relational_database')"
|
label="OLTP"
|
||||||
name="RDBMS"
|
name="OLTP"
|
||||||
/>
|
/>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('datasource.non_relational_database')"
|
label="OLAP"
|
||||||
name="NORDBMS"
|
name="OLAP"
|
||||||
|
/>
|
||||||
|
<el-tab-pane
|
||||||
|
:label="$t('datasource.data_warehouse_lake')"
|
||||||
|
name="dataWarehouseLake"
|
||||||
/>
|
/>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('datasource.other')"
|
:label="$t('datasource.other')"
|
||||||
@ -281,9 +285,9 @@
|
|||||||
<template v-for="(list, idx) in databaseList">
|
<template v-for="(list, idx) in databaseList">
|
||||||
<div
|
<div
|
||||||
:key="nameMap[idx]"
|
:key="nameMap[idx]"
|
||||||
:class="typeList[idx]"
|
:class="nameMap[idx]"
|
||||||
class="name"
|
class="name"
|
||||||
>{{ $t(`datasource.${nameMap[idx]}`) }}</div>
|
>{{ nameClassMap[idx] }}</div>
|
||||||
<div
|
<div
|
||||||
:key="nameMap[idx] + 'cont'"
|
:key="nameMap[idx] + 'cont'"
|
||||||
class="item-container"
|
class="item-container"
|
||||||
@ -342,14 +346,15 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabActive: 'RDBMS',
|
tabActive: 'OLTP',
|
||||||
databaseList: [],
|
databaseList: [],
|
||||||
currentNodeId: '',
|
currentNodeId: '',
|
||||||
dsTypeRelate: false,
|
dsTypeRelate: false,
|
||||||
expandedArray: [],
|
expandedArray: [],
|
||||||
tData: [],
|
tData: [],
|
||||||
nameMap: ['relational_database', 'non_relational_database', 'other'],
|
nameMap: ['OLTP', 'OLAP', 'dataWarehouseLake', 'OTHER'],
|
||||||
typeList: ['RDBMS', 'NORDBMS', 'OTHER'],
|
nameClassMap: ['OLTP', 'OLAP', this.$t(`datasource.data_warehouse_lake`), this.$t(`datasource.other`)],
|
||||||
|
typeList: [['Db2', 'DM', 'KingBase', 'MariaDB', 'MongoDB', 'Mongodb-BI', 'MySQL', 'Oracle', 'PostgreSQL', 'SQL Server', 'TiDB'], ['Doris', 'Apache Impala', 'ClickHouse', 'Elasticsearch', 'Presto', 'StarRocks'], ['Apache Hive', 'Kylin', 'AWS Redshift', 'Maxcompute'], ['API']],
|
||||||
treeLoading: false,
|
treeLoading: false,
|
||||||
dsTypes: [],
|
dsTypes: [],
|
||||||
dsTypesForDriver: [],
|
dsTypesForDriver: [],
|
||||||
@ -489,9 +494,9 @@ export default {
|
|||||||
datasourceTypes() {
|
datasourceTypes() {
|
||||||
listDatasourceType().then((res) => {
|
listDatasourceType().then((res) => {
|
||||||
this.dsTypes = res.data
|
this.dsTypes = res.data
|
||||||
const databaseList = [[], [], []]
|
const databaseList = [[], [], [], []]
|
||||||
this.dsTypes.forEach((item) => {
|
this.dsTypes.forEach((item) => {
|
||||||
const index = this.typeList.findIndex(ele => ele === item.databaseClassification)
|
const index = this.typeList.findIndex(ele => ele.includes(item.name))
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
databaseList[index].push(item)
|
databaseList[index].push(item)
|
||||||
}
|
}
|
||||||
|
@ -30,12 +30,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="top_banner_card">
|
<el-row class="top_banner_card">
|
||||||
<wizard-card :details="cardList[0]"/>
|
<wizard-card :details="cardList[0]" />
|
||||||
<wizard-card
|
<wizard-card
|
||||||
:details="cardList[1]"
|
:details="cardList[1]"
|
||||||
style="margin:0 24px 0 24px"
|
style="margin:0 24px 0 24px"
|
||||||
/>
|
/>
|
||||||
<wizard-card-enterprise :details="cardList[2]"/>
|
<wizard-card-enterprise :details="cardList[2]" />
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="content_middle">
|
<el-row class="content_middle">
|
||||||
<div class="content_middle_left">
|
<div class="content_middle_left">
|
||||||
@ -44,15 +44,15 @@
|
|||||||
<div class="content_middle_more"><a
|
<div class="content_middle_more"><a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://space.bilibili.com/510493147/channel/collectiondetail?sid=262774"
|
href="https://space.bilibili.com/510493147/channel/collectiondetail?sid=262774"
|
||||||
>{{ $t('wizard.more') }}<i class="el-icon-arrow-right"/></a></div>
|
>{{ $t('wizard.more') }}<i class="el-icon-arrow-right" /></a></div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 12px">
|
<el-row style="margin-top: 12px">
|
||||||
<video-card :details="videoList[0]"/>
|
<video-card :details="videoList[0]" />
|
||||||
<video-card
|
<video-card
|
||||||
style="margin:0 12px 0 12px"
|
style="margin:0 12px 0 12px"
|
||||||
:details="videoList[1]"
|
:details="videoList[1]"
|
||||||
/>
|
/>
|
||||||
<video-card :details="videoList[2]"/>
|
<video-card :details="videoList[2]" />
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_middle_right">
|
<div class="content_middle_right">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<div class="content_middle_more"><a
|
<div class="content_middle_more"><a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://blog.fit2cloud.com/?cat=321"
|
href="https://blog.fit2cloud.com/?cat=321"
|
||||||
>{{ $t('wizard.more') }}<i class="el-icon-arrow-right"/></a></div>
|
>{{ $t('wizard.more') }}<i class="el-icon-arrow-right" /></a></div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<ul class="ul-custom">
|
<ul class="ul-custom">
|
||||||
@ -93,10 +93,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="contact_content">
|
<el-row class="contact_content">
|
||||||
{{ $t('wizard.web') }}<a
|
{{ $t('wizard.web') }}<a
|
||||||
style="text-decoration:underline;"
|
style="text-decoration:underline;"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://www.dataease.io"
|
href="https://www.dataease.io"
|
||||||
>www.dataease.io</a>
|
>www.dataease.io</a>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user