Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
9ba7aeae
提交
9ba7aeae
authored
5月 05, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:仪表盘支持表格
上级
cd5f1af7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
35 行增加
和
17 行删除
+35
-17
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+34
-16
index.vue
frontend/src/views/panel/index.vue
+1
-1
没有找到文件。
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
9ba7aeae
<
template
>
<div
class=
"rect-shape"
>
<chart-component
:ref=
"element.propValue.id"
class=
"chart-class"
:chart=
"chart"
/>
<div
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
class=
"rect-shape"
>
<div
v-if=
"requestStatus==='error'"
style=
";width: 100%;height: 100%;background-color: #ece7e7; text-align: center"
>
<div
style=
"font-size: 12px; color: #9ea6b2;"
>
获取数据出错 请联系管理员
<br>
{{
message
}}
</div>
</div>
<chart-component
v-if=
"requestStatus==='success'&&chart.type && !chart.type.includes('table')"
:ref=
"element.propValue.id"
class=
"chart-class"
:chart=
"chart"
/>
<table-normal
v-if=
"requestStatus==='success'&&chart.type && chart.type.includes('table')"
:chart=
"chart"
class=
"table-class"
/>
</div>
</
template
>
...
...
@@ -8,6 +16,8 @@
import
{
post
}
from
'@/api/panel/panel'
import
ChartComponent
from
'@/views/chart/components/ChartComponent.vue'
import
TableNormal
from
'@/views/chart/components/table/TableNormal'
import
{
mapState
}
from
'vuex'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
...
...
@@ -25,7 +35,7 @@ import {
export
default
{
name
:
'UserView'
,
components
:
{
ChartComponent
},
components
:
{
ChartComponent
,
TableNormal
},
props
:
{
element
:
{
type
:
Object
...
...
@@ -63,17 +73,6 @@ export default {
computed
:
mapState
([
'canvasStyleData'
]),
// computed: mapState({
// canvasStyleData: function(state) {
// debugger
// // this.chart.viewFirst == false 优先使用仪表盘样式
// if (!this.chart.viewFirst) {
// this.chart.customAttr = state.canvasStyleData.chart.customAttr
// this.chart.customStyle = state.canvasStyleData.chart.customStyle
// }
// }
//
// }),
data
()
{
return
{
chart
:
{
...
...
@@ -97,7 +96,9 @@ export default {
background
:
DEFAULT_BACKGROUND_COLOR
},
customFilter
:
[]
}
},
requestStatus
:
'waiting'
,
message
:
null
}
},
created
()
{
...
...
@@ -109,9 +110,23 @@ export default {
methods
:
{
getData
(
id
)
{
if
(
id
)
{
this
.
requestStatus
=
'waiting'
this
.
message
=
null
post
(
'/chart/view/getData/'
+
id
,
this
.
filter
).
then
(
response
=>
{
// 将视图传入echart组件
this
.
chart
=
response
.
data
debugger
if
(
response
.
success
)
{
this
.
chart
=
response
.
data
this
.
requestStatus
=
'success'
}
else
{
this
.
requestStatus
=
'error'
this
.
message
=
response
.
massage
}
return
true
}).
catch
(
err
=>
{
this
.
requestStatus
=
'error'
this
.
message
=
err
return
true
})
}
}
...
...
@@ -128,4 +143,7 @@ export default {
.chart-class
{
height
:
100%
;
}
.table-class
{
height
:
100%
;
}
</
style
>
frontend/src/views/panel/index.vue
浏览文件 @
9ba7aeae
<
template
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-main-container>
<component
:is=
"component"
:param=
"param"
/>
</de-main-container>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论