Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
20ce5bbb
提交
20ce5bbb
authored
5月 06, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
# Conflicts: # frontend/src/views/chart/view/ChartEdit.vue
上级
53b021bb
1dabde63
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
78 行增加
和
80 行删除
+78
-80
JWTUtils.java
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
+4
-2
application.properties
backend/src/main/resources/application.properties
+5
-3
TableNormal.vue
frontend/src/views/chart/components/table/TableNormal.vue
+1
-1
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+68
-74
没有找到文件。
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
浏览文件 @
20ce5bbb
...
...
@@ -85,8 +85,10 @@ public class JWTUtils {
public
static
boolean
loginExpire
(
String
token
){
if
(
Login_Interval
==
0
)
{
String
property
=
CommonBeanFactory
.
getBean
(
Environment
.
class
).
getProperty
(
"dataease.login_timeout"
);
int
seconds
=
StringUtils
.
isNotEmpty
(
property
)
?
Integer
.
parseInt
(
property
):
(
10
*
60
);
Login_Interval
=
seconds
*
1000
;
// 默认超时时间是8h
int
minute
=
StringUtils
.
isNotEmpty
(
property
)
?
Integer
.
parseInt
(
property
):
(
8
*
60
);
// 分钟换算成毫秒
Login_Interval
=
minute
*
1000
*
60
;
}
Long
now
=
System
.
currentTimeMillis
();
Long
lastOperateTime
=
tokenLastOperateTime
(
token
);
...
...
backend/src/main/resources/application.properties
浏览文件 @
20ce5bbb
...
...
@@ -62,10 +62,12 @@ spring.mvc.log-request-details=true
pagehelper.PageRowBounds
=
true
#excel等用户上传文件路径
upload.file.path
=
/opt/dataease/data/upload/
#初始密码和登录超时时间移到/opt/dataease/conf/dataease.properties
#用户初始密码,如果不设置默认是DataEase123..
dataease.init_password
=
DataEase123456
#登录超时时间单位
s 设置默认30分钟 如果雨不设置 默认10分钟也就是10*60
dataease.login_timeout
=
180
0
#
dataease.init_password=DataEase123456
#登录超时时间单位
min
#dataease.login_timeout=48
0
...
...
frontend/src/views/chart/components/table/TableNormal.vue
浏览文件 @
20ce5bbb
...
...
@@ -113,7 +113,7 @@ export default {
const
that
=
this
setTimeout
(
function
()
{
const
currentHeight
=
document
.
documentElement
.
clientHeight
const
tableMaxHeight
=
currentHeight
-
56
-
40
-
84
-
that
.
$refs
.
title
.
offsetHeight
-
8
*
2
-
20
const
tableMaxHeight
=
currentHeight
-
56
-
40
-
84
-
that
.
$refs
.
title
.
offsetHeight
-
20
let
tableHeight
if
(
that
.
chart
.
data
)
{
tableHeight
=
(
that
.
chart
.
data
.
tableRow
.
length
+
2
)
*
36
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
20ce5bbb
...
...
@@ -75,7 +75,7 @@
<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
WithSnapshot()
"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
<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"
>
...
...
@@ -97,7 +97,7 @@
<el-radio-group
v-model=
"view.type"
style=
"width: 100%"
@
change=
"save"
@
change=
"save
(false)
"
>
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<el-radio
value=
"bar"
label=
"bar"
><svg-icon
icon-class=
"bar"
class=
"chart-icon"
/></el-radio>
...
...
@@ -125,30 +125,21 @@
</el-row>
</div>
<div
style=
"height: 40%;overflow:hidden;border-top: 1px solid #e6e6e6"
>
<el-row
class=
"padding-lr"
>
<span>
样式优先级
</span>
<el-radio-group
v-model=
"view.stylePriority"
size=
"mini"
@
change=
"save"
>
<el-radio
style=
"margin-left: 20px"
label=
"view"
><span>
视图
</span></el-radio>
<el-radio
label=
"panel"
><span>
仪表盘
</span></el-radio>
</el-radio-group>
</el-row>
<el-row>
<el-tabs
type=
"card"
:stretch=
"true"
class=
"tab-header"
>
<el-tab-pane
:label=
"$t('chart.shape_attr')"
class=
"padding-lr"
>
<color-selector
class=
"attr-selector"
:chart=
"chart"
@
onColorChange=
"onColorChange"
/>
<size-selector
class=
"attr-selector"
:chart=
"chart"
@
onSizeChange=
"onSizeChange"
/>
<label-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLabelChange=
"onLabelChange"
/>
<tooltip-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onTooltipChange=
"onTooltipChange"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('chart.module_style')"
class=
"padding-lr"
>
<title-selector
class=
"attr-selector"
:chart=
"chart"
@
onTextChange=
"onTextChange"
/>
<legend-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
<x-axis-selector
v-show=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
<y-axis-selector
v-show=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
<background-color-selector
class=
"attr-selector"
:chart=
"chart"
@
onChangeBackgroundForm=
"onChangeBackgroundForm"
/>
</el-tab-pane>
</el-tabs>
</el-row>
<el-tabs
type=
"card"
:stretch=
"true"
class=
"tab-header"
>
<el-tab-pane
:label=
"$t('chart.shape_attr')"
class=
"padding-lr"
>
<color-selector
class=
"attr-selector"
:chart=
"chart"
@
onColorChange=
"onColorChange"
/>
<size-selector
class=
"attr-selector"
:chart=
"chart"
@
onSizeChange=
"onSizeChange"
/>
<label-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLabelChange=
"onLabelChange"
/>
<tooltip-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onTooltipChange=
"onTooltipChange"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('chart.module_style')"
class=
"padding-lr"
>
<title-selector
class=
"attr-selector"
:chart=
"chart"
@
onTextChange=
"onTextChange"
/>
<legend-selector
v-show=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
<x-axis-selector
v-show=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
<y-axis-selector
v-show=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
<background-color-selector
class=
"attr-selector"
:chart=
"chart"
@
onChangeBackgroundForm=
"onChangeBackgroundForm"
/>
</el-tab-pane>
</el-tabs>
</div>
<div
v-if=
"false"
style=
"overflow:auto;border-top: 1px solid #e6e6e6"
class=
"padding-lr filter-class"
>
<span>
{{
$t
(
'chart.result_filter'
)
}}
</span>
...
...
@@ -204,10 +195,8 @@
</el-row>
</el-row>
<div
ref=
"imageWrapper"
style=
"height: 100%"
>
<chart-component
v-if=
"chart.type && !chart.type.includes('table')"
:chart-id=
"chart.id"
:chart=
"chart"
class=
"chart-class"
/>
<table-normal
v-if=
"chart.type && chart.type.includes('table')"
:chart=
"chart"
class=
"table-class"
/>
</div>
<chart-component
v-if=
"chart.type && !chart.type.includes('table')"
:chart-id=
"chart.id"
:chart=
"chart"
class=
"chart-class"
/>
<table-normal
v-if=
"chart.type && chart.type.includes('table')"
:chart=
"chart"
class=
"table-class"
/>
</el-row>
</el-col>
</el-row>
...
...
@@ -264,7 +253,6 @@ import FilterItem from '../components/drag-item/FilterItem'
import
ChartComponent
from
'../components/ChartComponent'
import
bus
from
'@/utils/bus'
import
DatasetChartDetail
from
'../../dataset/common/DatasetChartDetail'
import
html2canvas
from
'html2canvas'
// shape attr,component style
import
{
...
...
@@ -306,7 +294,6 @@ export default {
dimension
:
[],
quota
:
[],
view
:
{
stylePriority
:
'panel'
,
xaxis
:
[],
yaxis
:
[],
show
:
true
,
...
...
@@ -344,7 +331,8 @@ export default {
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'change'
}
]
},
tabStatus
:
false
tabStatus
:
false
,
data
:
{}
}
},
computed
:
{
...
...
@@ -386,10 +374,7 @@ export default {
this
.
quota
=
response
.
data
.
quota
})
},
saveWithSnapshot
(){
this
.
save
(
'true'
)
},
save
(
withSnapshot
)
{
save
(
getData
)
{
const
view
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
view
))
view
.
id
=
this
.
view
.
id
view
.
sceneId
=
this
.
view
.
sceneId
...
...
@@ -431,29 +416,19 @@ export default {
view
.
customAttr
=
JSON
.
stringify
(
view
.
customAttr
)
view
.
customStyle
=
JSON
.
stringify
(
view
.
customStyle
)
view
.
customFilter
=
JSON
.
stringify
(
view
.
customFilter
)
debugger
if
(
withSnapshot
===
'true'
)
{
html2canvas
(
this
.
$refs
.
imageWrapper
).
then
(
canvas
=>
{
const
snapshot
=
canvas
.
toDataURL
(
'image/jpeg'
,
0.2
)
// 0.2是图片质量
if
(
snapshot
!==
''
)
{
view
.
snapshot
=
snapshot
debugger
post
(
'/chart/view/save'
,
view
).
then
(
response
=>
{
// this.get(response.data.id);
this
.
getData
(
response
.
data
.
id
)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
null
)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
response
.
data
)
})
}
})
}
else
{
post
(
'/chart/view/save'
,
view
).
then
(
response
=>
{
// this.get(response.data.id);
post
(
'/chart/view/save'
,
view
).
then
(
response
=>
{
// this.get(response.data.id);
// this.getData(response.data.id)
if
(
getData
)
{
this
.
getData
(
response
.
data
.
id
)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
null
)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
response
.
data
)
})
}
}
else
{
this
.
getChart
(
response
.
data
.
id
)
}
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
null
)
this
.
$store
.
dispatch
(
'chart/setChartSceneData'
,
response
.
data
)
})
},
closeEdit
()
{
// 从仪表盘入口关闭
...
...
@@ -474,7 +449,26 @@ export default {
this
.
view
.
customFilter
=
this
.
view
.
customFilter
?
JSON
.
parse
(
this
.
view
.
customFilter
)
:
{}
// 将视图传入echart组件
this
.
chart
=
response
.
data
console
.
log
(
JSON
.
stringify
(
this
.
chart
))
this
.
data
=
response
.
data
.
data
// console.log(JSON.stringify(this.chart))
})
}
else
{
this
.
view
=
{}
}
},
getChart
(
id
)
{
if
(
id
)
{
post
(
'/chart/view/get/'
+
id
,
{}).
then
(
response
=>
{
this
.
initTableData
(
response
.
data
.
tableId
)
this
.
view
=
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
))
this
.
view
.
xaxis
=
this
.
view
.
xaxis
?
JSON
.
parse
(
this
.
view
.
xaxis
)
:
[]
this
.
view
.
yaxis
=
this
.
view
.
yaxis
?
JSON
.
parse
(
this
.
view
.
yaxis
)
:
[]
this
.
view
.
customAttr
=
this
.
view
.
customAttr
?
JSON
.
parse
(
this
.
view
.
customAttr
)
:
{}
this
.
view
.
customStyle
=
this
.
view
.
customStyle
?
JSON
.
parse
(
this
.
view
.
customStyle
)
:
{}
this
.
view
.
customFilter
=
this
.
view
.
customFilter
?
JSON
.
parse
(
this
.
view
.
customFilter
)
:
{}
response
.
data
.
data
=
this
.
data
this
.
chart
=
response
.
data
})
}
else
{
this
.
view
=
{}
...
...
@@ -483,26 +477,26 @@ export default {
// 左边往右边拖动时的事件
start1
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
e
.
clone
.
className
=
'item-on-move'
e
.
item
.
className
=
'item-on-move'
},
end1
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
e
.
clone
.
className
=
'item'
e
.
item
.
className
=
'item'
this
.
refuseMove
(
e
)
this
.
removeCheckedKey
(
e
)
this
.
save
()
this
.
save
(
true
)
},
// 右边往左边拖动时的事件
start2
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
},
end2
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
this
.
removeDuplicateKey
(
e
)
this
.
save
()
this
.
save
(
true
)
},
removeCheckedKey
(
e
)
{
const
that
=
this
...
...
@@ -551,7 +545,7 @@ export default {
},
// move回调方法
onMove
(
e
,
originalEvent
)
{
console
.
log
(
e
)
//
console.log(e)
this
.
moveId
=
e
.
draggedContext
.
element
.
id
// //不允许停靠
// if (e.relatedContext.element.id == 1) return false;
...
...
@@ -562,12 +556,12 @@ export default {
},
dimensionItemChange
(
item
)
{
this
.
save
()
this
.
save
(
true
)
},
dimensionItemRemove
(
item
)
{
this
.
view
.
xaxis
.
splice
(
item
.
index
,
1
)
this
.
save
()
this
.
save
(
true
)
},
quotaItemChange
(
item
)
{
...
...
@@ -577,12 +571,12 @@ export default {
// ele.summary = item.summary
// }
// })
this
.
save
()
this
.
save
(
true
)
},
quotaItemRemove
(
item
)
{
this
.
view
.
yaxis
.
splice
(
item
.
index
,
1
)
this
.
save
()
this
.
save
(
true
)
},
onColorChange
(
val
)
{
...
...
@@ -639,7 +633,7 @@ export default {
},
saveDimensionFilter
()
{
this
.
view
.
xaxis
[
this
.
dimensionItem
.
index
].
filter
=
this
.
dimensionItem
.
filter
this
.
save
()
this
.
save
(
true
)
this
.
closeDimensionFilter
()
},
...
...
@@ -652,7 +646,7 @@ export default {
},
saveQuotaFilter
()
{
this
.
view
.
yaxis
[
this
.
quotaItem
.
index
].
filter
=
this
.
quotaItem
.
filter
this
.
save
()
this
.
save
(
true
)
this
.
closeQuotaFilter
()
},
...
...
@@ -666,7 +660,7 @@ export default {
}
else
if
(
this
.
itemForm
.
renameType
===
'dimension'
)
{
this
.
view
.
xaxis
[
this
.
itemForm
.
index
].
name
=
this
.
itemForm
.
name
}
this
.
save
()
this
.
save
(
true
)
this
.
closeRename
()
},
closeRename
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论