forked from github/dataease
Merge branch 'main' of github.com:dataease/dataease into main
This commit is contained in:
commit
7e4ead4830
@ -7,10 +7,6 @@ DataEase 是开源的数据可视化分析工具,帮助用户分析数据、
|
||||
- 数据引擎: 支持直连模式、本地模式(基于 Apache Doris / Kettle 实现);
|
||||
- 数据连接: 支持关系型数据库、Excel 等文件、Hadoop 等大数据平台、NoSQL 等各种数据源。
|
||||
|
||||
## 功能架构
|
||||
|
||||
![de-architecture](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/de-architecture.png)
|
||||
|
||||
## UI 展示
|
||||
|
||||
![de-ui](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/de-ui.png)
|
||||
@ -39,6 +35,10 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
|
||||
|
||||
![wechat-group](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png)
|
||||
|
||||
## 功能架构
|
||||
|
||||
![de-architecture](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/de-architecture.png)
|
||||
|
||||
## 产品优势
|
||||
|
||||
- 开源开放:零门槛,线上快速获取和安装;快速获取用户反馈、按月发布新版本;
|
||||
|
@ -6,6 +6,10 @@
|
||||
extends="io.dataease.base.mapper.PanelGroupMapper.BaseResultMap">
|
||||
<result column="label" jdbcType="VARCHAR" property="label"/>
|
||||
<result column="privileges" jdbcType="VARCHAR" property="privileges"/>
|
||||
<result column="default_panel_id" jdbcType="VARCHAR" property="defaultPanelId"/>
|
||||
<result column="default_panel_name" jdbcType="VARCHAR" property="defaultPanelName"/>
|
||||
<result column="source_panel_name" jdbcType="VARCHAR" property="sourcePanelName"/>
|
||||
<result column="is_default" property="isDefault"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="panelGroup" resultMap="BaseResultMapDTO">
|
||||
@ -14,32 +18,70 @@
|
||||
|
||||
<select id="panelGroupListDefault" resultMap="BaseResultMapDTO">
|
||||
SELECT
|
||||
id,
|
||||
`name`,
|
||||
pid,
|
||||
`level`,
|
||||
node_type,
|
||||
create_by,
|
||||
create_time,
|
||||
panel_type,
|
||||
`name` AS label
|
||||
from panel_group
|
||||
where panel_group.panel_type=#{panelType}
|
||||
panel_group.id,
|
||||
panel_group.`name`,
|
||||
panel_group.pid,
|
||||
panel_group.`level`,
|
||||
panel_group.node_type,
|
||||
panel_group.create_by,
|
||||
panel_group.create_time,
|
||||
panel_group.panel_type,
|
||||
panel_group.`name` AS label,
|
||||
panel_group.`source`,
|
||||
panel_group.`panel_type`,
|
||||
sourcePanelGroup.`name` as source_panel_name,
|
||||
get_auths(panel_group.id,'panel',#{userId}) as `privileges`
|
||||
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'panel') cids) t,panel_group
|
||||
LEFT JOIN (select id,`name` from panel_group) sourcePanelGroup
|
||||
on sourcePanelGroup.id=panel_group.source
|
||||
<where>
|
||||
FIND_IN_SET(panel_group.id,cids)
|
||||
<if test="name != null">
|
||||
and panel_group.name like CONCAT('%', #{name},'%')
|
||||
</if>
|
||||
<if test="nodeType != null">
|
||||
and panel_group.node_type = #{nodeType}
|
||||
</if>
|
||||
<if test="panelType != null">
|
||||
and panel_group.panel_type = #{panelType}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and panel_group.id = #{id}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and panel_group.pid = #{pid}
|
||||
</if>
|
||||
<if test="level != null">
|
||||
and panel_group.level = #{level}
|
||||
</if>
|
||||
</where>
|
||||
<if test="sort != null">
|
||||
order by ${sort}
|
||||
</if>
|
||||
<if test="sort == null">
|
||||
order by panel_group.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="panelGroupList" resultMap="BaseResultMapDTO">
|
||||
SELECT
|
||||
id,
|
||||
`name`,
|
||||
pid,
|
||||
`level`,
|
||||
node_type,
|
||||
create_by,
|
||||
create_time,
|
||||
panel_type,
|
||||
`name` AS label,
|
||||
get_auths(id,'panel',#{userId}) as `privileges`
|
||||
panel_group.id,
|
||||
panel_group.`name`,
|
||||
panel_group.pid,
|
||||
panel_group.`level`,
|
||||
panel_group.node_type,
|
||||
panel_group.create_by,
|
||||
panel_group.create_time,
|
||||
panel_group.panel_type,
|
||||
panel_group.`name` AS label,
|
||||
panel_group.`node_type`,
|
||||
(case when ISNULL(defaultPanelGroup.id) then false else true end) is_default,
|
||||
defaultPanelGroup.id as default_panel_id,
|
||||
defaultPanelGroup.`name` as default_panel_name,
|
||||
get_auths(panel_group.id,'panel',#{userId}) as `privileges`
|
||||
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'panel') cids) t,panel_group
|
||||
LEFT JOIN (select source,id,`name` from panel_group where source is not null) defaultPanelGroup
|
||||
on defaultPanelGroup.source=panel_group.id
|
||||
<where>
|
||||
FIND_IN_SET(panel_group.id,cids)
|
||||
<if test="name != null">
|
||||
@ -70,6 +112,7 @@
|
||||
</select>
|
||||
|
||||
<delete id="deleteCircle">
|
||||
delete from panel_group where FIND_IN_SET(panel_group.id,GET_PANEL_GROUP_WITH_CHILDREN(#{pid}))
|
||||
delete from panel_group where FIND_IN_SET(panel_group.id,GET_PANEL_GROUP_WITH_CHILDREN(#{pid})) or FIND_IN_SET(panel_group.source,GET_PANEL_GROUP_WITH_CHILDREN(#{pid}))
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -21,6 +21,14 @@ public class PanelGroupDTO extends PanelGroupWithBLOBs implements ITreeBase<Pane
|
||||
|
||||
private String privileges;
|
||||
|
||||
private String defaultPanelId;
|
||||
|
||||
private String defaultPanelName;
|
||||
|
||||
private Boolean isDefault;
|
||||
|
||||
private String sourcePanelName;
|
||||
|
||||
private List<PanelGroupDTO> children = new ArrayList<>();
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class PanelGroupService {
|
||||
public List<PanelGroupDTO> defaultTree(PanelGroupRequest panelGroupRequest) {
|
||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||
panelGroupRequest.setUserId(userId);
|
||||
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupList(panelGroupRequest);
|
||||
List<PanelGroupDTO> panelGroupDTOList = extPanelGroupMapper.panelGroupListDefault(panelGroupRequest);
|
||||
List<PanelGroupDTO> result = TreeUtils.mergeTree(panelGroupDTOList,"default_panel");
|
||||
return result;
|
||||
}
|
||||
@ -132,6 +132,7 @@ public class PanelGroupService {
|
||||
|
||||
public void deleteCircle(String id) {
|
||||
Assert.notNull(id, "id cannot be null");
|
||||
// 同时会删除对应默认仪表盘
|
||||
extPanelGroupMapper.deleteCircle(id);
|
||||
storeService.removeByPanelId(id);
|
||||
shareService.delete(id, null);
|
||||
|
@ -55,15 +55,17 @@ export default {
|
||||
scaleWidth: '100',
|
||||
scaleHeight: '100',
|
||||
timer: null,
|
||||
componentDataShow: []
|
||||
componentDataShow: [],
|
||||
mainWidth: '100%',
|
||||
mainHeight: '100%'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
customStyle() {
|
||||
let style = {
|
||||
margin: 'auto',
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
width: this.mainWidth,
|
||||
height: this.mainHeight
|
||||
}
|
||||
if (this.canvasStyleData.openCommonStyle) {
|
||||
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||
@ -122,6 +124,7 @@ export default {
|
||||
this.scaleHeight = canvasHeight * 100 / parseInt(this.canvasStyleData.height)// 获取高度比
|
||||
if (this.showType === 'width') {
|
||||
this.scaleHeight = this.scaleWidth
|
||||
this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
|
||||
}
|
||||
this.handleScaleChange()
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100vh;">
|
||||
<fullscreen style="background: #ffffff" :fullscreen.sync="fullscreen" @change="fullscreenChange">
|
||||
<fullscreen style="height:100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen" @change="fullscreenChange">
|
||||
<Preview v-if="fullscreen" />
|
||||
</fullscreen>
|
||||
</div>
|
||||
|
@ -375,8 +375,13 @@ export default {
|
||||
let left = 0
|
||||
// 如果档期有计划的组件 坐标取当前组件的加上偏移量
|
||||
if (this.curComponent && !target.className.includes('editor')) {
|
||||
if (this.canvasStyleData.selfAdaption) {
|
||||
top = this.curComponent.style.top * this.scaleHeight / 100 + e.offsetY
|
||||
left = this.curComponent.style.left * this.scaleWidth / 100 + e.offsetX
|
||||
} else {
|
||||
top = this.curComponent.style.top + e.offsetY
|
||||
left = this.curComponent.style.left + e.offsetX
|
||||
}
|
||||
} else {
|
||||
// 计算菜单相对于编辑器的位移
|
||||
top = e.offsetY
|
||||
|
@ -839,7 +839,9 @@ export default {
|
||||
dataset_group: 'Dataset Group',
|
||||
m1: 'Move ',
|
||||
m2: ' To',
|
||||
char_can_not_more_50: 'Dataset name can not more 50'
|
||||
char_can_not_more_50: 'Dataset name can not more 50',
|
||||
task_add_title: 'Add Task',
|
||||
task_edit_title: 'Edit Task'
|
||||
},
|
||||
datasource: {
|
||||
datasource: 'Data Source',
|
||||
@ -989,7 +991,9 @@ export default {
|
||||
border_style_dashed: 'Dashed',
|
||||
select_component: 'Check Component',
|
||||
other_module: 'Other',
|
||||
content: 'Content'
|
||||
content: 'Content',
|
||||
default_panel_name: 'Default Dashboard Name',
|
||||
source_panel_name: 'Source Dashboard Name'
|
||||
},
|
||||
plugin: {
|
||||
local_install: 'Local installation',
|
||||
|
@ -839,7 +839,9 @@ export default {
|
||||
dataset_group: '數據集分組',
|
||||
m1: '將 ',
|
||||
m2: ' 移動到',
|
||||
char_can_not_more_50: '數據集名稱不能超過50個字符'
|
||||
char_can_not_more_50: '數據集名稱不能超過50個字符',
|
||||
task_add_title: '添加任務',
|
||||
task_edit_title: '編輯任務'
|
||||
},
|
||||
datasource: {
|
||||
datasource: '數據源',
|
||||
@ -989,7 +991,9 @@ export default {
|
||||
border_style_dashed: '虚线',
|
||||
select_component: '请选择组件',
|
||||
other_module: '其他',
|
||||
content: '内容'
|
||||
content: '内容',
|
||||
default_panel_name: '默认仪表板名称',
|
||||
source_panel_name: '原仪表板名称'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安裝',
|
||||
|
@ -839,7 +839,9 @@ export default {
|
||||
dataset_group: '数据集分组',
|
||||
m1: '将 ',
|
||||
m2: ' 移动到',
|
||||
char_can_not_more_50: '数据集名称不能超过50个字符'
|
||||
char_can_not_more_50: '数据集名称不能超过50个字符',
|
||||
task_add_title: '添加任务',
|
||||
task_edit_title: '编辑任务'
|
||||
},
|
||||
datasource: {
|
||||
datasource: '数据源',
|
||||
@ -989,7 +991,9 @@ export default {
|
||||
border_style_dashed: '虚线',
|
||||
select_component: '请选择组件',
|
||||
other_module: '其他',
|
||||
content: '内容'
|
||||
content: '内容',
|
||||
default_panel_name: '默认仪表板名称',
|
||||
source_panel_name: '原仪表板名称'
|
||||
},
|
||||
plugin: {
|
||||
local_install: '本地安装',
|
||||
|
@ -87,7 +87,7 @@
|
||||
>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="$t('dataset.task_update')"
|
||||
:title="update_task_dialog_title"
|
||||
:visible="update_task"
|
||||
:show-close="false"
|
||||
width="50%"
|
||||
@ -310,6 +310,7 @@ export default {
|
||||
update_setting: false,
|
||||
update_task: false,
|
||||
show_error_massage: false,
|
||||
update_task_dialog_title: '',
|
||||
error_massage: '',
|
||||
taskForm: {
|
||||
name: '',
|
||||
@ -446,11 +447,15 @@ export default {
|
||||
},
|
||||
addTask(task) {
|
||||
if (!task) {
|
||||
// add
|
||||
this.resetTaskForm()
|
||||
this.taskForm.name = this.table.name + ' ' + this.$t('dataset.task_update')
|
||||
this.taskForm.startTime = new Date()
|
||||
this.update_task_dialog_title = this.$t('dataset.task_add_title')
|
||||
} else {
|
||||
// update
|
||||
this.taskForm = JSON.parse(JSON.stringify(task))
|
||||
this.update_task_dialog_title = this.$t('dataset.task_edit_title')
|
||||
}
|
||||
this.update_task = true
|
||||
},
|
||||
|
@ -28,7 +28,7 @@
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span>
|
||||
<span v-if="data.type==='scene'">
|
||||
<span v-if="data.type==='scene'||data.type==='group'">
|
||||
<el-button
|
||||
icon="el-icon-folder"
|
||||
type="text"
|
||||
|
@ -135,7 +135,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<fullscreen style="height: 100%;background: #f7f8fa" :fullscreen.sync="previewVisible">
|
||||
<fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="previewVisible">
|
||||
<Preview v-if="previewVisible" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
|
||||
</fullscreen>
|
||||
|
||||
|
@ -115,7 +115,7 @@
|
||||
<el-dropdown-item v-if="data.nodeType==='panel'" icon="el-icon-paperclip" :command="beforeClickMore('link',data,node)">
|
||||
{{ $t('panel.create_public_links') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="data.nodeType==='panel'" icon="el-icon-copy-document" :command="beforeClickMore('toDefaultPanel',data,node)">
|
||||
<el-dropdown-item v-if="data.nodeType==='panel'" :disabled="data.isDefault" icon="el-icon-copy-document" :command="beforeClickMore('toDefaultPanel',data,node)">
|
||||
{{ $t('panel.to_default_panel') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-edit-outline" :command="beforeClickMore('rename',data,node)">
|
||||
@ -575,7 +575,9 @@ export default {
|
||||
this.activeTree = data.panelType
|
||||
if (data.nodeType === 'panel') {
|
||||
// 加载视图数据
|
||||
findOne(data.id).then(response => {
|
||||
// 如果是默认仪表盘 需要查询原仪表板的详细数据
|
||||
const queryPanelId = data.panelType === 'system' ? data.source : data.id
|
||||
findOne(queryPanelId).then(response => {
|
||||
const componentDatas = JSON.parse(response.data.panelData)
|
||||
componentDatas.forEach(item => {
|
||||
item.filters = (item.filters || [])
|
||||
|
@ -55,7 +55,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('panel/setMainActiveName', 'PanelMain')
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
@ -74,7 +74,17 @@ export default {
|
||||
refreshEnshrine() {
|
||||
this.showEnshrine = false
|
||||
this.$nextTick(() => (this.showEnshrine = true))
|
||||
},
|
||||
clear() {
|
||||
// 清空
|
||||
this.$store.dispatch('panel/setPanelInfo', {
|
||||
id: null,
|
||||
name: '',
|
||||
preStyle: null
|
||||
})
|
||||
this.$store.dispatch('panel/setMainActiveName', 'PanelMain')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -6,6 +6,9 @@
|
||||
<div style="border-bottom: 1px solid #dfe4ed;height: 100%;">
|
||||
<el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px">
|
||||
<span>{{ panelInfo.name || '测试仪表板' }}</span>
|
||||
|
||||
<span v-if="panelInfo.isDefault" style="color: green;font-size: 12px">({{ $t('panel.default_panel_name') }}:{{ panelInfo.defaultPanelName }})</span>
|
||||
<span v-if="panelInfo.sourcePanelName" style="color: green;font-size: 12px">({{ $t('panel.source_panel_name') }}:{{ panelInfo.sourcePanelName }})</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span v-if="hasDataPermission('export',panelInfo.privileges)" style="float: right;margin-right: 10px">
|
||||
@ -47,7 +50,7 @@
|
||||
<!-- 仪表板预览区域-->
|
||||
<el-row class="panel-design-preview">
|
||||
<div ref="imageWrapper" style="width: 100%;height: 100%">
|
||||
<fullscreen style="height: 100%;background: #f7f8fa" :fullscreen.sync="fullscreen">
|
||||
<fullscreen style="height: 100%;background: #f7f8fa;overflow-y: auto" :fullscreen.sync="fullscreen">
|
||||
<Preview v-if="showMain" :show-type="canvasStyleData.selfAdaption?'full':'width'" />
|
||||
</fullscreen>
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<el-table-column prop="type" :label="$t('datasource.type')">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type ==='mysql'">MySQL</span>
|
||||
<span v-if="scope.row.type ==='sqlserver'">SQL Server</span>
|
||||
<span v-if="scope.row.type ==='sqlServer'">SQL Server</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<fu-table-operations :buttons="buttons" :label="$t('commons.operating')" fix />
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
field: 'type',
|
||||
label: this.$t('datasource.type'),
|
||||
component: 'FuComplexSelect',
|
||||
options: [{ label: 'mysql', value: 'mysql' }, { label: 'sqlServer', value: 'sqlServer' }],
|
||||
options: [{ label: 'MySQL', value: 'mysql' }, { label: 'SQL Server', value: 'sqlServer' }],
|
||||
multiple: false
|
||||
}
|
||||
// { field: 'deptId', label: '组织', component: conditionTable }
|
||||
|
Loading…
Reference in New Issue
Block a user