Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
ffbd32fe
提交
ffbd32fe
authored
8月 17, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
f1f20b2d
287f332c
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
137 行增加
和
362 行删除
+137
-362
ShiroServiceImpl.java
.../java/io/dataease/auth/service/impl/ShiroServiceImpl.java
+2
-0
ExtBaseMapper.java
.../main/java/io/dataease/base/mapper/ext/ExtBaseMapper.java
+0
-4
ExtBaseMapper.xml
...c/main/java/io/dataease/base/mapper/ext/ExtBaseMapper.xml
+0
-59
FileUtils.java
...nd/src/main/java/io/dataease/commons/utils/FileUtils.java
+0
-34
MsgController.java
...c/main/java/io/dataease/controller/sys/MsgController.java
+12
-0
SysMsgService.java
.../main/java/io/dataease/service/message/SysMsgService.java
+7
-0
msg.js
frontend/src/api/system/msg.js
+9
-0
index.vue
frontend/src/components/Notification/index.vue
+42
-16
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+6
-0
en.js
frontend/src/lang/en.js
+8
-2
tw.js
frontend/src/lang/tw.js
+7
-2
zh.js
frontend/src/lang/zh.js
+7
-2
index.scss
frontend/src/styles/index.scss
+0
-1
request.js
frontend/src/utils/request.js
+3
-2
common.js
frontend/src/views/chart/chart/common/common.js
+2
-2
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+12
-2
BackgroundColorSelector.vue
...rt/components/component-style/BackgroundColorSelector.vue
+4
-0
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+8
-2
CalcFieldEdit.vue
frontend/src/views/dataset/data/CalcFieldEdit.vue
+4
-0
FieldEdit.vue
frontend/src/views/dataset/data/FieldEdit.vue
+4
-0
LdapSetting.vue
...tend/src/views/system/systemParamSettings/LdapSetting.vue
+0
-234
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java
浏览文件 @
ffbd32fe
...
@@ -45,6 +45,8 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -45,6 +45,8 @@ public class ShiroServiceImpl implements ShiroService {
//验证链接
//验证链接
filterChainDefinitionMap
.
put
(
"/api/link/validate**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/link/validate**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/map/areaEntitys/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/map/areaEntitys/**"
,
ANON
);
//未读消息数量
filterChainDefinitionMap
.
put
(
"/api/sys_msg/unReadCount"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.json"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.json"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/system/ui/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/system/ui/**"
,
ANON
);
...
...
backend/src/main/java/io/dataease/base/mapper/ext/ExtBaseMapper.java
deleted
100644 → 0
浏览文件 @
f1f20b2d
package
io
.
dataease
.
base
.
mapper
.
ext
;
public
interface
ExtBaseMapper
{
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtBaseMapper.xml
deleted
100644 → 0
浏览文件 @
f1f20b2d
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"io.dataease.base.mapper.ext.ExtBaseMapper"
>
<sql
id=
"orders"
>
<if
test=
"request.orders != null and request.orders.size() > 0"
>
order by
<foreach
collection=
"request.orders"
separator=
","
item=
"order"
>
${order.name} ${order.type}
</foreach>
</if>
</sql>
<sql
id=
"condition"
>
<choose>
<when
test=
'${object}.operator == "like"'
>
like CONCAT('%', #{${object}.value},'%')
</when>
<when
test=
'${object}.operator == "not like"'
>
not like CONCAT('%', #{${object}.value},'%')
</when>
<when
test=
'${object}.operator == "in"'
>
in
<foreach
collection=
"${object}.value"
item=
"v"
separator=
","
open=
"("
close=
")"
>
#{v}
</foreach>
</when>
<when
test=
'${object}.operator == "not in"'
>
not in
<foreach
collection=
"${object}.value"
item=
"v"
separator=
","
open=
"("
close=
")"
>
#{v}
</foreach>
</when>
<when
test=
'${object}.operator == "between"'
>
between #{${object}.value[0]} and #{${object}.value[1]}
</when>
<when
test=
'${object}.operator == "gt"'
>
>
#{${object}.value}
</when>
<when
test=
'${object}.operator == "lt"'
>
<
#{${object}.value}
</when>
<when
test=
'${object}.operator == "ge"'
>
>
= #{${object}.value}
</when>
<when
test=
'${object}.operator == "le"'
>
<
= #{${object}.value}
</when>
<when
test=
'${object}.operator == "current user"'
>
= '${@io.metersphere.commons.utils.SessionUtils@getUserId()}'
</when>
<otherwise>
= #{${object}.value}
</otherwise>
</choose>
</sql>
</mapper>
backend/src/main/java/io/dataease/commons/utils/FileUtils.java
deleted
100644 → 0
浏览文件 @
f1f20b2d
package
io
.
dataease
.
commons
.
utils
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.i18n.Translator
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.aspectj.util.FileUtil
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.*
;
import
java.util.List
;
public
class
FileUtils
{
private
static
final
String
BODY_FILE_DIR
=
"/opt/metersphere/data/body"
;
public
static
void
createBodyFiles
(
List
<
String
>
bodyUploadIds
,
List
<
MultipartFile
>
bodyFiles
)
{
if
(
CollectionUtils
.
isNotEmpty
(
bodyUploadIds
)
&&
CollectionUtils
.
isNotEmpty
(
bodyFiles
))
{
File
testDir
=
new
File
(
BODY_FILE_DIR
);
if
(!
testDir
.
exists
())
{
testDir
.
mkdirs
();
}
for
(
int
i
=
0
;
i
<
bodyUploadIds
.
size
();
i
++)
{
MultipartFile
item
=
bodyFiles
.
get
(
i
);
File
file
=
new
File
(
BODY_FILE_DIR
+
"/"
+
bodyUploadIds
.
get
(
i
)
+
"_"
+
item
.
getOriginalFilename
());
try
(
InputStream
in
=
item
.
getInputStream
();
OutputStream
out
=
new
FileOutputStream
(
file
))
{
file
.
createNewFile
();
FileUtil
.
copyStream
(
in
,
out
);
}
catch
(
IOException
e
)
{
LogUtil
.
error
(
e
);
DEException
.
throwException
(
Translator
.
get
(
"upload_fail"
));
}
}
}
}
}
backend/src/main/java/io/dataease/controller/sys/MsgController.java
浏览文件 @
ffbd32fe
...
@@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
...
@@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import
io.dataease.base.domain.SysMsgChannel
;
import
io.dataease.base.domain.SysMsgChannel
;
import
io.dataease.base.domain.SysMsgSetting
;
import
io.dataease.base.domain.SysMsgSetting
;
import
io.dataease.base.domain.SysMsgType
;
import
io.dataease.base.domain.SysMsgType
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.PageUtils
;
import
io.dataease.commons.utils.PageUtils
;
import
io.dataease.commons.utils.Pager
;
import
io.dataease.commons.utils.Pager
;
...
@@ -21,6 +22,7 @@ import org.apache.commons.lang3.ObjectUtils;
...
@@ -21,6 +22,7 @@ import org.apache.commons.lang3.ObjectUtils;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Api
(
tags
=
"系统:消息管理"
)
@Api
(
tags
=
"系统:消息管理"
)
...
@@ -46,6 +48,16 @@ public class MsgController {
...
@@ -46,6 +48,16 @@ public class MsgController {
return
listPager
;
return
listPager
;
}
}
@ApiOperation
(
"查询未读数量"
)
@PostMapping
(
"/unReadCount"
)
public
Long
unReadCount
(
@RequestBody
Map
<
String
,
Long
>
request
)
{
if
(
null
==
request
||
null
==
request
.
get
(
"userId"
))
{
throw
new
RuntimeException
(
"缺少用户ID"
);
}
Long
userId
=
request
.
get
(
"userId"
);
return
sysMsgService
.
queryCount
(
userId
);
}
@ApiOperation
(
"设置已读"
)
@ApiOperation
(
"设置已读"
)
@PostMapping
(
"/setReaded/{msgId}"
)
@PostMapping
(
"/setReaded/{msgId}"
)
public
void
setReaded
(
@PathVariable
Long
msgId
)
{
public
void
setReaded
(
@PathVariable
Long
msgId
)
{
...
...
backend/src/main/java/io/dataease/service/message/SysMsgService.java
浏览文件 @
ffbd32fe
...
@@ -105,6 +105,13 @@ public class SysMsgService {
...
@@ -105,6 +105,13 @@ public class SysMsgService {
return
msgGridDtos
;
return
msgGridDtos
;
}
}
public
Long
queryCount
(
Long
userId
)
{
SysMsgExample
example
=
new
SysMsgExample
();
SysMsgExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
).
andStatusEqualTo
(
false
);
return
sysMsgMapper
.
countByExample
(
example
);
}
public
void
setReaded
(
Long
msgId
)
{
public
void
setReaded
(
Long
msgId
)
{
SysMsg
sysMsg
=
new
SysMsg
();
SysMsg
sysMsg
=
new
SysMsg
();
sysMsg
.
setMsgId
(
msgId
);
sysMsg
.
setMsgId
(
msgId
);
...
...
frontend/src/api/system/msg.js
浏览文件 @
ffbd32fe
...
@@ -9,6 +9,15 @@ export function query(pageIndex, pageSize, data) {
...
@@ -9,6 +9,15 @@ export function query(pageIndex, pageSize, data) {
})
})
}
}
export
function
unReadCount
(
data
)
{
return
request
({
url
:
'/api/sys_msg/unReadCount'
,
method
:
'post'
,
loading
:
false
,
data
})
}
export
function
updateStatus
(
msgId
)
{
export
function
updateStatus
(
msgId
)
{
return
request
({
return
request
({
url
:
'/api/sys_msg/setReaded/'
+
msgId
,
url
:
'/api/sys_msg/setReaded/'
+
msgId
,
...
...
frontend/src/components/Notification/index.vue
浏览文件 @
ffbd32fe
...
@@ -53,14 +53,14 @@
...
@@ -53,14 +53,14 @@
class-name=
"notification"
class-name=
"notification"
icon-class=
"notification"
icon-class=
"notification"
/>
/>
<span
v-if=
"
paginationConfig.total"
class=
"msg-number"
>
{{
paginationConfig.total }}
</span>
<span
v-if=
"
count || paginationConfig.total"
class=
"msg-number"
>
{{ count ||
paginationConfig.total }}
</span>
</div>
</div>
</div>
</div>
</el-popover>
</el-popover>
</template>
</template>
<
script
>
<
script
>
import
{
query
,
updateStatus
}
from
'@/api/system/msg'
import
{
query
,
updateStatus
,
unReadCount
}
from
'@/api/system/msg'
import
{
getTypeName
,
loadMsgTypes
}
from
'@/utils/webMsg'
import
{
getTypeName
,
loadMsgTypes
}
from
'@/utils/webMsg'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
bus
from
'@/utils/bus'
import
bus
from
'@/utils/bus'
...
@@ -76,21 +76,30 @@ export default {
...
@@ -76,21 +76,30 @@ export default {
pageSize
:
5
,
pageSize
:
5
,
total
:
0
total
:
0
},
},
timer
:
null
timer
:
null
,
count
:
0
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'permission_routes'
'permission_routes'
,
'user'
])
])
},
},
watch
:
{
'visible'
:
function
(
newV
,
oldV
)
{
if
(
newV
&&
!
oldV
)
{
this
.
search
()
}
}
},
created
()
{
created
()
{
// 先加载消息类型
// 先加载消息类型
loadMsgTypes
()
loadMsgTypes
()
this
.
search
()
this
.
queryCount
()
// 每30s定时刷新拉取消息
// 每30s定时刷新拉取消息
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
search
()
this
.
queryCount
()
},
30000
)
},
30000
)
},
},
mounted
()
{
mounted
()
{
...
@@ -105,19 +114,11 @@ export default {
...
@@ -105,19 +114,11 @@ export default {
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
timer
&&
clearInterval
(
this
.
timer
)
},
},
methods
:
{
methods
:
{
// handClick(lang) {
// console.log(lang)
// },
showDetail
(
row
)
{
showDetail
(
row
)
{
const
param
=
{
...{
msgNotification
:
true
,
msgType
:
row
.
typeId
,
sourceParam
:
row
.
param
}}
const
param
=
{
...{
msgNotification
:
true
,
msgType
:
row
.
typeId
,
sourceParam
:
row
.
param
}}
this
.
visible
=
false
this
.
visible
=
false
// if (this.$route && this.$route.name && this.$route.name.includes('panel') && row.type === 0) {
// bus.$emit('to-msg-share', param)
// } else if (this.$route && this.$route.name && this.$route.name.includes('dataset') && row.type === 1) {
// bus.$emit('to-msg-dataset', param)
// } else {
// this.$router.push({ name: row.router, params: param })
// }
if
(
this
.
$route
&&
this
.
$route
.
name
&&
this
.
$route
.
name
===
row
.
router
)
{
if
(
this
.
$route
&&
this
.
$route
.
name
&&
this
.
$route
.
name
===
row
.
router
)
{
// 如果当前路由就是目标路由 那么使用router.push页面不会刷新 这时候要使用事件方式
// 如果当前路由就是目标路由 那么使用router.push页面不会刷新 这时候要使用事件方式
row
.
callback
&&
bus
.
$emit
(
row
.
callback
,
param
)
row
.
callback
&&
bus
.
$emit
(
row
.
callback
,
param
)
...
@@ -164,6 +165,31 @@ export default {
...
@@ -164,6 +165,31 @@ export default {
this
.
$store
.
commit
(
'permission/SET_CURRENT_ROUTES'
,
route
)
this
.
$store
.
commit
(
'permission/SET_CURRENT_ROUTES'
,
route
)
// this.setSidebarHide(route)
// this.setSidebarHide(route)
},
},
queryCount
()
{
const
token
=
getToken
()
if
(
!
token
||
token
===
'null'
||
token
===
'undefined'
||
!
this
.
user
||
!
this
.
user
.
userId
)
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
const
message
=
this
.
$t
(
'login.tokenError'
)
this
.
$alert
(
message
,
{
confirmButtonText
:
this
.
$t
(
'login.re_login'
),
showClose
:
false
,
callback
:
function
(
action
,
instance
)
{
if
(
action
===
'confirm'
)
{
this
.
$store
.
dispatch
(
'user/logout'
).
then
(()
=>
{
location
.
reload
()
})
}
}.
bind
(
this
)
})
}
const
param
=
{
userId
:
this
.
user
.
userId
}
unReadCount
(
param
).
then
(
res
=>
{
this
.
count
=
res
.
data
})
},
search
()
{
search
()
{
const
param
=
{
const
param
=
{
status
:
false
,
status
:
false
,
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
ffbd32fe
...
@@ -309,6 +309,12 @@ export default {
...
@@ -309,6 +309,12 @@ export default {
this
.
chart
.
type
===
'map'
&&
this
.
sendToChildren
(
param
)
this
.
chart
.
type
===
'map'
&&
this
.
sendToChildren
(
param
)
this
.
drillClickDimensionList
.
push
({
dimensionList
:
param
.
data
.
dimensionList
})
this
.
drillClickDimensionList
.
push
({
dimensionList
:
param
.
data
.
dimensionList
})
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
}
else
if
(
this
.
chart
.
drillFields
.
length
>
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
this
.
$t
(
'chart.last_layer'
),
showClose
:
true
})
}
}
},
},
...
...
frontend/src/lang/en.js
浏览文件 @
ffbd32fe
...
@@ -696,6 +696,10 @@ export default {
...
@@ -696,6 +696,10 @@ export default {
filter
:
'Filter'
,
filter
:
'Filter'
,
none
:
'None'
,
none
:
'None'
,
background
:
'Background'
,
background
:
'Background'
,
border
:
'Corner'
,
border_width
:
'Border width'
,
border_radius
:
'Border radius'
,
alpha
:
'Transparency'
,
alpha
:
'Transparency'
,
add_filter
:
'Add Filter'
,
add_filter
:
'Add Filter'
,
no_limit
:
'No limit'
,
no_limit
:
'No limit'
,
...
@@ -842,7 +846,8 @@ export default {
...
@@ -842,7 +846,8 @@ export default {
width
:
'Width'
,
width
:
'Width'
,
height
:
'Height'
,
height
:
'Height'
,
system_case
:
'System'
,
system_case
:
'System'
,
custom_case
:
'Custom'
custom_case
:
'Custom'
,
last_layer
:
'This Is The Last Layer'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
...
@@ -1013,7 +1018,8 @@ export default {
...
@@ -1013,7 +1018,8 @@ export default {
merge
:
'Merge'
,
merge
:
'Merge'
,
no_merge
:
'Dont Merge'
,
no_merge
:
'Dont Merge'
,
merge_msg
:
'If the fields in the data table are consistent, merge them into one data set?'
,
merge_msg
:
'If the fields in the data table are consistent, merge them into one data set?'
,
merge_title
:
'Merge data'
merge_title
:
'Merge data'
,
field_name_less_50
:
'Field name can not more 50 chars.'
},
},
datasource
:
{
datasource
:
{
datasource
:
'Data Source'
,
datasource
:
'Data Source'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
ffbd32fe
...
@@ -696,6 +696,9 @@ export default {
...
@@ -696,6 +696,9 @@ export default {
filter
:
'過濾'
,
filter
:
'過濾'
,
none
:
'無'
,
none
:
'無'
,
background
:
'背景'
,
background
:
'背景'
,
border
:
'邊角'
,
border_width
:
'邊框寬度'
,
border_radius
:
'邊框半徑'
,
alpha
:
'透明度'
,
alpha
:
'透明度'
,
add_filter
:
'添加過濾'
,
add_filter
:
'添加過濾'
,
no_limit
:
'無顯示'
,
no_limit
:
'無顯示'
,
...
@@ -842,7 +845,8 @@ export default {
...
@@ -842,7 +845,8 @@ export default {
width
:
'寬度'
,
width
:
'寬度'
,
height
:
'高度'
,
height
:
'高度'
,
system_case
:
'系統方案'
,
system_case
:
'系統方案'
,
custom_case
:
'自定義'
custom_case
:
'自定義'
,
last_layer
:
'当前已经是最后一级'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多個sheet頁面,默認抽取第一個'
,
sheet_warn
:
'有多個sheet頁面,默認抽取第一個'
,
...
@@ -1013,7 +1017,8 @@ export default {
...
@@ -1013,7 +1017,8 @@ export default {
merge
:
'合併'
,
merge
:
'合併'
,
no_merge
:
'不合併'
,
no_merge
:
'不合併'
,
merge_msg
:
'數據表中存在自斷一直的情況,是否合併到一個數據集中?'
,
merge_msg
:
'數據表中存在自斷一直的情況,是否合併到一個數據集中?'
,
merge_title
:
'合併數據'
merge_title
:
'合併數據'
,
field_name_less_50
:
'字段名不能超過50個字符'
},
},
datasource
:
{
datasource
:
{
datasource
:
'數據源'
,
datasource
:
'數據源'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
ffbd32fe
...
@@ -696,6 +696,9 @@ export default {
...
@@ -696,6 +696,9 @@ export default {
filter
:
'过滤'
,
filter
:
'过滤'
,
none
:
'无'
,
none
:
'无'
,
background
:
'背景'
,
background
:
'背景'
,
border
:
'边角'
,
border_width
:
'边框宽度'
,
border_radius
:
'边框半径'
,
alpha
:
'透明度'
,
alpha
:
'透明度'
,
add_filter
:
'添加过滤'
,
add_filter
:
'添加过滤'
,
no_limit
:
'无限制'
,
no_limit
:
'无限制'
,
...
@@ -842,7 +845,8 @@ export default {
...
@@ -842,7 +845,8 @@ export default {
width
:
'宽度'
,
width
:
'宽度'
,
height
:
'高度'
,
height
:
'高度'
,
system_case
:
'系统方案'
,
system_case
:
'系统方案'
,
custom_case
:
'自定义'
custom_case
:
'自定义'
,
last_layer
:
'当前已经是最后一级'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
@@ -1013,7 +1017,8 @@ export default {
...
@@ -1013,7 +1017,8 @@ export default {
merge
:
'合并'
,
merge
:
'合并'
,
no_merge
:
'不合并'
,
no_merge
:
'不合并'
,
merge_msg
:
'数据表中存在字段一致的情况,是否合并到一个数据集中?'
,
merge_msg
:
'数据表中存在字段一致的情况,是否合并到一个数据集中?'
,
merge_title
:
'合并数据'
merge_title
:
'合并数据'
,
field_name_less_50
:
'字段名不能超过50个字符'
},
},
datasource
:
{
datasource
:
{
datasource
:
'数据源'
,
datasource
:
'数据源'
,
...
...
frontend/src/styles/index.scss
浏览文件 @
ffbd32fe
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
@import
'~umy-ui/lib/theme-chalk/index.css'
;
@import
'~umy-ui/lib/theme-chalk/index.css'
;
// 引入样式
// 引入样式
@import
'./deicon/iconfont.css'
;
@import
'./deicon/iconfont.css'
;
// @import '../metersphere/common/css/index.css';
body
{
body
{
...
...
frontend/src/utils/request.js
浏览文件 @
ffbd32fe
...
@@ -8,7 +8,7 @@ import i18n from '@/lang'
...
@@ -8,7 +8,7 @@ import i18n from '@/lang'
import
{
tryShowLoading
,
tryHideLoading
}
from
'./loading'
import
{
tryShowLoading
,
tryHideLoading
}
from
'./loading'
import
{
getLinkToken
,
setLinkToken
}
from
'@/utils/auth'
import
{
getLinkToken
,
setLinkToken
}
from
'@/utils/auth'
// import router from '@/router'
// import router from '@/router'
const
interruptTokenContineUrls
=
Config
.
interruptTokenContineUrls
//
const interruptTokenContineUrls = Config.interruptTokenContineUrls
const
TokenKey
=
Config
.
TokenKey
const
TokenKey
=
Config
.
TokenKey
const
RefreshTokenKey
=
Config
.
RefreshTokenKey
const
RefreshTokenKey
=
Config
.
RefreshTokenKey
const
LinkTokenKey
=
Config
.
LinkTokenKey
const
LinkTokenKey
=
Config
.
LinkTokenKey
...
@@ -88,7 +88,8 @@ const checkAuth = response => {
...
@@ -88,7 +88,8 @@ const checkAuth = response => {
})
})
}
}
// token到期后自动续命 刷新token
// token到期后自动续命 刷新token
if
(
response
.
headers
[
RefreshTokenKey
]
&&
!
interruptTokenContineUrls
.
some
(
item
=>
response
.
config
.
url
.
indexOf
(
item
)
>=
0
))
{
// if (response.headers[RefreshTokenKey] && !interruptTokenContineUrls.some(item => response.config.url.indexOf(item) >= 0)) {
if
(
response
.
headers
[
RefreshTokenKey
])
{
const
refreshToken
=
response
.
headers
[
RefreshTokenKey
]
const
refreshToken
=
response
.
headers
[
RefreshTokenKey
]
store
.
dispatch
(
'user/refreshToken'
,
refreshToken
)
store
.
dispatch
(
'user/refreshToken'
,
refreshToken
)
}
}
...
...
frontend/src/views/chart/chart/common/common.js
浏览文件 @
ffbd32fe
...
@@ -51,7 +51,7 @@ export function componentStyle(chart_option, chart) {
...
@@ -51,7 +51,7 @@ export function componentStyle(chart_option, chart) {
chart_option
.
legend
.
icon
=
customStyle
.
legend
.
icon
chart_option
.
legend
.
icon
=
customStyle
.
legend
.
icon
chart_option
.
legend
.
textStyle
=
customStyle
.
legend
.
textStyle
chart_option
.
legend
.
textStyle
=
customStyle
.
legend
.
textStyle
}
}
if
(
customStyle
.
xAxis
&&
(
chart
.
type
.
includes
(
'bar'
)
||
chart
.
type
.
includes
(
'line'
)))
{
if
(
customStyle
.
xAxis
&&
(
chart
.
type
.
includes
(
'bar'
)
||
chart
.
type
.
includes
(
'line'
)
||
chart
.
type
.
includes
(
'scatter'
)
))
{
chart_option
.
xAxis
.
show
=
customStyle
.
xAxis
.
show
chart_option
.
xAxis
.
show
=
customStyle
.
xAxis
.
show
chart_option
.
xAxis
.
position
=
customStyle
.
xAxis
.
position
chart_option
.
xAxis
.
position
=
customStyle
.
xAxis
.
position
chart_option
.
xAxis
.
name
=
customStyle
.
xAxis
.
name
chart_option
.
xAxis
.
name
=
customStyle
.
xAxis
.
name
...
@@ -59,7 +59,7 @@ export function componentStyle(chart_option, chart) {
...
@@ -59,7 +59,7 @@ export function componentStyle(chart_option, chart) {
chart_option
.
xAxis
.
splitLine
=
customStyle
.
xAxis
.
splitLine
chart_option
.
xAxis
.
splitLine
=
customStyle
.
xAxis
.
splitLine
chart_option
.
xAxis
.
nameTextStyle
=
customStyle
.
xAxis
.
nameTextStyle
chart_option
.
xAxis
.
nameTextStyle
=
customStyle
.
xAxis
.
nameTextStyle
}
}
if
(
customStyle
.
yAxis
&&
(
chart
.
type
.
includes
(
'bar'
)
||
chart
.
type
.
includes
(
'line'
)))
{
if
(
customStyle
.
yAxis
&&
(
chart
.
type
.
includes
(
'bar'
)
||
chart
.
type
.
includes
(
'line'
)
||
chart
.
type
.
includes
(
'scatter'
)
))
{
chart_option
.
yAxis
.
show
=
customStyle
.
yAxis
.
show
chart_option
.
yAxis
.
show
=
customStyle
.
yAxis
.
show
chart_option
.
yAxis
.
position
=
customStyle
.
yAxis
.
position
chart_option
.
yAxis
.
position
=
customStyle
.
yAxis
.
position
chart_option
.
yAxis
.
name
=
customStyle
.
yAxis
.
name
chart_option
.
yAxis
.
name
=
customStyle
.
yAxis
.
name
...
...
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
ffbd32fe
<
template
>
<
template
>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<view-track-bar
ref=
"viewTrack"
:track-menu=
"trackMenu"
class=
"track-bar"
:style=
"trackBarStyleTime"
@
trackClick=
"trackClick"
/>
<view-track-bar
ref=
"viewTrack"
:track-menu=
"trackMenu"
class=
"track-bar"
:style=
"trackBarStyleTime"
@
trackClick=
"trackClick"
/>
<div
:id=
"chartId"
style=
"width: 100%;height: 100%;"
/>
<div
:id=
"chartId"
style=
"width: 100%;height: 100%;
overflow: hidden;"
:style=
"
{ borderRadius: borderRadius}
" />
</div>
</div>
</
template
>
</
template
>
...
@@ -56,7 +56,8 @@ export default {
...
@@ -56,7 +56,8 @@ export default {
},
},
pointParam
:
null
,
pointParam
:
null
,
dynamicAreaCode
:
null
dynamicAreaCode
:
null
,
borderRadius
:
'0px'
}
}
},
},
...
@@ -195,11 +196,20 @@ export default {
...
@@ -195,11 +196,20 @@ export default {
myEcharts
(
option
)
{
myEcharts
(
option
)
{
// 指定图表的配置项和数据
// 指定图表的配置项和数据
const
chart
=
this
.
myChart
const
chart
=
this
.
myChart
this
.
setBackGroundBorder
()
setTimeout
(
chart
.
setOption
(
option
,
true
),
500
)
setTimeout
(
chart
.
setOption
(
option
,
true
),
500
)
window
.
onresize
=
function
()
{
window
.
onresize
=
function
()
{
chart
.
resize
()
chart
.
resize
()
}
}
},
},
setBackGroundBorder
()
{
if
(
this
.
chart
.
customStyle
)
{
const
customStyle
=
JSON
.
parse
(
this
.
chart
.
customStyle
)
if
(
customStyle
.
background
)
{
this
.
borderRadius
=
(
customStyle
.
background
.
borderRadius
||
0
)
+
'px'
}
}
},
chartResize
()
{
chartResize
()
{
// 指定图表的配置项和数据
// 指定图表的配置项和数据
const
chart
=
this
.
myChart
const
chart
=
this
.
myChart
...
...
frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue
浏览文件 @
ffbd32fe
...
@@ -8,6 +8,10 @@
...
@@ -8,6 +8,10 @@
<el-form-item
:label=
"$t('chart.not_alpha')"
class=
"form-item form-item-slider"
>
<el-form-item
:label=
"$t('chart.not_alpha')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"colorForm.alpha"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBackgroundStyle"
/>
<el-slider
v-model=
"colorForm.alpha"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBackgroundStyle"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('chart.border_radius')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"colorForm.borderRadius"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBackgroundStyle"
/>
</el-form-item>
</el-form>
</el-form>
</el-col>
</el-col>
</div>
</div>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
ffbd32fe
...
@@ -447,10 +447,10 @@
...
@@ -447,10 +447,10 @@
<el-row>
<el-row>
<span
class=
"padding-lr"
>
{{
$t
(
'chart.module_style'
)
}}
</span>
<span
class=
"padding-lr"
>
{{
$t
(
'chart.module_style'
)
}}
</span>
<el-collapse
v-model=
"styleActiveNames"
class=
"style-collapse"
>
<el-collapse
v-model=
"styleActiveNames"
class=
"style-collapse"
>
<el-collapse-item
v-show=
"view.type && (view.type.includes('bar') || view.type.includes('line'))"
name=
"xAxis"
:title=
"$t('chart.xAxis')"
>
<el-collapse-item
v-show=
"view.type && (view.type.includes('bar') || view.type.includes('line')
|| view.type.includes('scatter')
)"
name=
"xAxis"
:title=
"$t('chart.xAxis')"
>
<x-axis-selector
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
<x-axis-selector
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
v-show=
"view.type && (view.type.includes('bar') || view.type.includes('line'))"
name=
"yAxis"
:title=
"$t('chart.yAxis')"
>
<el-collapse-item
v-show=
"view.type && (view.type.includes('bar') || view.type.includes('line')
|| view.type.includes('scatter')
)"
name=
"yAxis"
:title=
"$t('chart.yAxis')"
>
<y-axis-selector
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
<y-axis-selector
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
</el-collapse-item>
</el-collapse-item>
<el-collapse-item
v-show=
"view.type && view.type.includes('radar')"
name=
"split"
:title=
"$t('chart.split')"
>
<el-collapse-item
v-show=
"view.type && view.type.includes('radar')"
name=
"split"
:title=
"$t('chart.split')"
>
...
@@ -1416,6 +1416,12 @@ export default {
...
@@ -1416,6 +1416,12 @@ export default {
this
.
drillClickDimensionList
.
push
({
dimensionList
:
param
.
data
.
dimensionList
})
this
.
drillClickDimensionList
.
push
({
dimensionList
:
param
.
data
.
dimensionList
})
this
.
getData
(
this
.
param
.
id
)
this
.
getData
(
this
.
param
.
id
)
}
}
}
else
if
(
this
.
view
.
drillFields
.
length
>
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
this
.
$t
(
'chart.last_layer'
),
showClose
:
true
})
}
}
},
},
...
...
frontend/src/views/dataset/data/CalcFieldEdit.vue
浏览文件 @
ffbd32fe
...
@@ -312,6 +312,10 @@ export default {
...
@@ -312,6 +312,10 @@ export default {
},
},
saveCalcField
()
{
saveCalcField
()
{
if
(
this
.
fieldForm
.
name
&&
this
.
fieldForm
.
name
.
length
>
50
)
{
this
.
$message
.
error
(
this
.
$t
(
'dataset.field_name_less_50'
))
return
}
if
(
!
this
.
fieldForm
.
id
)
{
if
(
!
this
.
fieldForm
.
id
)
{
this
.
fieldForm
.
type
=
this
.
fieldForm
.
deType
this
.
fieldForm
.
type
=
this
.
fieldForm
.
deType
this
.
fieldForm
.
deExtractType
=
this
.
fieldForm
.
deType
this
.
fieldForm
.
deExtractType
=
this
.
fieldForm
.
deType
...
...
frontend/src/views/dataset/data/FieldEdit.vue
浏览文件 @
ffbd32fe
...
@@ -327,6 +327,10 @@ export default {
...
@@ -327,6 +327,10 @@ export default {
// // this.closeEdit()
// // this.closeEdit()
// this.initField()
// this.initField()
// })
// })
if
(
item
.
name
&&
item
.
name
.
length
>
50
)
{
this
.
$message
.
error
(
this
.
$t
(
'dataset.field_name_less_50'
))
return
}
post
(
'/dataset/field/save'
,
item
).
then
(
response
=>
{
post
(
'/dataset/field/save'
,
item
).
then
(
response
=>
{
this
.
initField
()
this
.
initField
()
...
...
frontend/src/views/system/systemParamSettings/LdapSetting.vue
deleted
100644 → 0
浏览文件 @
f1f20b2d
<
template
>
<div
v-loading=
"result.loading"
>
<el-form
ref=
"form"
:model=
"form"
size=
"small"
:rules=
"rules"
:disabled=
"show"
>
<el-form-item
:label=
"$t('ldap.url')"
prop=
"url"
>
<el-input
v-model=
"form.url"
:placeholder=
"$t('ldap.input_url_placeholder')"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.dn')"
prop=
"dn"
>
<el-input
v-model=
"form.dn"
:placeholder=
"$t('ldap.input_dn')"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.password')"
prop=
"password"
>
<el-input
v-model=
"form.password"
:placeholder=
"$t('ldap.input_password')"
show-password
auto-complete=
"new-password"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.ou')"
prop=
"ou"
>
<el-input
v-model=
"form.ou"
:placeholder=
"$t('ldap.input_ou_placeholder')"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.filter')"
prop=
"filter"
>
<el-input
v-model=
"form.filter"
:placeholder=
"$t('ldap.input_filter_placeholder')"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.mapping')"
prop=
"mapping"
>
<el-input
v-model=
"form.mapping"
:placeholder=
"$t('ldap.input_mapping_placeholder')"
/>
</el-form-item>
<el-form-item
:label=
"$t('ldap.open')"
prop=
"open"
>
<el-checkbox
v-model=
"form.open"
/>
</el-form-item>
</el-form>
<div>
<el-button
type=
"primary"
size=
"small"
:disabled=
"!show"
@
click=
"testConnection"
>
{{
$t
(
'ldap.test_connect'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"small"
:disabled=
"!showLogin || !show"
@
click=
"testLogin"
>
{{
$t
(
'ldap.test_login'
)
}}
</el-button>
<el-button
v-if=
"showEdit"
size=
"small"
@
click=
"edit"
>
{{
$t
(
'ldap.edit'
)
}}
</el-button>
<el-button
v-if=
"showSave"
type=
"success"
size=
"small"
@
click=
"save('form')"
>
{{
$t
(
'commons.save'
)
}}
</el-button>
<el-button
v-if=
"showCancel"
type=
"info"
size=
"small"
@
click=
"cancel"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
</div>
<el-dialog
v-loading=
"result.loading"
:title=
"$t('ldap.test_login')"
:visible
.
sync=
"loginVisible"
width=
"30%"
destroy-on-close
@
close=
"close"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginFormRules"
label-width=
"90px"
>
<el-form-item
:label=
"$t('commons.username')"
prop=
"username"
>
<el-input
v-model=
"loginForm.username"
autocomplete=
"off"
:placeholder=
"$t('ldap.input_username')"
/>
</el-form-item>
<el-form-item
:label=
"$t('commons.password')"
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
autocomplete=
"new-password"
:placeholder=
"$t('ldap.input_password')"
show-password
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"loginVisible = false"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"login('loginForm')"
>
确认
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
// import MsDialogFooter from '@/metersphere/common/components/MsDialogFooter'
// import { listenGoBack, removeGoBackListener } from '@/metersphere/common/js/utils'
export
default
{
name
:
'LdapSetting'
,
components
:
{
},
data
()
{
return
{
form
:
{
open
:
false
},
loginForm
:
{},
result
:
{},
show
:
true
,
showEdit
:
true
,
showSave
:
false
,
showCancel
:
false
,
showLogin
:
false
,
loginVisible
:
false
,
rules
:
{
url
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_url'
),
trigger
:
[
'change'
,
'blur'
]
},
dn
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_dn'
),
trigger
:
[
'change'
,
'blur'
]
},
password
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_password'
),
trigger
:
[
'change'
,
'blur'
]
},
ou
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_ou'
),
trigger
:
[
'change'
,
'blur'
]
},
filter
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_filter'
),
trigger
:
[
'change'
,
'blur'
]
},
mapping
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_mapping'
),
trigger
:
[
'change'
,
'blur'
]
}
},
loginFormRules
:
{
username
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_username'
),
trigger
:
'blur'
},
password
:
{
required
:
true
,
message
:
this
.
$t
(
'ldap.input_password'
),
trigger
:
'blur'
}
}
}
},
created
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
result
=
this
.
$get
(
'/system/ldap/info'
,
response
=>
{
this
.
form
=
response
.
data
this
.
form
.
open
=
this
.
form
.
open
===
'true'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
()
})
})
},
edit
()
{
this
.
show
=
false
this
.
showEdit
=
false
this
.
showSave
=
true
this
.
showCancel
=
true
},
cancel
()
{
this
.
showEdit
=
true
this
.
showCancel
=
false
this
.
showSave
=
false
this
.
show
=
true
this
.
init
()
},
close
()
{
this
.
loginVisible
=
false
},
testConnection
()
{
if
(
!
this
.
checkParam
())
{
return
false
}
this
.
result
=
this
.
$post
(
'/ldap/test/connect'
,
this
.
form
,
()
=>
{
this
.
$success
(
this
.
$t
(
'commons.connection_successful'
))
this
.
showLogin
=
true
},
()
=>
{
this
.
showLogin
=
false
})
},
testLogin
()
{
if
(
!
this
.
checkParam
())
{
return
false
}
if
(
!
this
.
form
.
ou
)
{
this
.
$warning
(
this
.
$t
(
'ldap.ou_cannot_be_empty'
))
return
false
}
if
(
!
this
.
form
.
filter
)
{
this
.
$warning
(
this
.
$t
(
'ldap.filter_cannot_be_empty'
))
return
false
}
if
(
!
this
.
form
.
mapping
)
{
this
.
$warning
(
this
.
$t
(
'ldap.mapping_cannot_be_empty'
))
return
false
}
this
.
loginForm
=
{}
this
.
loginVisible
=
true
},
checkParam
()
{
if
(
!
this
.
form
.
url
)
{
this
.
$warning
(
this
.
$t
(
'ldap.url_cannot_be_empty'
))
return
false
}
if
(
!
this
.
form
.
dn
)
{
this
.
$warning
(
this
.
$t
(
'ldap.dn_cannot_be_empty'
))
return
false
}
if
(
!
this
.
form
.
password
)
{
this
.
$warning
(
this
.
$t
(
'ldap.password_cannot_be_empty'
))
return
false
}
return
true
},
save
(
form
)
{
const
param
=
[
{
paramKey
:
'ldap.url'
,
paramValue
:
this
.
form
.
url
,
type
:
'text'
,
sort
:
1
},
{
paramKey
:
'ldap.dn'
,
paramValue
:
this
.
form
.
dn
,
type
:
'text'
,
sort
:
2
},
{
paramKey
:
'ldap.password'
,
paramValue
:
this
.
form
.
password
,
type
:
'password'
,
sort
:
3
},
{
paramKey
:
'ldap.ou'
,
paramValue
:
this
.
form
.
ou
,
type
:
'text'
,
sort
:
4
},
{
paramKey
:
'ldap.filter'
,
paramValue
:
this
.
form
.
filter
,
type
:
'text'
,
sort
:
5
},
{
paramKey
:
'ldap.mapping'
,
paramValue
:
this
.
form
.
mapping
,
type
:
'text'
,
sort
:
6
},
{
paramKey
:
'ldap.open'
,
paramValue
:
this
.
form
.
open
,
type
:
'text'
,
sort
:
7
}
]
this
.
$refs
[
form
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
result
=
this
.
$post
(
'/system/save/ldap'
,
param
,
()
=>
{
this
.
show
=
true
this
.
showEdit
=
true
this
.
showSave
=
false
this
.
showCancel
=
false
this
.
showLogin
=
false
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
init
()
})
}
else
{
return
false
}
})
},
login
(
form
)
{
this
.
$refs
[
form
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
result
=
this
.
$post
(
'/ldap/test/login'
,
this
.
loginForm
,
()
=>
{
this
.
$success
(
this
.
$t
(
'ldap.login_success'
))
})
}
else
{
return
false
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论