Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
f2978cb1
提交
f2978cb1
authored
2月 15, 2022
作者:
junjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: S2 pivot
上级
fcf069f8
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
55 行增加
和
15 行删除
+55
-15
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
chart.js
frontend/src/views/chart/chart/chart.js
+4
-3
common_table.js
frontend/src/views/chart/chart/common/common_table.js
+39
-8
ChartComponentS2.vue
frontend/src/views/chart/components/ChartComponentS2.vue
+1
-1
ColorSelector.vue
...d/src/views/chart/components/shape-attr/ColorSelector.vue
+5
-0
没有找到文件。
frontend/src/lang/en.js
浏览文件 @
f2978cb1
...
@@ -1023,7 +1023,8 @@ export default {
...
@@ -1023,7 +1023,8 @@ export default {
table_column_custom
:
'Custom'
,
table_column_custom
:
'Custom'
,
chart_table_pivot
:
'Pivot Table'
,
chart_table_pivot
:
'Pivot Table'
,
table_pivot_row
:
'Data Row'
,
table_pivot_row
:
'Data Row'
,
field_error_tips
:
'This field is changed(Include dimension、quota,field type,deleted),please edit again.'
field_error_tips
:
'This field is changed(Include dimension、quota,field type,deleted),please edit again.'
,
table_border_color
:
'Border Color'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
f2978cb1
...
@@ -1023,7 +1023,8 @@ export default {
...
@@ -1023,7 +1023,8 @@ export default {
table_column_custom
:
'自定義'
,
table_column_custom
:
'自定義'
,
chart_table_pivot
:
'透視表'
,
chart_table_pivot
:
'透視表'
,
table_pivot_row
:
'數據行'
,
table_pivot_row
:
'數據行'
,
field_error_tips
:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯'
field_error_tips
:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯'
,
table_border_color
:
'邊框顏色'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
f2978cb1
...
@@ -1025,7 +1025,8 @@ export default {
...
@@ -1025,7 +1025,8 @@ export default {
table_column_custom
:
'自定义'
,
table_column_custom
:
'自定义'
,
chart_table_pivot
:
'透视表'
,
chart_table_pivot
:
'透视表'
,
table_pivot_row
:
'数据行'
,
table_pivot_row
:
'数据行'
,
field_error_tips
:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑'
field_error_tips
:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑'
,
table_border_color
:
'边框颜色'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
f2978cb1
...
@@ -2,12 +2,13 @@ export const DEFAULT_COLOR_CASE = {
...
@@ -2,12 +2,13 @@ export const DEFAULT_COLOR_CASE = {
value
:
'default'
,
value
:
'default'
,
colors
:
[
'#5470c6'
,
'#91cc75'
,
'#fac858'
,
'#ee6666'
,
'#73c0de'
,
'#3ba272'
,
'#fc8452'
,
'#9a60b4'
,
'#ea7ccc'
],
colors
:
[
'#5470c6'
,
'#91cc75'
,
'#fac858'
,
'#ee6666'
,
'#73c0de'
,
'#3ba272'
,
'#fc8452'
,
'#9a60b4'
,
'#ea7ccc'
],
alpha
:
100
,
alpha
:
100
,
tableHeaderBgColor
:
'#
c1d1f6
'
,
tableHeaderBgColor
:
'#
e1eaff
'
,
tableItemBgColor
:
'#
e2eafe
'
,
tableItemBgColor
:
'#
ffffff
'
,
tableFontColor
:
'#000000'
,
tableFontColor
:
'#000000'
,
tableStripe
:
true
,
tableStripe
:
true
,
dimensionColor
:
'#000000'
,
dimensionColor
:
'#000000'
,
quotaColor
:
'#000000'
quotaColor
:
'#000000'
,
tableBorderColor
:
'#cfdaf4'
}
}
export
const
DEFAULT_SIZE
=
{
export
const
DEFAULT_SIZE
=
{
barDefault
:
true
,
barDefault
:
true
,
...
...
frontend/src/views/chart/chart/common/common_table.js
浏览文件 @
f2978cb1
...
@@ -2,13 +2,22 @@ import { hexColorToRGBA } from '@/views/chart/chart/util'
...
@@ -2,13 +2,22 @@ import { hexColorToRGBA } from '@/views/chart/chart/util'
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
}
from
'@/views/chart/chart/chart'
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
}
from
'@/views/chart/chart/chart'
export
function
getCustomTheme
(
chart
)
{
export
function
getCustomTheme
(
chart
)
{
const
headerColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
itemColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableItemBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
borderColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableBorderColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
theme
=
{
const
theme
=
{
background
:
{
background
:
{
color
:
'#00000000'
color
:
'#00000000'
},
},
splitLine
:
{
horizontalBorderColor
:
borderColor
,
verticalBorderColor
:
borderColor
},
cornerCell
:
{
cornerCell
:
{
cell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
backgroundColor
:
headerColor
,
horizontalBorderColor
:
borderColor
,
verticalBorderColor
:
borderColor
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
...
@@ -21,7 +30,9 @@ export function getCustomTheme(chart) {
...
@@ -21,7 +30,9 @@ export function getCustomTheme(chart) {
},
},
rowCell
:
{
rowCell
:
{
cell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
backgroundColor
:
headerColor
,
horizontalBorderColor
:
borderColor
,
verticalBorderColor
:
borderColor
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
...
@@ -34,7 +45,9 @@ export function getCustomTheme(chart) {
...
@@ -34,7 +45,9 @@ export function getCustomTheme(chart) {
},
},
colCell
:
{
colCell
:
{
cell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
backgroundColor
:
headerColor
,
horizontalBorderColor
:
borderColor
,
verticalBorderColor
:
borderColor
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
...
@@ -47,7 +60,9 @@ export function getCustomTheme(chart) {
...
@@ -47,7 +60,9 @@ export function getCustomTheme(chart) {
},
},
dataCell
:
{
dataCell
:
{
cell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableItemBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
backgroundColor
:
itemColor
,
horizontalBorderColor
:
borderColor
,
verticalBorderColor
:
borderColor
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
...
@@ -62,17 +77,33 @@ export function getCustomTheme(chart) {
...
@@ -62,17 +77,33 @@ export function getCustomTheme(chart) {
// color
// color
if
(
customAttr
.
color
)
{
if
(
customAttr
.
color
)
{
const
c
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
color
))
const
c
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
color
))
theme
.
cornerCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableHeaderBgColor
,
c
.
alpha
)
const
h_c
=
hexColorToRGBA
(
c
.
tableHeaderBgColor
,
c
.
alpha
)
const
i_c
=
hexColorToRGBA
(
c
.
tableItemBgColor
,
c
.
alpha
)
const
b_c
=
c
.
tableBorderColor
?
hexColorToRGBA
(
c
.
tableBorderColor
,
c
.
alpha
)
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableBorderColor
,
c
.
alpha
)
theme
.
splitLine
.
horizontalBorderColor
=
b_c
theme
.
splitLine
.
verticalBorderColor
=
b_c
theme
.
cornerCell
.
cell
.
backgroundColor
=
h_c
theme
.
cornerCell
.
cell
.
horizontalBorderColor
=
b_c
theme
.
cornerCell
.
cell
.
verticalBorderColor
=
b_c
theme
.
cornerCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
cornerCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
cornerCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
cornerCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
rowCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableHeaderBgColor
,
c
.
alpha
)
theme
.
rowCell
.
cell
.
backgroundColor
=
h_c
theme
.
rowCell
.
cell
.
horizontalBorderColor
=
b_c
theme
.
rowCell
.
cell
.
verticalBorderColor
=
b_c
theme
.
rowCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
rowCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
rowCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
rowCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
colCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableHeaderBgColor
,
c
.
alpha
)
theme
.
colCell
.
cell
.
backgroundColor
=
h_c
theme
.
colCell
.
cell
.
horizontalBorderColor
=
b_c
theme
.
colCell
.
cell
.
verticalBorderColor
=
b_c
theme
.
colCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
colCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
colCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
colCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
dataCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableItemBgColor
,
c
.
alpha
)
theme
.
dataCell
.
cell
.
backgroundColor
=
i_c
theme
.
dataCell
.
cell
.
horizontalBorderColor
=
b_c
theme
.
dataCell
.
cell
.
verticalBorderColor
=
b_c
theme
.
dataCell
.
text
.
fill
=
c
.
tableFontColor
theme
.
dataCell
.
text
.
fill
=
c
.
tableFontColor
}
}
// size
// size
...
...
frontend/src/views/chart/components/ChartComponentS2.vue
浏览文件 @
f2978cb1
...
@@ -135,7 +135,7 @@ export default {
...
@@ -135,7 +135,7 @@ export default {
methods
:
{
methods
:
{
initData
()
{
initData
()
{
let
datas
=
[]
let
datas
=
[]
if
(
this
.
chart
.
data
)
{
if
(
this
.
chart
.
data
&&
this
.
chart
.
data
.
fields
)
{
this
.
fields
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
.
data
.
fields
))
this
.
fields
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
.
data
.
fields
))
const
attr
=
JSON
.
parse
(
this
.
chart
.
customAttr
)
const
attr
=
JSON
.
parse
(
this
.
chart
.
customAttr
)
this
.
currentPage
.
pageSize
=
parseInt
(
attr
.
size
.
tablePageSize
?
attr
.
size
.
tablePageSize
:
20
)
this
.
currentPage
.
pageSize
=
parseInt
(
attr
.
size
.
tablePageSize
?
attr
.
size
.
tablePageSize
:
20
)
...
...
frontend/src/views/chart/components/shape-attr/ColorSelector.vue
浏览文件 @
f2978cb1
...
@@ -63,6 +63,9 @@
...
@@ -63,6 +63,9 @@
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<el-color-picker
v-model=
"colorForm.tableFontColor"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeColorCase"
/>
<el-color-picker
v-model=
"colorForm.tableFontColor"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeColorCase"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.table_border_color')"
class=
"form-item"
>
<el-color-picker
v-model=
"colorForm.tableBorderColor"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeColorCase"
/>
</el-form-item>
<!-- 暂时不支持该功能-->
<!-- 暂时不支持该功能-->
<!--
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
-->
<!--
<el-form-item
v-show=
"(chart.type && chart.type.includes('table')) || sourceType==='panelTable'"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
-->
<!--
<el-checkbox
v-model=
"colorForm.tableStripe"
@
change=
"changeColorCase"
>
{{
$t
(
'chart.stripe'
)
}}
</el-checkbox>
-->
<!--
<el-checkbox
v-model=
"colorForm.tableStripe"
@
change=
"changeColorCase"
>
{{
$t
(
'chart.stripe'
)
}}
</el-checkbox>
-->
...
@@ -240,6 +243,8 @@ export default {
...
@@ -240,6 +243,8 @@ export default {
this
.
customColor
=
this
.
colorForm
.
colors
[
0
]
this
.
customColor
=
this
.
colorForm
.
colors
[
0
]
this
.
colorIndex
=
0
this
.
colorIndex
=
0
}
}
this
.
colorForm
.
tableBorderColor
=
this
.
colorForm
.
tableBorderColor
?
this
.
colorForm
.
tableBorderColor
:
DEFAULT_COLOR_CASE
.
tableBorderColor
}
}
}
}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论