Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
e9c5201d
Unverified
提交
e9c5201d
authored
7月 28, 2021
作者:
XiaJunjie2020
提交者:
GitHub
7月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #366 from dataease/pr@v1.1@fix_过滤器多条件问题;视图编辑字段问题
fix: 过滤器多条件问题;视图编辑字段问题
上级
d80754f8
e33032a2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
53 行增加
和
28 行删除
+53
-28
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+21
-25
AddCustom.vue
frontend/src/views/dataset/add/AddCustom.vue
+14
-2
AddSQL.vue
frontend/src/views/dataset/add/AddSQL.vue
+15
-0
FieldEdit.vue
frontend/src/views/dataset/data/FieldEdit.vue
+3
-1
没有找到文件。
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
e9c5201d
...
...
@@ -136,33 +136,29 @@ public class ChartViewService {
}.
getType
());
List
<
ChartFieldCustomFilterDTO
>
fieldCustomFilter
=
new
Gson
().
fromJson
(
view
.
getCustomFilter
(),
new
TypeToken
<
List
<
ChartFieldCustomFilterDTO
>>()
{
}.
getType
());
List
<
ChartCustomFilterDTO
>
customFilter
=
fieldCustomFilter
.
stream
().
map
(
ele
->
{
ChartCustomFilterDTO
dto
=
new
ChartCustomFilterDTO
();
ele
.
getFilter
().
forEach
(
f
->
{
List
<
ChartCustomFilterDTO
>
customFilter
=
new
ArrayList
<>();
for
(
ChartFieldCustomFilterDTO
ele
:
fieldCustomFilter
)
{
List
<
ChartCustomFilterDTO
>
collect
=
ele
.
getFilter
().
stream
().
map
(
f
->
{
ChartCustomFilterDTO
dto
=
new
ChartCustomFilterDTO
();
BeanUtils
.
copyBean
(
dto
,
f
);
dto
.
setField
(
dataSetTableFieldsService
.
get
(
f
.
getFieldId
()));
});
return
dto
;
}).
collect
(
Collectors
.
toList
());
// if (StringUtils.equalsIgnoreCase("text", view.getType()) || StringUtils.equalsIgnoreCase("gauge", view.getType())) {
// xAxis = new ArrayList<>();
// if (CollectionUtils.isEmpty(yAxis)) {
// ChartViewDTO dto = new ChartViewDTO();
// BeanUtils.copyBean(dto, view);
// return dto;
// }
// } else {
// if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis)) {
// ChartViewDTO dto = new ChartViewDTO();
// BeanUtils.copyBean(dto, view);
// return dto;
// }
// }
if
(
CollectionUtils
.
isEmpty
(
xAxis
)
&&
CollectionUtils
.
isEmpty
(
yAxis
))
{
ChartViewDTO
dto
=
new
ChartViewDTO
();
BeanUtils
.
copyBean
(
dto
,
view
);
return
dto
;
return
dto
;
}).
collect
(
Collectors
.
toList
());
customFilter
.
addAll
(
collect
);
}
if
(
StringUtils
.
equalsIgnoreCase
(
"text"
,
view
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
"gauge"
,
view
.
getType
()))
{
xAxis
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
yAxis
))
{
ChartViewDTO
dto
=
new
ChartViewDTO
();
BeanUtils
.
copyBean
(
dto
,
view
);
return
dto
;
}
}
else
{
if
(
CollectionUtils
.
isEmpty
(
xAxis
)
&&
CollectionUtils
.
isEmpty
(
yAxis
))
{
ChartViewDTO
dto
=
new
ChartViewDTO
();
BeanUtils
.
copyBean
(
dto
,
view
);
return
dto
;
}
}
// 过滤来自仪表板的条件
...
...
frontend/src/views/dataset/add/AddCustom.vue
浏览文件 @
e9c5201d
...
...
@@ -88,6 +88,11 @@ export default {
}
},
watch
:
{
'param.tableId'
:
{
handler
:
function
()
{
this
.
resetComponent
()
}
},
'checkedList'
:
function
()
{
// console.log(this.checkedList)
this
.
getUnionData
()
...
...
@@ -239,8 +244,15 @@ export default {
}
},
dataReset
()
{
resetComponent
()
{
this
.
name
=
'自定义数据集'
this
.
table
=
{}
this
.
checkedList
=
[]
this
.
unionData
=
[]
this
.
height
=
500
this
.
data
=
[]
this
.
fields
=
[]
this
.
customType
=
[
'db'
,
'sql'
,
'excel'
]
}
}
...
...
frontend/src/views/dataset/add/AddSQL.vue
浏览文件 @
e9c5201d
...
...
@@ -163,6 +163,7 @@ export default {
watch
:
{
'param.tableId'
:
{
handler
:
function
()
{
this
.
resetComponent
()
this
.
initTableInfo
()
}
}
...
...
@@ -302,6 +303,20 @@ export default {
// console.log(newCode)
this
.
sql
=
newCode
this
.
$emit
(
'codeChange'
,
this
.
sql
)
},
resetComponent
()
{
this
.
dataSource
=
''
this
.
options
=
[]
this
.
name
=
''
this
.
sql
=
''
this
.
data
=
[]
this
.
fields
=
[]
this
.
mode
=
'0'
this
.
syncType
=
'sync_now'
this
.
height
=
500
this
.
kettleRunning
=
false
this
.
$refs
.
plxTable
.
reloadData
(
this
.
data
)
}
}
}
...
...
frontend/src/views/dataset/data/FieldEdit.vue
浏览文件 @
e9c5201d
...
...
@@ -129,7 +129,9 @@ export default {
}
},
watch
:
{
'param'
:
function
()
{
this
.
initField
()
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论