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
f2ecfc0f
Commit
f2ecfc0f
authored
Apr 25, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产挂载
parent
92905c60
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
30 deletions
+85
-30
AssetTable.jsx
src/view/Manage/AssetManage/components/AssetTable.jsx
+3
-3
AssetMount.jsx
src/view/Manage/AssetRecycle/AssetMount.jsx
+0
-23
AssetMount.jsx
src/view/Manage/AssetRecycle/Components/AssetMount.jsx
+58
-0
index.jsx
src/view/Manage/AssetRecycle/index.jsx
+24
-4
No files found.
src/view/Manage/AssetManage/components/AssetTable.jsx
View file @
f2ecfc0f
...
@@ -246,7 +246,7 @@ const AssetTable = (props) =>{
...
@@ -246,7 +246,7 @@ const AssetTable = (props) =>{
title=
'资产要素导入'
title=
'资产要素导入'
visible=
{
importElementVisible
}
visible=
{
importElementVisible
}
onVisibleChange=
{
onImportElementVisibleChange
}
onVisibleChange=
{
onImportElementVisibleChange
}
trigger=
"
click
"
>
trigger=
"
hover
"
>
<
Button
type=
"primary"
>
导入
</
Button
>
<
Button
type=
"primary"
>
导入
</
Button
>
</
Popover
>
</
Popover
>
<
Button
type=
"primary"
onClick=
{
onExportElementBtnClick
}
>
导出
</
Button
>
<
Button
type=
"primary"
onClick=
{
onExportElementBtnClick
}
>
导出
</
Button
>
...
@@ -256,7 +256,7 @@ const AssetTable = (props) =>{
...
@@ -256,7 +256,7 @@ const AssetTable = (props) =>{
title=
'资产要素过滤'
title=
'资产要素过滤'
visible=
{
filterElementVisible
}
visible=
{
filterElementVisible
}
onVisibleChange=
{
onFilterElementVisibleChange
}
onVisibleChange=
{
onFilterElementVisibleChange
}
trigger=
"
click
"
>
trigger=
"
hover
"
>
<
Button
type=
"primary"
>
过滤
</
Button
>
<
Button
type=
"primary"
>
过滤
</
Button
>
</
Popover
>
</
Popover
>
</
Space
>
</
Space
>
...
@@ -270,7 +270,7 @@ const AssetTable = (props) =>{
...
@@ -270,7 +270,7 @@ const AssetTable = (props) =>{
title=
'资产导入'
title=
'资产导入'
visible=
{
importAssetVisible
}
visible=
{
importAssetVisible
}
onVisibleChange=
{
onImportAssetVisibleChange
}
onVisibleChange=
{
onImportAssetVisibleChange
}
trigger=
"
click
"
>
trigger=
"
hover
"
>
<
Button
type=
"primary"
>
<
Button
type=
"primary"
>
导入
导入
</
Button
>
</
Button
>
...
...
src/view/Manage/AssetRecycle/AssetMount.jsx
deleted
100644 → 0
View file @
92905c60
import
React
from
"react"
;
import
{
Modal
}
from
"antd"
;
import
LeftTree
from
'../AssetManage/components/LeftTree'
;
const
AssetMount
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
item
}
=
props
return
(
<
Modal
title=
'挂载详情'
visible=
{
visible
}
width=
{
800
}
onCancel=
{
()
=>
{
onCancel
&&
onCancel
()}
}
>
<
LeftTree
readOnly=
{
true
}
/>
</
Modal
>
)
}
export
default
AssetMount
;
\ No newline at end of file
src/view/Manage/AssetRecycle/Components/AssetMount.jsx
0 → 100644
View file @
f2ecfc0f
import
React
,
{
useState
}
from
"react"
;
import
{
Modal
}
from
"antd"
;
import
{
dispatch
}
from
'../../../../model'
;
import
LeftTree
from
'../../AssetManage/components/LeftTree'
;
import
{
showMessage
}
from
'../../../../util'
;
const
AssetMount
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
item
}
=
props
;
const
[
nodeId
,
setNodeId
]
=
useState
(
null
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
onOk
=
()
=>
{
if
(
!
nodeId
)
{
showMessage
(
'warn'
,
'请先选择资产目录'
);
return
;
}
setConfirmLoading
(
true
);
dispatch
({
type
:
'assetmanage.loadDataAssets'
,
payload
:
{
params
:
{
dirId
:
nodeId
,
},
data
:
[
item
.
id
||
''
]
},
callback
:
data
=>
{
setConfirmLoading
(
false
);
onCancel
&&
onCancel
(
true
);
},
error
:
()
=>
{
setConfirmLoading
(
false
);
}
})
}
return
(
<
Modal
title=
'挂载详情'
visible=
{
visible
}
width=
{
500
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
()
=>
{
onCancel
&&
onCancel
()}
}
onOk=
{
onOk
}
>
<
LeftTree
readOnly=
{
true
}
setNodeId=
{
(
data
)
=>
{
setNodeId
(
data
);
}
}
/>
</
Modal
>
)
}
export
default
AssetMount
;
\ No newline at end of file
src/view/Manage/AssetRecycle/index.jsx
View file @
f2ecfc0f
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Table
,
Pagination
,
Space
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Table
,
Pagination
,
Space
,
Tooltip
,
Button
,
Modal
}
from
'antd'
;
import
{
ReconciliationOutlined
,
DeleteOutlined
,
UndoOutlined
}
from
'@ant-design/icons'
;
import
{
ReconciliationOutlined
,
DeleteOutlined
,
UndoOutlined
}
from
'@ant-design/icons'
;
import
{
dispatchLatest
}
from
'../../../model'
;
import
{
dispatchLatest
}
from
'../../../model'
;
import
AssetDetail
from
'../AssetManage/components/AssetDetail'
;
import
AssetDetail
from
'../AssetManage/components/AssetDetail'
;
import
AssetMount
from
'./AssetMount'
;
import
AssetMount
from
'./Components/AssetMount'
;
import
{
showMessage
}
from
'../../../util'
;
import
'./index.less'
;
import
'./index.less'
;
...
@@ -20,6 +21,8 @@ const AssetRecycle = (props) => {
...
@@ -20,6 +21,8 @@ const AssetRecycle = (props) => {
const
{
pageNum
,
pageSize
}
=
pagination
;
const
{
pageNum
,
pageSize
}
=
pagination
;
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
useEffect
(()
=>
{
useEffect
(()
=>
{
getAssets
();
getAssets
();
...
@@ -98,15 +101,31 @@ const AssetRecycle = (props) => {
...
@@ -98,15 +101,31 @@ const AssetRecycle = (props) => {
}
}
const
deleteItem
=
(
record
)
=>
{
const
deleteItem
=
(
record
)
=>
{
modal
.
confirm
({
title
:
'提示!'
,
content
:
'您确定要永久删除该资产吗?'
,
onOk
:
()
=>
{
dispatchLatest
({
type
:
'assetmanage.deleteDataAssets'
,
payload
:
{
data
:
[
record
.
id
]
},
callback
:
()
=>
{
showMessage
(
'success'
,
'资产删除成功'
);
getAssets
();
}
})
}
});
}
}
const
onAssetDetailCancel
=
()
=>
{
const
onAssetDetailCancel
=
()
=>
{
setAssetDetailVisible
(
false
);
setAssetDetailVisible
(
false
);
}
}
const
onAssetMountCancel
=
()
=>
{
const
onAssetMountCancel
=
(
refresh
=
false
)
=>
{
setAssetMountVisible
(
false
);
setAssetMountVisible
(
false
);
refresh
&&
getAssets
();
}
}
return
(
return
(
...
@@ -145,6 +164,7 @@ const AssetRecycle = (props) => {
...
@@ -145,6 +164,7 @@ const AssetRecycle = (props) => {
item=
{
currentAsset
}
item=
{
currentAsset
}
onCancel=
{
onAssetMountCancel
}
onCancel=
{
onAssetMountCancel
}
/>
/>
{
contextHolder
}
</
div
>
</
div
>
);
);
}
}
...
...
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