Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
bddb3bc6
提交
bddb3bc6
authored
2月 16, 2022
作者:
junjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: S2 pivot align
上级
09188e9d
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
68 行增加
和
11 行删除
+68
-11
en.js
frontend/src/lang/en.js
+6
-1
tw.js
frontend/src/lang/tw.js
+6
-1
zh.js
frontend/src/lang/zh.js
+6
-1
chart.js
frontend/src/views/chart/chart/chart.js
+2
-0
common_table.js
frontend/src/views/chart/chart/common/common_table.js
+29
-7
SizeSelectorAntV.vue
...rc/views/chart/components/shape-attr/SizeSelectorAntV.vue
+19
-1
没有找到文件。
frontend/src/lang/en.js
浏览文件 @
bddb3bc6
...
@@ -1024,7 +1024,12 @@ export default {
...
@@ -1024,7 +1024,12 @@ export default {
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'
table_border_color
:
'Border Color'
,
table_header_align
:
'Header Align'
,
table_item_align
:
'Body Align'
,
table_align_left
:
'Left'
,
table_align_center
:
'Center'
,
table_align_right
:
'Right'
},
},
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
浏览文件 @
bddb3bc6
...
@@ -1024,7 +1024,12 @@ export default {
...
@@ -1024,7 +1024,12 @@ export default {
chart_table_pivot
:
'透視表'
,
chart_table_pivot
:
'透視表'
,
table_pivot_row
:
'數據行'
,
table_pivot_row
:
'數據行'
,
field_error_tips
:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯'
,
field_error_tips
:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯'
,
table_border_color
:
'邊框顏色'
table_border_color
:
'邊框顏色'
,
table_header_align
:
'表頭對齊方式'
,
table_item_align
:
'表格對齊方式'
,
table_align_left
:
'左對齊'
,
table_align_center
:
'居中'
,
table_align_right
:
'右對齊'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
bddb3bc6
...
@@ -1026,7 +1026,12 @@ export default {
...
@@ -1026,7 +1026,12 @@ export default {
chart_table_pivot
:
'透视表'
,
chart_table_pivot
:
'透视表'
,
table_pivot_row
:
'数据行'
,
table_pivot_row
:
'数据行'
,
field_error_tips
:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑'
,
field_error_tips
:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑'
,
table_border_color
:
'边框颜色'
table_border_color
:
'边框颜色'
,
table_header_align
:
'表头对齐方式'
,
table_item_align
:
'表格对齐方式'
,
table_align_left
:
'左对齐'
,
table_align_center
:
'居中'
,
table_align_right
:
'右对齐'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
bddb3bc6
...
@@ -34,6 +34,8 @@ export const DEFAULT_SIZE = {
...
@@ -34,6 +34,8 @@ export const DEFAULT_SIZE = {
tablePageSize
:
'20'
,
tablePageSize
:
'20'
,
tableColumnMode
:
'custom'
,
tableColumnMode
:
'custom'
,
tableColumnWidth
:
100
,
tableColumnWidth
:
100
,
tableHeaderAlign
:
'left'
,
tableItemAlign
:
'right'
,
gaugeMin
:
0
,
gaugeMin
:
0
,
gaugeMax
:
100
,
gaugeMax
:
100
,
gaugeStartAngle
:
225
,
gaugeStartAngle
:
225
,
...
...
frontend/src/views/chart/chart/common/common_table.js
浏览文件 @
bddb3bc6
...
@@ -5,6 +5,9 @@ export function getCustomTheme(chart) {
...
@@ -5,6 +5,9 @@ export function getCustomTheme(chart) {
const
headerColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
headerColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
itemColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableItemBgColor
,
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
borderColor
=
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableBorderColor
,
DEFAULT_COLOR_CASE
.
alpha
)
const
headerAlign
=
DEFAULT_SIZE
.
tableHeaderAlign
const
itemAlign
=
DEFAULT_SIZE
.
tableItemAlign
const
theme
=
{
const
theme
=
{
background
:
{
background
:
{
color
:
'#00000000'
color
:
'#00000000'
...
@@ -21,11 +24,13 @@ export function getCustomTheme(chart) {
...
@@ -21,11 +24,13 @@ export function getCustomTheme(chart) {
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
},
},
bolderText
:
{
bolderText
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
}
}
},
},
rowCell
:
{
rowCell
:
{
...
@@ -36,11 +41,13 @@ export function getCustomTheme(chart) {
...
@@ -36,11 +41,13 @@ export function getCustomTheme(chart) {
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
},
},
bolderText
:
{
bolderText
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
}
}
},
},
colCell
:
{
colCell
:
{
...
@@ -51,11 +58,13 @@ export function getCustomTheme(chart) {
...
@@ -51,11 +58,13 @@ export function getCustomTheme(chart) {
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
},
},
bolderText
:
{
bolderText
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
,
textAlign
:
headerAlign
}
}
},
},
dataCell
:
{
dataCell
:
{
...
@@ -66,7 +75,8 @@ export function getCustomTheme(chart) {
...
@@ -66,7 +75,8 @@ export function getCustomTheme(chart) {
},
},
text
:
{
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableItemFontSize
fontSize
:
DEFAULT_SIZE
.
tableItemFontSize
,
textAlign
:
itemAlign
}
}
}
}
}
}
...
@@ -109,14 +119,26 @@ export function getCustomTheme(chart) {
...
@@ -109,14 +119,26 @@ export function getCustomTheme(chart) {
// size
// size
if
(
customAttr
.
size
)
{
if
(
customAttr
.
size
)
{
const
s
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
const
s
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
const
h_a
=
s
.
tableHeaderAlign
?
s
.
tableHeaderAlign
:
DEFAULT_SIZE
.
tableHeaderAlign
const
i_a
=
s
.
tableItemAlign
?
s
.
tableItemAlign
:
DEFAULT_SIZE
.
tableItemAlign
theme
.
cornerCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
cornerCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
cornerCell
.
bolderText
.
textAlign
=
h_a
theme
.
cornerCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
cornerCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
cornerCell
.
text
.
textAlign
=
h_a
theme
.
rowCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
rowCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
rowCell
.
bolderText
.
textAlign
=
h_a
theme
.
rowCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
rowCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
rowCell
.
text
.
textAlign
=
h_a
theme
.
colCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
colCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
colCell
.
bolderText
.
textAlign
=
h_a
theme
.
colCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
colCell
.
text
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
colCell
.
text
.
textAlign
=
h_a
theme
.
dataCell
.
text
.
fontSize
=
parseInt
(
s
.
tableItemFontSize
)
theme
.
dataCell
.
text
.
fontSize
=
parseInt
(
s
.
tableItemFontSize
)
theme
.
dataCell
.
text
.
textAlign
=
i_a
}
}
}
}
...
...
frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
浏览文件 @
bddb3bc6
...
@@ -101,6 +101,16 @@
...
@@ -101,6 +101,16 @@
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('chart.table_header_align')"
class=
"form-item"
>
<el-select
v-model=
"sizeForm.tableHeaderAlign"
:placeholder=
"$t('chart.table_header_align')"
@
change=
"changeBarSizeCase"
>
<el-option
v-for=
"option in alignOptions"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.table_item_align')"
class=
"form-item"
>
<el-select
v-model=
"sizeForm.tableItemAlign"
:placeholder=
"$t('chart.table_item_align')"
@
change=
"changeBarSizeCase"
>
<el-option
v-for=
"option in alignOptions"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.table_title_height')"
class=
"form-item form-item-slider"
>
<el-form-item
:label=
"$t('chart.table_title_height')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.tableTitleHeight"
:min=
"20"
:max=
"100"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBarSizeCase"
/>
<el-slider
v-model=
"sizeForm.tableTitleHeight"
:min=
"20"
:max=
"100"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
</el-form-item>
...
@@ -302,7 +312,12 @@ export default {
...
@@ -302,7 +312,12 @@ export default {
{
name
:
'50'
+
this
.
$t
(
'chart.table_page_size_unit'
),
value
:
'50'
},
{
name
:
'50'
+
this
.
$t
(
'chart.table_page_size_unit'
),
value
:
'50'
},
{
name
:
'100'
+
this
.
$t
(
'chart.table_page_size_unit'
),
value
:
'100'
}
{
name
:
'100'
+
this
.
$t
(
'chart.table_page_size_unit'
),
value
:
'100'
}
],
],
fontSize
:
[]
fontSize
:
[],
alignOptions
:
[
{
name
:
this
.
$t
(
'chart.table_align_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.table_align_center'
),
value
:
'center'
},
{
name
:
this
.
$t
(
'chart.table_align_right'
),
value
:
'right'
}
]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -344,6 +359,9 @@ export default {
...
@@ -344,6 +359,9 @@ export default {
this
.
sizeForm
.
tableColumnMode
=
this
.
sizeForm
.
tableColumnMode
?
this
.
sizeForm
.
tableColumnMode
:
DEFAULT_SIZE
.
tableColumnMode
this
.
sizeForm
.
tableColumnMode
=
this
.
sizeForm
.
tableColumnMode
?
this
.
sizeForm
.
tableColumnMode
:
DEFAULT_SIZE
.
tableColumnMode
this
.
sizeForm
.
tableColumnWidth
=
this
.
sizeForm
.
tableColumnWidth
?
this
.
sizeForm
.
tableColumnWidth
:
DEFAULT_SIZE
.
tableColumnWidth
this
.
sizeForm
.
tableColumnWidth
=
this
.
sizeForm
.
tableColumnWidth
?
this
.
sizeForm
.
tableColumnWidth
:
DEFAULT_SIZE
.
tableColumnWidth
this
.
sizeForm
.
tableHeaderAlign
=
this
.
sizeForm
.
tableHeaderAlign
?
this
.
sizeForm
.
tableHeaderAlign
:
DEFAULT_SIZE
.
tableHeaderAlign
this
.
sizeForm
.
tableItemAlign
=
this
.
sizeForm
.
tableItemAlign
?
this
.
sizeForm
.
tableItemAlign
:
DEFAULT_SIZE
.
tableItemAlign
}
}
}
}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论