Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
8c50976d
提交
8c50976d
authored
3月 02, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(视图): 视图编辑保存,横纵维度指标,EChart展示
上级
b6117d65
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
58 行增加
和
26 行删除
+58
-26
ChartGroupController.java
...va/io/dataease/controller/chart/ChartGroupController.java
+6
-0
DataSetGroupController.java
...o/dataease/controller/dataset/DataSetGroupController.java
+5
-0
ChartGroupService.java
...ain/java/io/dataease/service/chart/ChartGroupService.java
+4
-0
DataSetGroupService.java
...java/io/dataease/service/dataset/DataSetGroupService.java
+4
-0
Group.vue
frontend/src/business/components/chart/group/Group.vue
+14
-6
ChartEdit.vue
frontend/src/business/components/chart/view/ChartEdit.vue
+10
-10
Group.vue
frontend/src/business/components/dataset/group/Group.vue
+15
-10
没有找到文件。
backend/src/main/java/io/dataease/controller/chart/ChartGroupController.java
浏览文件 @
8c50976d
package
io
.
dataease
.
controller
.
chart
;
import
io.dataease.base.domain.ChartGroup
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.controller.request.chart.ChartGroupRequest
;
import
io.dataease.dto.chart.ChartGroupDTO
;
import
io.dataease.service.chart.ChartGroupService
;
...
...
@@ -29,4 +30,9 @@ public class ChartGroupController {
public
void
tree
(
@PathVariable
String
id
)
{
chartGroupService
.
delete
(
id
);
}
@PostMapping
(
"/getScene/{id}"
)
public
ChartGroup
getScene
(
@PathVariable
String
id
)
{
return
chartGroupService
.
getScene
(
id
);
}
}
backend/src/main/java/io/dataease/controller/dataset/DataSetGroupController.java
浏览文件 @
8c50976d
...
...
@@ -33,4 +33,9 @@ public class DataSetGroupController {
public
void
tree
(
@PathVariable
String
id
)
{
dataSetGroupService
.
delete
(
id
);
}
@PostMapping
(
"/getScene/{id}"
)
public
DatasetGroup
getScene
(
@PathVariable
String
id
)
{
return
dataSetGroupService
.
getScene
(
id
);
}
}
backend/src/main/java/io/dataease/service/chart/ChartGroupService.java
浏览文件 @
8c50976d
...
...
@@ -47,6 +47,10 @@ public class ChartGroupService {
chartGroupMapper
.
deleteByExample
(
ChartGroupExample
);
}
public
ChartGroup
getScene
(
String
id
)
{
return
chartGroupMapper
.
selectByPrimaryKey
(
id
);
}
public
List
<
ChartGroupDTO
>
tree
(
ChartGroupRequest
ChartGroup
)
{
ChartGroupExample
ChartGroupExample
=
new
ChartGroupExample
();
ChartGroupExample
.
Criteria
criteria
=
ChartGroupExample
.
createCriteria
();
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java
浏览文件 @
8c50976d
...
...
@@ -58,6 +58,10 @@ public class DataSetGroupService {
}).
map
(
DatasetGroup:
:
getId
).
collect
(
Collectors
.
toList
()));
}
public
DatasetGroup
getScene
(
String
id
)
{
return
datasetGroupMapper
.
selectByPrimaryKey
(
id
);
}
public
void
deleteTableAndField
(
List
<
String
>
sceneIds
)
{
for
(
String
sceneId
:
sceneIds
)
{
DataSetTableRequest
dataSetTableRequest
=
new
DataSetTableRequest
();
...
...
frontend/src/business/components/chart/group/Group.vue
浏览文件 @
8c50976d
...
...
@@ -216,7 +216,7 @@ export default {
editTable
:
false
,
data
:
[],
chartData
:
[],
currGroup
:
null
,
currGroup
:
{}
,
expandedArray
:
[],
groupForm
:
{
name
:
''
,
...
...
@@ -252,10 +252,7 @@ export default {
},
mounted
()
{
this
.
groupTree
(
this
.
groupForm
);
this
.
chartTree
();
},
activated
()
{
this
.
groupTree
(
this
.
groupForm
);
this
.
refresh
();
this
.
chartTree
();
},
watch
:
{},
...
...
@@ -430,7 +427,7 @@ export default {
chartTree
()
{
this
.
chartData
=
[];
if
(
this
.
currGroup
)
{
if
(
this
.
currGroup
.
id
)
{
this
.
$post
(
'/chart/view/list'
,
{
sort
:
'create_time desc,name asc'
,
sceneId
:
this
.
currGroup
.
id
...
...
@@ -505,6 +502,17 @@ export default {
getTable
(
table
)
{
this
.
table
=
table
;
},
refresh
()
{
let
path
=
this
.
$route
.
path
;
if
(
path
===
'/chart/chart-edit'
)
{
this
.
sceneMode
=
true
;
let
sceneId
=
this
.
$store
.
state
.
chart
.
sceneId
;
this
.
$post
(
'/chart/group/getScene/'
+
sceneId
,
null
,
response
=>
{
this
.
currGroup
=
response
.
data
;
})
}
}
},
}
...
...
frontend/src/business/components/chart/view/ChartEdit.vue
浏览文件 @
8c50976d
...
...
@@ -47,7 +47,7 @@
<div
style=
"border-bottom: 1px solid #E6E6E6;overflow-y:hidden;"
class=
"padding-lr"
>
<el-row>
<span>
{{
$t
(
'chart.title'
)
}}
</span>
<
el-checkbox
v-model=
"view.show"
style=
"float: right;"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
!--
<el-checkbox
v-model=
"view.show"
style=
"float: right;"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
</el-row>
<el-form>
<el-form-item
class=
"form-item"
>
...
...
@@ -91,9 +91,9 @@
<draggable
v-model=
"view.xaxis"
@
end=
"end3"
group=
"itxst"
animation=
"300"
:move=
"onMove"
style=
"width:100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;"
>
<transition-group>
<el-tag
size=
"
mini
"
class=
"item"
v-for=
"(item,index) in view.xaxis"
:key=
"index"
closable
style=
"width:100%;
height: 100%;
margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;"
>
<transition-group
style=
"width: 100%;height: 100%;"
>
<el-tag
size=
"
small
"
class=
"item"
v-for=
"(item,index) in view.xaxis"
:key=
"index"
closable
@
close=
"clear1(index)"
>
{{
item
.
name
}}
</el-tag>
...
...
@@ -105,9 +105,9 @@
<draggable
v-model=
"view.yaxis"
@
end=
"end4"
group=
"itxst"
animation=
"300"
:move=
"onMove"
style=
"width:100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;"
>
<transition-group>
<el-tag
size=
"
mini
"
class=
"item"
v-for=
"(item,index) in view.yaxis"
:key=
"index"
closable
style=
"width:100%;
height: 100%;
margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;"
>
<transition-group
style=
"width:100%;height: 100%;"
>
<el-tag
size=
"
small
"
class=
"item"
v-for=
"(item,index) in view.yaxis"
:key=
"index"
closable
@
close=
"clear2(index)"
>
{{
item
.
name
}}
</el-tag>
...
...
@@ -172,16 +172,16 @@ export default {
},
computed
:
{
tableId
()
{
console
.
log
(
this
.
$store
.
state
.
chart
.
tableId
);
//
console.log(this.$store.state.chart.tableId);
this
.
initTableData
(
this
.
$store
.
state
.
chart
.
tableId
);
return
this
.
$store
.
state
.
chart
.
tableId
;
},
sceneId
()
{
console
.
log
(
this
.
$store
.
state
.
chart
.
sceneId
);
//
console.log(this.$store.state.chart.sceneId);
return
this
.
$store
.
state
.
chart
.
sceneId
;
},
vId
()
{
console
.
log
(
this
.
$store
.
state
.
chart
.
viewId
);
//
console.log(this.$store.state.chart.viewId);
this
.
getData
(
this
.
$store
.
state
.
chart
.
viewId
);
return
this
.
$store
.
state
.
chart
.
viewId
;
},
...
...
frontend/src/business/components/dataset/group/Group.vue
浏览文件 @
8c50976d
...
...
@@ -231,7 +231,7 @@ export default {
editTable
:
false
,
data
:
[],
tableData
:
[],
currGroup
:
null
,
currGroup
:
{}
,
expandedArray
:
[],
groupForm
:
{
name
:
''
,
...
...
@@ -266,15 +266,9 @@ export default {
},
mounted
()
{
this
.
tree
(
this
.
groupForm
);
this
.
refresh
();
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset'
);
this
.
$store
.
commit
(
'setTable'
,
null
);
},
activated
()
{
this
.
tree
(
this
.
groupForm
);
this
.
tableTree
();
this
.
$router
.
push
(
'/dataset'
);
this
.
$store
.
commit
(
'setTable'
,
null
);
// this.$router.push('/dataset');
},
watch
:
{
// search(val){
...
...
@@ -457,7 +451,7 @@ export default {
tableTree
()
{
this
.
tableData
=
[];
if
(
this
.
currGroup
)
{
if
(
this
.
currGroup
.
id
)
{
this
.
$post
(
'/dataset/table/list'
,
{
sort
:
'type asc,create_time desc,name asc'
,
sceneId
:
this
.
currGroup
.
id
...
...
@@ -473,6 +467,7 @@ export default {
if
(
data
.
type
===
'scene'
)
{
this
.
sceneMode
=
true
;
this
.
currGroup
=
data
;
this
.
$store
.
commit
(
"setSceneData"
,
this
.
currGroup
.
id
);
}
if
(
node
.
expanded
)
{
this
.
expandedArray
.
push
(
data
.
id
);
...
...
@@ -535,6 +530,16 @@ export default {
});
},
refresh
()
{
let
path
=
this
.
$route
.
path
;
if
(
path
===
'/dataset/table'
)
{
this
.
sceneMode
=
true
;
let
sceneId
=
this
.
$store
.
state
.
dataset
.
sceneData
;
this
.
$post
(
'/dataset/group/getScene/'
+
sceneId
,
null
,
response
=>
{
this
.
currGroup
=
response
.
data
;
})
}
}
},
}
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论