Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
66b75928
提交
66b75928
authored
1月 31, 2022
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: S2明细表
上级
ea164951
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
97 行增加
和
4 行删除
+97
-4
package.json
frontend/package.json
+1
-1
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+16
-2
common_table.js
frontend/src/views/chart/chart/common/common_table.js
+10
-0
table-info.js
frontend/src/views/chart/chart/table/table-info.js
+59
-0
ChartComponentS2.vue
frontend/src/views/chart/components/ChartComponentS2.vue
+0
-0
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+11
-1
没有找到文件。
frontend/package.json
浏览文件 @
66b75928
...
...
@@ -14,7 +14,7 @@
},
"dependencies"
:
{
"@antv/g2plot"
:
"^2.3.32"
,
"@antv/s2"
:
"^1.
6
.0"
,
"@antv/s2"
:
"^1.
7
.0"
,
"@riophae/vue-treeselect"
:
"0.4.0"
,
"@tinymce/tinymce-vue"
:
"^3.2.8"
,
"axios"
:
"^0.21.1"
,
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
66b75928
...
...
@@ -37,6 +37,16 @@
@
onChartClick=
"chartClick"
@
onJumpClick=
"jumpClick"
/>
<chart-component-s2
v-if=
"charViewS2ShowFlag"
:ref=
"element.propValue.id"
class=
"chart-class"
:chart=
"chart"
:track-menu=
"trackMenu"
:search-count=
"searchCount"
@
onChartClick=
"chartClick"
@
onJumpClick=
"jumpClick"
/>
<table-normal
v-if=
"tableShowFlag"
:ref=
"element.propValue.id"
...
...
@@ -71,10 +81,11 @@ import { areaMapping } from '@/api/map/map'
import
ChartComponentG2
from
'@/views/chart/components/ChartComponentG2'
import
EditBarView
from
'@/components/canvas/components/Editor/EditBarView'
import
{
customAttrTrans
,
customStyleTrans
,
recursionTransObj
}
from
'@/components/canvas/utils/style'
import
ChartComponentS2
from
'@/views/chart/components/ChartComponentS2'
export
default
{
name
:
'UserView'
,
components
:
{
EditBarView
,
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
components
:
{
ChartComponentS2
,
EditBarView
,
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
props
:
{
element
:
{
type
:
Object
,
...
...
@@ -169,8 +180,11 @@ export default {
charViewG2ShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
!
this
.
chart
.
type
.
includes
(
'table'
)
&&
!
this
.
chart
.
type
.
includes
(
'text'
)
&&
this
.
renderComponent
()
===
'antv'
},
charViewS2ShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
this
.
chart
.
type
.
includes
(
'table'
)
&&
!
this
.
chart
.
type
.
includes
(
'text'
)
&&
this
.
renderComponent
()
===
'antv'
},
tableShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
this
.
chart
.
type
.
includes
(
'table'
)
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
this
.
chart
.
type
.
includes
(
'table'
)
&&
this
.
renderComponent
()
===
'echarts'
},
labelShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
this
.
chart
.
type
.
includes
(
'text'
)
...
...
frontend/src/views/chart/chart/common/common_table.js
0 → 100644
浏览文件 @
66b75928
export
function
getCustomTheme
(
chart
)
{
const
theme
=
{}
const
background
=
{
color
:
'#00000000'
}
theme
.
background
=
background
return
theme
}
frontend/src/views/chart/chart/table/table-info.js
0 → 100644
浏览文件 @
66b75928
import
{
TableSheet
}
from
'@antv/s2'
import
{
getCustomTheme
}
from
'@/views/chart/chart/common/common_table'
export
function
baseTableInfo
(
s2
,
container
,
chart
,
action
,
tableData
)
{
const
containerDom
=
document
.
getElementById
(
container
)
// data
const
fields
=
chart
.
data
.
fields
if
(
!
fields
||
fields
.
length
===
0
)
{
if
(
s2
)
{
s2
.
destroy
()
}
return
}
const
columns
=
[]
const
meta
=
[]
fields
.
forEach
(
ele
=>
{
columns
.
push
(
ele
.
dataeaseName
)
meta
.
push
({
field
:
ele
.
dataeaseName
,
name
:
ele
.
name
})
})
// data config
const
s2DataConfig
=
{
fields
:
{
columns
:
columns
},
meta
:
meta
,
data
:
tableData
}
// options
const
s2Options
=
{
width
:
containerDom
.
offsetWidth
,
height
:
containerDom
.
offsetHeight
,
// showSeriesNumber: true
style
:
{
cellCfg
:
{
width
:
500
}
}
}
// 开始渲染
if
(
s2
)
{
s2
.
destroy
()
}
s2
=
new
TableSheet
(
containerDom
,
s2DataConfig
,
s2Options
)
// theme
const
customTheme
=
getCustomTheme
(
chart
)
s2
.
setThemeCfg
({
theme
:
customTheme
})
return
s2
}
frontend/src/views/chart/components/ChartComponentS2.vue
0 → 100644
浏览文件 @
66b75928
差异被折叠。
点击展开。
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
66b75928
...
...
@@ -769,8 +769,16 @@
class=
"chart-class"
@
onChartClick=
"chartClick"
/>
<chart-component-s2
v-if=
"httpRequest.status && chart.type && chart.type.includes('table') && !chart.type.includes('text') && renderComponent() === 'antv'"
ref=
"dynamicChart"
:chart-id=
"chart.id"
:chart=
"chart"
class=
"chart-class"
@
onChartClick=
"chartClick"
/>
<table-normal
v-if=
"httpRequest.status && chart.type && chart.type.includes('table')"
v-if=
"httpRequest.status && chart.type && chart.type.includes('table')
&& renderComponent() === 'echarts'
"
:show-summary=
"chart.type === 'table-normal'"
:chart=
"chart"
class=
"table-class"
...
...
@@ -973,10 +981,12 @@ import SizeSelectorAntV from '@/views/chart/components/shape-attr/SizeSelectorAn
import
SplitSelectorAntV
from
'@/views/chart/components/component-style/SplitSelectorAntV'
import
CompareEdit
from
'@/views/chart/components/compare/CompareEdit'
import
{
compareItem
}
from
'@/views/chart/chart/compare'
import
ChartComponentS2
from
'@/views/chart/components/ChartComponentS2'
export
default
{
name
:
'ChartEdit'
,
components
:
{
ChartComponentS2
,
CompareEdit
,
SplitSelectorAntV
,
SizeSelectorAntV
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论