Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
657265cc
提交
657265cc
authored
4月 26, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
a6315795
9d1c5ea9
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
29 行增加
和
16 行删除
+29
-16
DeSelect.vue
frontend/src/components/widget/DeWidget/DeSelect.vue
+2
-1
chart.js
frontend/src/views/chart/chart/chart.js
+2
-4
utils.js
frontend/src/views/chart/components/drag-item/utils.js
+5
-0
LabelNormal.vue
frontend/src/views/chart/components/normal/LabelNormal.vue
+8
-7
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+12
-4
没有找到文件。
frontend/src/components/widget/DeWidget/DeSelect.vue
浏览文件 @
657265cc
...
@@ -227,7 +227,8 @@ export default {
...
@@ -227,7 +227,8 @@ export default {
this
.
onFocus
=
true
this
.
onFocus
=
true
// 下拉框弹出时,设置弹框的宽度
// 下拉框弹出时,设置弹框的宽度
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
selectOptionWidth
=
event
.
srcElement
.
offsetWidth
+
'px'
// this.selectOptionWidth = event.srcElement.offsetWidth + 'px'
this
.
selectOptionWidth
=
event
.
srcElement
.
parentElement
.
parentElement
.
offsetWidth
+
'px'
})
})
}
}
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
657265cc
...
@@ -674,8 +674,7 @@ export const BASE_CHART_STRING = {
...
@@ -674,8 +674,7 @@ export const BASE_CHART_STRING = {
legend
:
DEFAULT_LEGEND_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
background
:
DEFAULT_BACKGROUND_COLOR
}),
}),
customFilter
:
'[]'
customFilter
:
'[]'
}
}
...
@@ -698,8 +697,7 @@ export const BASE_CHART = {
...
@@ -698,8 +697,7 @@ export const BASE_CHART = {
legend
:
DEFAULT_LEGEND_STYLE
,
legend
:
DEFAULT_LEGEND_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
background
:
DEFAULT_BACKGROUND_COLOR
},
},
customFilter
:
[]
customFilter
:
[]
}
}
...
...
frontend/src/views/chart/components/drag-item/utils.js
浏览文件 @
657265cc
export
function
getItemType
(
dimensionData
,
quotaData
,
item
)
{
export
function
getItemType
(
dimensionData
,
quotaData
,
item
)
{
// Check whether the current view is in template status
// ( dimensionData and quotaData have no data). If yes, return 'success' directly
if
(
dimensionData
.
length
===
0
&&
quotaData
.
length
===
0
)
{
return
'success'
}
// 将item的字段在数据集维度、指标字段中查询一遍,如果遇到id不存在、字段类型不一致、维度指标不一致,则提示
// 将item的字段在数据集维度、指标字段中查询一遍,如果遇到id不存在、字段类型不一致、维度指标不一致,则提示
const
status
=
item
.
groupType
const
status
=
item
.
groupType
let
checked
=
false
let
checked
=
false
...
...
frontend/src/views/chart/components/normal/LabelNormal.vue
浏览文件 @
657265cc
...
@@ -175,37 +175,38 @@ export default {
...
@@ -175,37 +175,38 @@ export default {
if
(
this
.
chart
.
senior
)
{
if
(
this
.
chart
.
senior
)
{
const
senior
=
JSON
.
parse
(
this
.
chart
.
senior
)
const
senior
=
JSON
.
parse
(
this
.
chart
.
senior
)
if
(
senior
.
threshold
&&
senior
.
threshold
.
labelThreshold
&&
senior
.
threshold
.
labelThreshold
.
length
>
0
)
{
if
(
senior
.
threshold
&&
senior
.
threshold
.
labelThreshold
&&
senior
.
threshold
.
labelThreshold
.
length
>
0
)
{
const
value
=
this
.
chart
.
data
.
series
[
0
].
data
[
0
]
const
value
=
parseFloat
(
this
.
chart
.
data
.
series
[
0
].
data
[
0
])
for
(
let
i
=
0
;
i
<
senior
.
threshold
.
labelThreshold
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
senior
.
threshold
.
labelThreshold
.
length
;
i
++
)
{
let
flag
=
false
let
flag
=
false
const
t
=
senior
.
threshold
.
labelThreshold
[
i
]
const
t
=
senior
.
threshold
.
labelThreshold
[
i
]
const
tv
=
parseFloat
(
t
.
value
)
if
(
t
.
term
===
'eq'
)
{
if
(
t
.
term
===
'eq'
)
{
if
(
value
===
t
.
value
)
{
if
(
value
===
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
}
else
if
(
t
.
term
===
'not_eq'
)
{
}
else
if
(
t
.
term
===
'not_eq'
)
{
if
(
value
!==
t
.
value
)
{
if
(
value
!==
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
}
else
if
(
t
.
term
===
'lt'
)
{
}
else
if
(
t
.
term
===
'lt'
)
{
if
(
value
<
t
.
value
)
{
if
(
value
<
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
}
else
if
(
t
.
term
===
'gt'
)
{
}
else
if
(
t
.
term
===
'gt'
)
{
if
(
value
>
t
.
value
)
{
if
(
value
>
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
}
else
if
(
t
.
term
===
'le'
)
{
}
else
if
(
t
.
term
===
'le'
)
{
if
(
value
<=
t
.
value
)
{
if
(
value
<=
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
}
else
if
(
t
.
term
===
'ge'
)
{
}
else
if
(
t
.
term
===
'ge'
)
{
if
(
value
>=
t
.
value
)
{
if
(
value
>=
t
v
)
{
this
.
label_content_class
.
color
=
t
.
color
this
.
label_content_class
.
color
=
t
.
color
flag
=
true
flag
=
true
}
}
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
657265cc
...
@@ -1178,7 +1178,6 @@ import bus from '@/utils/bus'
...
@@ -1178,7 +1178,6 @@ import bus from '@/utils/bus'
import
DatasetChartDetail
from
'../../dataset/common/DatasetChartDetail'
import
DatasetChartDetail
from
'../../dataset/common/DatasetChartDetail'
// shape attr,component style
// shape attr,component style
import
{
import
{
DEFAULT_BACKGROUND_COLOR
,
DEFAULT_COLOR_CASE
,
DEFAULT_COLOR_CASE
,
DEFAULT_FUNCTION_CFG
,
DEFAULT_FUNCTION_CFG
,
DEFAULT_LABEL
,
DEFAULT_LABEL
,
...
@@ -1333,7 +1332,6 @@ export default {
...
@@ -1333,7 +1332,6 @@ export default {
xAxis
:
DEFAULT_XAXIS_STYLE
,
xAxis
:
DEFAULT_XAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxis
:
DEFAULT_YAXIS_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
,
yAxisExt
:
DEFAULT_YAXIS_EXT_STYLE
,
background
:
DEFAULT_BACKGROUND_COLOR
,
split
:
DEFAULT_SPLIT
split
:
DEFAULT_SPLIT
},
},
senior
:
{
senior
:
{
...
@@ -1472,7 +1470,8 @@ export default {
...
@@ -1472,7 +1470,8 @@ export default {
})
})
this
.
pluginRenderOptions
=
[...
this
.
renderOptions
,
...
pluginOptions
]
this
.
pluginRenderOptions
=
[...
this
.
renderOptions
,
...
pluginOptions
]
},
},
emptyTableData
()
{
emptyTableData
(
id
)
{
console
.
log
(
'emptyTableData:'
+
id
)
this
.
table
=
{}
this
.
table
=
{}
this
.
dimension
=
[]
this
.
dimension
=
[]
this
.
quota
=
[]
this
.
quota
=
[]
...
@@ -1500,8 +1499,11 @@ export default {
...
@@ -1500,8 +1499,11 @@ export default {
initTableData
(
id
,
optType
)
{
initTableData
(
id
,
optType
)
{
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
post
(
'/dataset/table/getWithPermission/'
+
id
,
null
).
then
(
response
=>
{
post
(
'/dataset/table/getWithPermission/'
+
id
,
null
).
then
(
response
=>
{
// If click too fast on the panel, the data here may be inconsistent, so make a verification
if
(
this
.
view
.
tableId
===
id
)
{
this
.
table
=
response
.
data
this
.
table
=
response
.
data
this
.
initTableField
(
id
,
optType
)
this
.
initTableField
(
id
,
optType
)
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
table
=
null
this
.
table
=
null
this
.
resetDatasetField
()
this
.
resetDatasetField
()
...
@@ -1514,6 +1516,8 @@ export default {
...
@@ -1514,6 +1516,8 @@ export default {
initTableField
(
id
,
optType
)
{
initTableField
(
id
,
optType
)
{
if
(
this
.
table
)
{
if
(
this
.
table
)
{
post
(
'/dataset/table/getFieldsFromDE'
,
this
.
table
).
then
(
response
=>
{
post
(
'/dataset/table/getFieldsFromDE'
,
this
.
table
).
then
(
response
=>
{
// If click too fast on the panel, the data here may be inconsistent, so make a verification
if
(
this
.
view
.
tableId
===
id
)
{
this
.
dimension
=
response
.
data
.
dimension
this
.
dimension
=
response
.
data
.
dimension
this
.
quota
=
response
.
data
.
quota
this
.
quota
=
response
.
data
.
quota
this
.
dimensionData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dimension
))
this
.
dimensionData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dimension
))
...
@@ -1526,6 +1530,7 @@ export default {
...
@@ -1526,6 +1530,7 @@ export default {
this
.
calcData
()
this
.
calcData
()
})
})
}
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
this
.
resetView
()
this
.
resetView
()
...
@@ -1911,8 +1916,10 @@ export default {
...
@@ -1911,8 +1916,10 @@ export default {
getChart
(
id
,
queryFrom
=
'panel_edit'
)
{
getChart
(
id
,
queryFrom
=
'panel_edit'
)
{
if
(
id
)
{
if
(
id
)
{
getChartDetails
(
id
,
this
.
panelInfo
.
id
,
{
queryFrom
:
queryFrom
}).
then
(
response
=>
{
getChartDetails
(
id
,
this
.
panelInfo
.
id
,
{
queryFrom
:
queryFrom
}).
then
(
response
=>
{
// If click too fast on the panel, the data here may be inconsistent, so make a verification
if
(
response
.
data
.
id
===
this
.
param
.
id
)
{
if
(
response
.
data
.
dataFrom
===
'template'
)
{
if
(
response
.
data
.
dataFrom
===
'template'
)
{
this
.
emptyTableData
(
)
this
.
emptyTableData
(
response
.
data
.
id
)
}
else
{
}
else
{
this
.
initTableData
(
response
.
data
.
tableId
)
this
.
initTableData
(
response
.
data
.
tableId
)
}
}
...
@@ -1932,6 +1939,7 @@ export default {
...
@@ -1932,6 +1939,7 @@ export default {
// 将视图传入echart组件
// 将视图传入echart组件
this
.
chart
=
response
.
data
this
.
chart
=
response
.
data
this
.
data
=
response
.
data
.
data
this
.
data
=
response
.
data
.
data
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
httpRequest
.
status
=
err
.
response
.
data
.
success
this
.
httpRequest
.
status
=
err
.
response
.
data
.
success
this
.
httpRequest
.
msg
=
err
.
response
.
data
.
message
this
.
httpRequest
.
msg
=
err
.
response
.
data
.
message
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论