Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
e955d2bf
提交
e955d2bf
authored
5月 28, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(frontend):user列表增加角色字段;数据源添加报错fix
上级
92549c13
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
27 行增加
和
3 行删除
+27
-3
DatasourceService.java
...ava/io/dataease/datasource/service/DatasourceService.java
+2
-1
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+1
-0
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+1
-0
form.vue
frontend/src/views/system/datasource/form.vue
+4
-2
index.vue
frontend/src/views/system/user/index.vue
+18
-0
没有找到文件。
backend/src/main/java/io/dataease/datasource/service/DatasourceService.java
浏览文件 @
e955d2bf
...
@@ -18,6 +18,7 @@ import io.dataease.datasource.provider.ProviderFactory;
...
@@ -18,6 +18,7 @@ import io.dataease.datasource.provider.ProviderFactory;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.dto.DatasourceDTO
;
import
io.dataease.dto.DatasourceDTO
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.i18n.Translator
;
import
io.dataease.service.dataset.DataSetGroupService
;
import
io.dataease.service.dataset.DataSetGroupService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -49,7 +50,7 @@ public class DatasourceService {
...
@@ -49,7 +50,7 @@ public class DatasourceService {
DatasourceExample
example
=
new
DatasourceExample
();
DatasourceExample
example
=
new
DatasourceExample
();
example
.
createCriteria
().
andNameEqualTo
(
datasource
.
getName
());
example
.
createCriteria
().
andNameEqualTo
(
datasource
.
getName
());
if
(
CollectionUtils
.
isNotEmpty
(
datasourceMapper
.
selectByExample
(
example
)))
{
if
(
CollectionUtils
.
isNotEmpty
(
datasourceMapper
.
selectByExample
(
example
)))
{
DEException
.
throwException
(
"Exist data connection with the same name "
);
DEException
.
throwException
(
Translator
.
get
(
"i18n_ds_name_exists"
)
);
}
}
long
currentTimeMillis
=
System
.
currentTimeMillis
();
long
currentTimeMillis
=
System
.
currentTimeMillis
();
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
...
...
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
e955d2bf
...
@@ -241,4 +241,5 @@ i18n_union_field_exists=The same field can't in two dataset
...
@@ -241,4 +241,5 @@ i18n_union_field_exists=The same field can't in two dataset
i18n_cron_time_error
=
Start time can't greater then end time
i18n_cron_time_error
=
Start time can't greater then end time
i18n_auth_source_be_canceled
=
This Auth Resource Already Be Canceled
i18n_auth_source_be_canceled
=
This Auth Resource Already Be Canceled
i18n_username_exists
=
ID is already exists
i18n_username_exists
=
ID is already exists
i18n_ds_name_exists
=
Datasource name exists
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
e955d2bf
...
@@ -243,3 +243,4 @@ i18n_union_field_exists=两个数据集之间关联不能出现多次相同字
...
@@ -243,3 +243,4 @@ i18n_union_field_exists=两个数据集之间关联不能出现多次相同字
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_auth_source_be_canceled
=
当前资源授权权限已经被取消
i18n_auth_source_be_canceled
=
当前资源授权权限已经被取消
i18n_username_exists
=
用户ID已存在
i18n_username_exists
=
用户ID已存在
i18n_ds_name_exists
=
数据源名称已存在
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
e955d2bf
...
@@ -243,3 +243,4 @@ i18n_union_field_exists=兩個數據集之間關聯不能出現多次相同字
...
@@ -243,3 +243,4 @@ i18n_union_field_exists=兩個數據集之間關聯不能出現多次相同字
i18n_cron_time_error
=
開始時間不能大於結束時間
i18n_cron_time_error
=
開始時間不能大於結束時間
i18n_auth_source_be_canceled
=
當前資源授權權限已經被取消
i18n_auth_source_be_canceled
=
當前資源授權權限已經被取消
i18n_username_exists
=
用戶ID已存在
i18n_username_exists
=
用戶ID已存在
i18n_ds_name_exists
=
數據源名稱已存在
frontend/src/views/system/datasource/form.vue
浏览文件 @
e955d2bf
...
@@ -94,8 +94,10 @@ export default {
...
@@ -94,8 +94,10 @@ export default {
this
.
$refs
.
dsForm
.
validate
(
valid
=>
{
this
.
$refs
.
dsForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
const
method
=
this
.
formType
===
'add'
?
addDs
:
editDs
const
method
=
this
.
formType
===
'add'
?
addDs
:
editDs
this
.
form
.
configuration
=
JSON
.
stringify
(
this
.
form
.
configuration
)
// this.form.configuration = JSON.stringify(this.form.configuration)
method
(
this
.
form
).
then
(
res
=>
{
const
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
form
.
configuration
=
JSON
.
stringify
(
form
.
configuration
)
method
(
form
).
then
(
res
=>
{
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
backToList
()
this
.
backToList
()
})
})
...
...
frontend/src/views/system/user/index.vue
浏览文件 @
e955d2bf
...
@@ -25,6 +25,24 @@
...
@@ -25,6 +25,24 @@
<div>
{{
scope
.
row
.
dept
&&
scope
.
row
.
dept
.
deptName
}}
</div>
<div>
{{
scope
.
row
.
dept
&&
scope
.
row
.
dept
.
deptName
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"roles"
:label=
"$t('commons.role')"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.roles && scope.row.roles.length
<
=
2
"
>
<div
v-for=
"role in scope.row.roles"
:key=
"role.roleId"
>
{{
role
.
roleName
}}
</div>
</div>
<div
v-if=
"scope.row.roles && scope.row.roles.length > 2"
>
<el-tooltip
placement=
"top"
>
<div
slot=
"content"
>
<div
v-for=
"role in scope.row.roles"
:key=
"role.roleId"
>
{{
role
.
roleName
}}
</div>
</div>
<div>
<div
v-for=
"(role,index) in scope.row.roles"
v-if=
"index
<
2
"
:key=
"role.roleId"
>
{{
role
.
roleName
}}
</div>
<div>
...
</div>
</div>
</el-tooltip>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
:label=
"$t('commons.status')"
>
<el-table-column
prop=
"status"
:label=
"$t('commons.status')"
>
<
template
v-slot:default=
"scope"
>
<
template
v-slot:default=
"scope"
>
<el-switch
v-model=
"scope.row.enabled"
:active-value=
"1"
:inactive-value=
"0"
inactive-color=
"#DCDFE6"
@
change=
"changeSwitch(scope.row)"
/>
<el-switch
v-model=
"scope.row.enabled"
:active-value=
"1"
:inactive-value=
"0"
inactive-color=
"#DCDFE6"
@
change=
"changeSwitch(scope.row)"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论