Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
861b5767
提交
861b5767
authored
4月 29, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
bcb4084e
121feeb9
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
76 行增加
和
40 行删除
+76
-40
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+21
-3
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+5
-1
DeStreamMedia.vue
.../src/components/canvas/custom-component/DeStreamMedia.vue
+1
-1
gauge_antv.js
frontend/src/views/chart/chart/gauge/gauge_antv.js
+1
-1
ComponentWait.vue
frontend/src/views/panel/edit/ComponentWait.vue
+1
-1
ComponentWaitItem.vue
frontend/src/views/panel/edit/ComponentWaitItem.vue
+5
-9
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+27
-20
index.vue
frontend/src/views/system/user/index.vue
+7
-2
personPwd.vue
frontend/src/views/system/user/personPwd.vue
+6
-1
index.html
mobile/public/index.html
+2
-1
没有找到文件。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
861b5767
package
io
.
dataease
.
service
.
dataset
;
package
io
.
dataease
.
service
.
dataset
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
...
@@ -960,6 +962,8 @@ public class DataSetTableService {
...
@@ -960,6 +962,8 @@ public class DataSetTableService {
res
.
put
(
"data"
,
jsonArray
);
res
.
put
(
"data"
,
jsonArray
);
return
res
;
return
res
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
return
res
;
return
res
;
}
}
}
}
...
@@ -1321,6 +1325,17 @@ public class DataSetTableService {
...
@@ -1321,6 +1325,17 @@ public class DataSetTableService {
DatasourceTypes
datasourceTypes
=
DatasourceTypes
.
valueOf
(
ds
.
getType
());
DatasourceTypes
datasourceTypes
=
DatasourceTypes
.
valueOf
(
ds
.
getType
());
String
keyword
=
datasourceTypes
.
getKeywordPrefix
()
+
"%s"
+
datasourceTypes
.
getKeywordSuffix
();
String
keyword
=
datasourceTypes
.
getKeywordPrefix
()
+
"%s"
+
datasourceTypes
.
getKeywordSuffix
();
String
configuration
=
ds
.
getConfiguration
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
configuration
);
String
schema
=
jsonObject
.
getString
(
"schema"
);
String
joinPrefix
=
""
;
if
(
StringUtils
.
isNotEmpty
(
schema
)
&&
(
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
db2
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
sqlServer
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
oracle
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
ds
.
getType
(),
DatasourceTypes
.
pg
.
getType
())))
{
joinPrefix
=
String
.
format
(
keyword
,
schema
)
+
"."
;
}
List
<
UnionDTO
>
union
=
dataTableInfoDTO
.
getUnion
();
List
<
UnionDTO
>
union
=
dataTableInfoDTO
.
getUnion
();
// 所有选中的字段,即select后的查询字段
// 所有选中的字段,即select后的查询字段
Map
<
String
,
String
[]>
checkedInfo
=
new
LinkedHashMap
<>();
Map
<
String
,
String
[]>
checkedInfo
=
new
LinkedHashMap
<>();
...
@@ -1386,7 +1401,7 @@ public class DataSetTableService {
...
@@ -1386,7 +1401,7 @@ public class DataSetTableService {
String
currentTableName
=
new
Gson
().
fromJson
(
currentTable
.
getInfo
(),
DataTableInfoDTO
.
class
)
String
currentTableName
=
new
Gson
().
fromJson
(
currentTable
.
getInfo
(),
DataTableInfoDTO
.
class
)
.
getTable
();
.
getTable
();
join
.
append
(
" "
).
append
(
joinType
).
append
(
" "
).
append
(
String
.
format
(
keyword
,
currentTableName
))
join
.
append
(
" "
).
append
(
joinType
).
append
(
" "
).
append
(
joinPrefix
).
append
(
String
.
format
(
keyword
,
currentTableName
))
.
append
(
" ON "
);
.
append
(
" ON "
);
for
(
int
i
=
0
;
i
<
unionParamDTO
.
getUnionFields
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
unionParamDTO
.
getUnionFields
().
size
();
i
++)
{
UnionItemDTO
unionItemDTO
=
unionParamDTO
.
getUnionFields
().
get
(
i
);
UnionItemDTO
unionItemDTO
=
unionParamDTO
.
getUnionFields
().
get
(
i
);
...
@@ -1409,13 +1424,13 @@ public class DataSetTableService {
...
@@ -1409,13 +1424,13 @@ public class DataSetTableService {
if
(
StringUtils
.
isEmpty
(
f
))
{
if
(
StringUtils
.
isEmpty
(
f
))
{
DEException
.
throwException
(
Translator
.
get
(
"i18n_union_ds_no_checked"
));
DEException
.
throwException
(
Translator
.
get
(
"i18n_union_ds_no_checked"
));
}
}
sql
=
MessageFormat
.
format
(
"SELECT {0} FROM {1}"
,
f
,
String
.
format
(
keyword
,
tableName
))
+
join
.
toString
();
sql
=
MessageFormat
.
format
(
"SELECT {0} FROM {1}"
,
f
,
joinPrefix
+
String
.
format
(
keyword
,
tableName
))
+
join
.
toString
();
}
else
{
}
else
{
String
f
=
StringUtils
.
join
(
checkedInfo
.
get
(
tableName
),
","
);
String
f
=
StringUtils
.
join
(
checkedInfo
.
get
(
tableName
),
","
);
if
(
StringUtils
.
isEmpty
(
f
))
{
if
(
StringUtils
.
isEmpty
(
f
))
{
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_union_ds_no_checked"
));
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_union_ds_no_checked"
));
}
}
sql
=
MessageFormat
.
format
(
"SELECT {0} FROM {1}"
,
f
,
String
.
format
(
keyword
,
tableName
));
sql
=
MessageFormat
.
format
(
"SELECT {0} FROM {1}"
,
f
,
joinPrefix
+
String
.
format
(
keyword
,
tableName
));
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"sql"
,
sql
);
map
.
put
(
"sql"
,
sql
);
...
@@ -1494,6 +1509,9 @@ public class DataSetTableService {
...
@@ -1494,6 +1509,9 @@ public class DataSetTableService {
public
void
saveTableField
(
DatasetTable
datasetTable
)
throws
Exception
{
public
void
saveTableField
(
DatasetTable
datasetTable
)
throws
Exception
{
Datasource
ds
=
datasourceMapper
.
selectByPrimaryKey
(
datasetTable
.
getDataSourceId
());
Datasource
ds
=
datasourceMapper
.
selectByPrimaryKey
(
datasetTable
.
getDataSourceId
());
if
(
ObjectUtils
.
isEmpty
(
ds
))
{
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_datasource_delete"
));
}
DataSetTableRequest
dataSetTableRequest
=
new
DataSetTableRequest
();
DataSetTableRequest
dataSetTableRequest
=
new
DataSetTableRequest
();
BeanUtils
.
copyBean
(
dataSetTableRequest
,
datasetTable
);
BeanUtils
.
copyBean
(
dataSetTableRequest
,
datasetTable
);
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
861b5767
...
@@ -1368,7 +1368,11 @@ export default {
...
@@ -1368,7 +1368,11 @@ export default {
resizeView
(
index
,
item
)
{
resizeView
(
index
,
item
)
{
if
(
item
.
type
===
'view'
||
item
.
type
===
'de-show-date'
)
{
if
(
item
.
type
===
'view'
||
item
.
type
===
'de-show-date'
)
{
this
.
$refs
.
wrapperChild
[
index
].
chartResize
()
try
{
this
.
$refs
.
wrapperChild
[
index
].
chartResize
()
}
catch
(
e
)
{
// ignore error
}
}
}
},
},
editComponent
(
index
,
item
)
{
editComponent
(
index
,
item
)
{
...
...
frontend/src/components/canvas/custom-component/DeStreamMedia.vue
浏览文件 @
861b5767
...
@@ -115,7 +115,7 @@ export default {
...
@@ -115,7 +115,7 @@ export default {
this
.
flvPlayer
.
load
()
this
.
flvPlayer
.
load
()
this
.
flvPlayer
.
play
()
this
.
flvPlayer
.
play
()
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
'flvjs err ignore'
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/chart/gauge/gauge_antv.js
浏览文件 @
861b5767
...
@@ -128,7 +128,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
...
@@ -128,7 +128,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
}
}
}
}
}
}
console
.
log
(
options
.
indicator
.
pin
)
//
console.log(options.indicator.pin)
// 开始渲染
// 开始渲染
if
(
plot
)
{
if
(
plot
)
{
...
...
frontend/src/views/panel/edit/ComponentWait.vue
浏览文件 @
861b5767
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
v-for=
"(config, index) in pcComponentData"
v-for=
"(config, index) in pcComponentData"
v-if=
"!config.mobileSelected"
v-if=
"!config.mobileSelected"
:id=
"'wait' + config.id"
:id=
"'wait' + config.id"
:key=
"
index
"
:key=
"
config.id
"
>
>
<component-wait-item
<component-wait-item
:config=
"config"
:config=
"config"
...
...
frontend/src/views/panel/edit/ComponentWaitItem.vue
浏览文件 @
861b5767
<
template
>
<
template
>
<div
<div
class=
"component-item"
>
v-proportion=
"0.8"
:style=
"componentItemStyle"
>
<mobile-check-bar
v-if=
"mobileCheckBarShow"
:element=
"config"
/>
<mobile-check-bar
v-if=
"mobileCheckBarShow"
:element=
"config"
/>
<de-out-widget
<de-out-widget
v-if=
"config.type==='custom'"
v-if=
"config.type==='custom'"
...
@@ -70,11 +67,6 @@ export default {
...
@@ -70,11 +67,6 @@ export default {
})
})
return
result
return
result
},
},
componentItemStyle
()
{
return
{
padding
:
'5px'
}
},
...
mapState
([
...
mapState
([
'mobileLayoutStatus'
,
'mobileLayoutStatus'
,
'componentData'
,
'componentData'
,
...
@@ -96,4 +88,8 @@ export default {
...
@@ -96,4 +88,8 @@ export default {
width
:
100%
!important
;
width
:
100%
!important
;
height
:
100%
;
height
:
100%
;
}
}
.component-item
{
padding
:
5px
;
height
:
200px
!important
;
}
</
style
>
</
style
>
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
861b5767
...
@@ -266,35 +266,40 @@ export default {
...
@@ -266,35 +266,40 @@ export default {
downloadToTemplate
()
{
downloadToTemplate
()
{
const
_this
=
this
const
_this
=
this
_this
.
dataLoading
=
true
_this
.
dataLoading
=
true
_this
.
findStaticSource
(
function
(
staticResource
)
{
try
{
html2canvas
(
document
.
getElementById
(
'canvasInfoTemp'
)).
then
(
canvas
=>
{
_this
.
findStaticSource
(
function
(
staticResource
)
{
_this
.
dataLoading
=
false
html2canvas
(
document
.
getElementById
(
'canvasInfoTemp'
)).
then
(
canvas
=>
{
const
snapshot
=
canvas
.
toDataURL
(
'image/jpeg'
,
0.1
)
// 0.1是图片质量
_this
.
dataLoading
=
false
if
(
snapshot
!==
''
)
{
const
snapshot
=
canvas
.
toDataURL
(
'image/jpeg'
,
0.1
)
// 0.1是图片质量
_this
.
templateInfo
=
{
if
(
snapshot
!==
''
)
{
name
:
_this
.
$store
.
state
.
panel
.
panelInfo
.
name
,
_this
.
templateInfo
=
{
templateType
:
'self'
,
name
:
_this
.
$store
.
state
.
panel
.
panelInfo
.
name
,
snapshot
:
snapshot
,
templateType
:
'self'
,
panelStyle
:
JSON
.
stringify
(
_this
.
canvasStyleData
),
snapshot
:
snapshot
,
panelData
:
JSON
.
stringify
(
_this
.
componentData
),
panelStyle
:
JSON
.
stringify
(
_this
.
canvasStyleData
),
dynamicData
:
JSON
.
stringify
(
_this
.
panelViewDetailsInfo
),
panelData
:
JSON
.
stringify
(
_this
.
componentData
),
staticResource
:
JSON
.
stringify
(
staticResource
||
{})
dynamicData
:
JSON
.
stringify
(
_this
.
panelViewDetailsInfo
),
staticResource
:
JSON
.
stringify
(
staticResource
||
{})
}
const
blob
=
new
Blob
([
JSON
.
stringify
(
_this
.
templateInfo
)],
{
type
:
''
})
FileSaver
.
saveAs
(
blob
,
_this
.
$store
.
state
.
panel
.
panelInfo
.
name
+
'-TEMPLATE.DET'
)
}
}
const
blob
=
new
Blob
([
JSON
.
stringify
(
_this
.
templateInfo
)],
{
type
:
''
})
})
FileSaver
.
saveAs
(
blob
,
_this
.
$store
.
state
.
panel
.
panelInfo
.
name
+
'-TEMPLATE.DET'
)
}
})
})
})
}
catch
(
e
)
{
console
.
error
(
e
)
_this
.
dataLoading
=
false
}
},
},
// 解析静态文件
// 解析静态文件
findStaticSource
(
callBack
)
{
findStaticSource
(
callBack
)
{
const
staticResource
=
[]
const
staticResource
=
[]
// 系统背景文件
// 系统背景文件
if
(
t
his
.
canvasStyleData
.
panel
.
imageUrl
&&
this
.
canvasStyleData
.
panel
.
imageUrl
.
indexOf
(
'static-resource'
)
>
-
1
)
{
if
(
t
ypeof
this
.
canvasStyleData
.
panel
.
imageUrl
===
'string'
&&
this
.
canvasStyleData
.
panel
.
imageUrl
.
indexOf
(
'static-resource'
)
>
-
1
)
{
staticResource
.
push
(
this
.
canvasStyleData
.
panel
.
imageUrl
)
staticResource
.
push
(
this
.
canvasStyleData
.
panel
.
imageUrl
)
}
}
this
.
componentData
.
forEach
(
item
=>
{
this
.
componentData
.
forEach
(
item
=>
{
if
(
item
.
commonBackground
&&
item
.
commonBackground
.
outerImage
&&
item
.
commonBackground
.
outerImage
.
indexOf
(
'static-resource'
)
>
-
1
)
{
if
(
typeof
item
.
commonBackground
.
outerImage
===
'string'
&&
item
.
commonBackground
.
outerImage
.
indexOf
(
'static-resource'
)
>
-
1
)
{
staticResource
.
push
(
item
.
commonBackground
.
outerImage
)
staticResource
.
push
(
item
.
commonBackground
.
outerImage
)
}
}
})
})
...
@@ -308,7 +313,9 @@ export default {
...
@@ -308,7 +313,9 @@ export default {
callBack
()
callBack
()
}
}
}
else
{
}
else
{
callBack
()
setTimeout
(()
=>
{
callBack
()
},
0
)
}
}
},
},
...
...
frontend/src/views/system/user/index.vue
浏览文件 @
861b5767
...
@@ -183,7 +183,7 @@ import { pluginLoaded } from '@/api/user'
...
@@ -183,7 +183,7 @@ import { pluginLoaded } from '@/api/user'
/* import { ldapStatus, pluginLoaded } from '@/api/user' */
/* import { ldapStatus, pluginLoaded } from '@/api/user' */
import
{
userLists
,
addUser
,
editUser
,
delUser
,
editPassword
,
editStatus
,
allRoles
}
from
'@/api/system/user'
import
{
userLists
,
addUser
,
editUser
,
delUser
,
editPassword
,
editStatus
,
allRoles
}
from
'@/api/system/user'
import
{
getDeptTree
,
treeByDeptId
}
from
'@/api/system/dept'
import
{
getDeptTree
,
treeByDeptId
}
from
'@/api/system/dept'
import
{
mapGetters
}
from
'vuex'
export
default
{
export
default
{
components
:
{
ComplexTable
,
LayoutContent
,
Treeselect
},
components
:
{
ComplexTable
,
LayoutContent
,
Treeselect
},
...
@@ -320,6 +320,11 @@ export default {
...
@@ -320,6 +320,11 @@ export default {
canLoadDom
:
false
canLoadDom
:
false
}
}
},
},
computed
:
{
...
mapGetters
([
'user'
])
},
mounted
()
{
mounted
()
{
this
.
allRoles
()
this
.
allRoles
()
this
.
search
()
this
.
search
()
...
@@ -420,7 +425,7 @@ export default {
...
@@ -420,7 +425,7 @@ export default {
this
.
$success
(
this
.
$t
(
'commons.modify_success'
))
this
.
$success
(
this
.
$t
(
'commons.modify_success'
))
this
.
editPasswordVisible
=
false
this
.
editPasswordVisible
=
false
this
.
search
()
this
.
search
()
window
.
location
.
reload
()
this
.
user
&&
this
.
user
.
userId
&&
(
this
.
user
.
userId
===
editPasswordForm
.
userId
)
&&
window
.
location
.
reload
()
})
})
}
else
{
}
else
{
return
false
return
false
...
...
frontend/src/views/system/user/personPwd.vue
浏览文件 @
861b5767
...
@@ -85,12 +85,17 @@ export default {
...
@@ -85,12 +85,17 @@ export default {
}
}
updatePersonPwd
(
param
).
then
(
res
=>
{
updatePersonPwd
(
param
).
then
(
res
=>
{
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
$router
.
push
(
'/panel/index'
)
this
.
logout
()
// this.$router.push('/panel/index')
})
})
}
else
{
}
else
{
return
false
return
false
}
}
})
})
},
async
logout
()
{
await
this
.
$store
.
dispatch
(
'user/logout'
)
this
.
$router
.
push
(
'/'
)
}
}
}
}
}
}
...
...
mobile/public/index.html
浏览文件 @
861b5767
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"Content-Security-Policy"
content=
"upgrade-insecure-requests"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<title>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
</title>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论