Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
2d749d76
提交
2d749d76
authored
6月 24, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
21b98098
fe13a2e5
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
73 行增加
和
32 行删除
+73
-32
AuthUserServiceImpl.java
...va/io/dataease/auth/service/impl/AuthUserServiceImpl.java
+2
-14
DynamicMenuServiceImpl.java
...io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
+16
-0
DorisQueryProvider.java
...n/java/io/dataease/provider/doris/DorisQueryProvider.java
+4
-0
MysqlQueryProvider.java
...n/java/io/dataease/provider/mysql/MysqlQueryProvider.java
+4
-0
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+1
-1
dataset.js
frontend/src/api/dataset/dataset.js
+3
-2
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+4
-4
en.js
frontend/src/lang/en.js
+1
-0
tw.js
frontend/src/lang/tw.js
+0
-0
zh.js
frontend/src/lang/zh.js
+2
-1
permission.js
frontend/src/store/modules/permission.js
+9
-0
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+10
-1
Group.vue
frontend/src/views/dataset/group/Group.vue
+4
-4
index.vue
frontend/src/views/panel/SubjectSetting/index.vue
+4
-4
DsTree.vue
frontend/src/views/system/datasource/DsTree.vue
+9
-1
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/AuthUserServiceImpl.java
浏览文件 @
2d749d76
package
io
.
dataease
.
auth
.
service
.
impl
;
import
com.google.gson.Gson
;
import
io.dataease.auth.api.dto.CurrentRoleDto
;
import
io.dataease.auth.entity.SysUserEntity
;
import
io.dataease.base.domain.SysUser
;
...
...
@@ -34,7 +33,7 @@ public class AuthUserServiceImpl implements AuthUserService {
@Resource
private
SysUserMapper
sysUserMapper
;
@Resource
private
ExtPluginSysMenuMapper
extPluginSysMenuMapper
;
private
DynamicMenuServiceImpl
dynamicMenuService
;
/**
* 此处需被F2CRealm登录认证调用 也就是说每次请求都会被调用 所以最好加上缓存
...
...
@@ -66,7 +65,7 @@ public class AuthUserServiceImpl implements AuthUserService {
@Override
public
List
<
String
>
permissions
(
Long
userId
){
// 用户登录获取菜单权限时同时更新插件菜单表
this
.
syncPluginMenu
();
dynamicMenuService
.
syncPluginMenu
();
List
<
String
>
permissions
;
SysUser
sysUser
=
sysUserMapper
.
selectByPrimaryKey
(
userId
);
if
(
sysUser
.
getIsAdmin
()!=
null
&&
sysUser
.
getIsAdmin
()){
...
...
@@ -103,15 +102,4 @@ public class AuthUserServiceImpl implements AuthUserService {
LogUtil
.
info
(
"正在清除用户缓存【{}】"
,
userId
);
}
@Transactional
public
void
syncPluginMenu
()
{
List
<
PluginSysMenu
>
pluginSysMenuList
=
PluginUtils
.
pluginMenus
();
int
i
=
extPluginSysMenuMapper
.
deletePluginMenu
();
LogUtil
.
info
(
"删除插件菜单记录数{}"
,
i
);
if
(
CollectionUtils
.
isNotEmpty
(
pluginSysMenuList
)){
LogUtil
.
info
(
"待插入插件菜单记录是"
+
new
Gson
().
toJson
(
pluginSysMenuList
));
extPluginSysMenuMapper
.
savePluginMenu
(
pluginSysMenuList
);
}
}
}
backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
浏览文件 @
2d749d76
...
...
@@ -6,11 +6,15 @@ import io.dataease.auth.service.DynamicMenuService;
import
io.dataease.base.domain.SysMenu
;
import
io.dataease.base.domain.SysMenuExample
;
import
io.dataease.base.mapper.SysMenuMapper
;
import
io.dataease.base.mapper.ext.ExtPluginSysMenuMapper
;
import
io.dataease.plugins.common.dto.PluginSysMenu
;
import
io.dataease.plugins.util.PluginUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -22,6 +26,9 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
@Autowired
(
required
=
false
)
private
SysMenuMapper
sysMenuMapper
;
@Resource
private
ExtPluginSysMenuMapper
extPluginSysMenuMapper
;
@Override
public
List
<
DynamicMenuDto
>
load
(
String
userId
)
{
SysMenuExample
sysMenuExample
=
new
SysMenuExample
();
...
...
@@ -109,4 +116,13 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
private
Boolean
isParent
(
Long
pid
){
return
null
==
pid
||
pid
==
0L
;
}
@Transactional
public
void
syncPluginMenu
()
{
List
<
PluginSysMenu
>
pluginSysMenuList
=
PluginUtils
.
pluginMenus
();
extPluginSysMenuMapper
.
deletePluginMenu
();
if
(
CollectionUtils
.
isNotEmpty
(
pluginSysMenuList
)){
extPluginSysMenuMapper
.
savePluginMenu
(
pluginSysMenuList
);
}
}
}
backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java
浏览文件 @
2d749d76
...
...
@@ -6,6 +6,7 @@ import io.dataease.dto.chart.ChartCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
...
...
@@ -366,6 +367,9 @@ public class DorisQueryProvider extends QueryProvider {
for
(
ChartCustomFilterDTO
request
:
requestList
)
{
String
value
=
request
.
getValue
();
DatasetTableField
field
=
request
.
getField
();
if
(
ObjectUtils
.
isEmpty
(
field
))
{
continue
;
}
if
(
field
.
getDeType
()
==
1
&&
field
.
getDeExtractType
()
!=
1
)
{
filter
.
append
(
" AND FROM_UNIXTIME(cast("
)
.
append
(
field
.
getDataeaseName
())
...
...
backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java
浏览文件 @
2d749d76
...
...
@@ -6,6 +6,7 @@ import io.dataease.dto.chart.ChartCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
...
...
@@ -374,6 +375,9 @@ public class MysqlQueryProvider extends QueryProvider {
for
(
ChartCustomFilterDTO
request
:
requestList
)
{
String
value
=
request
.
getValue
();
DatasetTableField
field
=
request
.
getField
();
if
(
ObjectUtils
.
isEmpty
(
field
))
{
continue
;
}
if
(
field
.
getDeType
()
==
1
&&
field
.
getDeExtractType
()
!=
1
)
{
filter
.
append
(
" AND FROM_UNIXTIME(cast("
)
.
append
(
field
.
getOriginName
())
...
...
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
2d749d76
...
...
@@ -261,4 +261,4 @@ i18n_custom_ds_delete=自定義數據集所關聯數據被刪除,無法正常
i18n_sql_add_not_matching
=
增量添加 sql 的數據列與數據集不匹配,
i18n_sql_delete_not_matching
=
增量刪除 sql 的數據列與數據集不匹配,
i18n_cst_ds_tb_or_field_deleted
=
自定義數據集所關聯數據被刪除或字段發生變化,無法正常顯示
i18n_no_all_delete_privilege_folder
=
该目录下存在没有管理权限或查看权限的资源,无法删
除
i18n_no_all_delete_privilege_folder
=
該目錄下存在沒有管理權限或查看權限的資源,無法刪
除
frontend/src/api/dataset/dataset.js
浏览文件 @
2d749d76
...
...
@@ -68,11 +68,12 @@ export function listDatasource() {
})
}
export
function
getTable
(
id
)
{
export
function
getTable
(
id
,
hideMsg
=
false
)
{
return
request
({
url
:
'/dataset/table/get/'
+
id
,
loading
:
true
,
method
:
'post'
method
:
'post'
,
hideMsg
:
hideMsg
})
}
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
2d749d76
...
...
@@ -3,13 +3,13 @@
<div
class=
"toolbar"
>
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
<el-switch
v-model=
"canvasStyleData.auxiliaryMatrix"
:width=
"35"
label=
"矩阵设计"
name=
"auxiliaryMatrix"
/>
<span>
矩阵设计
</span>
<el-switch
v-model=
"canvasStyleData.auxiliaryMatrix"
:width=
"35"
name=
"auxiliaryMatrix"
/>
<span>
{{
$t
(
'panel.matrix_design'
)
}}
</span>
</div>
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
<el-switch
v-model=
"canvasStyleData.selfAdaption"
:width=
"35"
label=
"自适应画布区域"
name=
"selfAdaption"
/>
<span>
自适应画布区域
</span>
<el-switch
v-model=
"canvasStyleData.selfAdaption"
:width=
"35"
name=
"selfAdaption"
/>
<span>
{{
$t
(
'panel.canvas_self_adaption'
)
}}
</span>
</div>
<div
class=
"canvas-config"
style=
"margin-right: 55px"
>
...
...
frontend/src/lang/en.js
浏览文件 @
2d749d76
...
...
@@ -999,6 +999,7 @@ export default {
default_panel_name
:
'Default Dashboard Name'
,
source_panel_name
:
'Source Dashboard Name'
,
content_style
:
'Content Style'
,
canvas_self_adaption
:
'Canvas Self Adaption'
},
plugin
:
{
local_install
:
'Local installation'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
2d749d76
差异被折叠。
点击展开。
frontend/src/lang/zh.js
浏览文件 @
2d749d76
...
...
@@ -998,7 +998,8 @@ export default {
content
:
'内容'
,
default_panel_name
:
'默认仪表板名称'
,
source_panel_name
:
'原仪表板名称'
,
content_style
:
'内容样式'
content_style
:
'内容样式'
,
canvas_self_adaption
:
'自适应画布区域'
},
plugin
:
{
local_install
:
'本地安装'
,
...
...
frontend/src/store/modules/permission.js
浏览文件 @
2d749d76
...
...
@@ -53,6 +53,7 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由
router
.
component
=
loadView
(
component
)
}
}
router
.
name
&&
fillMeta
(
router
)
if
(
router
.
children
&&
router
.
children
.
length
)
{
router
.
children
=
filterAsyncRouter
(
router
.
children
)
}
...
...
@@ -66,6 +67,14 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由
})
}
// 后台设计时未考虑activeMenu字段 这里先前端处理一下
export
const
fillMeta
=
(
router
)
=>
{
router
.
name
.
includes
(
'system-user-form'
)
&&
(
router
.
meta
.
activeMenu
=
'/system/user'
)
router
.
name
.
includes
(
'system-role-form'
)
&&
(
router
.
meta
.
activeMenu
=
'/system/role'
)
router
.
name
.
includes
(
'system-dept-form'
)
&&
(
router
.
meta
.
activeMenu
=
'/system/dept'
)
// return router
}
// 包装一层父级目录
export
const
decorate
=
(
router
)
=>
{
const
parent
=
{
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
2d749d76
<
template
>
<el-row
style=
"height: 100%;overflow-y: hidden;width: 100%;"
>
<span
v-show=
"false"
>
{{
tableRefresh
}}
</span>
<el-row
style=
"height: 26px;"
>
<el-popover
placement=
"right-start"
...
...
@@ -92,6 +93,12 @@ export default {
tabStatus
:
false
}
},
computed
:
{
tableRefresh
()
{
this
.
initTable
(
this
.
param
)
return
this
.
$store
.
state
.
dataset
.
table
}
},
watch
:
{
'param'
:
function
()
{
this
.
initTable
(
this
.
param
)
...
...
@@ -107,9 +114,11 @@ export default {
if
(
id
!==
null
)
{
this
.
fields
=
[]
this
.
data
=
[]
getTable
(
id
).
then
(
response
=>
{
getTable
(
id
,
true
).
then
(
response
=>
{
this
.
table
=
response
.
data
this
.
initPreviewData
(
this
.
page
)
}).
catch
(
res
=>
{
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
})
}
},
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
2d749d76
...
...
@@ -561,8 +561,8 @@ export default {
// this.tableTree()
this
.
refreshNodeBy
(
table
.
sceneId
)
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
n
ull
)
// this.$emit('switchComponent', { name: 'ViewTable', param: table.id
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
n
ew
Date
().
getTime
()
)
})
}
else
{
// this.$message({
...
...
@@ -609,8 +609,8 @@ export default {
// this.tableTree()
this
.
refreshNodeBy
(
data
.
sceneId
)
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
n
ull
)
//
this.$emit('switchComponent', { name: '' })
this
.
$store
.
dispatch
(
'dataset/setTable'
,
n
ew
Date
().
getTime
()
)
})
}).
catch
(()
=>
{
})
...
...
frontend/src/views/panel/SubjectSetting/index.vue
浏览文件 @
2d749d76
...
...
@@ -20,14 +20,14 @@
<background-color-selector
v-if=
"chart"
class=
"attr-selector"
:chart=
"chart"
@
onChangeBackgroundForm=
"onChangeBackgroundForm"
/>
</el-row>
</el-collapse-item>
<el-collapse-item
:title=
"$t('
chart.shape_attr')"
name=
"graphical
"
>
<el-collapse-item
:title=
"$t('
panel.table')"
name=
"table
"
>
<el-row
style=
"background-color: #f7f8fa; margin: 5px"
>
<color-selector
:source-type=
"'panelEchart'"
class=
"attr-selector"
:chart=
"chart"
@
onColorChange=
"on
ColorChange"
/>
<color-selector
index=
"10002"
:source-type=
"'panelTable'"
class=
"attr-selector"
:chart=
"tableChart"
@
onColorChange=
"onTable
ColorChange"
/>
</el-row>
</el-collapse-item>
<el-collapse-item
:title=
"$t('
panel.table')"
name=
"table
"
>
<el-collapse-item
:title=
"$t('
chart.shape_attr')"
name=
"graphical
"
>
<el-row
style=
"background-color: #f7f8fa; margin: 5px"
>
<color-selector
index=
"10002"
:source-type=
"'panelTable'"
class=
"attr-selector"
:chart=
"tableChart"
@
onColorChange=
"onTable
ColorChange"
/>
<color-selector
:source-type=
"'panelEchart'"
class=
"attr-selector"
:chart=
"chart"
@
onColorChange=
"on
ColorChange"
/>
</el-row>
</el-collapse-item>
</el-collapse>
...
...
frontend/src/views/system/datasource/DsTree.vue
浏览文件 @
2d749d76
...
...
@@ -141,7 +141,7 @@ export default {
if
(
!
(
element
.
type
in
types
))
{
types
[
element
.
type
]
=
[]
// newArr.push(...element, ...{ children: types[element.type] })
newArr
.
push
({
id
:
element
.
type
,
name
:
element
.
type
,
type
:
'folder'
,
children
:
types
[
element
.
type
]
})
newArr
.
push
({
id
:
element
.
type
,
name
:
this
.
transTypeToName
(
element
.
type
)
,
type
:
'folder'
,
children
:
types
[
element
.
type
]
})
}
types
[
element
.
type
].
push
(
element
)
// newArr.children.push({ id: element.id, label: element.name })
...
...
@@ -149,6 +149,14 @@ export default {
return
newArr
},
transTypeToName
(
type
)
{
if
(
type
===
'mysql'
)
{
return
'MySQL'
}
else
if
(
type
===
'sqlServer'
)
{
return
'SQL Server'
}
},
addFolder
()
{
this
.
switchMain
(
'DsForm'
)
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论