Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
d04500f3
提交
d04500f3
authored
6月 08, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
a196430d
c839b3cb
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
338 行增加
和
71 行删除
+338
-71
F2CRealm.java
backend/src/main/java/io/dataease/auth/config/F2CRealm.java
+7
-0
JWTUtils.java
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
+0
-3
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+2
-2
DataSetTableRequest.java
...aease/controller/request/dataset/DataSetTableRequest.java
+2
-0
LicCacheEventListener.java
...main/java/io/dataease/listener/LicCacheEventListener.java
+80
-0
CacheUtils.java
...d/src/main/java/io/dataease/listener/util/CacheUtils.java
+61
-0
XAuthServer.java
...src/main/java/io/dataease/plugins/server/XAuthServer.java
+12
-0
AboutService.java
backend/src/main/java/io/dataease/service/AboutService.java
+12
-1
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+3
-3
PluginService.java
.../src/main/java/io/dataease/service/sys/PluginService.java
+12
-0
ehcache.xml
backend/src/main/resources/ehcache/ehcache.xml
+14
-0
Shape.vue
frontend/src/components/canvas/components/Editor/Shape.vue
+7
-3
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+30
-34
en.js
frontend/src/lang/en.js
+5
-1
tw.js
frontend/src/lang/tw.js
+6
-2
zh.js
frontend/src/lang/zh.js
+5
-1
request.js
frontend/src/utils/request.js
+4
-0
TableNormal.vue
frontend/src/views/chart/components/table/TableNormal.vue
+10
-4
AddExcel.vue
frontend/src/views/dataset/add/AddExcel.vue
+24
-10
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+33
-2
LazyTree.vue
frontend/src/views/system/authority/components/LazyTree.vue
+6
-2
index.vue
frontend/src/views/system/datasource/index.vue
+1
-1
index.vue
frontend/src/views/system/role/index.vue
+1
-1
EmailSetting.vue
...end/src/views/system/systemParamSettings/EmailSetting.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/auth/config/F2CRealm.java
浏览文件 @
d04500f3
...
...
@@ -8,6 +8,8 @@ import io.dataease.auth.entity.TokenInfo;
import
io.dataease.auth.service.AuthUserService
;
import
io.dataease.auth.util.JWTUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.listener.util.CacheUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.authc.AuthenticationInfo
;
import
org.apache.shiro.authc.AuthenticationToken
;
...
...
@@ -54,6 +56,11 @@ public class F2CRealm extends AuthorizingRealm {
@Override
protected
AuthenticationInfo
doGetAuthenticationInfo
(
AuthenticationToken
auth
)
throws
AuthenticationException
{
try
{
CacheUtils
.
get
(
"lic_info"
,
"lic"
);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
e
);
}
String
token
=
(
String
)
auth
.
getCredentials
();
// 解密获得username,用于和数据库进行对比
TokenInfo
tokenInfo
=
JWTUtils
.
tokenInfoByToken
(
token
);
...
...
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
浏览文件 @
d04500f3
...
...
@@ -6,12 +6,9 @@ import com.auth0.jwt.algorithms.Algorithm;
import
com.auth0.jwt.exceptions.JWTDecodeException
;
import
com.auth0.jwt.interfaces.DecodedJWT
;
import
io.dataease.auth.entity.TokenInfo
;
import
io.dataease.auth.filter.JWTFilter
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.springframework.core.env.Environment
;
import
java.util.Date
;
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
d04500f3
...
...
@@ -25,12 +25,12 @@ public class DataSetTableController {
private
DataSetTableService
dataSetTableService
;
@PostMapping
(
"batchAdd"
)
public
void
batchAdd
(
@RequestBody
List
<
Data
setTable
>
datasetTable
)
throws
Exception
{
public
void
batchAdd
(
@RequestBody
List
<
Data
SetTableRequest
>
datasetTable
)
throws
Exception
{
dataSetTableService
.
batchInsert
(
datasetTable
);
}
@PostMapping
(
"update"
)
public
DatasetTable
save
(
@RequestBody
Data
setTable
datasetTable
)
throws
Exception
{
public
DatasetTable
save
(
@RequestBody
Data
SetTableRequest
datasetTable
)
throws
Exception
{
return
dataSetTableService
.
save
(
datasetTable
);
}
...
...
backend/src/main/java/io/dataease/controller/request/dataset/DataSetTableRequest.java
浏览文件 @
d04500f3
...
...
@@ -18,4 +18,6 @@ public class DataSetTableRequest extends DatasetTable {
private
String
row
=
"1000"
;
private
String
userId
;
private
Integer
editType
;
}
backend/src/main/java/io/dataease/listener/LicCacheEventListener.java
0 → 100644
浏览文件 @
d04500f3
package
io
.
dataease
.
listener
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.listener.util.CacheUtils
;
import
net.sf.ehcache.CacheException
;
import
net.sf.ehcache.Ehcache
;
import
net.sf.ehcache.Element
;
import
net.sf.ehcache.event.CacheEventListener
;
import
net.sf.ehcache.event.CacheEventListenerFactory
;
import
org.springframework.stereotype.Component
;
import
java.util.Properties
;
@Component
public
class
LicCacheEventListener
extends
CacheEventListenerFactory
implements
CacheEventListener
{
private
static
CacheEventListener
cacheEventListener
;
public
LicCacheEventListener
()
{
cacheEventListener
=
cacheEventListener
==
null
?
this
:
cacheEventListener
;
}
@Override
public
void
notifyElementRemoved
(
Ehcache
ehcache
,
Element
element
)
throws
CacheException
{
/*System.out.println("notifyElementRemoved");*/
}
@Override
public
void
notifyElementPut
(
Ehcache
ehcache
,
Element
element
)
throws
CacheException
{
/*long expirationTime = element.getExpirationTime();
System.out.println(expirationTime);
System.out.println("notifyElementPut");*/
}
@Override
public
void
notifyElementUpdated
(
Ehcache
ehcache
,
Element
element
)
throws
CacheException
{
/*System.out.println("notifyElementUpdated");*/
}
/**
* lic过期触发: 清除用户、角色、权限缓存
* @param ehcache
* @param element
*/
@Override
public
void
notifyElementExpired
(
Ehcache
ehcache
,
Element
element
)
{
// System.out.println("notifyElementExpired");
/*String token = ServletUtils.getToken();
Long userId = JWTUtils.tokenInfoByToken(token).getUserId();
authUserService.clearCache(userId);*/
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
}
@Override
public
void
notifyElementEvicted
(
Ehcache
ehcache
,
Element
element
)
{
/*System.out.println("notifyElementEvicted");*/
}
@Override
public
void
notifyRemoveAll
(
Ehcache
ehcache
)
{
/*System.out.println("notifyRemoveAll");*/
}
@Override
public
void
dispose
()
{
}
@Override
public
CacheEventListener
createCacheEventListener
(
Properties
properties
)
{
return
cacheEventListener
;
}
@Override
public
Object
clone
()
throws
CloneNotSupportedException
{
return
super
.
clone
();
}
}
backend/src/main/java/io/dataease/listener/util/CacheUtils.java
0 → 100644
浏览文件 @
d04500f3
package
io
.
dataease
.
listener
.
util
;
import
net.sf.ehcache.Cache
;
import
net.sf.ehcache.Element
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.ehcache.EhCacheCacheManager
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.Date
;
@Configuration
public
class
CacheUtils
{
private
static
CacheManager
manager
;
@Autowired
public
void
setManager
(
CacheManager
manager
)
{
CacheUtils
.
manager
=
manager
;
}
public
static
Object
get
(
String
cacheName
,
Object
key
)
{
Element
element
=
cache
(
cacheName
).
get
(
key
);
if
(
null
==
element
)
return
null
;
return
element
.
getObjectValue
();
}
private
static
void
put
(
String
cacheName
,
Object
key
,
Object
value
,
Integer
ttl
,
Integer
tti
)
{
Element
e
=
new
Element
(
key
,
value
);
//不设置则使用xml配置
if
(
ttl
!=
null
)
e
.
setEternal
(
false
);
e
.
setTimeToLive
(
ttl
);
if
(
tti
!=
null
)
e
.
setTimeToIdle
(
tti
);
cache
(
cacheName
).
put
(
e
);
}
private
static
boolean
remove
(
String
cacheName
,
Object
key
)
{
return
cache
(
cacheName
).
remove
(
key
);
}
public
static
void
removeAll
(
String
cacheName
)
{
cache
(
cacheName
).
removeAll
();
}
private
static
Cache
cache
(
String
cacheName
)
{
net
.
sf
.
ehcache
.
CacheManager
cacheManager
=
((
EhCacheCacheManager
)
manager
).
getCacheManager
();
if
(!
cacheManager
.
cacheExists
(
cacheName
))
cacheManager
.
addCache
(
cacheName
);
Cache
cacheManagerCache
=
cacheManager
.
getCache
(
cacheName
);
return
cacheManagerCache
;
}
public
static
void
updateLicCache
(
Date
expDate
){
long
time
=
expDate
.
getTime
();
long
exp
=
(
time
-
System
.
currentTimeMillis
())
/
1000
;
int
intExp
=
(
int
)
exp
;
removeAll
(
"lic_info"
);
put
(
"lic_info"
,
"lic"
,
"lic"
,
intExp
,
intExp
);
}
}
backend/src/main/java/io/dataease/plugins/server/XAuthServer.java
浏览文件 @
d04500f3
...
...
@@ -2,18 +2,22 @@ package io.dataease.plugins.server;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.controller.handler.annotation.I18n
;
import
io.dataease.listener.util.CacheUtils
;
import
io.dataease.plugins.config.SpringContextUtil
;
import
io.dataease.plugins.xpack.auth.dto.request.XpackBaseTreeRequest
;
import
io.dataease.plugins.xpack.auth.dto.request.XpackSysAuthRequest
;
import
io.dataease.plugins.xpack.auth.dto.response.XpackSysAuthDetail
;
import
io.dataease.plugins.xpack.auth.dto.response.XpackSysAuthDetailDTO
;
import
io.dataease.plugins.xpack.auth.dto.response.XpackVAuthModelDTO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
io.dataease.plugins.xpack.auth.service.AuthXpackService
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
@RequestMapping
(
"/plugin/auth"
)
@RestController
...
...
@@ -45,5 +49,13 @@ public class XAuthServer {
AuthXpackService
sysAuthService
=
SpringContextUtil
.
getBean
(
AuthXpackService
.
class
);
CurrentUserDto
user
=
AuthUtils
.
getUser
();
sysAuthService
.
authChange
(
request
,
user
.
getUserId
(),
user
.
getUsername
(),
user
.
getIsAdmin
());
// 当权限发生变化 前端实时刷新对应菜单
Optional
.
ofNullable
(
request
.
getAuthSourceType
()).
ifPresent
(
type
->
{
if
(
StringUtils
.
equals
(
"menu"
,
type
))
{
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
}
});
}
}
backend/src/main/java/io/dataease/service/AboutService.java
浏览文件 @
d04500f3
package
io
.
dataease
.
service
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.license.DefaultLicenseService
;
import
io.dataease.commons.license.F2CLicenseResponse
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.listener.util.CacheUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.util.Date
;
import
java.util.Optional
;
@Service
...
...
@@ -23,6 +25,15 @@ public class AboutService {
public
F2CLicenseResponse
updateLicense
(
String
licenseKey
)
{
F2CLicenseResponse
f2CLicenseResponse
=
defaultLicenseService
.
updateLicense
(
product
,
licenseKey
);
Optional
.
ofNullable
(
f2CLicenseResponse
).
ifPresent
(
resp
->
{
if
(
resp
.
getStatus
()
==
F2CLicenseResponse
.
Status
.
valid
){
CacheUtils
.
updateLicCache
(
new
Date
(
f2CLicenseResponse
.
getLicense
().
getExpired
()));
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
}
});
return
f2CLicenseResponse
;
}
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
d04500f3
...
...
@@ -84,13 +84,13 @@ public class DataSetTableService {
@Value
(
"${upload.file.path}"
)
private
String
path
;
public
void
batchInsert
(
List
<
Data
setTable
>
datasetTable
)
throws
Exception
{
for
(
Data
setTable
table
:
datasetTable
)
{
public
void
batchInsert
(
List
<
Data
SetTableRequest
>
datasetTable
)
throws
Exception
{
for
(
Data
SetTableRequest
table
:
datasetTable
)
{
save
(
table
);
}
}
public
DatasetTable
save
(
Data
setTable
datasetTable
)
throws
Exception
{
public
DatasetTable
save
(
Data
SetTableRequest
datasetTable
)
throws
Exception
{
checkName
(
datasetTable
);
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTable
.
getType
(),
"sql"
))
{
DataSetTableRequest
dataSetTableRequest
=
new
DataSetTableRequest
();
...
...
backend/src/main/java/io/dataease/service/sys/PluginService.java
浏览文件 @
d04500f3
...
...
@@ -5,9 +5,11 @@ import io.dataease.base.domain.MyPlugin;
import
io.dataease.base.mapper.MyPluginMapper
;
import
io.dataease.base.mapper.ext.ExtSysPluginMapper
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.utils.DeFileUtils
;
import
io.dataease.commons.utils.ZipUtils
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.listener.util.CacheUtils
;
import
io.dataease.plugins.config.LoadjarUtil
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -89,6 +91,10 @@ public class PluginService {
jarPath
=
DeFileUtils
.
copy
(
jarFile
,
targetDir
);
loadJar
(
jarPath
,
myPlugin
);
myPluginMapper
.
insert
(
myPlugin
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
}
catch
(
Exception
e
)
{
if
(
StringUtils
.
isNotEmpty
(
targetDir
))
{
DeFileUtils
.
deleteFile
(
targetDir
);
...
...
@@ -137,6 +143,9 @@ public class PluginService {
* @return
*/
public
Boolean
uninstall
(
Long
pluginId
)
{
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
myPluginMapper
.
deleteByPrimaryKey
(
pluginId
);
return
true
;
}
...
...
@@ -148,6 +157,9 @@ public class PluginService {
* @return
*/
public
Boolean
changeStatus
(
Long
pluginId
,
Boolean
status
)
{
CacheUtils
.
removeAll
(
AuthConstants
.
USER_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_ROLE_CACHE_NAME
);
CacheUtils
.
removeAll
(
AuthConstants
.
USER_PERMISSION_CACHE_NAME
);
return
false
;
}
...
...
backend/src/main/resources/ehcache/ehcache.xml
浏览文件 @
d04500f3
...
...
@@ -69,5 +69,18 @@
memoryStoreEvictionPolicy=
"LRU"
/>
<cache
name=
"lic_info"
eternal=
"false"
maxElementsInMemory=
"10"
overflowToDisk=
"false"
diskPersistent=
"false"
timeToIdleSeconds=
"60"
timeToLiveSeconds=
"60"
memoryStoreEvictionPolicy=
"FIFO"
>
<cacheEventListenerFactory
class=
"io.dataease.listener.LicCacheEventListener"
/>
</cache>
</ehcache>
\ No newline at end of file
frontend/src/components/canvas/components/Editor/Shape.vue
浏览文件 @
d04500f3
...
...
@@ -36,15 +36,18 @@ export default {
},
element
:
{
require
:
true
,
type
:
Object
type
:
Object
,
default
:
null
},
defaultStyle
:
{
require
:
true
,
type
:
Object
type
:
Object
,
default
:
null
},
index
:
{
require
:
true
,
type
:
[
Number
,
String
]
type
:
[
Number
,
String
],
default
:
null
}
},
data
()
{
...
...
@@ -200,6 +203,7 @@ export default {
pointList
.
forEach
(
point
=>
{
const
angle
=
mod360
(
initialAngle
[
point
]
+
rotate
)
const
len
=
angleToCursor
.
length
// eslint-disable-next-line no-constant-condition
while
(
true
)
{
lastMatchIndex
=
(
lastMatchIndex
+
1
)
%
len
const
angleLimit
=
angleToCursor
[
lastMatchIndex
]
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
d04500f3
...
...
@@ -40,7 +40,8 @@ export default {
components
:
{
ChartComponent
,
TableNormal
,
LabelNormal
},
props
:
{
element
:
{
type
:
Object
type
:
Object
,
default
:
null
},
filter
:
{
type
:
Object
,
...
...
@@ -59,38 +60,6 @@ export default {
}
}
},
watch
:
{
'$store.getters.conditions'
:
function
(
newVal
,
oldVal
)
{
this
.
filter
.
filter
=
newVal
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
},
filter
(
val
)
{
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
},
// deep监听panel 如果改变 提交到 store
canvasStyleData
:
{
handler
(
newVal
,
oldVla
)
{
// this.chart.stylePriority == panel 优先使用仪表板样式
this
.
mergeStyle
()
},
deep
:
true
},
// 监听外部的样式变化
outStyle
:
{
handler
(
newVal
,
oldVla
)
{
if
(
this
.
$refs
[
this
.
element
.
propValue
.
id
])
{
this
.
$refs
[
this
.
element
.
propValue
.
id
].
chartResize
()
}
},
deep
:
true
}
},
created
()
{
this
.
refId
=
uuid
.
v1
},
computed
:
mapState
([
'canvasStyleData'
]),
data
()
{
return
{
refId
:
null
,
...
...
@@ -120,8 +89,35 @@ export default {
message
:
null
}
},
computed
:
mapState
([
'canvasStyleData'
]),
watch
:
{
filter
(
val
)
{
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
},
// deep监听panel 如果改变 提交到 store
canvasStyleData
:
{
handler
(
newVal
,
oldVla
)
{
// this.chart.stylePriority == panel 优先使用仪表板样式
this
.
mergeStyle
()
},
deep
:
true
},
// 监听外部的样式变化
outStyle
:
{
handler
(
newVal
,
oldVla
)
{
if
(
this
.
$refs
[
this
.
element
.
propValue
.
id
])
{
this
.
$refs
[
this
.
element
.
propValue
.
id
].
chartResize
()
}
},
deep
:
true
}
},
created
()
{
this
.
filter
.
filter
=
this
.
$store
.
getters
.
conditions
this
.
refId
=
uuid
.
v1
// this.filter.filter = this.$store.getters.conditions
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
},
mounted
()
{
...
...
frontend/src/lang/en.js
浏览文件 @
d04500f3
...
...
@@ -830,7 +830,11 @@ export default {
preview_100_data
:
'Show 100 lines data'
,
invalid_table_check
:
'Please sync data first.'
,
parse_error
:
'Parse Error'
,
origin_field_type
:
'Origin Type'
origin_field_type
:
'Origin Type'
,
edit_excel_table
:
'Edit Excel Dataset'
,
edit_excel
:
'Edit Excel'
,
excel_replace
:
'Replace'
,
excel_add
:
'Add'
},
datasource
:
{
datasource
:
'Data Source'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
d04500f3
...
...
@@ -797,7 +797,7 @@ export default {
param
:
'參數'
,
edit_sql
:
'編輯 SQL'
,
showRow
:
'顯示行'
,
add_excel_table
:
' 添加
Excel
數據集'
,
add_excel_table
:
' 添加
Excel
數據集'
,
add_custom_table
:
'添加自助數據集'
,
upload_file
:
'上傳文件'
,
detail
:
'詳情'
,
...
...
@@ -830,7 +830,11 @@ export default {
preview_100_data
:
'顯示前100行數據'
,
invalid_table_check
:
'非直連數據集請先完成數據同步'
,
parse_error
:
'解析錯誤'
,
origin_field_type
:
'原始類型'
origin_field_type
:
'原始類型'
,
edit_excel_table
:
'編輯Excel數據集'
,
edit_excel
:
'編輯Excel'
,
excel_replace
:
'替換'
,
excel_add
:
'追加'
},
datasource
:
{
datasource
:
'數據源'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
d04500f3
...
...
@@ -830,7 +830,11 @@ export default {
preview_100_data
:
'显示前100行数据'
,
invalid_table_check
:
'非直连数据集请先完成数据同步'
,
parse_error
:
'解析错误'
,
origin_field_type
:
'原始类型'
origin_field_type
:
'原始类型'
,
edit_excel_table
:
'编辑Excel数据集'
,
edit_excel
:
'编辑Excel'
,
excel_replace
:
'替换'
,
excel_add
:
'追加'
},
datasource
:
{
datasource
:
'数据源'
,
...
...
frontend/src/utils/request.js
浏览文件 @
d04500f3
...
...
@@ -83,6 +83,10 @@ const checkAuth = response => {
const
linkToken
=
response
.
headers
[
LinkTokenKey
.
toLocaleLowerCase
()]
setLinkToken
(
linkToken
)
}
// 许可状态改变 刷新页面
// if (response.headers['lic-status']) {
// location.reload()
// }
}
// 请根据实际需求修改
...
...
frontend/src/views/chart/components/table/TableNormal.vue
浏览文件 @
d04500f3
...
...
@@ -2,6 +2,7 @@
<div
ref=
"tableContainer"
:style=
"bg_class"
>
<p
v-show=
"title_show"
ref=
"title"
:style=
"title_class"
>
{{
chart
.
title
}}
</p>
<ux-grid
:id=
"chart.id"
ref=
"plxTable"
size=
"mini"
style=
"width: 100%;"
...
...
@@ -109,7 +110,9 @@ export default {
datas
=
[]
}
this
.
$refs
.
plxTable
.
reloadData
(
datas
)
this
.
initStyle
()
this
.
$nextTick
(()
=>
{
this
.
initStyle
()
})
window
.
onresize
=
function
()
{
that
.
calcHeight
()
}
...
...
@@ -165,15 +168,18 @@ export default {
this
.
bg_class
.
background
=
hexColorToRGBA
(
customStyle
.
background
.
color
,
customStyle
.
background
.
alpha
)
}
}
// 修改footer合计样式
const
s_table
=
document
.
getElementsByClassName
(
'elx-table--footer'
)[
0
]
const
table
=
document
.
getElementById
(
this
.
chart
.
id
)
const
s_table
=
table
.
getElementsByClassName
(
'elx-table--footer'
)
// console.log(s_table)
let
s
=
''
for
(
const
i
in
this
.
table_header_class
)
{
s
+=
(
i
===
'fontSize'
?
'font-size'
:
i
)
+
':'
+
this
.
table_header_class
[
i
]
+
';'
}
s_table
.
setAttribute
(
'style'
,
s
)
console
.
log
(
s_table
)
for
(
let
i
=
0
;
i
<
s_table
.
length
;
i
++
)
{
s_table
[
i
].
setAttribute
(
'style'
,
s
)
}
},
getRowStyle
({
row
,
rowIndex
})
{
if
(
rowIndex
%
2
===
0
)
{
...
...
frontend/src/views/dataset/add/AddExcel.vue
浏览文件 @
d04500f3
...
...
@@ -3,7 +3,7 @@
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_excel_table'
)
}}
{{
param
.
tableId
?
$t
(
'dataset.edit_excel_table'
):
$t
(
'dataset.add_excel_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
...
...
@@ -20,7 +20,7 @@
<el-col
style=
"width: 500px;"
>
<el-form
:inline=
"true"
size=
"mini"
class=
"row-style"
>
<el-form-item
class=
"form-item"
>
<el-input
v-model=
"name"
:placeholder=
"$t('commons.name')"
/>
<el-input
v-
show=
"!param.tableId"
v-
model=
"name"
:placeholder=
"$t('commons.name')"
/>
</el-form-item>
<el-form-item
class=
"form-item"
>
<el-upload
...
...
@@ -176,14 +176,28 @@ export default {
})
return
}
const
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
let
table
=
{}
if
(
!
this
.
param
.
tableId
)
{
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
}
}
else
{
table
=
{
id
:
this
.
param
.
tableId
,
name
:
this
.
param
.
table
.
name
,
sceneId
:
this
.
param
.
id
,
dataSourceId
:
null
,
type
:
'excel'
,
mode
:
parseInt
(
this
.
mode
),
info
:
'{"data":"'
+
this
.
path
+
'"}'
,
editType
:
this
.
param
.
editType
?
this
.
param
.
editType
:
0
}
}
post
(
'/dataset/table/update'
,
table
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
d04500f3
...
...
@@ -14,6 +14,19 @@
</span>
</el-popover>
<el-row
style=
"float: right"
>
<el-dropdown
style=
"margin-right: 10px;"
size=
"small"
trigger=
"click"
@
command=
"clickEditExcel"
>
<el-button
type=
"primary"
size=
"mini"
plain
>
{{
$t
(
'dataset.edit_excel'
)
}}
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"beforeEditExcel('0')"
>
{{
$t
(
'dataset.excel_replace'
)
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"beforeEditExcel('1')"
>
{{
$t
(
'dataset.excel_add'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
v-if=
"table.type ==='custom'"
size=
"mini"
@
click=
"editCustom"
>
{{
$t
(
'dataset.edit_custom_table'
)
}}
</el-button>
...
...
@@ -108,10 +121,10 @@ export default {
this
.
fields
=
response
.
data
.
fields
this
.
data
=
response
.
data
.
data
this
.
page
=
response
.
data
.
page
if
(
response
.
data
.
status
===
'warnning'
)
{
if
(
response
.
data
.
status
===
'warnning'
)
{
this
.
$warning
(
response
.
data
.
msg
,
3000
)
}
if
(
response
.
data
.
status
===
'error'
)
{
if
(
response
.
data
.
status
===
'error'
)
{
this
.
$error
(
response
.
data
.
msg
,
3000
)
}
}).
catch
(
response
=>
{
...
...
@@ -147,6 +160,24 @@ export default {
},
hideTab
()
{
this
.
tabStatus
=
false
},
clickEditExcel
(
param
)
{
// console.log(param);
switch
(
param
.
type
)
{
case
'0'
:
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
0
,
table
:
this
.
table
}})
break
case
'1'
:
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddExcel'
,
param
:
{
id
:
this
.
table
.
sceneId
,
tableId
:
this
.
table
.
id
,
editType
:
1
,
table
:
this
.
table
}})
break
}
},
beforeEditExcel
(
type
)
{
return
{
'type'
:
type
}
}
}
}
...
...
frontend/src/views/system/authority/components/LazyTree.vue
浏览文件 @
d04500f3
...
...
@@ -57,7 +57,8 @@ export default {
},
authCondition
:
{
type
:
Object
,
required
:
false
required
:
false
,
default
:
null
},
dataInfo
:
{
type
:
Object
,
...
...
@@ -67,7 +68,10 @@ export default {
type
:
String
,
required
:
true
},
attachActiveName
:
String
,
attachActiveName
:
{
type
:
String
,
default
:
null
},
defaultProps
:
{
type
:
Object
,
required
:
false
,
...
...
frontend/src/views/system/datasource/index.vue
浏览文件 @
d04500f3
...
...
@@ -92,7 +92,7 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
checkPermission
,
hasDataPermission
}
from
'@/utils/permission'
import
{
hasDataPermission
}
from
'@/utils/permission'
import
{
formatCondition
}
from
'@/utils/index'
import
{
dsGrid
,
addDs
,
editDs
,
delDs
,
validateDs
}
from
'@/api/system/datasource'
...
...
frontend/src/views/system/role/index.vue
浏览文件 @
d04500f3
...
...
@@ -146,7 +146,7 @@ export default {
},
methods
:
{
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
)
//
console.log(tab, event)
},
create
()
{
this
.
$router
.
push
({
name
:
'system-role-form'
})
...
...
frontend/src/views/system/systemParamSettings/EmailSetting.vue
浏览文件 @
d04500f3
...
...
@@ -152,7 +152,7 @@ export default {
this
.
formInline
=
response
.
data
this
.
formInline
.
ssl
=
this
.
formInline
.
ssl
===
'true'
this
.
formInline
.
tls
=
this
.
formInline
.
tls
===
'true'
console
.
log
(
this
.
formInline
)
//
console.log(this.formInline)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
formInline
.
clearValidate
()
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论