Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
688a59d5
提交
688a59d5
authored
5月 31, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
001f6b46
7838dfac
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
173 行增加
和
51 行删除
+173
-51
LegendSelector.vue
...views/chart/components/component-style/LegendSelector.vue
+24
-5
TitleSelector.vue
.../views/chart/components/component-style/TitleSelector.vue
+33
-7
XAxisSelector.vue
.../views/chart/components/component-style/XAxisSelector.vue
+25
-6
YAxisSelector.vue
.../views/chart/components/component-style/YAxisSelector.vue
+25
-6
LabelSelector.vue
...d/src/views/chart/components/shape-attr/LabelSelector.vue
+24
-5
TooltipSelector.vue
...src/views/chart/components/shape-attr/TooltipSelector.vue
+24
-5
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+18
-17
没有找到文件。
frontend/src/views/chart/components/component-style/LegendSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,15 +2,16 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"legendForm"
:model=
"legendForm"
label-width=
"80px"
size=
"mini"
>
<
el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"legendForm.show"
@
change=
"changeLegendStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
/el-form-item
>
<
!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
--
>
<!--
<el-checkbox
v-model=
"legendForm.show"
@
change=
"changeLegendStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
:label=
"$t('chart.icon')"
class=
"form-item"
>
<el-select
v-model=
"legendForm.icon"
:placeholder=
"$t('chart.icon')"
@
change=
"changeLegendStyle"
>
<el-option
...
...
@@ -52,7 +53,15 @@
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.legend'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!legendForm.show"
>
{{
$t
(
'chart.legend'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"legendForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeLegendStyle"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -80,7 +89,8 @@ export default {
{
name
:
this
.
$t
(
'chart.line_symbol_roundRect'
),
value
:
'roundRect'
},
{
name
:
this
.
$t
(
'chart.line_symbol_triangle'
),
value
:
'triangle'
},
{
name
:
this
.
$t
(
'chart.line_symbol_diamond'
),
value
:
'diamond'
}
]
],
isSetting
:
false
}
},
watch
:
{
...
...
@@ -116,6 +126,9 @@ export default {
this
.
fontSize
=
arr
},
changeLegendStyle
()
{
if
(
!
this
.
legendForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onLegendChange'
,
this
.
legendForm
)
}
}
...
...
@@ -147,4 +160,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/components/component-style/TitleSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,14 +2,24 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"titleForm"
:model=
"titleForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
<!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
-->
<!--
<el-checkbox
v-model=
"titleForm.show"
@
change=
"changeTitleStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
-->
<!--
</el-form-item>
-->
<el-form-item
:label=
"$t('chart.title')"
class=
"form-item"
>
<el-input
v-model=
"titleForm.title"
size=
"mini"
:placeholder=
"$t('chart.title')"
clearable
@
blur=
"changeTitleStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.text_fontsize')"
class=
"form-item"
>
<el-select
v-model=
"titleForm.fontSize"
:placeholder=
"$t('chart.text_fontsize')"
size=
"mini"
@
change=
"changeTitleStyle"
>
...
...
@@ -39,7 +49,15 @@
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.title'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!titleForm.show"
>
{{
$t
(
'chart.title'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"titleForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeTitleStyle"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -59,7 +77,8 @@ export default {
data
()
{
return
{
titleForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_TITLE_STYLE
)),
fontSize
:
[]
fontSize
:
[],
isSetting
:
false
}
},
watch
:
{
...
...
@@ -76,13 +95,11 @@ export default {
if
(
customStyle
.
text
)
{
this
.
titleForm
=
customStyle
.
text
}
this
.
titleForm
.
title
=
this
.
chart
.
title
}
}
}
},
created
()
{
console
.
log
(
JSON
.
stringify
(
this
.
chart
))
},
mounted
()
{
this
.
init
()
},
...
...
@@ -98,6 +115,9 @@ export default {
this
.
fontSize
=
arr
},
changeTitleStyle
()
{
if
(
!
this
.
titleForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onTextChange'
,
this
.
titleForm
)
}
}
...
...
@@ -129,4 +149,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/components/component-style/XAxisSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,15 +2,16 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"axisForm"
:model=
"axisForm"
label-width=
"80px"
size=
"mini"
>
<
el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.show"
@
change=
"changeXAxisStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
/el-form-item
>
<
!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
--
>
<!--
<el-checkbox
v-model=
"axisForm.show"
@
change=
"changeXAxisStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
:label=
"$t('chart.position')"
class=
"form-item"
>
<el-radio-group
v-model=
"axisForm.position"
size=
"mini"
@
change=
"changeXAxisStyle"
>
<el-radio-button
label=
"top"
>
{{
$t
(
'chart.text_pos_top'
)
}}
</el-radio-button>
...
...
@@ -24,12 +25,20 @@
<el-slider
v-model=
"axisForm.axisLabel.rotate"
show-input
:show-input-controls=
"false"
:min=
"-90"
:max=
"90"
input-size=
"mini"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabel.formatter"
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 4}" @blur="changeXAxisStyle"/>
<el-input
v-model=
"axisForm.axisLabel.formatter"
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 4}" @blur="changeXAxisStyle"
/>
</el-form-item>
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.xAxis'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!axisForm.show"
>
{{
$t
(
'chart.xAxis'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"axisForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeXAxisStyle"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -48,7 +57,8 @@ export default {
},
data
()
{
return
{
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
))
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
)),
isSetting
:
false
}
},
watch
:
{
...
...
@@ -73,6 +83,9 @@ export default {
},
methods
:
{
changeXAxisStyle
()
{
if
(
!
this
.
axisForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onChangeXAxisForm'
,
this
.
axisForm
)
}
}
...
...
@@ -104,4 +117,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/components/component-style/YAxisSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,15 +2,16 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"axisForm"
:model=
"axisForm"
label-width=
"80px"
size=
"mini"
>
<
el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.show"
@
change=
"changeYAxisStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
/el-form-item
>
<
!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
--
>
<!--
<el-checkbox
v-model=
"axisForm.show"
@
change=
"changeYAxisStyle"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
:label=
"$t('chart.position')"
class=
"form-item"
>
<el-radio-group
v-model=
"axisForm.position"
size=
"mini"
@
change=
"changeYAxisStyle"
>
<el-radio-button
label=
"left"
>
{{
$t
(
'chart.text_pos_left'
)
}}
</el-radio-button>
...
...
@@ -24,12 +25,20 @@
<el-slider
v-model=
"axisForm.axisLabel.rotate"
show-input
:show-input-controls=
"false"
:min=
"-90"
:max=
"90"
input-size=
"mini"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabel.formatter"
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 4}" @blur="changeYAxisStyle"/>
<el-input
v-model=
"axisForm.axisLabel.formatter"
type=
"textarea"
:autosize=
"
{ minRows: 4, maxRows: 4}" @blur="changeYAxisStyle"
/>
</el-form-item>
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.yAxis'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!axisForm.show"
>
{{
$t
(
'chart.yAxis'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"axisForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeYAxisStyle"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -48,7 +57,8 @@ export default {
},
data
()
{
return
{
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
))
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
)),
isSetting
:
false
}
},
watch
:
{
...
...
@@ -73,6 +83,9 @@ export default {
},
methods
:
{
changeYAxisStyle
()
{
if
(
!
this
.
axisForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onChangeYAxisForm'
,
this
.
axisForm
)
}
}
...
...
@@ -104,4 +117,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/components/shape-attr/LabelSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,15 +2,16 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
v-show=
"chart.type && !chart.type.includes('gauge')"
ref=
"labelForm"
:model=
"labelForm"
label-width=
"80px"
size=
"mini"
>
<
el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"labelForm.show"
@
change=
"changeLabelAttr"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
/el-form-item
>
<
!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
--
>
<!--
<el-checkbox
v-model=
"labelForm.show"
@
change=
"changeLabelAttr"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
:label=
"$t('chart.text_fontsize')"
class=
"form-item"
>
<el-select
v-model=
"labelForm.fontSize"
:placeholder=
"$t('chart.text_fontsize')"
size=
"mini"
@
change=
"changeLabelAttr"
>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
...
...
@@ -67,7 +68,15 @@
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.label'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!labelForm.show"
>
{{
$t
(
'chart.label'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"labelForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeLabelAttr"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -87,7 +96,8 @@ export default {
data
()
{
return
{
labelForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_LABEL
)),
fontSize
:
[]
fontSize
:
[],
isSetting
:
false
}
},
watch
:
{
...
...
@@ -123,6 +133,9 @@ export default {
this
.
fontSize
=
arr
},
changeLabelAttr
()
{
if
(
!
this
.
labelForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onLabelChange'
,
this
.
labelForm
)
}
}
...
...
@@ -154,4 +167,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/components/shape-attr/TooltipSelector.vue
浏览文件 @
688a59d5
...
...
@@ -2,15 +2,16 @@
<div>
<div
style=
"width: 100%"
>
<el-popover
v-model=
"isSetting"
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"tooltipForm"
:model=
"tooltipForm"
label-width=
"80px"
size=
"mini"
>
<
el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
<el-checkbox
v-model=
"tooltipForm.show"
@
change=
"changeTooltipAttr"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox
>
<
/el-form-item
>
<
!--
<el-form-item
:label=
"$t('chart.show')"
class=
"form-item"
>
--
>
<!--
<el-checkbox
v-model=
"tooltipForm.show"
@
change=
"changeTooltipAttr"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
--
>
<
!--
</el-form-item>
--
>
<el-form-item
:label=
"$t('chart.trigger_position')"
class=
"form-item"
>
<el-radio-group
v-model=
"tooltipForm.trigger"
size=
"mini"
@
change=
"changeTooltipAttr"
>
<el-radio-button
label=
"item"
>
{{
$t
(
'chart.tooltip_item'
)
}}
</el-radio-button>
...
...
@@ -54,7 +55,15 @@
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
{{
$t
(
'chart.tooltip'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
:disabled=
"!tooltipForm.show"
>
{{
$t
(
'chart.tooltip'
)
}}
<i
class=
"el-icon-setting el-icon--right"
/>
<el-switch
v-model=
"tooltipForm.show"
class=
"switch-style"
@
click
.
stop
.
native
@
change=
"changeTooltipAttr"
/>
</el-button>
</el-popover>
</div>
</div>
...
...
@@ -74,7 +83,8 @@ export default {
data
()
{
return
{
tooltipForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_TOOLTIP
)),
fontSize
:
[]
fontSize
:
[],
isSetting
:
false
}
},
watch
:
{
...
...
@@ -110,6 +120,9 @@ export default {
this
.
fontSize
=
arr
},
changeTooltipAttr
()
{
if
(
!
this
.
tooltipForm
.
show
)
{
this
.
isSetting
=
false
}
this
.
$emit
(
'onTooltipChange'
,
this
.
tooltipForm
)
}
}
...
...
@@ -141,4 +154,10 @@ export default {
.el-form-item
{
margin-bottom
:
6px
;
}
.switch-style
{
position
:
absolute
;
right
:
10px
;
margin-top
:
-4px
;
}
</
style
>
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
688a59d5
...
...
@@ -73,23 +73,23 @@
<el-col
style=
"height: 100%;width: 30%;min-width: 200px;max-width:220px;border: 1px solid #E6E6E6;border-left: 0 solid;"
>
<
div
style=
"border-bottom: 1px solid #E6E6E6;overflow-y:hidden;height: 62px;"
class=
"padding-lr"
>
<el-row
>
<span>
{{
$t
(
'chart.title'
)
}}
</span
>
<el-button
style=
"float: right;padding: 0;margin: 8px 0 0 0;font-size: 12px;"
type=
"text"
@
click=
"save"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button
>
</el-row
>
<el-form
>
<el-form-item
class=
"form-item"
>
<el-input
v-model=
"view.title"
size=
"mini"
:placeholder=
"$t('chart.title')"
prefix-icon=
"el-icon-search"
clearable
/
>
</el-form-item
>
</el-form
>
<
/div
>
<
!--
<div
style=
"border-bottom: 1px solid #E6E6E6;overflow-y:hidden;height: 62px;"
class=
"padding-lr"
>
--
>
<!--
<el-row>
--
>
<!--
<span>
{{
$t
(
'chart.title'
)
}}
</span>
--
>
<!--
<el-button
style=
"float: right;padding: 0;margin: 8px 0 0 0;font-size: 12px;"
type=
"text"
@
click=
"save"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
--
>
<!--
</el-row>
--
>
<!--
<el-form>
--
>
<!--
<el-form-item
class=
"form-item"
>
--
>
<!--
<el-input-->
<!-- v-model="view.title"-->
<!-- size="mini"-->
<!-- :placeholder="$t('chart.title')"-->
<!-- prefix-icon="el-icon-search"-->
<!-- clearable-->
<!-- />--
>
<!--
</el-form-item>
--
>
<!--
</el-form>
--
>
<
!--
</div>
--
>
<div
style=
"height: 25vh;overflow:auto"
class=
"padding-lr"
>
<span>
{{
$t
(
'chart.chart_type'
)
}}
</span>
<el-row>
...
...
@@ -736,6 +736,7 @@ export default {
onTextChange
(
val
)
{
this
.
view
.
customStyle
.
text
=
val
this
.
view
.
title
=
val
.
title
this
.
save
()
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论