Merge branch 'dev' into pr@dev_dataset_source
BIN
frontend/src/assets/datasource/StarRocks.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
frontend/src/assets/datasource/TiDB.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
frontend/src/assets/datasource/api.jpg
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
frontend/src/assets/datasource/ck.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/src/assets/datasource/db2.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
frontend/src/assets/datasource/ds_doris.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/src/assets/datasource/es.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
frontend/src/assets/datasource/hive.jpg
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
frontend/src/assets/datasource/impala.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
frontend/src/assets/datasource/mariadb.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
frontend/src/assets/datasource/mongo.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
frontend/src/assets/datasource/mysql.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
frontend/src/assets/datasource/oracle.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
frontend/src/assets/datasource/pg.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
frontend/src/assets/datasource/redshift.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
frontend/src/assets/datasource/sqlServel.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div @mousedown="fieldsAreaDown">
|
||||
<el-button v-for="(field) in fields" :key="field.id" size="mini" class="field-area" @click="fieldSelect(field)">
|
||||
<el-button v-for="(field) in fields" :title="field.name" :key="field.id" size="mini" class="field-area" @click="fieldSelect(field)">
|
||||
{{ field.name }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -51,6 +51,9 @@ export default {
|
||||
margin: 4px 0 0 0;
|
||||
text-align: left;
|
||||
margin-left: 0px!important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -69,6 +69,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
initReady: false,
|
||||
editReady: false,
|
||||
editShow: true,
|
||||
canEdit: false,
|
||||
// 初始化配置
|
||||
@@ -109,6 +110,9 @@ export default {
|
||||
// 监听内容变化
|
||||
active(val) {
|
||||
if (!val) {
|
||||
if (this.canEdit) {
|
||||
this.element.propValue.textValue = this.myValue
|
||||
}
|
||||
this.canEdit = false
|
||||
this.reShow()
|
||||
this.myValue = this.assignment(this.element.propValue.textValue)
|
||||
@@ -117,9 +121,6 @@ export default {
|
||||
}
|
||||
},
|
||||
myValue(newValue) {
|
||||
if (this.canEdit) {
|
||||
this.element.propValue.textValue = newValue
|
||||
}
|
||||
this.initReady&&this.$store.commit('canvasChange')
|
||||
}
|
||||
},
|
||||
@@ -195,6 +196,8 @@ export default {
|
||||
this.canEdit = true
|
||||
this.element['editing'] = true
|
||||
this.myValue = this.element.propValue.textValue
|
||||
const ed = tinymce.editors[this.tinymceId]
|
||||
ed.setContent(this.myValue)
|
||||
this.reShow()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -141,6 +141,7 @@ import { viewEditSave, viewPropsSave } from '@/api/chart/chart'
|
||||
import { checkAddHttp } from '@/utils/urlUtils'
|
||||
import DeRichTextView from '@/components/canvas/custom-component/DeRichTextView'
|
||||
import Vue from 'vue'
|
||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||
|
||||
export default {
|
||||
name: 'UserView',
|
||||
@@ -654,6 +655,21 @@ export default {
|
||||
return pre
|
||||
}, {})
|
||||
const rowData = chartDetails.data.tableRow[0]
|
||||
if(chartDetails.type === 'richTextView'){
|
||||
let yAxis = []
|
||||
try {
|
||||
yAxis = JSON.parse(chartDetails.yaxis)
|
||||
} catch (err) {
|
||||
yAxis = JSON.parse(JSON.stringify(chartDetails.yaxis))
|
||||
}
|
||||
let yDataeaseNames = []
|
||||
let yDataeaseNamesCfg = []
|
||||
yAxis.forEach(yItem => {
|
||||
yDataeaseNames.push(yItem.dataeaseName)
|
||||
yDataeaseNamesCfg[yItem.dataeaseName]=yItem.formatterCfg
|
||||
})
|
||||
this.rowDataFormat(rowData,yDataeaseNames,yDataeaseNamesCfg)
|
||||
}
|
||||
for (const key in rowData) {
|
||||
this.dataRowSelect[nameIdMap[key]] = rowData[key]
|
||||
this.dataRowNameSelect[sourceFieldNameIdMap[key]] = rowData[key]
|
||||
@@ -666,6 +682,25 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
rowDataFormat(rowData,yDataeaseNames,yDataeaseNamesCfg) {
|
||||
for (const key in rowData) {
|
||||
if(yDataeaseNames.includes(key)){
|
||||
let formatterCfg = yDataeaseNamesCfg[key]
|
||||
let value = rowData[key]
|
||||
if (value === null || value === undefined) {
|
||||
rowData[key] = '-'
|
||||
}
|
||||
if (formatterCfg) {
|
||||
const v = valueFormatter(value, formatterCfg)
|
||||
rowData[key] = v.includes('NaN') ? value : v
|
||||
} else {
|
||||
const v = valueFormatter(value, formatterItem)
|
||||
rowData[key] = v.includes('NaN') ? value : v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
viewIdMatch(viewIds, viewId) {
|
||||
return !viewIds || viewIds.length === 0 || viewIds.includes(viewId)
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<el-dropdown-item :command="beforeSort('none')">{{ $t('chart.none') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeSort('asc')">{{ $t('chart.asc') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeSort('desc')">{{ $t('chart.desc') }}</el-dropdown-item>
|
||||
<el-dropdown-item v-show="!item.chartId && (item.deType === 0 || item.deType === 5)" :command="beforeSort('custom_sort')">{{ $t('chart.custom_sort') }}...</el-dropdown-item>
|
||||
<el-dropdown-item v-show="!item.chartId" :command="beforeSort('custom_sort')">{{ $t('chart.custom_sort') }}...</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template xmlns:el-col="http://www.w3.org/1999/html">
|
||||
<el-col class="tree-style">
|
||||
<el-col>
|
||||
<el-row class="title-css" v-show="showView === 'Datasource'">
|
||||
<el-row v-show="showView === 'Datasource'" class="title-css">
|
||||
<el-col class="title-text" :span="12">
|
||||
{{ $t('commons.datasource') }}
|
||||
</el-col>
|
||||
@@ -13,10 +13,10 @@
|
||||
placement="top"
|
||||
>
|
||||
<i
|
||||
@click="driverMgm"
|
||||
v-show="user.isAdmin"
|
||||
class="el-icon-setting"
|
||||
></i>
|
||||
@click="driverMgm"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
@@ -24,7 +24,7 @@
|
||||
:content="$t('datasource.create')"
|
||||
placement="top"
|
||||
>
|
||||
<i @click="addFolder" class="el-icon-plus"></i>
|
||||
<i class="el-icon-plus" @click="addFolder" />
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -54,8 +54,8 @@
|
||||
<span
|
||||
v-if="
|
||||
data.type !== 'folder' &&
|
||||
data.status !== 'Error' &&
|
||||
data.status !== 'Warning'
|
||||
data.status !== 'Error' &&
|
||||
data.status !== 'Warning'
|
||||
"
|
||||
>
|
||||
<svg-icon
|
||||
@@ -87,8 +87,8 @@
|
||||
"
|
||||
>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
v-if="['Error', 'Warning'].includes(data.status)"
|
||||
effect="dark"
|
||||
:content="
|
||||
data.status === 'Warning'
|
||||
? $t('datasource.warning')
|
||||
@@ -107,8 +107,8 @@
|
||||
</span>
|
||||
<span class="child">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
v-if="data.type === 'folder'"
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="
|
||||
$t(
|
||||
@@ -120,10 +120,10 @@
|
||||
placement="top"
|
||||
>
|
||||
<i
|
||||
class="el-icon-plus"
|
||||
@click.stop
|
||||
@click="addFolderWithType(data)"
|
||||
class="el-icon-plus"
|
||||
></i>
|
||||
/>
|
||||
</el-tooltip>
|
||||
|
||||
<el-dropdown
|
||||
@@ -132,15 +132,15 @@
|
||||
trigger="click"
|
||||
@command="(type) => handleCommand(type, data)"
|
||||
>
|
||||
<i @click.stop class="el-icon-more"></i>
|
||||
<el-dropdown-menu class="de-card-dropdown" slot="dropdown">
|
||||
<i class="el-icon-more" @click.stop />
|
||||
<el-dropdown-menu slot="dropdown" class="de-card-dropdown">
|
||||
<slot>
|
||||
<el-dropdown-item command="edit">
|
||||
<i class="el-icon-edit"></i>
|
||||
<i class="el-icon-edit" />
|
||||
{{ $t('chart.edit') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="delete">
|
||||
<i class="el-icon-delete"></i>
|
||||
<i class="el-icon-delete" />
|
||||
{{ $t('chart.delete') }}
|
||||
</el-dropdown-item>
|
||||
</slot>
|
||||
@@ -192,13 +192,16 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.description')">
|
||||
<deTextarea v-model="driverForm.desc"></deTextarea>
|
||||
<deTextarea v-model="driverForm.desc" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<deBtn secondary @click="close()">{{ $t('commons.cancel') }}</deBtn>
|
||||
<deBtn type="primary" size="mini" @click="saveDriver(driverForm)"
|
||||
>{{ $t('commons.save') }}
|
||||
<deBtn
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="saveDriver(driverForm)"
|
||||
>{{ $t('commons.save') }}
|
||||
</deBtn>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -212,32 +215,34 @@
|
||||
append-to-body
|
||||
>
|
||||
<el-tabs v-model="tabActive">
|
||||
<el-tab-pane :label="$t('datasource.all')" name="all"> </el-tab-pane>
|
||||
<el-tab-pane :label="$t('datasource.all')" name="all" />
|
||||
<el-tab-pane
|
||||
:label="$t('datasource.relational_database')"
|
||||
name="RDBMS"
|
||||
>
|
||||
</el-tab-pane>
|
||||
/>
|
||||
<el-tab-pane
|
||||
:label="$t('datasource.non_relational_database')"
|
||||
name="NORDBMS"
|
||||
>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('datasource.other')" name="OTHER">
|
||||
</el-tab-pane>
|
||||
/>
|
||||
<el-tab-pane :label="$t('datasource.other')" name="OTHER" />
|
||||
</el-tabs>
|
||||
<div class="db-container">
|
||||
<div
|
||||
@click="addDb(db)"
|
||||
v-for="(db, index) in databaseList"
|
||||
:key="db.type"
|
||||
class="db-card"
|
||||
:class="[{ marLeft: index % 4 === 0 }]"
|
||||
@click="addDb(db)"
|
||||
>
|
||||
<img
|
||||
src="https://gimg3.baidu.com/search/src=http%3A%2F%2Fgips0.baidu.com%2Fit%2Fu%3D3429312337%2C2430696955%26fm%3D3030%26app%3D3030%26f%3DJPEG%3Fw%3D121%26h%3D74%26s%3D51321C7281B1598818E875C1030010B0&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f242,150&n=0&g=0n&q=100&fmt=auto?sec=1662483600&t=53d1d1fe51561bb626c94ce63b5b31b8"
|
||||
v-if="!db.isPlugin"
|
||||
:src="require('../../../assets/datasource/' + db.type + '.jpg')"
|
||||
alt=""
|
||||
/>
|
||||
>
|
||||
<img
|
||||
v-if="db.isPlugin"
|
||||
:src="`/api/pluginCommon/staticInfo/${db.type}/jpg`"
|
||||
>
|
||||
<p class="db-name">{{ db.name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -259,13 +264,12 @@ import {
|
||||
listDriverByType,
|
||||
updateDriver
|
||||
} from '@/api/system/datasource'
|
||||
import { ApplicationContext } from '@/utils/ApplicationContext'
|
||||
import deTextarea from '@/components/deCustomCm/deTextarea.vue'
|
||||
import msgCfm from '@/components/msgCfm'
|
||||
export default {
|
||||
name: 'DsTree',
|
||||
mixins: [msgCfm],
|
||||
components: { deTextarea },
|
||||
mixins: [msgCfm],
|
||||
props: {
|
||||
datasource: {
|
||||
type: Object,
|
||||
@@ -502,7 +506,7 @@ export default {
|
||||
},
|
||||
showInfo(row) {
|
||||
if (this.showView === 'Driver') {
|
||||
const param = { ...row.data, ...{ showModel: 'show' } }
|
||||
const param = { ...row.data, ...{ showModel: 'show' }}
|
||||
this.switchMain(
|
||||
this.showView === 'Datasource' ? 'DsForm' : 'DriverForm',
|
||||
param,
|
||||
@@ -527,7 +531,7 @@ export default {
|
||||
},
|
||||
_handleEditer(row) {
|
||||
if (this.showView === 'Datasource') {
|
||||
const param = { ...row, ...{ showModel: 'show' } }
|
||||
const param = { ...row, ...{ showModel: 'show' }}
|
||||
this.switchMain('DsForm', param, this.tData, this.dsTypes)
|
||||
return
|
||||
}
|
||||
@@ -716,4 +720,4 @@ export default {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -149,8 +149,7 @@ export default {
|
||||
message: this.$t('member.password_format_is_incorrect'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
roleIds: [{ required: true, message: this.$t('user.input_roles'), trigger: 'change' }]
|
||||
]
|
||||
|
||||
},
|
||||
defaultForm: { id: null, username: null, nickName: null, gender: '男', email: null, enabled: 1, deptId: null, phone: null, roleIds: [] },
|
||||
|
||||