Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a58f92ed
提交
a58f92ed
authored
2月 14, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
上级
769b7bc2
c6e752bf
显示空白字符变更
内嵌
并排
正在显示
37 个修改的文件
包含
553 行增加
和
91 行删除
+553
-91
DeCleaner.java
.../src/main/java/io/dataease/auth/annotation/DeCleaner.java
+14
-0
DeCleanerAnnotationHandler.java
...java/io/dataease/auth/aop/DeCleanerAnnotationHandler.java
+74
-0
ExtAuthServiceImpl.java
...ava/io/dataease/auth/service/impl/ExtAuthServiceImpl.java
+6
-0
ExtAuthMapper.xml
...c/main/java/io/dataease/base/mapper/ext/ExtAuthMapper.xml
+3
-3
AuthUtils.java
...nd/src/main/java/io/dataease/commons/utils/AuthUtils.java
+4
-3
DataSetGroupController.java
...o/dataease/controller/dataset/DataSetGroupController.java
+14
-0
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+26
-0
DatasourceController.java
.../dataease/controller/datasource/DatasourceController.java
+16
-0
SystemParameterController.java
...io/dataease/controller/sys/SystemParameterController.java
+6
-0
ThemeServer.java
...src/main/java/io/dataease/plugins/server/ThemeServer.java
+3
-0
XAuthServer.java
...src/main/java/io/dataease/plugins/server/XAuthServer.java
+5
-0
XDeptServer.java
...src/main/java/io/dataease/plugins/server/XDeptServer.java
+5
-0
XDisplayServer.java
.../main/java/io/dataease/plugins/server/XDisplayServer.java
+2
-0
XEmailTaskServer.java
...ain/java/io/dataease/plugins/server/XEmailTaskServer.java
+5
-0
XLdapServer.java
...src/main/java/io/dataease/plugins/server/XLdapServer.java
+2
-0
XOidcServer.java
...src/main/java/io/dataease/plugins/server/XOidcServer.java
+2
-0
XRoleServer.java
...src/main/java/io/dataease/plugins/server/XRoleServer.java
+5
-0
DataSetGroupService.java
...java/io/dataease/service/dataset/DataSetGroupService.java
+3
-0
DatasourceService.java
...ava/io/dataease/service/datasource/DatasourceService.java
+3
-0
PanelGroupService.java
...ain/java/io/dataease/service/panel/PanelGroupService.java
+3
-0
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+27
-8
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
common_table.js
frontend/src/views/chart/chart/common/common_table.js
+1
-1
ChartDragItem.vue
...nd/src/views/chart/components/drag-item/ChartDragItem.vue
+31
-2
DimensionExtItem.vue
...src/views/chart/components/drag-item/DimensionExtItem.vue
+28
-2
DimensionItem.vue
...nd/src/views/chart/components/drag-item/DimensionItem.vue
+28
-2
DrillItem.vue
frontend/src/views/chart/components/drag-item/DrillItem.vue
+31
-2
FilterItem.vue
frontend/src/views/chart/components/drag-item/FilterItem.vue
+31
-2
QuotaExtItem.vue
...end/src/views/chart/components/drag-item/QuotaExtItem.vue
+26
-19
QuotaItem.vue
frontend/src/views/chart/components/drag-item/QuotaItem.vue
+26
-19
FieldErrorTips.vue
.../chart/components/drag-item/components/FieldErrorTips.vue
+21
-0
utils.js
frontend/src/views/chart/components/drag-item/utils.js
+33
-0
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+16
-1
pages.json
mobile/src/pages.json
+2
-12
detail.nvue
mobile/src/pages/tabBar/home/detail.nvue
+45
-12
没有找到文件。
backend/src/main/java/io/dataease/auth/annotation/DeCleaner.java
0 → 100644
浏览文件 @
a58f92ed
package
io
.
dataease
.
auth
.
annotation
;
import
io.dataease.commons.constants.DePermissionType
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
({
ElementType
.
TYPE
,
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
DeCleaner
{
DePermissionType
value
();
}
backend/src/main/java/io/dataease/auth/aop/DeCleanerAnnotationHandler.java
0 → 100644
浏览文件 @
a58f92ed
package
io
.
dataease
.
auth
.
aop
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.listener.util.CacheUtils
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.stereotype.Component
;
import
java.lang.reflect.Method
;
@Aspect
@Component
public
class
DeCleanerAnnotationHandler
{
@Around
(
value
=
"@annotation(io.dataease.auth.annotation.DeCleaner)"
)
public
Object
CleanerAround
(
ProceedingJoinPoint
point
)
{
try
{
CurrentUserDto
user
=
AuthUtils
.
getUser
();
MethodSignature
ms
=
(
MethodSignature
)
point
.
getSignature
();
Method
method
=
ms
.
getMethod
();
DeCleaner
deCleaner
=
method
.
getAnnotation
(
DeCleaner
.
class
);
DePermissionType
type
=
deCleaner
.
value
();
switch
(
type
.
name
())
{
case
"DATASOURCE"
:
cleanDataSource
();
break
;
case
"DATASET"
:
cleanDataSet
();
break
;
default
:
cleanPanel
();
break
;
}
return
point
.
proceed
(
point
.
getArgs
());
}
catch
(
Throwable
e
)
{
LogUtil
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
e
);
}
}
public
void
cleanPanel
()
{
CurrentUserDto
user
=
AuthUtils
.
getUser
();
CacheUtils
.
remove
(
AuthConstants
.
USER_PANEL_NAME
,
"user"
+
user
.
getUserId
());
CacheUtils
.
remove
(
AuthConstants
.
DEPT_PANEL_NAME
,
"dept"
+
user
.
getDeptId
());
user
.
getRoles
().
forEach
(
role
->
{
CacheUtils
.
remove
(
AuthConstants
.
ROLE_PANEL_NAME
,
"role"
+
role
.
getId
());
});
}
public
void
cleanDataSet
()
{
CurrentUserDto
user
=
AuthUtils
.
getUser
();
CacheUtils
.
remove
(
AuthConstants
.
USER_DATASET_NAME
,
"user"
+
user
.
getUserId
());
CacheUtils
.
remove
(
AuthConstants
.
DEPT_DATASET_NAME
,
"dept"
+
user
.
getDeptId
());
user
.
getRoles
().
forEach
(
role
->
{
CacheUtils
.
remove
(
AuthConstants
.
ROLE_DATASET_NAME
,
"role"
+
role
.
getId
());
});
}
public
void
cleanDataSource
()
{
CurrentUserDto
user
=
AuthUtils
.
getUser
();
CacheUtils
.
remove
(
AuthConstants
.
USER_LINK_NAME
,
"user"
+
user
.
getUserId
());
CacheUtils
.
remove
(
AuthConstants
.
DEPT_LINK_NAME
,
"dept"
+
user
.
getDeptId
());
user
.
getRoles
().
forEach
(
role
->
{
CacheUtils
.
remove
(
AuthConstants
.
ROLE_LINK_NAME
,
"role"
+
role
.
getId
());
});
}
}
backend/src/main/java/io/dataease/auth/service/impl/ExtAuthServiceImpl.java
浏览文件 @
a58f92ed
package
io
.
dataease
.
auth
.
service
.
impl
;
package
io
.
dataease
.
auth
.
service
.
impl
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.auth.entity.AuthItem
;
import
io.dataease.auth.entity.AuthItem
;
import
io.dataease.auth.service.ExtAuthService
;
import
io.dataease.auth.service.ExtAuthService
;
import
io.dataease.base.domain.SysAuth
;
import
io.dataease.base.domain.SysAuth
;
import
io.dataease.base.mapper.ext.ExtAuthMapper
;
import
io.dataease.base.mapper.ext.ExtAuthMapper
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.listener.util.CacheUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
...
@@ -146,4 +149,7 @@ public class ExtAuthServiceImpl implements ExtAuthService {
...
@@ -146,4 +149,7 @@ public class ExtAuthServiceImpl implements ExtAuthService {
public
void
clearRoleResource
(
Long
roleId
)
{
public
void
clearRoleResource
(
Long
roleId
)
{
LogUtil
.
info
(
"all permission resource of role {} is cleanning..."
,
roleId
);
LogUtil
.
info
(
"all permission resource of role {} is cleanning..."
,
roleId
);
}
}
}
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtAuthMapper.xml
浏览文件 @
a58f92ed
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
sys_auth a
sys_auth a
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
WHERE
WHERE
auth_source_type = '
datasource
'
auth_source_type = '
link
'
AND auth_target_type = 'user'
AND auth_target_type = 'user'
AND auth_target = #{userId}
AND auth_target = #{userId}
AND d.privilege_value = 1
AND d.privilege_value = 1
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
sys_auth a
sys_auth a
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
WHERE
WHERE
auth_source_type = '
datasource
'
auth_source_type = '
link
'
AND auth_target_type = 'role'
AND auth_target_type = 'role'
AND auth_target = #{roleId}
AND auth_target = #{roleId}
AND d.privilege_value = 1
AND d.privilege_value = 1
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
sys_auth a
sys_auth a
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
LEFT JOIN sys_auth_detail d on d.auth_id = a.id
WHERE
WHERE
auth_source_type = '
datasource
'
auth_source_type = '
link
'
AND auth_target_type = 'dept'
AND auth_target_type = 'dept'
AND auth_target = #{deptId}
AND auth_target = #{deptId}
AND d.privilege_value = 1
AND d.privilege_value = 1
...
...
backend/src/main/java/io/dataease/commons/utils/AuthUtils.java
浏览文件 @
a58f92ed
...
@@ -4,6 +4,7 @@ import io.dataease.auth.api.dto.CurrentRoleDto;
...
@@ -4,6 +4,7 @@ import io.dataease.auth.api.dto.CurrentRoleDto;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.auth.api.dto.CurrentUserDto
;
import
io.dataease.auth.entity.AuthItem
;
import
io.dataease.auth.entity.AuthItem
;
import
io.dataease.auth.service.ExtAuthService
;
import
io.dataease.auth.service.ExtAuthService
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.model.AuthURD
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -56,7 +57,7 @@ public class AuthUtils {
...
@@ -56,7 +57,7 @@ public class AuthUtils {
Long
deptId
=
user
.
getDeptId
();
Long
deptId
=
user
.
getDeptId
();
List
<
CurrentRoleDto
>
roles
=
user
.
getRoles
();
List
<
CurrentRoleDto
>
roles
=
user
.
getRoles
();
Set
<
AuthItem
>
result
=
new
HashSet
<>();
Set
<
AuthItem
>
result
=
new
HashSet
<>();
if
(
StringUtils
.
equals
(
"link"
,
type
))
{
if
(
StringUtils
.
equals
(
DePermissionType
.
DATASOURCE
.
name
().
toLowerCase
()
,
type
))
{
Set
<
AuthItem
>
userSet
=
extAuthService
.
dataSourceIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
userSet
=
extAuthService
.
dataSourceIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
dataSourceIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
dataSourceIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
dataSourceIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
dataSourceIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
...
@@ -69,7 +70,7 @@ public class AuthUtils {
...
@@ -69,7 +70,7 @@ public class AuthUtils {
return
result
;
return
result
;
}
}
else
if
(
StringUtils
.
equals
(
"dataset"
,
type
))
{
else
if
(
StringUtils
.
equals
(
DePermissionType
.
DATASET
.
name
().
toLowerCase
()
,
type
))
{
Set
<
AuthItem
>
userSet
=
extAuthService
.
dataSetIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
userSet
=
extAuthService
.
dataSetIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
dataSetIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
dataSetIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
dataSetIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
dataSetIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
...
@@ -81,7 +82,7 @@ public class AuthUtils {
...
@@ -81,7 +82,7 @@ public class AuthUtils {
});
});
return
result
;
return
result
;
}
}
else
if
(
StringUtils
.
equals
(
"panel"
,
type
))
{
else
if
(
StringUtils
.
equals
(
DePermissionType
.
PANEL
.
name
().
toLowerCase
()
,
type
))
{
Set
<
AuthItem
>
userSet
=
extAuthService
.
panelIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
userSet
=
extAuthService
.
panelIdByUser
(
userId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
panelIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
roleSet
=
roles
.
stream
().
map
(
role
->
extAuthService
.
panelIdByRole
(
role
.
getId
())).
flatMap
(
Collection:
:
stream
).
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
panelIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
AuthItem
>
deptSet
=
extAuthService
.
panelIdByDept
(
deptId
).
stream
().
collect
(
Collectors
.
toSet
());
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetGroupController.java
浏览文件 @
a58f92ed
package
io
.
dataease
.
controller
.
dataset
;
package
io
.
dataease
.
controller
.
dataset
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
io.dataease.auth.annotation.DePermission
;
import
io.dataease.auth.annotation.DePermissions
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
import
io.dataease.controller.request.dataset.DataSetGroupRequest
;
import
io.dataease.controller.request.dataset.DataSetGroupRequest
;
import
io.dataease.dto.dataset.DataSetGroupDTO
;
import
io.dataease.dto.dataset.DataSetGroupDTO
;
import
io.dataease.service.dataset.DataSetGroupService
;
import
io.dataease.service.dataset.DataSetGroupService
;
import
io.dataease.service.dataset.ExtractDataService
;
import
io.dataease.service.dataset.ExtractDataService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -28,12 +34,18 @@ public class DataSetGroupController {
...
@@ -28,12 +34,18 @@ public class DataSetGroupController {
@Resource
@Resource
private
ExtractDataService
extractDataService
;
private
ExtractDataService
extractDataService
;
@RequiresPermissions
(
"data:read"
)
@DePermissions
(
value
=
{
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"id"
),
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"pid"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
)
},
logical
=
Logical
.
AND
)
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
DataSetGroupDTO
save
(
@RequestBody
DatasetGroup
datasetGroup
)
{
public
DataSetGroupDTO
save
(
@RequestBody
DatasetGroup
datasetGroup
)
{
return
dataSetGroupService
.
save
(
datasetGroup
);
return
dataSetGroupService
.
save
(
datasetGroup
);
}
}
@RequiresPermissions
(
"data:read"
)
@ApiOperation
(
"查询树"
)
@ApiOperation
(
"查询树"
)
@PostMapping
(
"/tree"
)
@PostMapping
(
"/tree"
)
public
List
<
DataSetGroupDTO
>
tree
(
@RequestBody
DataSetGroupRequest
datasetGroup
)
{
public
List
<
DataSetGroupDTO
>
tree
(
@RequestBody
DataSetGroupRequest
datasetGroup
)
{
...
@@ -46,6 +58,8 @@ public class DataSetGroupController {
...
@@ -46,6 +58,8 @@ public class DataSetGroupController {
return
dataSetGroupService
.
treeNode
(
datasetGroup
);
return
dataSetGroupService
.
treeNode
(
datasetGroup
);
}
}
@RequiresPermissions
(
"data:read"
)
@DePermission
(
type
=
DePermissionType
.
DATASET
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
)
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"/delete/{id}"
)
@PostMapping
(
"/delete/{id}"
)
public
void
tree
(
@PathVariable
String
id
)
throws
Exception
{
public
void
tree
(
@PathVariable
String
id
)
throws
Exception
{
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
a58f92ed
package
io
.
dataease
.
controller
.
dataset
;
package
io
.
dataease
.
controller
.
dataset
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
io.dataease.auth.annotation.DePermission
;
import
io.dataease.auth.annotation.DePermissions
;
import
io.dataease.base.domain.DatasetTable
;
import
io.dataease.base.domain.DatasetTable
;
import
io.dataease.base.domain.DatasetTableField
;
import
io.dataease.base.domain.DatasetTableField
;
import
io.dataease.base.domain.DatasetTableIncrementalConfig
;
import
io.dataease.base.domain.DatasetTableIncrementalConfig
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.controller.request.dataset.DataSetTableRequest
;
import
io.dataease.controller.response.DataSetDetail
;
import
io.dataease.controller.response.DataSetDetail
;
import
io.dataease.dto.datasource.TableFiled
;
import
io.dataease.dto.datasource.TableFiled
;
...
@@ -11,6 +15,8 @@ import io.dataease.dto.dataset.DataSetTableDTO;
...
@@ -11,6 +15,8 @@ import io.dataease.dto.dataset.DataSetTableDTO;
import
io.dataease.dto.dataset.ExcelFileData
;
import
io.dataease.dto.dataset.ExcelFileData
;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -30,12 +36,24 @@ public class DataSetTableController {
...
@@ -30,12 +36,24 @@ public class DataSetTableController {
@Resource
@Resource
private
DataSetTableService
dataSetTableService
;
private
DataSetTableService
dataSetTableService
;
@RequiresPermissions
(
"data:read"
)
@DePermissions
(
value
=
{
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"id"
),
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"sceneId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
),
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"dataSourceId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_USE
)
},
logical
=
Logical
.
AND
)
@ApiOperation
(
"批量保存"
)
@ApiOperation
(
"批量保存"
)
@PostMapping
(
"batchAdd"
)
@PostMapping
(
"batchAdd"
)
public
void
batchAdd
(
@RequestBody
List
<
DataSetTableRequest
>
datasetTable
)
throws
Exception
{
public
void
batchAdd
(
@RequestBody
List
<
DataSetTableRequest
>
datasetTable
)
throws
Exception
{
dataSetTableService
.
batchInsert
(
datasetTable
);
dataSetTableService
.
batchInsert
(
datasetTable
);
}
}
@RequiresPermissions
(
"data:read"
)
@DePermissions
(
value
=
{
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"id"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
),
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"sceneId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
),
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"dataSourceId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_USE
)
},
logical
=
Logical
.
AND
)
@ApiOperation
(
"更新"
)
@ApiOperation
(
"更新"
)
@PostMapping
(
"update"
)
@PostMapping
(
"update"
)
public
void
save
(
@RequestBody
DataSetTableRequest
datasetTable
)
throws
Exception
{
public
void
save
(
@RequestBody
DataSetTableRequest
datasetTable
)
throws
Exception
{
...
@@ -46,12 +64,19 @@ public class DataSetTableController {
...
@@ -46,12 +64,19 @@ public class DataSetTableController {
}
}
}
}
@RequiresPermissions
(
"data:read"
)
@DePermissions
(
value
=
{
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"id"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
),
@DePermission
(
type
=
DePermissionType
.
DATASET
,
value
=
"sceneId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
),
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"dataSourceId"
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_USE
)
},
logical
=
Logical
.
AND
)
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@PostMapping
(
"alter"
)
@PostMapping
(
"alter"
)
public
void
alter
(
@RequestBody
DataSetTableRequest
request
)
throws
Exception
{
public
void
alter
(
@RequestBody
DataSetTableRequest
request
)
throws
Exception
{
dataSetTableService
.
alter
(
request
);
dataSetTableService
.
alter
(
request
);
}
}
@DePermission
(
type
=
DePermissionType
.
DATASET
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
)
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"delete/{id}"
)
@PostMapping
(
"delete/{id}"
)
public
void
delete
(
@ApiParam
(
name
=
"id"
,
value
=
"数据集ID"
,
required
=
true
)
@PathVariable
String
id
)
throws
Exception
{
public
void
delete
(
@ApiParam
(
name
=
"id"
,
value
=
"数据集ID"
,
required
=
true
)
@PathVariable
String
id
)
throws
Exception
{
...
@@ -70,6 +95,7 @@ public class DataSetTableController {
...
@@ -70,6 +95,7 @@ public class DataSetTableController {
return
dataSetTableService
.
listAndGroup
(
dataSetTableRequest
);
return
dataSetTableService
.
listAndGroup
(
dataSetTableRequest
);
}
}
@DePermission
(
type
=
DePermissionType
.
DATASET
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_USE
)
@ApiOperation
(
"详息"
)
@ApiOperation
(
"详息"
)
@PostMapping
(
"get/{id}"
)
@PostMapping
(
"get/{id}"
)
public
DatasetTable
get
(
@ApiParam
(
name
=
"id"
,
value
=
"数据集ID"
,
required
=
true
)
@PathVariable
String
id
)
{
public
DatasetTable
get
(
@ApiParam
(
name
=
"id"
,
value
=
"数据集ID"
,
required
=
true
)
@PathVariable
String
id
)
{
...
...
backend/src/main/java/io/dataease/controller/datasource/DatasourceController.java
浏览文件 @
a58f92ed
...
@@ -3,7 +3,11 @@ package io.dataease.controller.datasource;
...
@@ -3,7 +3,11 @@ package io.dataease.controller.datasource;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
io.dataease.auth.annotation.DePermission
;
import
io.dataease.auth.annotation.DePermissions
;
import
io.dataease.base.domain.Datasource
;
import
io.dataease.base.domain.Datasource
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
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
;
...
@@ -15,6 +19,8 @@ import io.dataease.service.datasource.DatasourceService;
...
@@ -15,6 +19,8 @@ import io.dataease.service.datasource.DatasourceService;
import
io.dataease.dto.DatasourceDTO
;
import
io.dataease.dto.DatasourceDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -31,18 +37,24 @@ public class DatasourceController {
...
@@ -31,18 +37,24 @@ public class DatasourceController {
@Resource
@Resource
private
DatasourceService
datasourceService
;
private
DatasourceService
datasourceService
;
@RequiresPermissions
(
"datasource:add"
)
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"id"
)
@ApiOperation
(
"新增数据源"
)
@ApiOperation
(
"新增数据源"
)
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
Datasource
addDatasource
(
@RequestBody
Datasource
datasource
)
throws
Exception
{
public
Datasource
addDatasource
(
@RequestBody
Datasource
datasource
)
throws
Exception
{
return
datasourceService
.
addDatasource
(
datasource
);
return
datasourceService
.
addDatasource
(
datasource
);
}
}
@RequiresPermissions
(
"datasource:read"
)
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"id"
)
@ApiOperation
(
"验证数据源"
)
@ApiOperation
(
"验证数据源"
)
@PostMapping
(
"/validate"
)
@PostMapping
(
"/validate"
)
public
ResultHolder
validate
(
@RequestBody
Datasource
datasource
)
throws
Exception
{
public
ResultHolder
validate
(
@RequestBody
Datasource
datasource
)
throws
Exception
{
return
datasourceService
.
validate
(
datasource
);
return
datasourceService
.
validate
(
datasource
);
}
}
@RequiresPermissions
(
"datasource:read"
)
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
)
@ApiOperation
(
"验证数据源"
)
@ApiOperation
(
"验证数据源"
)
@GetMapping
(
"/validate/{datasourceId}"
)
@GetMapping
(
"/validate/{datasourceId}"
)
public
ResultHolder
validate
(
@PathVariable
String
datasourceId
)
{
public
ResultHolder
validate
(
@PathVariable
String
datasourceId
)
{
...
@@ -64,6 +76,7 @@ public class DatasourceController {
...
@@ -64,6 +76,7 @@ public class DatasourceController {
return
getDatasourceList
().
stream
().
filter
(
datasourceDTO
->
datasourceDTO
.
getType
().
equalsIgnoreCase
(
type
)).
collect
(
Collectors
.
toList
());
return
getDatasourceList
().
stream
().
filter
(
datasourceDTO
->
datasourceDTO
.
getType
().
equalsIgnoreCase
(
type
)).
collect
(
Collectors
.
toList
());
}
}
@RequiresPermissions
(
"datasource:read"
)
@ApiIgnore
@ApiIgnore
@PostMapping
(
"/list/{goPage}/{pageSize}"
)
@PostMapping
(
"/list/{goPage}/{pageSize}"
)
public
Pager
<
List
<
DatasourceDTO
>>
getDatasourceList
(
@RequestBody
BaseGridRequest
request
,
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
)
throws
Exception
{
public
Pager
<
List
<
DatasourceDTO
>>
getDatasourceList
(
@RequestBody
BaseGridRequest
request
,
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
)
throws
Exception
{
...
@@ -71,12 +84,15 @@ public class DatasourceController {
...
@@ -71,12 +84,15 @@ public class DatasourceController {
return
PageUtils
.
setPageInfo
(
page
,
datasourceService
.
gridQuery
(
request
));
return
PageUtils
.
setPageInfo
(
page
,
datasourceService
.
gridQuery
(
request
));
}
}
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
level
=
ResourceAuthLevel
.
LINK_LEVEL_MANAGE
)
@ApiOperation
(
"删除数据源"
)
@ApiOperation
(
"删除数据源"
)
@PostMapping
(
"/delete/{datasourceID}"
)
@PostMapping
(
"/delete/{datasourceID}"
)
public
void
deleteDatasource
(
@PathVariable
(
value
=
"datasourceID"
)
String
datasourceID
)
throws
Exception
{
public
void
deleteDatasource
(
@PathVariable
(
value
=
"datasourceID"
)
String
datasourceID
)
throws
Exception
{
datasourceService
.
deleteDatasource
(
datasourceID
);
datasourceService
.
deleteDatasource
(
datasourceID
);
}
}
@RequiresPermissions
(
"datasource:add"
)
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
value
=
"id"
,
level
=
ResourceAuthLevel
.
LINK_LEVEL_MANAGE
)
@ApiOperation
(
"更新数据源"
)
@ApiOperation
(
"更新数据源"
)
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
public
void
updateDatasource
(
@RequestBody
Datasource
Datasource
)
{
public
void
updateDatasource
(
@RequestBody
Datasource
Datasource
)
{
...
...
backend/src/main/java/io/dataease/controller/sys/SystemParameterController.java
浏览文件 @
a58f92ed
...
@@ -11,6 +11,7 @@ import io.dataease.service.FileService;
...
@@ -11,6 +11,7 @@ import io.dataease.service.FileService;
import
io.dataease.service.system.EmailService
;
import
io.dataease.service.system.EmailService
;
import
io.dataease.service.system.SystemParameterService
;
import
io.dataease.service.system.SystemParameterService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
@@ -39,11 +40,13 @@ public class SystemParameterController {
...
@@ -39,11 +40,13 @@ public class SystemParameterController {
private
EmailService
emailService
;
private
EmailService
emailService
;
@RequiresPermissions
(
"sysparam:read"
)
@GetMapping
(
"/mail/info"
)
@GetMapping
(
"/mail/info"
)
public
MailInfo
mailInfo
()
{
public
MailInfo
mailInfo
()
{
return
emailService
.
mailInfo
();
return
emailService
.
mailInfo
();
}
}
@RequiresPermissions
(
"sysparam:read"
)
@GetMapping
(
"/basic/info"
)
@GetMapping
(
"/basic/info"
)
public
BasicInfo
basicInfo
()
{
public
BasicInfo
basicInfo
()
{
return
systemParameterService
.
basicInfo
();
return
systemParameterService
.
basicInfo
();
...
@@ -55,11 +58,13 @@ public class SystemParameterController {
...
@@ -55,11 +58,13 @@ public class SystemParameterController {
return
StringUtils
.
isNotBlank
(
basicInfo
.
getFrontTimeOut
())
?
Integer
.
parseInt
(
basicInfo
.
getFrontTimeOut
())
:
10
;
return
StringUtils
.
isNotBlank
(
basicInfo
.
getFrontTimeOut
())
?
Integer
.
parseInt
(
basicInfo
.
getFrontTimeOut
())
:
10
;
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/edit/email"
)
@PostMapping
(
"/edit/email"
)
public
void
editMail
(
@RequestBody
List
<
SystemParameter
>
systemParameter
)
{
public
void
editMail
(
@RequestBody
List
<
SystemParameter
>
systemParameter
)
{
emailService
.
editMail
(
systemParameter
);
emailService
.
editMail
(
systemParameter
);
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/edit/basic"
)
@PostMapping
(
"/edit/basic"
)
public
void
editBasic
(
@RequestBody
List
<
SystemParameter
>
systemParameter
)
{
public
void
editBasic
(
@RequestBody
List
<
SystemParameter
>
systemParameter
)
{
systemParameterService
.
editBasic
(
systemParameter
);
systemParameterService
.
editBasic
(
systemParameter
);
...
@@ -76,6 +81,7 @@ public class SystemParameterController {
...
@@ -76,6 +81,7 @@ public class SystemParameterController {
}
}
@RequiresPermissions
(
"sysparam:read"
)
@GetMapping
(
"/base/info"
)
@GetMapping
(
"/base/info"
)
public
List
<
SystemParameterDTO
>
getBaseInfo
()
{
public
List
<
SystemParameterDTO
>
getBaseInfo
()
{
return
systemParameterService
.
getSystemParameterInfo
(
ParamConstants
.
Classify
.
BASE
.
getValue
());
return
systemParameterService
.
getSystemParameterInfo
(
ParamConstants
.
Classify
.
BASE
.
getValue
());
...
...
backend/src/main/java/io/dataease/plugins/server/ThemeServer.java
浏览文件 @
a58f92ed
...
@@ -3,6 +3,7 @@ package io.dataease.plugins.server;
...
@@ -3,6 +3,7 @@ package io.dataease.plugins.server;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -36,6 +37,7 @@ public class ThemeServer {
...
@@ -36,6 +37,7 @@ public class ThemeServer {
return
themeXpackService
.
queryItems
(
themeId
);
return
themeXpackService
.
queryItems
(
themeId
);
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
void
save
(
@RequestPart
(
"request"
)
ThemeRequest
request
,
public
void
save
(
@RequestPart
(
"request"
)
ThemeRequest
request
,
@RequestPart
(
value
=
"file"
,
required
=
false
)
MultipartFile
bodyFile
)
{
@RequestPart
(
value
=
"file"
,
required
=
false
)
MultipartFile
bodyFile
)
{
...
@@ -55,6 +57,7 @@ public class ThemeServer {
...
@@ -55,6 +57,7 @@ public class ThemeServer {
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/delete/{themeId}"
)
@PostMapping
(
"/delete/{themeId}"
)
public
void
delete
(
@PathVariable
(
"themeId"
)
int
themeId
)
{
public
void
delete
(
@PathVariable
(
"themeId"
)
int
themeId
)
{
ThemeXpackService
themeXpackService
=
SpringContextUtil
.
getBean
(
ThemeXpackService
.
class
);
ThemeXpackService
themeXpackService
=
SpringContextUtil
.
getBean
(
ThemeXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XAuthServer.java
浏览文件 @
a58f92ed
...
@@ -14,6 +14,7 @@ import io.dataease.plugins.xpack.auth.dto.response.XpackSysAuthDetailDTO;
...
@@ -14,6 +14,7 @@ import io.dataease.plugins.xpack.auth.dto.response.XpackSysAuthDetailDTO;
import
io.dataease.plugins.xpack.auth.dto.response.XpackVAuthModelDTO
;
import
io.dataease.plugins.xpack.auth.dto.response.XpackVAuthModelDTO
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
io.dataease.plugins.xpack.auth.service.AuthXpackService
;
import
io.dataease.plugins.xpack.auth.service.AuthXpackService
;
...
@@ -25,6 +26,7 @@ public class XAuthServer {
...
@@ -25,6 +26,7 @@ public class XAuthServer {
private
static
final
Set
<
String
>
cacheTypes
=
new
HashSet
<>();
private
static
final
Set
<
String
>
cacheTypes
=
new
HashSet
<>();
@RequiresPermissions
(
"auth:read"
)
@PostMapping
(
"/authModels"
)
@PostMapping
(
"/authModels"
)
@I18n
@I18n
public
List
<
XpackVAuthModelDTO
>
authModels
(
@RequestBody
XpackBaseTreeRequest
request
)
{
public
List
<
XpackVAuthModelDTO
>
authModels
(
@RequestBody
XpackBaseTreeRequest
request
)
{
...
@@ -33,12 +35,14 @@ public class XAuthServer {
...
@@ -33,12 +35,14 @@ public class XAuthServer {
return
sysAuthService
.
searchAuthModelTree
(
request
,
user
.
getUserId
(),
user
.
getIsAdmin
());
return
sysAuthService
.
searchAuthModelTree
(
request
,
user
.
getUserId
(),
user
.
getIsAdmin
());
}
}
@RequiresPermissions
(
"auth:read"
)
@PostMapping
(
"/authDetails"
)
@PostMapping
(
"/authDetails"
)
public
Map
<
String
,
List
<
XpackSysAuthDetailDTO
>>
authDetails
(
@RequestBody
XpackSysAuthRequest
request
)
{
public
Map
<
String
,
List
<
XpackSysAuthDetailDTO
>>
authDetails
(
@RequestBody
XpackSysAuthRequest
request
)
{
AuthXpackService
sysAuthService
=
SpringContextUtil
.
getBean
(
AuthXpackService
.
class
);
AuthXpackService
sysAuthService
=
SpringContextUtil
.
getBean
(
AuthXpackService
.
class
);
return
sysAuthService
.
searchAuthDetails
(
request
);
return
sysAuthService
.
searchAuthDetails
(
request
);
}
}
@RequiresPermissions
(
"auth:read"
)
@GetMapping
(
"/authDetailsModel/{authType}/{direction}"
)
@GetMapping
(
"/authDetailsModel/{authType}/{direction}"
)
@I18n
@I18n
public
List
<
XpackSysAuthDetail
>
authDetailsModel
(
@PathVariable
String
authType
,
@PathVariable
String
direction
)
{
public
List
<
XpackSysAuthDetail
>
authDetailsModel
(
@PathVariable
String
authType
,
@PathVariable
String
direction
)
{
...
@@ -54,6 +58,7 @@ public class XAuthServer {
...
@@ -54,6 +58,7 @@ public class XAuthServer {
return
authDetails
;
return
authDetails
;
}
}
@RequiresPermissions
(
"auth:read"
)
@PostMapping
(
"/authChange"
)
@PostMapping
(
"/authChange"
)
public
void
authChange
(
@RequestBody
XpackSysAuthRequest
request
)
{
public
void
authChange
(
@RequestBody
XpackSysAuthRequest
request
)
{
AuthXpackService
sysAuthService
=
SpringContextUtil
.
getBean
(
AuthXpackService
.
class
);
AuthXpackService
sysAuthService
=
SpringContextUtil
.
getBean
(
AuthXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XDeptServer.java
浏览文件 @
a58f92ed
...
@@ -14,6 +14,7 @@ import io.dataease.plugins.xpack.dept.dto.response.XpackSysDept;
...
@@ -14,6 +14,7 @@ import io.dataease.plugins.xpack.dept.dto.response.XpackSysDept;
import
io.dataease.plugins.xpack.dept.service.DeptXpackService
;
import
io.dataease.plugins.xpack.dept.service.DeptXpackService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -66,6 +67,7 @@ public class XDeptServer {
...
@@ -66,6 +67,7 @@ public class XDeptServer {
return
nodes
;
return
nodes
;
}
}
@RequiresPermissions
(
"dept:add"
)
@ApiOperation
(
"创建"
)
@ApiOperation
(
"创建"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
int
create
(
@RequestBody
XpackCreateDept
dept
){
public
int
create
(
@RequestBody
XpackCreateDept
dept
){
...
@@ -73,6 +75,7 @@ public class XDeptServer {
...
@@ -73,6 +75,7 @@ public class XDeptServer {
return
deptService
.
add
(
dept
);
return
deptService
.
add
(
dept
);
}
}
@RequiresPermissions
(
"dept:del"
)
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"/delete"
)
@PostMapping
(
"/delete"
)
public
void
delete
(
@RequestBody
List
<
XpackDeleteDept
>
requests
){
public
void
delete
(
@RequestBody
List
<
XpackDeleteDept
>
requests
){
...
@@ -83,6 +86,7 @@ public class XDeptServer {
...
@@ -83,6 +86,7 @@ public class XDeptServer {
deptService
.
batchDelete
(
requests
);
deptService
.
batchDelete
(
requests
);
}
}
@RequiresPermissions
(
"dept:edit"
)
@ApiOperation
(
"更新"
)
@ApiOperation
(
"更新"
)
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
public
int
update
(
@RequestBody
XpackCreateDept
dept
){
public
int
update
(
@RequestBody
XpackCreateDept
dept
){
...
@@ -91,6 +95,7 @@ public class XDeptServer {
...
@@ -91,6 +95,7 @@ public class XDeptServer {
}
}
@RequiresPermissions
(
"dept:del"
)
@ApiIgnore
@ApiIgnore
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"/nodesByDeptId/{deptId}"
)
@PostMapping
(
"/nodesByDeptId/{deptId}"
)
...
...
backend/src/main/java/io/dataease/plugins/server/XDisplayServer.java
浏览文件 @
a58f92ed
...
@@ -4,6 +4,7 @@ package io.dataease.plugins.server;
...
@@ -4,6 +4,7 @@ package io.dataease.plugins.server;
import
io.dataease.plugins.config.SpringContextUtil
;
import
io.dataease.plugins.config.SpringContextUtil
;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.display.service.DisplayXpackService
;
import
io.dataease.plugins.xpack.display.service.DisplayXpackService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
import
java.util.List
;
...
@@ -22,6 +23,7 @@ public class XDisplayServer {
...
@@ -22,6 +23,7 @@ public class XDisplayServer {
return
disPlayXpackService
.
systemSettings
();
return
disPlayXpackService
.
systemSettings
();
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
value
=
"/save"
,
consumes
=
{
"multipart/form-data"
})
@PostMapping
(
value
=
"/save"
,
consumes
=
{
"multipart/form-data"
})
public
void
saveUIInfo
(
@RequestPart
(
"request"
)
Map
<
String
,
List
<
SysSettingDto
>>
systemParameterMap
,
@RequestPart
(
value
=
"files"
,
required
=
false
)
List
<
MultipartFile
>
bodyFiles
)
throws
Exception
{
public
void
saveUIInfo
(
@RequestPart
(
"request"
)
Map
<
String
,
List
<
SysSettingDto
>>
systemParameterMap
,
@RequestPart
(
value
=
"files"
,
required
=
false
)
List
<
MultipartFile
>
bodyFiles
)
throws
Exception
{
DisplayXpackService
disPlayXpackService
=
SpringContextUtil
.
getBean
(
DisplayXpackService
.
class
);
DisplayXpackService
disPlayXpackService
=
SpringContextUtil
.
getBean
(
DisplayXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java
浏览文件 @
a58f92ed
...
@@ -20,6 +20,7 @@ import io.dataease.service.ScheduleService;
...
@@ -20,6 +20,7 @@ import io.dataease.service.ScheduleService;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -39,6 +40,7 @@ public class XEmailTaskServer {
...
@@ -39,6 +40,7 @@ public class XEmailTaskServer {
@Resource
@Resource
private
PriorityThreadPoolExecutor
priorityExecutor
;
private
PriorityThreadPoolExecutor
priorityExecutor
;
@RequiresPermissions
(
"task-email:read"
)
@PostMapping
(
"/queryTasks/{goPage}/{pageSize}"
)
@PostMapping
(
"/queryTasks/{goPage}/{pageSize}"
)
public
Pager
<
List
<
XpackTaskGridDTO
>>
queryTask
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
public
Pager
<
List
<
XpackTaskGridDTO
>>
queryTask
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
XpackGridRequest
request
)
{
@RequestBody
XpackGridRequest
request
)
{
...
@@ -71,6 +73,7 @@ public class XEmailTaskServer {
...
@@ -71,6 +73,7 @@ public class XEmailTaskServer {
return
listPager
;
return
listPager
;
}
}
@RequiresPermissions
(
"task-email:add"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
void
save
(
@RequestBody
XpackEmailCreate
param
)
throws
Exception
{
public
void
save
(
@RequestBody
XpackEmailCreate
param
)
throws
Exception
{
XpackEmailTaskRequest
request
=
param
.
fillContent
();
XpackEmailTaskRequest
request
=
param
.
fillContent
();
...
@@ -81,6 +84,7 @@ public class XEmailTaskServer {
...
@@ -81,6 +84,7 @@ public class XEmailTaskServer {
scheduleService
.
addSchedule
(
globalTask
);
scheduleService
.
addSchedule
(
globalTask
);
}
}
@RequiresPermissions
(
"task-email:read"
)
@PostMapping
(
"/queryForm/{taskId}"
)
@PostMapping
(
"/queryForm/{taskId}"
)
public
XpackEmailCreate
queryForm
(
@PathVariable
Long
taskId
)
{
public
XpackEmailCreate
queryForm
(
@PathVariable
Long
taskId
)
{
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
...
@@ -141,6 +145,7 @@ public class XEmailTaskServer {
...
@@ -141,6 +145,7 @@ public class XEmailTaskServer {
}
}
@RequiresPermissions
(
"task-email:del"
)
@PostMapping
(
"/delete/{taskId}"
)
@PostMapping
(
"/delete/{taskId}"
)
public
void
delete
(
@PathVariable
Long
taskId
)
{
public
void
delete
(
@PathVariable
Long
taskId
)
{
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XLdapServer.java
浏览文件 @
a58f92ed
...
@@ -6,6 +6,7 @@ import io.dataease.plugins.config.SpringContextUtil;
...
@@ -6,6 +6,7 @@ import io.dataease.plugins.config.SpringContextUtil;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.ldap.dto.response.LdapInfo
;
import
io.dataease.plugins.xpack.ldap.dto.response.LdapInfo
;
import
io.dataease.plugins.xpack.ldap.service.LdapXpackService
;
import
io.dataease.plugins.xpack.ldap.service.LdapXpackService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.List
;
...
@@ -21,6 +22,7 @@ public class XLdapServer {
...
@@ -21,6 +22,7 @@ public class XLdapServer {
return
ldapXpackService
.
info
();
return
ldapXpackService
.
info
();
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
void
save
(
@RequestBody
List
<
SysSettingDto
>
settings
)
{
public
void
save
(
@RequestBody
List
<
SysSettingDto
>
settings
)
{
LdapXpackService
ldapXpackService
=
SpringContextUtil
.
getBean
(
LdapXpackService
.
class
);
LdapXpackService
ldapXpackService
=
SpringContextUtil
.
getBean
(
LdapXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XOidcServer.java
浏览文件 @
a58f92ed
...
@@ -5,6 +5,7 @@ import io.dataease.plugins.config.SpringContextUtil;
...
@@ -5,6 +5,7 @@ import io.dataease.plugins.config.SpringContextUtil;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.oidc.service.OidcXpackService
;
import
io.dataease.plugins.xpack.oidc.service.OidcXpackService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -21,6 +22,7 @@ public class XOidcServer {
...
@@ -21,6 +22,7 @@ public class XOidcServer {
return
oidcXpackService
.
oidcSettings
();
return
oidcXpackService
.
oidcSettings
();
}
}
@RequiresPermissions
(
"sysparam:read"
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
void
save
(
@RequestBody
List
<
SysSettingDto
>
settings
)
{
public
void
save
(
@RequestBody
List
<
SysSettingDto
>
settings
)
{
OidcXpackService
oidcXpackService
=
SpringContextUtil
.
getBean
(
OidcXpackService
.
class
);
OidcXpackService
oidcXpackService
=
SpringContextUtil
.
getBean
(
OidcXpackService
.
class
);
...
...
backend/src/main/java/io/dataease/plugins/server/XRoleServer.java
浏览文件 @
a58f92ed
...
@@ -13,6 +13,7 @@ import io.dataease.plugins.xpack.role.dto.response.XpackRoleItemDto;
...
@@ -13,6 +13,7 @@ import io.dataease.plugins.xpack.role.dto.response.XpackRoleItemDto;
import
io.dataease.plugins.xpack.role.service.RoleXpackService
;
import
io.dataease.plugins.xpack.role.service.RoleXpackService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -26,6 +27,7 @@ public class XRoleServer {
...
@@ -26,6 +27,7 @@ public class XRoleServer {
@Autowired
@Autowired
private
ExtAuthService
extAuthService
;
private
ExtAuthService
extAuthService
;
@RequiresPermissions
(
"role:add"
)
@ApiOperation
(
"新增角色"
)
@ApiOperation
(
"新增角色"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
void
create
(
@RequestBody
XpackRoleDto
role
){
public
void
create
(
@RequestBody
XpackRoleDto
role
){
...
@@ -34,6 +36,7 @@ public class XRoleServer {
...
@@ -34,6 +36,7 @@ public class XRoleServer {
}
}
@RequiresPermissions
(
"role:del"
)
@ApiOperation
(
"删除角色"
)
@ApiOperation
(
"删除角色"
)
@PostMapping
(
"/delete/{roleId}"
)
@PostMapping
(
"/delete/{roleId}"
)
public
void
delete
(
@PathVariable
(
"roleId"
)
Long
roleId
){
public
void
delete
(
@PathVariable
(
"roleId"
)
Long
roleId
){
...
@@ -43,6 +46,7 @@ public class XRoleServer {
...
@@ -43,6 +46,7 @@ public class XRoleServer {
}
}
@RequiresPermissions
(
"role:edit"
)
@ApiOperation
(
"更新角色"
)
@ApiOperation
(
"更新角色"
)
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
public
void
update
(
@RequestBody
XpackRoleDto
role
){
public
void
update
(
@RequestBody
XpackRoleDto
role
){
...
@@ -50,6 +54,7 @@ public class XRoleServer {
...
@@ -50,6 +54,7 @@ public class XRoleServer {
roleXpackService
.
update
(
role
);
roleXpackService
.
update
(
role
);
}
}
@RequiresPermissions
(
"role:read"
)
@ApiOperation
(
"分页查询"
)
@ApiOperation
(
"分页查询"
)
@PostMapping
(
"/roleGrid/{goPage}/{pageSize}"
)
@PostMapping
(
"/roleGrid/{goPage}/{pageSize}"
)
public
Pager
<
List
<
XpackRoleDto
>>
roleGrid
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
XpackGridRequest
request
)
{
public
Pager
<
List
<
XpackRoleDto
>>
roleGrid
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
XpackGridRequest
request
)
{
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java
浏览文件 @
a58f92ed
package
io
.
dataease
.
service
.
dataset
;
package
io
.
dataease
.
service
.
dataset
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.base.domain.DatasetGroupExample
;
import
io.dataease.base.domain.DatasetGroupExample
;
import
io.dataease.base.mapper.DatasetGroupMapper
;
import
io.dataease.base.mapper.DatasetGroupMapper
;
import
io.dataease.base.mapper.ext.ExtDataSetGroupMapper
;
import
io.dataease.base.mapper.ext.ExtDataSetGroupMapper
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.TreeUtils
;
import
io.dataease.commons.utils.TreeUtils
;
...
@@ -39,6 +41,7 @@ public class DataSetGroupService {
...
@@ -39,6 +41,7 @@ public class DataSetGroupService {
@Resource
@Resource
private
SysAuthService
sysAuthService
;
private
SysAuthService
sysAuthService
;
@DeCleaner
(
DePermissionType
.
DATASET
)
public
DataSetGroupDTO
save
(
DatasetGroup
datasetGroup
)
{
public
DataSetGroupDTO
save
(
DatasetGroup
datasetGroup
)
{
checkName
(
datasetGroup
);
checkName
(
datasetGroup
);
if
(
StringUtils
.
isEmpty
(
datasetGroup
.
getId
()))
{
if
(
StringUtils
.
isEmpty
(
datasetGroup
.
getId
()))
{
...
...
backend/src/main/java/io/dataease/service/datasource/DatasourceService.java
浏览文件 @
a58f92ed
...
@@ -2,10 +2,12 @@ package io.dataease.service.datasource;
...
@@ -2,10 +2,12 @@ package io.dataease.service.datasource;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.ext.ExtDataSourceMapper
;
import
io.dataease.base.mapper.ext.ExtDataSourceMapper
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.model.AuthURD
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
...
@@ -51,6 +53,7 @@ public class DatasourceService {
...
@@ -51,6 +53,7 @@ public class DatasourceService {
@Resource
@Resource
private
CommonThreadPool
commonThreadPool
;
private
CommonThreadPool
commonThreadPool
;
@DeCleaner
(
DePermissionType
.
DATASOURCE
)
public
Datasource
addDatasource
(
Datasource
datasource
)
throws
Exception
{
public
Datasource
addDatasource
(
Datasource
datasource
)
throws
Exception
{
checkName
(
datasource
);
checkName
(
datasource
);
long
currentTimeMillis
=
System
.
currentTimeMillis
();
long
currentTimeMillis
=
System
.
currentTimeMillis
();
...
...
backend/src/main/java/io/dataease/service/panel/PanelGroupService.java
浏览文件 @
a58f92ed
package
io
.
dataease
.
service
.
panel
;
package
io
.
dataease
.
service
.
panel
;
import
io.dataease.auth.annotation.DeCleaner
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.ChartViewMapper
;
import
io.dataease.base.mapper.ChartViewMapper
;
import
io.dataease.base.mapper.PanelGroupMapper
;
import
io.dataease.base.mapper.PanelGroupMapper
;
...
@@ -7,6 +8,7 @@ import io.dataease.base.mapper.VAuthModelMapper;
...
@@ -7,6 +8,7 @@ import io.dataease.base.mapper.VAuthModelMapper;
import
io.dataease.base.mapper.ext.ExtPanelGroupMapper
;
import
io.dataease.base.mapper.ext.ExtPanelGroupMapper
;
import
io.dataease.base.mapper.ext.ExtPanelLinkJumpMapper
;
import
io.dataease.base.mapper.ext.ExtPanelLinkJumpMapper
;
import
io.dataease.base.mapper.ext.ExtVAuthModelMapper
;
import
io.dataease.base.mapper.ext.ExtVAuthModelMapper
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.PanelConstants
;
import
io.dataease.commons.constants.PanelConstants
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.TreeUtils
;
import
io.dataease.commons.utils.TreeUtils
;
...
@@ -83,6 +85,7 @@ public class PanelGroupService {
...
@@ -83,6 +85,7 @@ public class PanelGroupService {
return
TreeUtils
.
mergeTree
(
panelGroupDTOList
,
"default_panel"
);
return
TreeUtils
.
mergeTree
(
panelGroupDTOList
,
"default_panel"
);
}
}
@DeCleaner
(
DePermissionType
.
PANEL
)
@Transactional
@Transactional
public
PanelGroup
saveOrUpdate
(
PanelGroupRequest
request
)
{
public
PanelGroup
saveOrUpdate
(
PanelGroupRequest
request
)
{
try
{
try
{
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
a58f92ed
...
@@ -16,8 +16,15 @@
...
@@ -16,8 +16,15 @@
{{
$t
(
'chart.chart_error_tips'
)
}}
{{
$t
(
'chart.chart_error_tips'
)
}}
</div>
</div>
</div>
</div>
<plugin-com
v-if=
"isPlugin"
:ref=
"element.propValue.id"
:component-name=
"chart.type + '-view'"
:obj=
"
{chart, trackMenu, searchCount, terminalType: scaleCoefficientType}"
class="chart-class"
/>
<chart-component
<chart-component
v-if=
"charViewShowFlag"
v-
else-
if=
"charViewShowFlag"
:ref=
"element.propValue.id"
:ref=
"element.propValue.id"
class=
"chart-class"
class=
"chart-class"
:chart=
"chart"
:chart=
"chart"
...
@@ -28,7 +35,7 @@
...
@@ -28,7 +35,7 @@
@
onJumpClick=
"jumpClick"
@
onJumpClick=
"jumpClick"
/>
/>
<chart-component-g2
<chart-component-g2
v-if=
"charViewG2ShowFlag"
v-
else-
if=
"charViewG2ShowFlag"
:ref=
"element.propValue.id"
:ref=
"element.propValue.id"
class=
"chart-class"
class=
"chart-class"
:chart=
"chart"
:chart=
"chart"
...
@@ -38,7 +45,7 @@
...
@@ -38,7 +45,7 @@
@
onJumpClick=
"jumpClick"
@
onJumpClick=
"jumpClick"
/>
/>
<chart-component-s2
<chart-component-s2
v-if=
"charViewS2ShowFlag"
v-
else-
if=
"charViewS2ShowFlag"
:ref=
"element.propValue.id"
:ref=
"element.propValue.id"
class=
"chart-class"
class=
"chart-class"
:chart=
"chart"
:chart=
"chart"
...
@@ -48,13 +55,13 @@
...
@@ -48,13 +55,13 @@
@
onJumpClick=
"jumpClick"
@
onJumpClick=
"jumpClick"
/>
/>
<table-normal
<table-normal
v-if=
"tableShowFlag"
v-
else-
if=
"tableShowFlag"
:ref=
"element.propValue.id"
:ref=
"element.propValue.id"
:show-summary=
"chart.type === 'table-normal'"
:show-summary=
"chart.type === 'table-normal'"
:chart=
"chart"
:chart=
"chart"
class=
"table-class"
class=
"table-class"
/>
/>
<label-normal
v-if=
"labelShowFlag"
:ref=
"element.propValue.id"
:chart=
"chart"
class=
"table-class"
/>
<label-normal
v-
else-
if=
"labelShowFlag"
:ref=
"element.propValue.id"
:chart=
"chart"
class=
"table-class"
/>
<div
style=
"position: absolute;left: 8px;bottom:8px;"
>
<div
style=
"position: absolute;left: 8px;bottom:8px;"
>
<drill-path
:drill-filters=
"drillFilters"
@
onDrillJump=
"drillJump"
/>
<drill-path
:drill-filters=
"drillFilters"
@
onDrillJump=
"drillJump"
/>
</div>
</div>
...
@@ -82,10 +89,11 @@ import ChartComponentG2 from '@/views/chart/components/ChartComponentG2'
...
@@ -82,10 +89,11 @@ import ChartComponentG2 from '@/views/chart/components/ChartComponentG2'
import
EditBarView
from
'@/components/canvas/components/Editor/EditBarView'
import
EditBarView
from
'@/components/canvas/components/Editor/EditBarView'
import
{
customAttrTrans
,
customStyleTrans
,
recursionTransObj
}
from
'@/components/canvas/utils/style'
import
{
customAttrTrans
,
customStyleTrans
,
recursionTransObj
}
from
'@/components/canvas/utils/style'
import
ChartComponentS2
from
'@/views/chart/components/ChartComponentS2'
import
ChartComponentS2
from
'@/views/chart/components/ChartComponentS2'
import
{
pluginTypes
}
from
'@/api/chart/chart'
import
PluginCom
from
'@/views/system/plugin/PluginCom'
export
default
{
export
default
{
name
:
'UserView'
,
name
:
'UserView'
,
components
:
{
ChartComponentS2
,
EditBarView
,
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
components
:
{
PluginCom
,
ChartComponentS2
,
EditBarView
,
ChartComponent
,
TableNormal
,
LabelNormal
,
DrillPath
,
ChartComponentG2
},
props
:
{
props
:
{
element
:
{
element
:
{
type
:
Object
,
type
:
Object
,
...
@@ -108,6 +116,7 @@ export default {
...
@@ -108,6 +116,7 @@ export default {
required
:
false
,
required
:
false
,
default
:
false
default
:
false
},
},
// eslint-disable-next-line vue/require-default-prop
componentIndex
:
{
componentIndex
:
{
type
:
Number
,
type
:
Number
,
required
:
false
required
:
false
...
@@ -153,7 +162,9 @@ export default {
...
@@ -153,7 +162,9 @@ export default {
pre
:
null
,
pre
:
null
,
preCanvasPanel
:
null
,
preCanvasPanel
:
null
,
sourceCustomAttrStr
:
null
,
sourceCustomAttrStr
:
null
,
sourceCustomStyleStr
:
null
sourceCustomStyleStr
:
null
,
isPlugin
:
false
,
plugins
:
[]
}
}
},
},
computed
:
{
computed
:
{
...
@@ -260,6 +271,7 @@ export default {
...
@@ -260,6 +271,7 @@ export default {
},
},
watch
:
{
watch
:
{
'cfilters'
:
{
'cfilters'
:
{
handler
:
function
(
val1
,
val2
)
{
handler
:
function
(
val1
,
val2
)
{
if
(
isChange
(
val1
,
val2
)
&&
!
this
.
isFirstLoad
)
{
if
(
isChange
(
val1
,
val2
)
&&
!
this
.
isFirstLoad
)
{
...
@@ -320,6 +332,7 @@ export default {
...
@@ -320,6 +332,7 @@ export default {
}
}
},
},
'chartType'
:
function
(
newVal
,
oldVal
)
{
'chartType'
:
function
(
newVal
,
oldVal
)
{
this
.
isPlugin
=
this
.
plugins
.
some
(
plugin
=>
plugin
.
value
===
this
.
chart
.
type
)
if
(
newVal
===
'map'
&&
newVal
!==
oldVal
)
{
if
(
newVal
===
'map'
&&
newVal
!==
oldVal
)
{
this
.
initAreas
()
this
.
initAreas
()
}
}
...
@@ -334,6 +347,12 @@ export default {
...
@@ -334,6 +347,12 @@ export default {
deep
:
true
deep
:
true
}
}
},
},
beforeCreate
()
{
pluginTypes
().
then
(
res
=>
{
this
.
plugins
=
res
.
data
this
.
isPlugin
=
this
.
plugins
.
some
(
plugin
=>
plugin
.
value
===
this
.
chart
.
type
)
})
},
created
()
{
created
()
{
this
.
refId
=
uuid
.
v1
this
.
refId
=
uuid
.
v1
if
(
this
.
element
&&
this
.
element
.
propValue
&&
this
.
element
.
propValue
.
viewId
)
{
if
(
this
.
element
&&
this
.
element
.
propValue
&&
this
.
element
.
propValue
.
viewId
)
{
...
...
frontend/src/lang/en.js
浏览文件 @
a58f92ed
...
@@ -1022,7 +1022,8 @@ export default {
...
@@ -1022,7 +1022,8 @@ export default {
table_column_adapt
:
'Adapt'
,
table_column_adapt
:
'Adapt'
,
table_column_custom
:
'Custom'
,
table_column_custom
:
'Custom'
,
chart_table_pivot
:
'Pivot Table'
,
chart_table_pivot
:
'Pivot Table'
,
table_pivot_row
:
'Data Row'
table_pivot_row
:
'Data Row'
,
field_error_tips
:
'This field is changed(Include dimension、quota,field type,deleted),please edit again.'
},
},
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'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
a58f92ed
...
@@ -1022,7 +1022,8 @@ export default {
...
@@ -1022,7 +1022,8 @@ export default {
table_column_adapt
:
'自適應'
,
table_column_adapt
:
'自適應'
,
table_column_custom
:
'自定義'
,
table_column_custom
:
'自定義'
,
chart_table_pivot
:
'透視表'
,
chart_table_pivot
:
'透視表'
,
table_pivot_row
:
'數據行'
table_pivot_row
:
'數據行'
,
field_error_tips
:
'該字段所對應的數據集原始字段發生變更(包括維度、指標,字段類型,字段被刪除等),建議重新編輯'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
a58f92ed
...
@@ -1024,7 +1024,8 @@ export default {
...
@@ -1024,7 +1024,8 @@ export default {
table_column_adapt
:
'自适应'
,
table_column_adapt
:
'自适应'
,
table_column_custom
:
'自定义'
,
table_column_custom
:
'自定义'
,
chart_table_pivot
:
'透视表'
,
chart_table_pivot
:
'透视表'
,
table_pivot_row
:
'数据行'
table_pivot_row
:
'数据行'
,
field_error_tips
:
'该字段所对应的数据集原始字段发生变更(包括维度、指标,字段类型,字段被删除等),建议重新编辑'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
...
frontend/src/views/chart/chart/common/common_table.js
浏览文件 @
a58f92ed
...
@@ -106,7 +106,7 @@ export function getSize(chart) {
...
@@ -106,7 +106,7 @@ export function getSize(chart) {
size
.
cellCfg
=
{
size
.
cellCfg
=
{
height
:
s
.
tableItemHeight
height
:
s
.
tableItemHeight
}
}
if
(
!
s
.
tableColumnMode
||
s
.
tableColumnMode
===
'adapt'
)
{
if
(
s
.
tableColumnMode
&&
s
.
tableColumnMode
===
'adapt'
)
{
delete
size
.
cellCfg
.
width
delete
size
.
cellCfg
.
width
size
.
layoutWidthType
=
'compact'
size
.
layoutWidthType
=
'compact'
}
else
{
}
else
{
...
...
frontend/src/views/chart/components/drag-item/ChartDragItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
</span>
<span
v-if=
"item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
</span>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -27,6 +28,7 @@
...
@@ -27,6 +28,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
</span>
<span
v-if=
"item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
</span>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
...
@@ -120,8 +122,12 @@
...
@@ -120,8 +122,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'ChartDragItem'
,
name
:
'ChartDragItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -138,10 +144,30 @@ export default {
...
@@ -138,10 +144,30 @@ export default {
conf
:
{
conf
:
{
type
:
String
,
type
:
String
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
},
watch
:
{
dimensionData
:
function
()
{
this
.
getItemTagType
()
},
quotaData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -208,6 +234,9 @@ export default {
...
@@ -208,6 +234,9 @@ export default {
return
{
return
{
type
:
type
type
:
type
}
}
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/DimensionExtItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -10,13 +10,14 @@
...
@@ -10,13 +10,14 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
</span>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
</span>
...
@@ -100,8 +102,12 @@
...
@@ -100,8 +102,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'DimensionExtItem'
,
name
:
'DimensionExtItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -114,10 +120,27 @@ export default {
...
@@ -114,10 +120,27 @@ export default {
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
},
watch
:
{
dimensionData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -188,6 +211,9 @@ export default {
...
@@ -188,6 +211,9 @@ export default {
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
item
.
removeType
=
'dimensionExt'
this
.
item
.
removeType
=
'dimensionExt'
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/DimensionItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -10,13 +10,14 @@
...
@@ -10,13 +10,14 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
</span>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
<span
v-if=
"item.deType === 1"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
{{
$t
(
'chart.'
+
item
.
dateStyle
)
}}
</span>
</span>
...
@@ -103,8 +105,12 @@
...
@@ -103,8 +105,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'DimensionItem'
,
name
:
'DimensionItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -117,10 +123,27 @@ export default {
...
@@ -117,10 +123,27 @@ export default {
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
},
watch
:
{
dimensionData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -192,6 +215,9 @@ export default {
...
@@ -192,6 +215,9 @@ export default {
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
item
.
removeType
=
'dimension'
this
.
item
.
removeType
=
'dimension'
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/DrillItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -10,10 +10,11 @@
...
@@ -10,10 +10,11 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
</el-tag>
</el-tag>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
...
@@ -36,8 +38,12 @@
...
@@ -36,8 +38,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'DrillItem'
,
name
:
'DrillItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -50,10 +56,30 @@ export default {
...
@@ -50,10 +56,30 @@ export default {
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
},
watch
:
{
dimensionData
:
function
()
{
this
.
getItemTagType
()
},
quotaData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -79,6 +105,9 @@ export default {
...
@@ -79,6 +105,9 @@ export default {
removeItem
()
{
removeItem
()
{
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
this
.
$emit
(
'onDimensionItemRemove'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/FilterItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -8,10 +8,11 @@
...
@@ -8,10 +8,11 @@
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
</el-tag>
</el-tag>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
...
@@ -35,8 +37,12 @@
...
@@ -35,8 +37,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'FilterItem'
,
name
:
'FilterItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -49,10 +55,30 @@ export default {
...
@@ -49,10 +55,30 @@ export default {
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
},
watch
:
{
dimensionData
:
function
()
{
this
.
getItemTagType
()
},
quotaData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -85,6 +111,9 @@ export default {
...
@@ -85,6 +111,9 @@ export default {
removeItem
()
{
removeItem
()
{
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
$emit
(
'onFilterItemRemove'
,
this
.
item
)
this
.
$emit
(
'onFilterItemRemove'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/QuotaExtItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -13,13 +13,14 @@
...
@@ -13,13 +13,14 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
</span>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
</span>
...
@@ -75,22 +77,6 @@
...
@@ -75,22 +77,6 @@
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</el-dropdown-item>
</el-dropdown-item>
<!-- 快速计算先隐藏-->
<!--
<el-dropdown-item
v-if=
"item.id !== 'count'"
>
-->
<!--
<el-dropdown
placement=
"right-start"
size=
"mini"
style=
"width: 100%"
@
command=
"quickCalc"
>
-->
<!--
<span
class=
"el-dropdown-link inner-dropdown-menu"
>
-->
<!--
<span>
-->
<!--
<i
class=
"el-icon-s-grid"
/>
-->
<!--
<span>
{{
$t
(
'chart.quick_calc'
)
}}
</span>
-->
<!--
<span
class=
"summary-span-item"
>
(无)
</span>
-->
<!--
</span>
-->
<!--
<i
class=
"el-icon-arrow-right el-icon--right"
/>
-->
<!--
</span>
-->
<!--
<el-dropdown-menu
slot=
"dropdown"
>
-->
<!--
<el-dropdown-item
:command=
"beforeQuickCalc('none')"
>
无
</el-dropdown-item>
-->
<!--
</el-dropdown-menu>
-->
<!--
</el-dropdown>
-->
<!--
</el-dropdown-item>
-->
<!--同比/环比-->
<!--同比/环比-->
<el-dropdown-item
v-show=
"chart.type !== 'table-info'"
>
<el-dropdown-item
v-show=
"chart.type !== 'table-info'"
>
...
@@ -144,9 +130,12 @@
...
@@ -144,9 +130,12 @@
<
script
>
<
script
>
import
{
compareItem
}
from
'@/views/chart/chart/compare'
import
{
compareItem
}
from
'@/views/chart/chart/compare'
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'QuotaExtItem'
,
name
:
'QuotaExtItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -163,12 +152,21 @@ export default {
...
@@ -163,12 +152,21 @@ export default {
chart
:
{
chart
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
compareItem
:
compareItem
,
compareItem
:
compareItem
,
disableEditCompare
:
false
disableEditCompare
:
false
,
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
},
},
watch
:
{
watch
:
{
...
@@ -177,6 +175,12 @@ export default {
...
@@ -177,6 +175,12 @@ export default {
},
},
'chart.extStack'
:
function
()
{
'chart.extStack'
:
function
()
{
this
.
isEnableCompare
()
this
.
isEnableCompare
()
},
quotaData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -296,6 +300,9 @@ export default {
...
@@ -296,6 +300,9 @@ export default {
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
item
.
calcType
=
'quotaExt'
this
.
item
.
calcType
=
'quotaExt'
this
.
$emit
(
'editItemCompare'
,
this
.
item
)
this
.
$emit
(
'editItemCompare'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/QuotaItem.vue
浏览文件 @
a58f92ed
<
template
>
<
template
>
<span>
<span>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -13,13 +13,14 @@
...
@@ -13,13 +13,14 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
</span>
</el-tag>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
item.groupType === 'q'?'success':''
"
>
<el-tag
size=
"small"
class=
"item-axis"
:type=
"
tagType
"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
<svg-icon
v-if=
"item.sort === 'desc'"
icon-class=
"sort-desc"
class-name=
"field-icon-sort"
/>
</span>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<field-error-tips
v-if=
"tagType === 'danger'"
/>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
<span
v-if=
"chart.type !== 'table-info' && item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
<span
v-if=
"item.compareCalc && item.compareCalc.type && item.compareCalc.type !== '' && item.compareCalc.type !== 'none'"
>
-
{{
$t
(
'chart.'
+
item
.
compareCalc
.
type
)
}}
</span>
</span>
</span>
...
@@ -75,22 +77,6 @@
...
@@ -75,22 +77,6 @@
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</el-dropdown-item>
</el-dropdown-item>
<!-- 快速计算先隐藏-->
<!--
<el-dropdown-item
v-if=
"item.id !== 'count'"
>
-->
<!--
<el-dropdown
placement=
"right-start"
size=
"mini"
style=
"width: 100%"
@
command=
"quickCalc"
>
-->
<!--
<span
class=
"el-dropdown-link inner-dropdown-menu"
>
-->
<!--
<span>
-->
<!--
<i
class=
"el-icon-s-grid"
/>
-->
<!--
<span>
{{
$t
(
'chart.quick_calc'
)
}}
</span>
-->
<!--
<span
class=
"summary-span-item"
>
(无)
</span>
-->
<!--
</span>
-->
<!--
<i
class=
"el-icon-arrow-right el-icon--right"
/>
-->
<!--
</span>
-->
<!--
<el-dropdown-menu
slot=
"dropdown"
>
-->
<!--
<el-dropdown-item
:command=
"beforeQuickCalc('none')"
>
无
</el-dropdown-item>
-->
<!--
</el-dropdown-menu>
-->
<!--
</el-dropdown>
-->
<!--
</el-dropdown-item>
-->
<!--同比/环比-->
<!--同比/环比-->
<el-dropdown-item
v-show=
"chart.type !== 'table-info'"
>
<el-dropdown-item
v-show=
"chart.type !== 'table-info'"
>
...
@@ -144,9 +130,12 @@
...
@@ -144,9 +130,12 @@
<
script
>
<
script
>
import
{
compareItem
}
from
'@/views/chart/chart/compare'
import
{
compareItem
}
from
'@/views/chart/chart/compare'
import
{
getItemType
}
from
'@/views/chart/components/drag-item/utils'
import
FieldErrorTips
from
'@/views/chart/components/drag-item/components/FieldErrorTips'
export
default
{
export
default
{
name
:
'QuotaItem'
,
name
:
'QuotaItem'
,
components
:
{
FieldErrorTips
},
props
:
{
props
:
{
param
:
{
param
:
{
type
:
Object
,
type
:
Object
,
...
@@ -163,17 +152,32 @@ export default {
...
@@ -163,17 +152,32 @@ export default {
chart
:
{
chart
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
},
dimensionData
:
{
type
:
Array
,
required
:
true
},
quotaData
:
{
type
:
Array
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
compareItem
:
compareItem
,
compareItem
:
compareItem
,
disableEditCompare
:
false
disableEditCompare
:
false
,
tagType
:
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
},
},
watch
:
{
watch
:
{
'chart'
:
function
()
{
'chart'
:
function
()
{
this
.
isEnableCompare
()
this
.
isEnableCompare
()
},
quotaData
:
function
()
{
this
.
getItemTagType
()
},
item
:
function
()
{
this
.
getItemTagType
()
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -293,6 +297,9 @@ export default {
...
@@ -293,6 +297,9 @@ export default {
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
this
.
item
.
calcType
=
'quota'
this
.
item
.
calcType
=
'quota'
this
.
$emit
(
'editItemCompare'
,
this
.
item
)
this
.
$emit
(
'editItemCompare'
,
this
.
item
)
},
getItemTagType
()
{
this
.
tagType
=
getItemType
(
this
.
dimensionData
,
this
.
quotaData
,
this
.
item
)
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/drag-item/components/FieldErrorTips.vue
0 → 100644
浏览文件 @
a58f92ed
<
template
>
<div
class=
"tips-class"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('chart.field_error_tips')"
placement=
"bottom"
>
<span><i
class=
"el-icon-warning"
/></span>
</el-tooltip>
</div>
</
template
>
<
script
>
export
default
{
name
:
'FieldErrorTips'
}
</
script
>
<
style
scoped
>
.tips-class
{
position
:
absolute
;
right
:
10px
;
z-index
:
10
;
}
</
style
>
frontend/src/views/chart/components/drag-item/utils.js
0 → 100644
浏览文件 @
a58f92ed
export
function
getItemType
(
dimensionData
,
quotaData
,
item
)
{
// 将item的字段在数据集维度、指标字段中查询一遍,如果遇到id不存在、字段类型不一致、维度指标不一致,则提示
const
status
=
item
.
groupType
let
checked
=
false
if
(
status
===
'd'
)
{
for
(
let
i
=
0
;
i
<
dimensionData
.
length
;
i
++
)
{
const
ele
=
dimensionData
[
i
]
if
(
ele
.
id
===
item
.
id
&&
ele
.
deType
===
item
.
deType
&&
ele
.
groupType
===
item
.
groupType
)
{
checked
=
true
break
}
}
}
if
(
status
===
'q'
)
{
for
(
let
i
=
0
;
i
<
quotaData
.
length
;
i
++
)
{
const
ele
=
quotaData
[
i
]
if
(
ele
.
id
===
item
.
id
&&
ele
.
deType
===
item
.
deType
&&
ele
.
groupType
===
item
.
groupType
)
{
checked
=
true
break
}
}
}
if
(
checked
)
{
if
(
status
===
'd'
)
{
return
''
}
else
if
(
status
===
'q'
)
{
return
'success'
}
}
else
{
return
'danger'
}
}
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
a58f92ed
...
@@ -271,6 +271,8 @@
...
@@ -271,6 +271,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onDimensionItemChange=
"dimensionItemChange"
@
onDimensionItemChange=
"dimensionItemChange"
@
onDimensionItemRemove=
"dimensionItemRemove"
@
onDimensionItemRemove=
"dimensionItemRemove"
@
editItemFilter=
"showDimensionEditFilter"
@
editItemFilter=
"showDimensionEditFilter"
...
@@ -323,6 +325,8 @@
...
@@ -323,6 +325,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onDimensionItemChange=
"dimensionItemChange"
@
onDimensionItemChange=
"dimensionItemChange"
@
onDimensionItemRemove=
"dimensionItemRemove"
@
onDimensionItemRemove=
"dimensionItemRemove"
@
editItemFilter=
"showDimensionEditFilter"
@
editItemFilter=
"showDimensionEditFilter"
...
@@ -376,6 +380,8 @@
...
@@ -376,6 +380,8 @@
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:chart=
"chart"
:chart=
"chart"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onQuotaItemChange=
"quotaItemChange"
@
onQuotaItemChange=
"quotaItemChange"
@
onQuotaItemRemove=
"quotaItemRemove"
@
onQuotaItemRemove=
"quotaItemRemove"
@
editItemFilter=
"showQuotaEditFilter"
@
editItemFilter=
"showQuotaEditFilter"
...
@@ -413,6 +419,8 @@
...
@@ -413,6 +419,8 @@
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:chart=
"chart"
:chart=
"chart"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onQuotaItemChange=
"quotaItemChange"
@
onQuotaItemChange=
"quotaItemChange"
@
onQuotaItemRemove=
"quotaItemRemove"
@
onQuotaItemRemove=
"quotaItemRemove"
@
editItemFilter=
"showQuotaEditFilter"
@
editItemFilter=
"showQuotaEditFilter"
...
@@ -450,6 +458,8 @@
...
@@ -450,6 +458,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onItemChange=
"stackItemChange"
@
onItemChange=
"stackItemChange"
@
onItemRemove=
"stackItemRemove"
@
onItemRemove=
"stackItemRemove"
/>
/>
...
@@ -490,6 +500,8 @@
...
@@ -490,6 +500,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onItemChange=
"bubbleItemChange"
@
onItemChange=
"bubbleItemChange"
@
onItemRemove=
"bubbleItemRemove"
@
onItemRemove=
"bubbleItemRemove"
/>
/>
...
@@ -522,6 +534,8 @@
...
@@ -522,6 +534,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onFilterItemRemove=
"filterItemRemove"
@
onFilterItemRemove=
"filterItemRemove"
@
editItemFilter=
"showEditFilter"
@
editItemFilter=
"showEditFilter"
/>
/>
...
@@ -558,6 +572,8 @@
...
@@ -558,6 +572,8 @@
:param=
"param"
:param=
"param"
:index=
"index"
:index=
"index"
:item=
"item"
:item=
"item"
:dimension-data=
"dimensionData"
:quota-data=
"quotaData"
@
onDimensionItemChange=
"drillItemChange"
@
onDimensionItemChange=
"drillItemChange"
@
onDimensionItemRemove=
"drillItemRemove"
@
onDimensionItemRemove=
"drillItemRemove"
/>
/>
...
@@ -568,7 +584,6 @@
...
@@ -568,7 +584,6 @@
</div>
</div>
</el-row>
</el-row>
</div>
</div>
</el-row>
</el-row>
</div>
</div>
</el-col>
</el-col>
...
...
mobile/src/pages.json
浏览文件 @
a58f92ed
...
@@ -27,18 +27,8 @@
...
@@ -27,18 +27,8 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleNView"
:
false
,
"type"
:
"transparent"
,
"bounce"
:
"none"
"buttons"
:
[{
"type"
:
"share"
}]
}
},
"h5"
:
{
"titleNView"
:
{
"type"
:
"transparent"
,
"buttons"
:
[]
}
}
}
}
}
},
},
...
...
mobile/src/pages/tabBar/home/detail.nvue
浏览文件 @
a58f92ed
<template>
<template>
<view class="page dataease-main">
<view class="page dataease-main">
<uni-nav-bar :title="banner.title" >
<uni-nav-bar :
fixed="false" left-icon="arrowleft" @clickLeft="back" :
title="banner.title" >
<
view
slot="right">
<
block
slot="right">
<uni-row class="demo-uni-row" >
<uni-row class="demo-uni-row" >
<uni-col :span="12" @click="enshrine">
<uni-col :span="12">
<view @click="enshrine">
<uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons>
<uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons>
<uni-icons v-else type="star" size="18" color="#999"></uni-icons>
<uni-icons v-else type="star" size="18" color="#999"></uni-icons>
</view>
</uni-col>
</uni-col>
<uni-col :span="12" @click="refresh" style="margin: 0 10rpx;">
<uni-col :span="12" style="margin: 0 10rpx;">
<uni-icons type="reload" size="18" color="#999"></uni-icons>
<view @click="refresh">
<uni-icons type="reload" size="18" color="#999" ></uni-icons>
</view>
</uni-col>
</uni-col>
</uni-row>
</uni-row>
</view>
</block>
</uni-nav-bar>
</uni-nav-bar>
<view class="article-content">
<view class="article-content"
style="height: 100% !important;"
>
<view v-if="url">
<view v-if="url">
<web-view
<web-view
:webview-styles="webViewStyles"
:webview-styles="webViewStyles"
style="height:
calc(100vh - 112px)
;"
style="height:
100vh
;"
>
>
</web-view>
</web-view>
</view>
</view>
</view>
</view>
<!-- #ifdef MP-WEIXIN || MP-QQ -->
<ad v-if="htmlNodes.length > 0" unit-id="adunit-01b7a010bf53d74e"></ad>
<!-- #endif -->
</view>
</view>
...
@@ -271,7 +274,7 @@
...
@@ -271,7 +274,7 @@
}
}
.article-content {
.article-content {
height: 100vh;
margin: 5px 0;
margin: 5px 0;
background: #ffffff;
background: #ffffff;
}
}
...
@@ -295,6 +298,36 @@
...
@@ -295,6 +298,36 @@
margin-left: 5px;
margin-left: 5px;
}
}
.input-view {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
flex-direction: row;
// width: 500rpx;
flex: 1;
background-color: #f8f8f8;
height: $nav-height;
border-radius: 15px;
padding: 0 15px;
flex-wrap: nowrap;
margin: 7px 0;
line-height: $nav-height;
}
.input-uni-icon {
line-height: $nav-height;
}
.nav-bar-input {
height: $nav-height;
line-height: $nav-height;
/* #ifdef APP-PLUS-NVUE */
width: 370rpx;
/* #endif */
padding: 0 5px;
font-size: 14px;
background-color: #f8f8f8;
}
</style>
</style>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论