Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
1c48fc88
提交
1c48fc88
authored
5月 18, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 授权国际化等
上级
533d466c
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
261 行增加
和
424 行删除
+261
-424
Datasource.java
...end/src/main/java/io/dataease/base/domain/Datasource.java
+2
-0
DatasourceExample.java
.../main/java/io/dataease/base/domain/DatasourceExample.java
+70
-0
DatasourceMapper.xml
...rc/main/java/io/dataease/base/mapper/DatasourceMapper.xml
+22
-5
SysAuthController.java
...in/java/io/dataease/controller/sys/SysAuthController.java
+2
-0
DatasourceService.java
...ava/io/dataease/datasource/service/DatasourceService.java
+1
-0
V3__init_data.sql
backend/src/main/resources/db/migration/V3__init_data.sql
+1
-1
V5__auth.sql
backend/src/main/resources/db/migration/V5__auth.sql
+19
-43
generatorConfig.xml
backend/src/main/resources/generatorConfig.xml
+3
-3
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+5
-0
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+5
-0
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+5
-0
en.js
frontend/src/lang/en.js
+22
-0
tw.js
frontend/src/lang/tw.js
+22
-0
zh.js
frontend/src/lang/zh.js
+22
-0
authConfig.vue
frontend/src/views/system/authority/authConfig.vue
+17
-16
authQuickConfig.vue
frontend/src/views/system/authority/authQuickConfig.vue
+40
-39
authDept.vue
frontend/src/views/system/authority/components/authDept.vue
+0
-160
authRole.vue
frontend/src/views/system/authority/components/authRole.vue
+0
-78
authUser.vue
frontend/src/views/system/authority/components/authUser.vue
+0
-74
index.vue
frontend/src/views/system/authority/index.vue
+3
-5
没有找到文件。
backend/src/main/java/io/dataease/base/domain/Datasource.java
浏览文件 @
1c48fc88
...
@@ -13,6 +13,8 @@ public class Datasource implements Serializable {
...
@@ -13,6 +13,8 @@ public class Datasource implements Serializable {
private
String
type
;
private
String
type
;
private
String
createBy
;
private
Long
createTime
;
private
Long
createTime
;
private
Long
updateTime
;
private
Long
updateTime
;
...
...
backend/src/main/java/io/dataease/base/domain/DatasourceExample.java
浏览文件 @
1c48fc88
...
@@ -384,6 +384,76 @@ public class DatasourceExample {
...
@@ -384,6 +384,76 @@ public class DatasourceExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andCreateByIsNull
()
{
addCriterion
(
"create_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNotNull
()
{
addCriterion
(
"create_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByEqualTo
(
String
value
)
{
addCriterion
(
"create_by ="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotEqualTo
(
String
value
)
{
addCriterion
(
"create_by <>"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThan
(
String
value
)
{
addCriterion
(
"create_by >"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by >="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThan
(
String
value
)
{
addCriterion
(
"create_by <"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by <="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLike
(
String
value
)
{
addCriterion
(
"create_by like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotLike
(
String
value
)
{
addCriterion
(
"create_by not like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by not in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by not between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
backend/src/main/java/io/dataease/base/mapper/DatasourceMapper.xml
浏览文件 @
1c48fc88
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
</resultMap>
</resultMap>
...
@@ -71,7 +72,7 @@
...
@@ -71,7 +72,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, `name`, `desc`, `type`, create_time, update_time
id, `name`, `desc`, `type`, create_
by, create_
time, update_time
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
configuration
configuration
...
@@ -126,11 +127,11 @@
...
@@ -126,11 +127,11 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.Datasource"
>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.Datasource"
>
insert into datasource (id, `name`, `desc`,
insert into datasource (id, `name`, `desc`,
`type`, create_
time, upd
ate_time,
`type`, create_
by, cre
ate_time,
configuration)
update_time,
configuration)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{create
Time,jdbcType=BIGINT}, #{upd
ateTime,jdbcType=BIGINT},
#{type,jdbcType=VARCHAR}, #{create
By,jdbcType=VARCHAR}, #{cre
ateTime,jdbcType=BIGINT},
#{configuration,jdbcType=LONGVARCHAR})
#{
updateTime,jdbcType=BIGINT}, #{
configuration,jdbcType=LONGVARCHAR})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.Datasource"
>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.Datasource"
>
insert into datasource
insert into datasource
...
@@ -147,6 +148,9 @@
...
@@ -147,6 +148,9 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
`type`,
`type`,
</if>
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time,
create_time,
</if>
</if>
...
@@ -170,6 +174,9 @@
...
@@ -170,6 +174,9 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
#{createTime,jdbcType=BIGINT},
</if>
</if>
...
@@ -202,6 +209,9 @@
...
@@ -202,6 +209,9 @@
<if
test=
"record.type != null"
>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</if>
...
@@ -222,6 +232,7 @@
...
@@ -222,6 +232,7 @@
`name` = #{record.name,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
configuration = #{record.configuration,jdbcType=LONGVARCHAR}
configuration = #{record.configuration,jdbcType=LONGVARCHAR}
...
@@ -235,6 +246,7 @@
...
@@ -235,6 +246,7 @@
`name` = #{record.name,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
update_time = #{record.updateTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
...
@@ -253,6 +265,9 @@
...
@@ -253,6 +265,9 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT},
</if>
</if>
...
@@ -270,6 +285,7 @@
...
@@ -270,6 +285,7 @@
set `name` = #{name,jdbcType=VARCHAR},
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
configuration = #{configuration,jdbcType=LONGVARCHAR}
configuration = #{configuration,jdbcType=LONGVARCHAR}
...
@@ -280,6 +296,7 @@
...
@@ -280,6 +296,7 @@
set `name` = #{name,jdbcType=VARCHAR},
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
...
...
backend/src/main/java/io/dataease/controller/sys/SysAuthController.java
浏览文件 @
1c48fc88
...
@@ -4,6 +4,7 @@ import io.dataease.base.domain.SysAuth;
...
@@ -4,6 +4,7 @@ import io.dataease.base.domain.SysAuth;
import
io.dataease.base.domain.SysAuthDetail
;
import
io.dataease.base.domain.SysAuthDetail
;
import
io.dataease.base.domain.SysDept
;
import
io.dataease.base.domain.SysDept
;
import
io.dataease.controller.ResultHolder
;
import
io.dataease.controller.ResultHolder
;
import
io.dataease.controller.handler.annotation.I18n
;
import
io.dataease.controller.request.BaseTreeRequest
;
import
io.dataease.controller.request.BaseTreeRequest
;
import
io.dataease.controller.request.SysAuthDetailRequest
;
import
io.dataease.controller.request.SysAuthDetailRequest
;
import
io.dataease.controller.request.SysAuthRequest
;
import
io.dataease.controller.request.SysAuthRequest
;
...
@@ -49,6 +50,7 @@ public class SysAuthController {
...
@@ -49,6 +50,7 @@ public class SysAuthController {
@ApiOperation
(
"查询授权模板"
)
@ApiOperation
(
"查询授权模板"
)
@GetMapping
(
"/authDetailsModel/{authType}"
)
@GetMapping
(
"/authDetailsModel/{authType}"
)
@I18n
public
List
<
SysAuthDetail
>
authDetailsModel
(
@PathVariable
String
authType
){
public
List
<
SysAuthDetail
>
authDetailsModel
(
@PathVariable
String
authType
){
return
sysAuthService
.
searchAuthDetailsModel
(
authType
);
return
sysAuthService
.
searchAuthDetailsModel
(
authType
);
}
}
...
...
backend/src/main/java/io/dataease/datasource/service/DatasourceService.java
浏览文件 @
1c48fc88
...
@@ -51,6 +51,7 @@ public class DatasourceService {
...
@@ -51,6 +51,7 @@ public class DatasourceService {
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
datasource
.
setUpdateTime
(
currentTimeMillis
);
datasource
.
setUpdateTime
(
currentTimeMillis
);
datasource
.
setCreateTime
(
currentTimeMillis
);
datasource
.
setCreateTime
(
currentTimeMillis
);
datasource
.
setCreateBy
(
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
()));
datasourceMapper
.
insertSelective
(
datasource
);
datasourceMapper
.
insertSelective
(
datasource
);
return
datasource
;
return
datasource
;
}
}
...
...
backend/src/main/resources/db/migration/V3__init_data.sql
浏览文件 @
1c48fc88
...
@@ -43,7 +43,7 @@ INSERT INTO `sys_menu` VALUES (37, 1, 0, 1, '组织表单', '组织表单', 'sys
...
@@ -43,7 +43,7 @@ INSERT INTO `sys_menu` VALUES (37, 1, 0, 1, '组织表单', '组织表单', 'sys
INSERT
INTO
`sys_menu`
VALUES
(
38
,
1
,
0
,
1
,
'角色表单'
,
'角色表单'
,
'system/role/form'
,
13
,
''
,
'role-form'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
38
,
1
,
0
,
1
,
'角色表单'
,
'角色表单'
,
'system/role/form'
,
13
,
''
,
'role-form'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
39
,
0
,
0
,
1
,
'数据源表单'
,
'数据源表单'
,
'system/datasource/form'
,
5
,
NULL
,
'/ds-form'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
39
,
0
,
0
,
1
,
'数据源表单'
,
'数据源表单'
,
'system/datasource/form'
,
5
,
NULL
,
'/ds-form'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
40
,
1
,
0
,
1
,
'模板管理'
,
'模板管理'
,
'panel/template/index'
,
13
,
'dashboard'
,
'panel/template/index'
,
NULL
,
b
'0'
,
b
'0'
,
'sysparam:read'
,
NULL
,
NULL
,
NULL
,
1620444227389
);
INSERT
INTO
`sys_menu`
VALUES
(
40
,
1
,
0
,
1
,
'模板管理'
,
'模板管理'
,
'panel/template/index'
,
13
,
'dashboard'
,
'panel/template/index'
,
NULL
,
b
'0'
,
b
'0'
,
'sysparam:read'
,
NULL
,
NULL
,
NULL
,
1620444227389
);
INSERT
INTO
`sys_menu`
VALUES
(
41
,
1
,
0
,
1
,
'权限管理'
,
'权限管理'
,
'system/
permission/index'
,
14
,
'password'
,
'system/permission
/index'
,
b
'0'
,
b
'0'
,
b
'0'
,
'sysparam:read'
,
NULL
,
NULL
,
NULL
,
1620447312657
);
INSERT
INTO
`sys_menu`
VALUES
(
41
,
1
,
0
,
1
,
'权限管理'
,
'权限管理'
,
'system/
authority/index'
,
14
,
'password'
,
'system/authority
/index'
,
b
'0'
,
b
'0'
,
b
'0'
,
'sysparam:read'
,
NULL
,
NULL
,
NULL
,
1620447312657
);
INSERT
INTO
`sys_menu`
VALUES
(
50
,
0
,
0
,
1
,
'个人信息'
,
'个人信息'
,
'system/user/privateForm'
,
999
,
NULL
,
'/person-info'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
50
,
0
,
0
,
1
,
'个人信息'
,
'个人信息'
,
'system/user/privateForm'
,
999
,
NULL
,
'/person-info'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
51
,
0
,
0
,
1
,
'重置密码'
,
'重置密码'
,
'system/user/personPwd'
,
999
,
NULL
,
'/person-pwd'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
51
,
0
,
0
,
1
,
'重置密码'
,
'重置密码'
,
'system/user/personPwd'
,
999
,
NULL
,
'/person-pwd'
,
b
'0'
,
b
'0'
,
b
'1'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`sys_menu`
VALUES
(
52
,
1
,
0
,
1
,
'关于'
,
'关于'
,
'system/about/index'
,
16
,
'system'
,
'about'
,
b
'0'
,
b
'0'
,
b
'0'
,
NULL
,
NULL
,
NULL
,
NULL
,
1620897406691
);
INSERT
INTO
`sys_menu`
VALUES
(
52
,
1
,
0
,
1
,
'关于'
,
'关于'
,
'system/about/index'
,
16
,
'system'
,
'about'
,
b
'0'
,
b
'0'
,
b
'0'
,
NULL
,
NULL
,
NULL
,
NULL
,
1620897406691
);
...
...
backend/src/main/resources/db/migration/V5__auth.sql
浏览文件 @
1c48fc88
/*
Navicat Premium Data Transfer
Source Server : A-LOCAL-本机数据库
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : data_ease
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 18/05/2021 18:37:45
*/
SET
NAMES
utf8mb4
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
SET
FOREIGN_KEY_CHECKS
=
0
;
...
@@ -41,7 +56,7 @@ CREATE TABLE `sys_auth_detail` (
...
@@ -41,7 +56,7 @@ CREATE TABLE `sys_auth_detail` (
-- Records of sys_auth_detail
-- Records of sys_auth_detail
-- ----------------------------
-- ----------------------------
BEGIN
;
BEGIN
;
INSERT
INTO
`sys_auth_detail`
VALUES
(
'chart_manage'
,
'chart'
,
'
管理'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'chart_use'
,
'chart'
,
'使用'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'dataset_manege'
,
'dataset'
,
'管理'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'dataset_use'
,
'dataset'
,
'使用'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'link_manage'
,
'link'
,
'管理'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'link_user'
,
'link'
,
'使用'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'panel_export'
,
'panel'
,
'导出'
,
3
,
0
,
'export'
,
'基础权限-导出'
,
'system'
,
NULL
,
NULL
),
(
'panel_manage'
,
'panel'
,
'编辑'
,
5
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'panel_user'
,
'panel'
,
'查看
'
,
1
,
0
,
'view'
,
'基础权限-查看'
,
'system'
,
NULL
,
NULL
);
INSERT
INTO
`sys_auth_detail`
VALUES
(
'chart_manage'
,
'chart'
,
'
i18n_auth_manage'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'chart_use'
,
'chart'
,
'i18n_auth_use'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'dataset_manege'
,
'dataset'
,
'i18n_auth_manage'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'dataset_use'
,
'dataset'
,
'i18n_auth_use'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'link_manage'
,
'link'
,
'i18n_auth_manage'
,
3
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'link_user'
,
'link'
,
'i18n_auth_use'
,
1
,
0
,
'use'
,
'基础权限-使用'
,
'system'
,
NULL
,
NULL
),
(
'panel_export'
,
'panel'
,
'i18n_auth_export'
,
3
,
0
,
'export'
,
'基础权限-导出'
,
'system'
,
NULL
,
NULL
),
(
'panel_manage'
,
'panel'
,
'i18n_auth_manage'
,
5
,
0
,
'manage'
,
'基础权限-管理'
,
'system'
,
NULL
,
NULL
),
(
'panel_user'
,
'panel'
,
'i18n_auth_view
'
,
1
,
0
,
'view'
,
'基础权限-查看'
,
'system'
,
NULL
,
NULL
);
COMMIT
;
COMMIT
;
-- ----------------------------
-- ----------------------------
...
@@ -114,7 +129,7 @@ VALUES
...
@@ -114,7 +129,7 @@ VALUES
authId
AS
auth_id
,
authId
AS
auth_id
,
sys_auth_detail
.
privilege_name
,
sys_auth_detail
.
privilege_name
,
sys_auth_detail
.
privilege_type
,
sys_auth_detail
.
privilege_type
,
if
(
sys_auth_detail
.
privilege_type
=
1
,
1
,
sys_auth_detail
.
privilege_value
)
,
1
,
sys_auth_detail
.
privilege_extend
,
sys_auth_detail
.
privilege_extend
,
sys_auth_detail
.
remark
,
sys_auth_detail
.
remark
,
'auto'
AS
create_user
,
'auto'
AS
create_user
,
...
@@ -143,7 +158,7 @@ select id from sys_auth where sys_auth.auth_source=authSource and sys_auth.auth
...
@@ -143,7 +158,7 @@ select id from sys_auth where sys_auth.auth_source=authSource and sys_auth.auth
delete
from
sys_auth
where
sys_auth
.
auth_source
=
authSource
and
sys_auth
.
auth_source_type
=
authSourceType
;
delete
from
sys_auth
where
sys_auth
.
auth_source
=
authSource
and
sys_auth
.
auth_source_type
=
authSourceType
;
RETURN
'suc
c
ess'
;
RETURN
'sucess'
;
END
END
;;
;;
...
@@ -165,7 +180,7 @@ select id from sys_auth where sys_auth.auth_target=authTarget and sys_auth.auth
...
@@ -165,7 +180,7 @@ select id from sys_auth where sys_auth.auth_target=authTarget and sys_auth.auth
delete
from
sys_auth
where
sys_auth
.
auth_target
=
authTarget
and
sys_auth
.
auth_target_type
=
authTargetType
;
delete
from
sys_auth
where
sys_auth
.
auth_target
=
authTarget
and
sys_auth
.
auth_target_type
=
authTargetType
;
RETURN
'suc
c
ess'
;
RETURN
'sucess'
;
END
END
;;
;;
...
@@ -465,42 +480,3 @@ END
...
@@ -465,42 +480,3 @@ END
delimiter
;
delimiter
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
DROP
TRIGGER
if
exists
`new_auth_link`
;
DROP
TRIGGER
if
exists
`delete_auth_link`
;
CREATE
TRIGGER
`new_auth_link`
AFTER
INSERT
ON
`datasource`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'link'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_link`
AFTER
DELETE
ON
`datasource`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'link'
)
into
@
ee
;
DROP
TRIGGER
if
exists
`new_auth_dataset_group`
;
DROP
TRIGGER
if
exists
`delete_auth_dataset_group`
;
DROP
TRIGGER
if
exists
`new_auth_dataset_table`
;
DROP
TRIGGER
if
exists
`delete_auth_dataset_table`
;
CREATE
TRIGGER
`new_auth_dataset_group`
AFTER
INSERT
ON
`dataset_group`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'dataset'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_dataset_group`
AFTER
DELETE
ON
`dataset_group`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'dataset'
)
into
@
ee
;
CREATE
TRIGGER
`new_auth_dataset_table`
AFTER
INSERT
ON
`dataset_table`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'dataset'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_dataset_table`
AFTER
DELETE
ON
`dataset_table`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'dataset'
)
into
@
ee
;
DROP
TRIGGER
if
exists
`new_auth_chart_group`
;
DROP
TRIGGER
if
exists
`delete_auth_chart_group`
;
DROP
TRIGGER
if
exists
`new_auth_chart_view`
;
DROP
TRIGGER
if
exists
`delete_auth_chart_view`
;
CREATE
TRIGGER
`new_auth_chart_group`
AFTER
INSERT
ON
`chart_group`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'chart'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_chart_group`
AFTER
DELETE
ON
`chart_group`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'chart'
)
into
@
ee
;
CREATE
TRIGGER
`new_auth_chart_view`
AFTER
INSERT
ON
`chart_view`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'chart'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_chart_view`
AFTER
DELETE
ON
`chart_view`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'chart'
)
into
@
ee
;
DROP
TRIGGER
if
exists
`new_auth_panel`
;
DROP
TRIGGER
if
exists
`delete_auth_panel`
;
CREATE
TRIGGER
`new_auth_panel`
AFTER
INSERT
ON
`panel_group`
FOR
EACH
ROW
select
copy_auth
(
NEW
.
id
,
'panel'
,
NEW
.
create_by
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_panel`
AFTER
DELETE
ON
`panel_group`
FOR
EACH
ROW
select
delete_auth_source
(
OLD
.
id
,
'panel'
)
into
@
ee
;
DROP
TRIGGER
if
exists
`delete_auth_user_target`
;
DROP
TRIGGER
if
exists
`delete_auth_role_target`
;
DROP
TRIGGER
if
exists
`delete_auth_dept_target`
;
CREATE
TRIGGER
`delete_auth_user_target`
AFTER
DELETE
ON
`sys_user`
FOR
EACH
ROW
select
delete_auth_target
(
OLD
.
user_id
,
'user'
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_role_target`
AFTER
DELETE
ON
`sys_role`
FOR
EACH
ROW
select
delete_auth_target
(
OLD
.
role_id
,
'role'
)
into
@
ee
;
CREATE
TRIGGER
`delete_auth_dept_target`
AFTER
DELETE
ON
`sys_dept`
FOR
EACH
ROW
select
delete_auth_target
(
OLD
.
dept_id
,
'dept'
)
into
@
ee
;
backend/src/main/resources/generatorConfig.xml
浏览文件 @
1c48fc88
...
@@ -64,14 +64,14 @@
...
@@ -64,14 +64,14 @@
<!--要生成的数据库表 -->
<!--要生成的数据库表 -->
<!-- <table tableName="datasource"/>--
>
<table
tableName=
"datasource"
/
>
<!-- <table tableName="sys_dict"/>-->
<!-- <table tableName="sys_dict"/>-->
<!-- <table tableName="sys_dict_item"/>-->
<!-- <table tableName="sys_dict_item"/>-->
<!-- <table tableName="dataset_table_field"/>-->
<!-- <table tableName="dataset_table_field"/>-->
<!-- <table tableName="v_chart">-->
<!-- <table tableName="v_chart">-->
<!-- </table>-->
<!-- </table>-->
<table
tableName=
"v_auth_model"
>
<!-- <table tableName="v_auth_model">--
>
</table
>
<!-- </table>--
>
<!-- <table tableName="v_dataset"/>-->
<!-- <table tableName="v_dataset"/>-->
<!-- <table tableName="sys_auth_detail"/>-->
<!-- <table tableName="sys_auth_detail"/>-->
...
...
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
1c48fc88
...
@@ -221,3 +221,8 @@ authsource_configuration_is_null=Authentication source configuration cannot be e
...
@@ -221,3 +221,8 @@ authsource_configuration_is_null=Authentication source configuration cannot be e
角色管理=Role
management
角色管理=Role
management
角色表单=Role
Form
角色表单=Role
Form
重置密码=Reset
Password
重置密码=Reset
Password
i18n_auth_view
=
View
i18n_auth_use
=
Use
i18n_auth_export
=
Export
i18n_auth_manage
=
Manage
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
1c48fc88
...
@@ -222,3 +222,8 @@ authsource_configuration_is_null=认证源配置不能为空
...
@@ -222,3 +222,8 @@ authsource_configuration_is_null=认证源配置不能为空
角色管理=角色管理
角色管理=角色管理
角色表单=角色表单
角色表单=角色表单
重置密码=重置密码
重置密码=重置密码
i18n_auth_view
=
查看
i18n_auth_use
=
使用
i18n_auth_export
=
导出
i18n_auth_manage
=
管理
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
1c48fc88
...
@@ -222,3 +222,8 @@ authsource_configuration_is_null=認證源配置不能為空
...
@@ -222,3 +222,8 @@ authsource_configuration_is_null=認證源配置不能為空
角色管理=角色管理
角色管理=角色管理
角色表单=角色表單
角色表单=角色表單
重置密码=重置密碼
重置密码=重置密碼
i18n_auth_view
=
查看
i18n_auth_use
=
使用
i18n_auth_export
=
導出
i18n_auth_manage
=
管理
frontend/src/lang/en.js
浏览文件 @
1c48fc88
...
@@ -894,5 +894,27 @@ export default {
...
@@ -894,5 +894,27 @@ export default {
loginImage
:
'Picture on the right side of the login page'
,
loginImage
:
'Picture on the right side of the login page'
,
loginTitle
:
'Login page title'
,
loginTitle
:
'Login page title'
,
title
:
'System name'
title
:
'System name'
},
auth
:
{
authConfig
:
'Auth Config'
,
authQuickConfig
:
'Auth Quick Config'
,
dept
:
'Dept'
,
role
:
'Role'
,
user
:
'User'
,
linkAuth
:
'Datasource Permissions'
,
datasetAuth
:
'Data Permissions'
,
chartAuth
:
'Chart Permissions'
,
panelAuth
:
'Panel Permissions'
,
deptHead
:
'All Dept'
,
roleHead
:
'All Role'
,
userHead
:
'All User'
,
linkAuthHead
:
'All Datasource'
,
datasetAuthHead
:
'All Data'
,
chartAuthHead
:
'All Chart'
,
panelAuthHead
:
'All Chart'
,
view
:
'View'
,
use
:
'Use'
,
export
:
'Export'
,
manage
:
'Manage'
}
}
}
}
frontend/src/lang/tw.js
浏览文件 @
1c48fc88
...
@@ -894,5 +894,27 @@ export default {
...
@@ -894,5 +894,27 @@ export default {
loginImage
:
'登陸頁面右側圖片'
,
loginImage
:
'登陸頁面右側圖片'
,
loginTitle
:
'登陸頁面標題'
,
loginTitle
:
'登陸頁面標題'
,
title
:
'系統名稱'
title
:
'系統名稱'
},
auth
:
{
authConfig
:
'權限配置'
,
authQuickConfig
:
'權限快捷配置'
,
dept
:
'部門'
,
role
:
'角色'
,
user
:
'用戶'
,
linkAuth
:
'數據源權限'
,
datasetAuth
:
'數據權限'
,
chartAuth
:
'視圖權限'
,
panelAuth
:
'儀表盤權限'
,
deptHead
:
'所有部門'
,
roleHead
:
'所有角色'
,
userHead
:
'所有用戶'
,
linkAuthHead
:
'所有數據源'
,
datasetAuthHead
:
'所有數據'
,
chartAuthHead
:
'所有視圖'
,
panelAuthHead
:
'所有儀表盤'
,
view
:
'查看'
,
use
:
'使用'
,
export
:
'導出'
,
manage
:
'管理'
}
}
}
}
frontend/src/lang/zh.js
浏览文件 @
1c48fc88
...
@@ -895,5 +895,27 @@ export default {
...
@@ -895,5 +895,27 @@ export default {
loginImage
:
'登录页面右侧图片'
,
loginImage
:
'登录页面右侧图片'
,
loginTitle
:
'登录页面标题'
,
loginTitle
:
'登录页面标题'
,
title
:
'系统名称'
title
:
'系统名称'
},
auth
:
{
authConfig
:
'权限配置'
,
authQuickConfig
:
'权限快捷配置'
,
dept
:
'部门'
,
role
:
'角色'
,
user
:
'用户'
,
linkAuth
:
'数据源权限'
,
datasetAuth
:
'数据权限'
,
chartAuth
:
'视图权限'
,
panelAuth
:
'仪表盘权限'
,
deptHead
:
'所有部门'
,
roleHead
:
'所有角色'
,
userHead
:
'所有用户'
,
linkAuthHead
:
'所有数据源'
,
datasetAuthHead
:
'所有数据'
,
chartAuthHead
:
'所有视图'
,
panelAuthHead
:
'所有仪表盘'
,
view
:
'查看'
,
use
:
'使用'
,
export
:
'导出'
,
manage
:
'管理'
}
}
}
}
frontend/src/views/system/authority/authConfig.vue
浏览文件 @
1c48fc88
<
template
>
<
template
>
<de-container>
<de-container
style=
"height: auto"
>
<de-aside-container>
<de-aside-container
style=
"height: auto"
>
<el-button
v-show=
"!showTargetSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showTargetSearchWidget"
/>
<el-button
v-show=
"!showTargetSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showTargetSearchWidget"
/>
<div
v-show=
"showTargetSearchInput"
class=
"de-input"
>
<div
v-show=
"showTargetSearchInput"
class=
"de-input"
>
<el-input
v-model=
"targetFilterText"
>
<el-input
v-model=
"targetFilterText"
>
...
@@ -63,46 +63,46 @@ export default {
...
@@ -63,46 +63,46 @@ export default {
targetInfoArray
:
targetInfoArray
:
[
[
{
{
tabName
:
'部门'
,
tabName
:
this
.
$t
(
'auth.dept'
)
,
head
:
'所有部门'
,
head
:
this
.
$t
(
'auth.deptHead'
)
,
direction
:
'target'
,
direction
:
'target'
,
authType
:
'dept'
authType
:
'dept'
},
},
{
{
tabName
:
'角色'
,
tabName
:
this
.
$t
(
'auth.role'
)
,
head
:
'所有角色'
,
head
:
this
.
$t
(
'auth.roleHead'
)
,
direction
:
'target'
,
direction
:
'target'
,
authType
:
'role'
authType
:
'role'
},
},
{
{
tabName
:
'用户'
,
tabName
:
this
.
$t
(
'auth.user'
)
,
head
:
'所有用户'
,
head
:
this
.
$t
(
'auth.userHead'
)
,
direction
:
'target'
,
direction
:
'target'
,
authType
:
'user'
authType
:
'user'
}],
}],
sourceInfoArray
:
sourceInfoArray
:
[
[
{
{
tabName
:
'数据源权限'
,
tabName
:
this
.
$t
(
'auth.linkAuth'
)
,
head
:
'所有数据源'
,
head
:
this
.
$t
(
'auth.linkAuthHead'
)
,
direction
:
'source'
,
direction
:
'source'
,
authType
:
'link'
authType
:
'link'
},
},
{
{
tabName
:
'数据集权限'
,
tabName
:
this
.
$t
(
'auth.datasetAuth'
)
,
head
:
'所有数据集'
,
head
:
this
.
$t
(
'auth.datasetAuthHead'
)
,
direction
:
'source'
,
direction
:
'source'
,
authType
:
'dataset'
authType
:
'dataset'
},
},
{
{
tabName
:
'视图权限'
,
tabName
:
this
.
$t
(
'auth.chartAuth'
)
,
head
:
'所有视图'
,
head
:
this
.
$t
(
'auth.linkAuthHead'
)
,
direction
:
'source'
,
direction
:
'source'
,
authType
:
'chart'
authType
:
'chart'
},
},
{
{
tabName
:
'仪表盘权限'
,
tabName
:
this
.
$t
(
'auth.panelAuth'
)
,
head
:
'所有仪表板'
,
head
:
this
.
$t
(
'auth.panelAuthHead'
)
,
direction
:
'source'
,
direction
:
'source'
,
authType
:
'panel'
authType
:
'panel'
}],
}],
...
@@ -182,6 +182,7 @@ export default {
...
@@ -182,6 +182,7 @@ export default {
}
}
.de-main-container-auth
{
.de-main-container-auth
{
border
:
1px
solid
#E6E6E6
;
border
:
1px
solid
#E6E6E6
;
height
:
auto
;
}
}
// ::-webkit-scrollbar {
// ::-webkit-scrollbar {
...
...
frontend/src/views/system/authority/authQuickConfig.vue
浏览文件 @
1c48fc88
<
template
>
<
template
>
<de-container>
<de-container>
<de-aside-container>
<span>
敬请期待
</span>
<el-button
v-show=
"!showSourceSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showSourceSearchWidget"
/>
<!--
<de-aside-container>
-->
<div
v-show=
"showSourceSearchInput"
class=
"de-input"
>
<!--
<el-button
v-show=
"!showSourceSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showSourceSearchWidget"
/>
-->
<el-input
v-model=
"sourceFilterText"
>
<!--
<div
v-show=
"showSourceSearchInput"
class=
"de-input"
>
-->
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeSourceSearchWidget"
/>
<!--
<el-input
v-model=
"sourceFilterText"
>
-->
</el-input>
<!--
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeSourceSearchWidget"
/>
-->
</div>
<!--
</el-input>
-->
<el-tabs
v-model=
"sourceActiveName"
:class=
"
{'de-search-header': showSourceSearchInput}" @tab-click="handleClick">
<!--
</div>
-->
<el-tab-pane
v-for=
"(sourceInfo, index) in sourceInfoArray"
:key=
"index"
:lazy=
"true"
:label=
"sourceInfo.tabName"
:name=
"sourceInfo.authType"
>
<!--
<el-tabs
v-model=
"sourceActiveName"
:class=
"
{'de-search-header': showSourceSearchInput}" @tab-click="handleClick">-->
<lazy-tree
<!--
<el-tab-pane
v-for=
"(sourceInfo, index) in sourceInfoArray"
:key=
"index"
:lazy=
"true"
:label=
"sourceInfo.tabName"
:name=
"sourceInfo.authType"
>
-->
v-if=
"authCondition"
<!--
<lazy-tree-->
:active-name=
"sourceActiveName"
<!-- v-if="authCondition"-->
:filter-text=
"sourceFilterText"
<!-- :active-name="sourceActiveName"-->
:data-info=
"sourceInfo"
<!-- :filter-text="sourceFilterText"-->
highlight-current
<!-- :data-info="sourceInfo"-->
@
nodeClick=
"authNodeClick"
<!-- highlight-current-->
/>
<!-- @nodeClick="authNodeClick"-->
</el-tab-pane>
<!-- />-->
</el-tabs>
<!--
</el-tab-pane>
-->
</de-aside-container>
<!--
</el-tabs>
-->
<de-main-container
class=
"de-main-container-auth"
>
<!--
</de-aside-container>
-->
<el-button
v-show=
"!showTargetSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showTargetSearchWidget"
/>
<!--
<de-main-container
class=
"de-main-container-auth"
>
-->
<div
v-show=
"showTargetSearchInput"
class=
"de-input"
>
<!--
<el-button
v-show=
"!showTargetSearchInput"
class=
"de-icon"
icon=
"el-icon-search"
circle
size=
"mini"
@
click=
"showTargetSearchWidget"
/>
-->
<el-input
v-model=
"targetFilterText"
>
<!--
<div
v-show=
"showTargetSearchInput"
class=
"de-input"
>
-->
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeTargetSearchWidget"
/>
<!--
<el-input
v-model=
"targetFilterText"
>
-->
</el-input>
<!--
<el-button
slot=
"append"
icon=
"el-icon-close"
@
click=
"closeTargetSearchWidget"
/>
-->
</div>
<!--
</el-input>
-->
<el-tabs
v-model=
"targetActiveName"
:class=
"
{'de-search-header': showTargetSearchInput}" @tab-click="handleClick">
<!--
</div>
-->
<el-tab-pane
v-for=
"(targetInfo, index) in targetInfoArray"
:key=
"index"
:lazy=
"true"
:label=
"targetInfo.tabName"
:name=
"targetInfo.authType"
>
<!--
<el-tabs
v-model=
"targetActiveName"
:class=
"
{'de-search-header': showTargetSearchInput}" @tab-click="handleClick">-->
<lazy-tree
<!--
<el-tab-pane
v-for=
"(targetInfo, index) in targetInfoArray"
:key=
"index"
:lazy=
"true"
:label=
"targetInfo.tabName"
:name=
"targetInfo.authType"
>
-->
:active-name=
"targetActiveName"
<!--
<lazy-tree-->
:filter-text=
"targetFilterText"
<!-- :active-name="targetActiveName"-->
:data-info=
"targetInfo"
<!-- :filter-text="targetFilterText"-->
show-extent
<!-- :data-info="targetInfo"-->
:auth-condition=
"authCondition"
<!-- show-extent-->
/>
<!-- :auth-condition="authCondition"-->
</el-tab-pane>
<!-- />-->
</el-tabs>
<!--
</el-tab-pane>
-->
</de-main-container>
<!--
</el-tabs>
-->
<!--
</de-main-container>
-->
</de-container>
</de-container>
</
template
>
</
template
>
...
...
frontend/src/views/system/authority/components/authDept.vue
deleted
100644 → 0
浏览文件 @
533d466c
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<el-col>
<el-row
style=
"margin-top: 5px"
>
<el-tree
ref=
"templateTree"
:props=
"defaultProps"
:load=
"loadNodes"
:data=
"treeData"
node-key=
"deptId"
:highlight-current=
"true"
:default-expanded-keys=
"expandedKey"
lazy
@
node-click=
"nodeClick"
/>
</el-row>
</el-col>
</
template
>
<
script
>
import
{
getDeptTree
,
loadTable
}
from
'@/api/system/dept'
export
default
{
name
:
'AuthDept'
,
components
:
{
},
props
:
{
filterText
:
{
type
:
String
,
required
:
false
,
default
:
''
},
activeName
:
{
type
:
String
,
required
:
true
}
},
data
()
{
return
{
treeData
:
[],
changeIndex
:
0
,
timeMachine
:
null
,
expandedKey
:
[],
defaultCondition
:
{
field
:
'pid'
,
operator
:
'eq'
,
value
:
0
},
defaultProps
:
{
children
:
'children'
,
label
:
'name'
,
id
:
'deptId'
,
parentId
:
'pid'
,
isLeaf
:
'leaf'
}
}
},
computed
:
{
},
watch
:
{
filterText
(
val
)
{
// 当组件名和 activeName 相等时 才进行查询
if
(
this
.
$options
.
name
===
this
.
activeName
)
{
this
.
destroyTimeMachine
()
this
.
changeIndex
++
this
.
filterNode
(
this
.
changeIndex
)
}
}
},
methods
:
{
loadNodes
(
node
,
resolve
)
{
if
(
node
.
level
===
0
)
{
getDeptTree
(
0
).
then
(
res
=>
{
const
data
=
res
.
data
resolve
(
data
)
})
}
else
{
getDeptTree
(
node
.
data
.
deptId
).
then
(
res
=>
{
const
data
=
res
.
data
resolve
(
data
)
})
}
},
filterNode
(
index
)
{
this
.
timeMachine
=
setTimeout
(()
=>
{
if
(
index
===
this
.
changeIndex
)
{
const
condition
=
{
field
:
'name'
,
operator
:
'like'
,
value
:
this
.
filterText
}
this
.
search
(
condition
)
}
this
.
destroyTimeMachine
()
},
1500
)
},
nodeClick
(
data
,
node
)
{
this
.
$emit
(
'nodeClick'
,
{
id
:
data
.
deptId
,
type
:
'dept'
})
},
destroyTimeMachine
()
{
this
.
timeMachine
&&
clearTimeout
(
this
.
timeMachine
)
this
.
timeMachine
=
null
},
search
(
condition
)
{
let
param
=
{}
if
(
condition
&&
condition
.
value
)
{
param
=
{
conditions
:
[
condition
]
}
}
else
{
param
=
{
conditions
:
[
this
.
defaultCondition
]
}
}
loadTable
(
param
).
then
(
res
=>
{
this
.
expandedKey
=
[]
this
.
treeData
=
[]
const
data
=
res
.
data
this
.
treeData
=
this
.
buildTree
(
data
)
console
.
log
(
'===>'
+
JSON
.
stringify
(
this
.
treeData
))
})
},
buildTree
(
arrs
)
{
const
idMapping
=
arrs
.
reduce
((
acc
,
el
,
i
)
=>
{
acc
[
el
.
deptId
]
=
i
return
acc
},
{})
console
.
log
(
'idMapping>'
+
JSON
.
stringify
(
idMapping
))
const
roots
=
[]
arrs
.
forEach
(
el
=>
{
// 判断根节点
if
(
el
.
pid
===
null
||
el
.
pid
===
0
)
{
roots
.
push
(
el
)
return
}
debugger
// 用映射表找到父元素
const
parentEl
=
arrs
[
idMapping
[
el
.
pid
]]
console
.
log
(
'parentEl>'
+
JSON
.
stringify
(
parentEl
))
// 把当前元素添加到父元素的`children`数组中
parentEl
.
children
=
[...(
parentEl
.
children
||
[]),
el
]
console
.
log
(
'parentEl>'
+
JSON
.
stringify
(
parentEl
))
// 设置展开节点 如果没有子节点则不进行展开
if
(
parentEl
.
children
.
length
>
0
)
{
this
.
expandedKey
.
push
(
parentEl
.
deptId
)
}
})
return
roots
}
}
}
</
script
>
<
style
scoped
>
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
</
style
>
frontend/src/views/system/authority/components/authRole.vue
deleted
100644 → 0
浏览文件 @
533d466c
<
template
>
<div
class=
"my_table"
>
<el-table
:data=
"data.filter(node => !filterText || node[fieldName].toLowerCase().includes(filterText.toLowerCase()))"
:show-header=
"false"
style=
"width: 100%"
:row-style=
"
{height: '26px'}"
highlight-current-row
@current-change="nodeClick"
>
<el-table-column
:column-key=
"fieldName"
:prop=
"fieldName"
filter-placement=
"right-start"
/>
</el-table>
</div>
</
template
>
<
script
>
import
{
roleGrid
}
from
'@/api/system/role'
import
{
formatCondition
}
from
'@/utils/index'
export
default
{
name
:
'AuthRole'
,
props
:
{
resourceId
:
{
type
:
String
,
default
:
null
},
filterText
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
data
:
[],
fieldName
:
'name'
,
type
:
1
,
// 类型1代表角色
shares
:
[]
}
},
created
()
{
this
.
search
()
},
methods
:
{
search
(
condition
)
{
const
temp
=
formatCondition
(
condition
)
const
param
=
temp
||
{}
roleGrid
(
1
,
0
,
param
).
then
(
response
=>
{
const
data
=
response
.
data
this
.
data
=
data
.
listObject
})
},
cancel
()
{
console
.
log
(
'role cancel'
)
},
nodeClick
(
val
)
{
// role 为授权目标 加上authTarget
this
.
$emit
(
'nodeClick'
,
{
id
:
val
.
roleId
,
type
:
'role'
})
}
}
}
</
script
>
<
style
scoped
>
.my_table
>>>
.el-table__row
>
td
{
/* 去除表格线 */
border
:
none
;
padding
:
0
0
;
}
.my_table
>>>
.el-table
th
.is-leaf
{
/* 去除上边框 */
border
:
none
;
}
.my_table
>>>
.el-table
::before
{
/* 去除下边框 */
height
:
0
;
}
</
style
>
frontend/src/views/system/authority/components/authUser.vue
deleted
100644 → 0
浏览文件 @
533d466c
<
template
>
<div
class=
"my_table"
>
<el-table
:data=
"data.filter(node => !filterText || node[fieldName].toLowerCase().includes(filterText.toLowerCase()))"
:show-header=
"false"
style=
"width: 100%"
:row-style=
"
{height: '26px'}"
highlight-current-row
@current-change="handleCurrentChange"
>
<el-table-column
:column-key=
"fieldName"
:prop=
"fieldName"
filter-placement=
"right-start"
/>
</el-table>
</div>
</
template
>
<
script
>
import
{
userLists
}
from
'@/api/system/user'
import
{
formatCondition
}
from
'@/utils/index'
export
default
{
name
:
'AuthUser'
,
props
:
{
filterText
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
data
:
[],
fieldName
:
'nickName'
,
type
:
0
,
// 类型0代表用户
shares
:
[]
}
},
created
()
{
this
.
search
()
},
methods
:
{
search
(
condition
)
{
const
temp
=
formatCondition
(
condition
)
const
param
=
temp
||
{}
userLists
(
1
,
0
,
param
).
then
(
response
=>
{
debugger
const
data
=
response
.
data
this
.
data
=
data
.
listObject
})
},
cancel
()
{
console
.
log
(
'role cancel'
)
},
handleCurrentChange
(
val
)
{
console
.
log
(
'handleCurrentChange'
)
}
}
}
</
script
>
<
style
scoped
>
.my_table
>>>
.el-table__row
>
td
{
/* 去除表格线 */
border
:
none
;
padding
:
0
0
;
}
.my_table
>>>
.el-table
th
.is-leaf
{
/* 去除上边框 */
border
:
none
;
}
.my_table
>>>
.el-table
::before
{
/* 去除下边框 */
height
:
0
;
}
</
style
>
frontend/src/views/system/authority/index.vue
浏览文件 @
1c48fc88
<
template
>
<
template
>
<de-container>
<de-main-container
style=
"height: calc(100vh - 56px)"
>
<de-main-container>
<el-tabs
v-model=
"authorityType"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"authorityType"
@
tab-click=
"handleClick"
>
<el-tab-pane
name=
"authConfig"
>
<el-tab-pane
name=
"authConfig"
>
<span
slot=
"label"
>
权限配置
</span>
<span
slot=
"label"
>
{{
$t
(
'auth.authConfig'
)
}}
</span>
<auth-config
/>
<auth-config
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
name=
"authQuickConfig"
>
<el-tab-pane
name=
"authQuickConfig"
>
<span
slot=
"label"
>
权限快捷配置
</span>
<span
slot=
"label"
>
{{
$t
(
'auth.authQuickConfig'
)
}}
</span>
<auth-quick-config
/>
<auth-quick-config
/>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</de-main-container>
</de-main-container>
</de-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论