Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
0bf01bc7
Commit
0bf01bc7
authored
Dec 04, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产删除不要的回收站代码
parent
e1fb04ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
App.js
src/App.js
+0
-1
index.jsx
src/view/Manage/AssetBrowse/index.jsx
+1
-1
AssetTree.jsx
src/view/Manage/AssetManage/Component/AssetTree.jsx
+8
-13
AssetMount.jsx
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
+0
-1
No files found.
src/App.js
View file @
0bf01bc7
...
@@ -72,7 +72,6 @@ export class App extends React.Component {
...
@@ -72,7 +72,6 @@ export class App extends React.Component {
reference
=
'metadata'
reference
=
'metadata'
readOnly
=
{
true
}
readOnly
=
{
true
}
showCustom
=
{
false
}
showCustom
=
{
false
}
showTrash
=
{
false
}
checkable
=
{
true
}
checkable
=
{
true
}
onCheck
=
{(
values
)
=>
{
onCheck
=
{(
values
)
=>
{
callback
&&
callback
(
values
);
callback
&&
callback
(
values
);
...
...
src/view/Manage/AssetBrowse/index.jsx
View file @
0bf01bc7
...
@@ -29,7 +29,7 @@ const AssetBrowse = (props) => {
...
@@ -29,7 +29,7 @@ const AssetBrowse = (props) => {
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
div
className=
'left'
>
<
div
className=
'left'
>
<
AssetTree
onSelect=
{
onTreeSelect
}
showTrash=
{
false
}
readOnly
{
...
props
}
/>
<
AssetTree
onSelect=
{
onTreeSelect
}
readOnly
{
...
props
}
/>
</
div
>
</
div
>
<
div
className=
'tree-toggle-wrap'
>
<
div
className=
'tree-toggle-wrap'
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
...
...
src/view/Manage/AssetManage/Component/AssetTree.jsx
View file @
0bf01bc7
...
@@ -13,7 +13,7 @@ import './AssetTree.less';
...
@@ -13,7 +13,7 @@ import './AssetTree.less';
const
AssetTree
=
(
props
)
=>
{
const
AssetTree
=
(
props
)
=>
{
const
{
readOnly
=
false
,
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
''
,
showCustom
=
true
,
showTrash
=
true
}
=
props
;
const
{
readOnly
=
false
,
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
''
,
showCustom
=
true
}
=
props
;
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
([]);
const
[
treeData
,
setTreeData
]
=
useState
([]);
...
@@ -96,9 +96,6 @@ const AssetTree = (props) => {
...
@@ -96,9 +96,6 @@ const AssetTree = (props) => {
if
(
!
showCustom
)
{
if
(
!
showCustom
)
{
newData
=
(
newData
||
[]).
filter
(
item
=>
item
.
type
!==
'custom'
);
newData
=
(
newData
||
[]).
filter
(
item
=>
item
.
type
!==
'custom'
);
}
}
if
(
!
showTrash
)
{
newData
=
(
newData
||
[]).
filter
(
item
=>
item
.
type
!==
'RecycleBin'
);
}
setTreeData
(
newData
);
setTreeData
(
newData
);
...
@@ -238,7 +235,7 @@ const AssetTree = (props) => {
...
@@ -238,7 +235,7 @@ const AssetTree = (props) => {
}
}
const
addDir
=
()
=>
{
const
addDir
=
()
=>
{
if
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)
return
;
if
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
)
return
;
setUpdateDirectoryAction
(
'add'
);
setUpdateDirectoryAction
(
'add'
);
setUpdateDirectoryModalVisible
(
true
);
setUpdateDirectoryModalVisible
(
true
);
...
@@ -246,8 +243,6 @@ const AssetTree = (props) => {
...
@@ -246,8 +243,6 @@ const AssetTree = (props) => {
const
editDir
=
()
=>
{
const
editDir
=
()
=>
{
if
(
currentDirType
===
'RecycleBin'
)
return
;
if
((
currentDirType
||
''
)
===
''
)
{
if
((
currentDirType
||
''
)
===
''
)
{
setUpdateDirectoryAction
(
'edit'
);
setUpdateDirectoryAction
(
'edit'
);
...
@@ -266,7 +261,7 @@ const AssetTree = (props) => {
...
@@ -266,7 +261,7 @@ const AssetTree = (props) => {
}
}
const
importDir
=
()
=>
{
const
importDir
=
()
=>
{
if
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)
return
;
if
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
)
return
;
setImportDirectoryVisible
(
true
);
setImportDirectoryVisible
(
true
);
}
}
...
@@ -292,7 +287,7 @@ const AssetTree = (props) => {
...
@@ -292,7 +287,7 @@ const AssetTree = (props) => {
}
}
const
deleteDir
=
()
=>
{
const
deleteDir
=
()
=>
{
if
(
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)
return
;
if
(
currentDirType
===
'custom'
)
return
;
if
(
currentDirId
)
{
if
(
currentDirId
)
{
modal
.
confirm
({
modal
.
confirm
({
...
@@ -465,16 +460,16 @@ const AssetTree = (props) => {
...
@@ -465,16 +460,16 @@ const AssetTree = (props) => {
}
}
}
}
>
>
<
Tooltip
title=
"新增目录"
>
<
Tooltip
title=
"新增目录"
>
<
PlusOutlined
onClick=
{
addDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin
'
)?
'#bfbfbf'
:
''
}
}
/>
<
PlusOutlined
onClick=
{
addDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom
'
)?
'#bfbfbf'
:
''
}
}
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"修改"
className=
'ml-3'
>
<
Tooltip
title=
"修改"
className=
'ml-3'
>
<
EditOutlined
onClick=
{
editDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'RecycleBin'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'RecycleBin'
)?
'#bfbfbf'
:
'
'
}
}
/>
<
EditOutlined
onClick=
{
editDir
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer
'
}
}
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"刷新"
className=
'ml-3'
>
<
Tooltip
title=
"刷新"
className=
'ml-3'
>
<
SyncOutlined
onClick=
{
refreshTree
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
SyncOutlined
onClick=
{
refreshTree
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"导入"
className=
'ml-3'
>
<
Tooltip
title=
"导入"
className=
'ml-3'
>
<
ImportOutlined
onClick=
{
importDir
}
style=
{
{
fontSize
:
16
,
cursor
:(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin
'
)?
'#bfbfbf'
:
''
}
}
/>
<
ImportOutlined
onClick=
{
importDir
}
style=
{
{
fontSize
:
16
,
cursor
:(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom-root'
||
currentDirType
===
'custom
'
)?
'#bfbfbf'
:
''
}
}
/>
</
Tooltip
>
</
Tooltip
>
<
Dropdown
overlay=
{
exportMenu
}
placement=
"bottomLeft"
className=
'ml-3'
>
<
Dropdown
overlay=
{
exportMenu
}
placement=
"bottomLeft"
className=
'ml-3'
>
<
Tooltip
title=
"导出"
>
<
Tooltip
title=
"导出"
>
...
@@ -482,7 +477,7 @@ const AssetTree = (props) => {
...
@@ -482,7 +477,7 @@ const AssetTree = (props) => {
</
Tooltip
>
</
Tooltip
>
</
Dropdown
>
</
Dropdown
>
<
Tooltip
title=
"删除"
className=
'ml-3'
>
<
Tooltip
title=
"删除"
className=
'ml-3'
>
<
DeleteOutlined
onClick=
{
deleteDir
}
style=
{
{
fontSize
:
16
,
cursor
:(
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom'
||
currentDirType
===
'RecycleBin
'
)?
'#bfbfbf'
:
''
}
}
/>
<
DeleteOutlined
onClick=
{
deleteDir
}
style=
{
{
fontSize
:
16
,
cursor
:(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
,
color
:
(
currentDirType
===
'custom
'
)?
'#bfbfbf'
:
''
}
}
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"自定义"
className=
'ml-3'
>
<
Tooltip
title=
"自定义"
className=
'ml-3'
>
<
SettingOutlined
onClick=
{
customDir
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
SettingOutlined
onClick=
{
customDir
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
...
...
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
View file @
0bf01bc7
...
@@ -62,7 +62,6 @@ const AssetMount = (props) => {
...
@@ -62,7 +62,6 @@ const AssetMount = (props) => {
readOnly=
{
true
}
readOnly=
{
true
}
checkable=
{
true
}
checkable=
{
true
}
showCustom=
{
false
}
showCustom=
{
false
}
showTrash=
{
false
}
onCheck=
{
onCheck
}
onCheck=
{
onCheck
}
tableId=
{
(
refrence
===
'asset-manage'
&&
(
ids
||
[].
length
>
0
))?
ids
[
0
]:
''
}
tableId=
{
(
refrence
===
'asset-manage'
&&
(
ids
||
[].
length
>
0
))?
ids
[
0
]:
''
}
reference=
'mount'
reference=
'mount'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment