Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
6475c388
Unverified
提交
6475c388
authored
3月 21, 2022
作者:
Junjun
提交者:
GitHub
3月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1940 from dataease/pr@dev@refactor_chart_edit
refactor: 视图编辑块优化
上级
dba486d9
2ed3c6e8
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
27 行增加
和
11 行删除
+27
-11
CompareEdit.vue
frontend/src/views/chart/components/compare/CompareEdit.vue
+6
-1
DimensionExtItem.vue
...src/views/chart/components/drag-item/DimensionExtItem.vue
+1
-1
DimensionItem.vue
...nd/src/views/chart/components/drag-item/DimensionItem.vue
+1
-1
QuotaExtItem.vue
...end/src/views/chart/components/drag-item/QuotaExtItem.vue
+8
-3
QuotaItem.vue
frontend/src/views/chart/components/drag-item/QuotaItem.vue
+8
-3
TotalCfg.vue
frontend/src/views/chart/components/shape-attr/TotalCfg.vue
+2
-2
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+1
-0
没有找到文件。
frontend/src/views/chart/components/compare/CompareEdit.vue
浏览文件 @
6475c388
...
...
@@ -62,7 +62,12 @@ export default {
methods
:
{
// 过滤xaxis,extStack所有日期字段
initFieldList
()
{
const
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
let
xAxis
=
null
if
(
Object
.
prototype
.
toString
.
call
(
this
.
chart
.
xaxis
)
===
'[object Array]'
)
{
xAxis
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
.
xaxis
))
}
else
{
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
}
const
t1
=
xAxis
.
filter
(
ele
=>
{
return
ele
.
deType
===
1
})
this
.
fieldList
=
t1
// 如果没有选中字段,则默认选中第一个
...
...
frontend/src/views/chart/components/drag-item/DimensionExtItem.vue
浏览文件 @
6475c388
...
...
@@ -13,7 +13,7 @@
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"
false &&
item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
...
...
frontend/src/views/chart/components/drag-item/DimensionItem.vue
浏览文件 @
6475c388
...
...
@@ -13,7 +13,7 @@
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"
false &&
item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
...
...
frontend/src/views/chart/components/drag-item/QuotaExtItem.vue
浏览文件 @
6475c388
...
...
@@ -17,7 +17,7 @@
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"
false &&
item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
</el-tag>
...
...
@@ -176,12 +176,17 @@ export default {
}
},
isEnableCompare
()
{
const
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
let
xAxis
=
null
if
(
Object
.
prototype
.
toString
.
call
(
this
.
chart
.
xaxis
)
===
'[object Array]'
)
{
xAxis
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
.
xaxis
))
}
else
{
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
}
const
t1
=
xAxis
.
filter
(
ele
=>
{
return
ele
.
deType
===
1
})
// 暂时只支持类别轴/维度的时间类型字段
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'
label'
&&
this
.
chart
.
type
!==
'
gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
this
.
disableEditCompare
=
false
}
else
{
this
.
disableEditCompare
=
true
...
...
frontend/src/views/chart/components/drag-item/QuotaItem.vue
浏览文件 @
6475c388
...
...
@@ -17,7 +17,7 @@
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"
false &&
item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
</el-tag>
...
...
@@ -173,12 +173,17 @@ export default {
}
},
isEnableCompare
()
{
const
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
let
xAxis
=
null
if
(
Object
.
prototype
.
toString
.
call
(
this
.
chart
.
xaxis
)
===
'[object Array]'
)
{
xAxis
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
.
xaxis
))
}
else
{
xAxis
=
JSON
.
parse
(
this
.
chart
.
xaxis
)
}
const
t1
=
xAxis
.
filter
(
ele
=>
{
return
ele
.
deType
===
1
})
// 暂时只支持类别轴/维度的时间类型字段
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'
label'
&&
this
.
chart
.
type
!==
'
gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
this
.
disableEditCompare
=
false
}
else
{
this
.
disableEditCompare
=
true
...
...
frontend/src/views/chart/components/shape-attr/TotalCfg.vue
浏览文件 @
6475c388
...
...
@@ -89,7 +89,7 @@ export default {
const
chart
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
))
if
(
chart
.
xaxisExt
)
{
let
arr
=
null
if
(
Object
.
prototype
.
toString
.
call
(
chart
.
xaxisExt
)
===
'[object
Object
]'
)
{
if
(
Object
.
prototype
.
toString
.
call
(
chart
.
xaxisExt
)
===
'[object
Array
]'
)
{
arr
=
JSON
.
parse
(
JSON
.
stringify
(
chart
.
xaxisExt
))
}
else
{
arr
=
JSON
.
parse
(
chart
.
xaxisExt
)
...
...
@@ -102,7 +102,7 @@ export default {
const
chart
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chart
))
if
(
chart
.
xaxis
)
{
let
arr
=
null
if
(
Object
.
prototype
.
toString
.
call
(
chart
.
xaxis
)
===
'[object
Object
]'
)
{
if
(
Object
.
prototype
.
toString
.
call
(
chart
.
xaxis
)
===
'[object
Array
]'
)
{
arr
=
JSON
.
parse
(
JSON
.
stringify
(
chart
.
xaxis
))
}
else
{
arr
=
JSON
.
parse
(
chart
.
xaxis
)
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
6475c388
...
...
@@ -1635,6 +1635,7 @@ export default {
ele
.
filter
=
[]
}
})
this
.
chart
=
JSON
.
parse
(
JSON
.
stringify
(
view
))
this
.
view
=
JSON
.
parse
(
JSON
.
stringify
(
view
))
// stringify json param
view
.
xaxis
=
JSON
.
stringify
(
view
.
xaxis
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论