Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
2d1793f3
提交
2d1793f3
authored
5月 28, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
0b468cc2
f23580d4
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
70 行增加
和
84 行删除
+70
-84
DataSetGroupController.java
...o/dataease/controller/dataset/DataSetGroupController.java
+8
-9
DatasourceController.java
.../dataease/controller/datasource/DatasourceController.java
+11
-12
DeleteDsRequest.java
...taease/controller/datasource/request/DeleteDsRequest.java
+0
-16
LogService.java
...src/main/java/io/dataease/service/sys/log/LogService.java
+4
-1
V35__1.11.sql
backend/src/main/resources/db/migration/V35__1.11.sql
+2
-0
dataset.js
frontend/src/api/dataset/dataset.js
+3
-4
datasource.js
frontend/src/api/system/datasource.js
+3
-4
index.vue
frontend/src/components/DeDrag/index.vue
+1
-1
DeStreamMedia.vue
.../src/components/canvas/custom-component/DeStreamMedia.vue
+2
-2
Group.vue
frontend/src/views/dataset/group/Group.vue
+1
-2
SubjectTemplateItem.vue
...s/panel/SubjectSetting/PreSubject/SubjectTemplateItem.vue
+1
-1
index.vue
frontend/src/views/panel/edit/index.vue
+1
-0
DsTree.vue
frontend/src/views/system/datasource/DsTree.vue
+33
-32
没有找到文件。
backend/src/main/java/io/dataease/controller/dataset/DataSetGroupController.java
浏览文件 @
2d1793f3
...
...
@@ -7,8 +7,10 @@ import io.dataease.auth.annotation.DePermissions;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
import
io.dataease.commons.constants.SysLogConstants
;
import
io.dataease.commons.utils.DeLogUtils
;
import
io.dataease.controller.dataset.request.DeleteGroupRequest
;
import
io.dataease.controller.request.dataset.DataSetGroupRequest
;
import
io.dataease.dto.SysLogDTO
;
import
io.dataease.dto.dataset.DataSetGroupDTO
;
import
io.dataease.plugins.common.base.domain.DatasetGroup
;
import
io.dataease.service.dataset.DataSetGroupService
;
...
...
@@ -60,15 +62,12 @@ public class DataSetGroupController {
@DePermission
(
type
=
DePermissionType
.
DATASET
,
level
=
ResourceAuthLevel
.
DATASET_LEVEL_MANAGE
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"/delete"
)
@DeLog
(
operatetype
=
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
sourcetype
=
SysLogConstants
.
SOURCE_TYPE
.
DATASET
,
positionIndex
=
0
,
positionKey
=
"pid"
,
value
=
"id"
)
public
void
tree
(
@RequestBody
DeleteGroupRequest
request
)
throws
Exception
{
dataSetGroupService
.
delete
(
request
.
getId
());
@PostMapping
(
"/delete/{id}"
)
public
void
delete
(
@PathVariable
String
id
)
throws
Exception
{
DatasetGroup
datasetGroup
=
dataSetGroupService
.
getScene
(
id
);
SysLogDTO
sysLogDTO
=
DeLogUtils
.
buildLog
(
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
SysLogConstants
.
SOURCE_TYPE
.
DATASET
,
id
,
datasetGroup
.
getPid
(),
null
,
null
);
dataSetGroupService
.
delete
(
id
);
DeLogUtils
.
save
(
sysLogDTO
);
}
@ApiIgnore
...
...
backend/src/main/java/io/dataease/controller/datasource/DatasourceController.java
浏览文件 @
2d1793f3
...
...
@@ -4,7 +4,8 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import
io.dataease.auth.annotation.DeLog
;
import
io.dataease.auth.annotation.DePermission
;
import
io.dataease.commons.constants.SysLogConstants
;
import
io.dataease.controller.datasource.request.DeleteDsRequest
;
import
io.dataease.commons.utils.DeLogUtils
;
import
io.dataease.dto.SysLogDTO
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.commons.constants.DePermissionType
;
import
io.dataease.commons.constants.ResourceAuthLevel
;
...
...
@@ -14,13 +15,12 @@ import io.dataease.controller.datasource.request.UpdataDsRequest;
import
io.dataease.controller.request.DatasourceUnionRequest
;
import
io.dataease.controller.request.datasource.ApiDefinition
;
import
io.dataease.dto.datasource.DBTableDTO
;
import
io.dataease.plugins.common.dto.datasource.DataSourceType
;
import
io.dataease.service.datasource.DatasourceService
;
import
io.dataease.dto.DatasourceDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.pentaho.di.core.database.DataSourceProviderInterface
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
...
...
@@ -90,15 +90,14 @@ public class DatasourceController {
@RequiresPermissions
(
"datasource:read"
)
@DePermission
(
type
=
DePermissionType
.
DATASOURCE
,
level
=
ResourceAuthLevel
.
DATASOURCE_LEVEL_MANAGE
,
value
=
"id"
)
@ApiOperation
(
"删除数据源"
)
@PostMapping
(
"/delete"
)
@DeLog
(
operatetype
=
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
sourcetype
=
SysLogConstants
.
SOURCE_TYPE
.
DATASOURCE
,
positionIndex
=
0
,
positionKey
=
"type"
,
value
=
"id"
)
public
ResultHolder
deleteDatasource
(
@RequestBody
DeleteDsRequest
request
)
throws
Exception
{
return
datasourceService
.
deleteDatasource
(
request
.
getId
());
@PostMapping
(
"/delete/{datasourceID}"
)
public
ResultHolder
deleteDatasource
(
@PathVariable
(
value
=
"datasourceID"
)
String
datasourceID
)
throws
Exception
{
Datasource
datasource
=
datasourceService
.
get
(
datasourceID
);
SysLogDTO
sysLogDTO
=
DeLogUtils
.
buildLog
(
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
SysLogConstants
.
SOURCE_TYPE
.
DATASOURCE
,
datasourceID
,
datasource
.
getType
(),
null
,
null
);
ResultHolder
resultHolder
=
datasourceService
.
deleteDatasource
(
datasourceID
);
if
(
ObjectUtils
.
isNotEmpty
(
resultHolder
)
&&
resultHolder
.
isSuccess
())
DeLogUtils
.
save
(
sysLogDTO
);
return
resultHolder
;
}
@RequiresPermissions
(
"datasource:read"
)
...
...
backend/src/main/java/io/dataease/controller/datasource/request/DeleteDsRequest.java
deleted
100644 → 0
浏览文件 @
0b468cc2
package
io
.
dataease
.
controller
.
datasource
.
request
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
DeleteDsRequest
implements
Serializable
{
@ApiModelProperty
(
value
=
"ID"
,
required
=
true
)
private
String
id
;
@ApiModelProperty
(
value
=
"类型"
,
required
=
true
)
private
String
type
;
}
backend/src/main/java/io/dataease/service/sys/log/LogService.java
浏览文件 @
2d1793f3
...
...
@@ -48,7 +48,10 @@ public class LogService {
// 排除驱动和驱动文件的公共操作的资源类型
private
static
Integer
[]
COMMON_SOURCE
=
{
1
,
2
,
3
,
4
,
6
,
7
,
8
,
9
};
// 暂时屏蔽视图日志
// private static Integer[] COMMON_SOURCE = {1, 2,3,4,6,7,8,9};
private
static
Integer
[]
COMMON_SOURCE
=
{
1
,
2
,
3
,
6
,
7
,
8
,
9
};
// 增 改 删 针对公共资源的操作
private
static
Integer
[]
COMMON_SOURCE_OPERATE
=
{
1
,
2
,
3
};
...
...
backend/src/main/resources/db/migration/V35__1.11.sql
浏览文件 @
2d1793f3
...
...
@@ -57,6 +57,8 @@ UPDATE `chart_view` SET `view_fields` = '[]';
ALTER
TABLE
`chart_view_cache`
ADD
COLUMN
`view_fields`
LONGTEXT
COMMENT
'视图字段集合'
;
UPDATE
`chart_view_cache`
SET
`view_fields`
=
'[]'
;
INSERT
INTO
`my_plugin`
(
`plugin_id`
,
`name`
,
`store`
,
`free`
,
`cost`
,
`category`
,
`descript`
,
`version`
,
`install_type`
,
`creator`
,
`load_mybatis`
,
`release_time`
,
`install_time`
,
`module_name`
,
`icon`
,
`ds_type`
)
VALUES
(
11
,
'符号地图插件'
,
'default'
,
0
,
10000
,
'view'
,
'请购买正式许可'
,
'1.0-SNAPSHOT'
,
NULL
,
'DATAEASE'
,
0
,
NULL
,
1652174790928
,
'view-symbolmap-backend'
,
NULL
,
NULL
);
INSERT
INTO
`my_plugin`
(
`name`
,
`store`
,
`free`
,
`cost`
,
`category`
,
`descript`
,
`version`
,
`creator`
,
`load_mybatis`
,
`install_time`
,
`module_name`
,
`ds_type`
)
...
...
frontend/src/api/dataset/dataset.js
浏览文件 @
2d1793f3
...
...
@@ -26,12 +26,11 @@ export function addGroup(data) {
})
}
export
function
delGroup
(
data
)
{
export
function
delGroup
(
groupId
)
{
return
request
({
url
:
'/dataset/group/delete
'
,
url
:
'/dataset/group/delete
/'
+
groupId
,
loading
:
true
,
method
:
'post'
,
data
method
:
'post'
})
}
...
...
frontend/src/api/system/datasource.js
浏览文件 @
2d1793f3
...
...
@@ -61,12 +61,11 @@ export function editDs(data) {
})
}
export
function
delDs
(
data
)
{
export
function
delDs
(
id
)
{
return
request
({
url
:
'datasource/delete
'
,
url
:
'datasource/delete
/'
+
id
,
loading
:
true
,
method
:
'post'
,
data
method
:
'post'
})
}
...
...
frontend/src/components/DeDrag/index.vue
浏览文件 @
2d1793f3
...
...
@@ -759,7 +759,7 @@ export default {
elementMouseDown
(
e
)
{
// private 设置当前组件数据及状态
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
if
(
this
.
element
.
component
!==
'v-text'
&&
this
.
element
.
component
!==
'de-rich-text'
&&
this
.
element
.
component
!==
'rect-shape'
&&
this
.
element
.
component
!==
'de-input-search'
&&
this
.
element
.
component
!==
'de-select-grid'
&&
this
.
element
.
component
!==
'de-number-range'
&&
this
.
element
.
component
!==
'de-date'
)
{
if
(
this
.
element
.
component
!==
'
de-frame'
&&
this
.
element
.
component
!==
'
v-text'
&&
this
.
element
.
component
!==
'de-rich-text'
&&
this
.
element
.
component
!==
'rect-shape'
&&
this
.
element
.
component
!==
'de-input-search'
&&
this
.
element
.
component
!==
'de-select-grid'
&&
this
.
element
.
component
!==
'de-number-range'
&&
this
.
element
.
component
!==
'de-date'
)
{
e
.
preventDefault
()
}
// 阻止冒泡事件
...
...
frontend/src/components/canvas/custom-component/DeStreamMedia.vue
浏览文件 @
2d1793f3
...
...
@@ -2,7 +2,7 @@
<el-row
ref=
"mainPlayer"
style=
"width: 100%;height: 100%"
>
<div
v-if=
"element.streamMediaLinks[element.streamMediaLinks.videoType].url"
class=
"video-container"
>
<video
:ref=
"'player-'+element.id"
class=
"centered-video"
name=
"centeredVideo"
:loop=
"pOption.loop"
:controls=
"inScreen"
muted
/>
<div
v-if=
"editMode==='edit'"
class=
"stream-mask edit-mask"
/>
<div
v-if=
"editMode==='edit'"
class=
"stream-mask edit-mask
-stream
"
/>
<div
v-if=
"mobileLayoutStatus"
class=
"stream-mask"
>
<span
style=
"opacity: 0.7;"
>
<span
style=
"color: lightgray;"
>
{{
$t
(
'panel.stream_mobile_tips'
)
}}
</span>
...
...
@@ -177,7 +177,7 @@ export default {
justify-content
:
center
;
}
.edit-mask
{
.edit-mask
-stream
{
opacity
:
0
;
}
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
2d1793f3
...
...
@@ -461,8 +461,7 @@ export default {
cancelButtonText
:
this
.
$t
(
'dataset.cancel'
),
type
:
'warning'
}).
then
(()
=>
{
const
param
=
{
id
:
data
.
id
,
pid
:
data
.
pid
}
delGroup
(
param
).
then
(
response
=>
{
delGroup
(
data
.
id
).
then
(
response
=>
{
this
.
$message
({
type
:
'success'
,
message
:
this
.
$t
(
'dataset.delete_success'
),
...
...
frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItem.vue
浏览文件 @
2d1793f3
...
...
@@ -158,7 +158,7 @@ export default {
},
chartBackground
()
{
let
style
=
{}
if
(
this
.
subjectItemDetails
)
{
if
(
this
.
subjectItemDetails
&&
this
.
subjectItemDetails
.
chart
.
customStyle
.
background
)
{
style
=
{
background
:
this
.
subjectItemDetails
.
chart
.
customStyle
.
background
.
color
,
opacity
:
this
.
subjectItemDetails
.
chart
.
customStyle
.
background
.
alpha
/
100
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
2d1793f3
...
...
@@ -274,6 +274,7 @@
<Preview
v-if=
"previewVisible"
:in-screen=
"!previewVisible"
:panel-info=
"panelInfo"
:show-type=
"canvasStyleData.selfAdaption?'full':'width'"
:canvas-style-data=
"canvasStyleData"
:component-data=
"componentData"
...
...
frontend/src/views/system/datasource/DsTree.vue
浏览文件 @
2d1793f3
...
...
@@ -2,13 +2,12 @@
<el-col
class=
"tree-style"
>
<el-col>
<el-row>
<el-tabs
v-model=
"showView"
@
tab-click=
"changeTab"
type=
"card"
>
<el-tab-pane
v-for=
"(item, index) in editableTabs"
:key=
"item.name"
:label=
"item.title"
:name=
"item.name"
>
</el-tab-pane>
<el-tabs
v-model=
"showView"
type=
"card"
@
tab-click=
"changeTab"
>
<el-tab-pane
v-for=
"(item, index) in editableTabs"
:key=
"item.name"
:label=
"item.title"
:name=
"item.name"
/>
</el-tabs>
</el-row>
<el-row>
<el-button
icon=
"el-icon-plus"
type=
"text"
size=
"mini"
style=
"float: left;"
@
click=
"addFolder"
/>
<el-button
icon=
"el-icon-plus"
type=
"text"
size=
"mini"
style=
"float: left;"
@
click=
"addFolder"
/>
</el-row>
<el-row>
<el-form>
...
...
@@ -39,16 +38,16 @@
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list father">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<span
v-if=
"data.type !== 'folder' && data.status !== 'Error' && data.status !== 'Warning'"
>
<svg-icon
icon-class=
"datasource"
class=
"ds-icon-scene"
/>
<svg-icon
icon-class=
"datasource"
class=
"ds-icon-scene"
/>
</span>
<span
v-if=
"data.status === 'Error'"
>
<svg-icon
icon-class=
"exclamationmark"
class=
"ds-icon-scene"
/>
<svg-icon
icon-class=
"exclamationmark"
class=
"ds-icon-scene"
/>
</span>
<span
v-if=
"data.status === 'Warning'"
>
<svg-icon
icon-class=
"exclamationmark2"
class=
"ds-icon-scene"
/>
<svg-icon
icon-class=
"exclamationmark2"
class=
"ds-icon-scene"
/>
</span>
<span
v-if=
"data.type === 'folder'"
>
<i
class=
"el-icon-folder"
/>
<i
class=
"el-icon-folder"
/>
</span>
<span
v-if=
" data.status === 'Error'"
...
...
@@ -109,10 +108,10 @@
<el-dialog
v-dialogDrag
:title=
"dialogTitle"
:visible=
"editDriver"
:show-close=
"false"
width=
"50%"
append-to-body
>
<el-form
ref=
"driverForm"
:model=
"driverForm"
label-position=
"right"
label-width=
"100px"
:rules=
"rule"
>
<el-form-item
:label=
"$t('commons.name')"
prop=
"name"
>
<el-input
v-model=
"driverForm.name"
/>
<el-input
v-model=
"driverForm.name"
/>
</el-form-item>
<el-form-item
:label=
"$t('commons.description')"
>
<el-input
v-model=
"driverForm.desc"
/>
<el-input
v-model=
"driverForm.desc"
/>
</el-form-item>
<el-form-item
:label=
"$t('datasource.type')"
prop=
"type"
>
<el-select
...
...
@@ -138,14 +137,13 @@
</div>
</el-dialog>
</el-col>
</el-col>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
i18n
from
"@/lang"
;
import
{
mapGetters
}
from
'vuex'
import
i18n
from
'@/lang'
import
{
listDatasource
,
listDatasourceByType
,
...
...
@@ -156,7 +154,7 @@ import {
delDriver
,
listDriverByType
}
from
'@/api/system/datasource'
import
{
ApplicationContext
}
from
"@/utils/ApplicationContext"
;
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
export
default
{
name
:
'DsTree'
,
...
...
@@ -184,11 +182,11 @@ export default {
},
disabledModifyType
:
false
,
rule
:
{
name
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
50
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
desc
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
200
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.please_choose_type'
),
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
50
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
desc
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
200
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.please_choose_type'
),
trigger
:
'blur'
}]
},
editableTabs
:
[{
title
:
i18n
.
t
(
'commons.datasource'
),
...
...
@@ -215,7 +213,6 @@ export default {
name
:
'Driver'
})
}
},
methods
:
{
filterNode
(
value
,
data
)
{
...
...
@@ -244,11 +241,11 @@ export default {
datasourceTypes
()
{
listDatasourceType
().
then
(
res
=>
{
this
.
dsTypes
=
res
.
data
this
.
dsTypes
.
forEach
(
item
=>
{
if
(
item
.
isJdbc
)
{
this
.
dsTypesForDriver
.
push
(
item
)
}
})
this
.
dsTypes
.
forEach
(
item
=>
{
if
(
item
.
isJdbc
)
{
this
.
dsTypesForDriver
.
push
(
item
)
}
})
})
},
refreshType
(
datasource
)
{
...
...
@@ -327,7 +324,7 @@ export default {
this
.
editDriver
=
true
// this.switchMain(switchMain'DriverForm', {}, this.tData, this.dsTypes)
}
else
{
this
.
switchMain
(
'DsForm'
,
{
type
:
data
.
id
},
this
.
tData
,
this
.
dsTypes
)
this
.
switchMain
(
'DsForm'
,
{
type
:
data
.
id
},
this
.
tData
,
this
.
dsTypes
)
}
},
nodeClick
(
node
,
data
)
{
...
...
@@ -336,7 +333,7 @@ export default {
},
clickFileMore
(
param
)
{
const
{
optType
,
data
}
=
param
const
{
optType
,
data
}
=
param
switch
(
optType
)
{
case
'edit'
:
this
.
edit
(
data
)
...
...
@@ -349,13 +346,13 @@ export default {
}
},
beforeClickFile
(
optType
,
data
,
node
)
{
return
{
optType
,
data
,
node
}
return
{
optType
,
data
,
node
}
},
edit
(
row
)
{
this
.
switchMain
(
'DsForm'
,
row
,
this
.
tData
,
this
.
dsTypes
)
},
showInfo
(
row
)
{
const
param
=
{
...
row
.
data
,
...{
showModel
:
'show'
}}
const
param
=
{
...
row
.
data
,
...{
showModel
:
'show'
}}
if
(
this
.
showView
===
'Datasource'
)
{
this
.
switchMain
(
'DsForm'
,
param
,
this
.
tData
,
this
.
dsTypes
)
}
else
{
...
...
@@ -368,8 +365,12 @@ export default {
cancelButtonText
:
this
.
$t
(
'commons.cancel'
),
type
:
'warning'
}).
then
(()
=>
{
const
parma
=
{
type
:
datasource
.
type
,
id
:
datasource
.
id
}
const
method
=
this
.
showView
===
'Datasource'
?
delDs
:
delDriver
let
method
=
delDriver
let
parma
=
{
type
:
datasource
.
type
,
id
:
datasource
.
id
}
if
(
this
.
showView
===
'Datasource'
)
{
method
=
delDs
parma
=
datasource
.
id
}
method
(
parma
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
this
.
$t
(
'commons.delete_success'
))
...
...
@@ -437,7 +438,7 @@ export default {
return
false
}
})
}
,
}
}
}
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论