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
99f3d960
Commit
99f3d960
authored
Oct 30, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浏览
parent
c82ad1b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
57 deletions
+111
-57
index.jsx
src/view/Manage/AssetBrowse/index.jsx
+5
-8
table.jsx
src/view/Manage/AssetBrowse/table.jsx
+0
-0
table.jsx
src/view/Manage/AssetManage/table.jsx
+0
-17
index.jsx
src/view/Manage/AssetResourceBrowse/index.jsx
+102
-6
table.jsx
src/view/Manage/AssetResourceBrowse/table.jsx
+0
-0
add-to-asset.jsx
src/view/Manage/AssetResourceManage/add-to-asset.jsx
+4
-26
No files found.
src/view/Manage/AssetBrowse/index.jsx
View file @
99f3d960
...
@@ -6,7 +6,7 @@ import { ResizableBox } from 'react-resizable';
...
@@ -6,7 +6,7 @@ import { ResizableBox } from 'react-resizable';
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
import
RelationContainer
from
'./Component/RelationContainer'
;
import
RelationContainer
from
'./Component/RelationContainer'
;
import
AssetTable
from
".
./AssetManage/Component/AssetT
able"
;
import
AssetTable
from
".
/t
able"
;
import
Separate
from
'../AssetManage/Component/Separate'
;
import
Separate
from
'../AssetManage/Component/Separate'
;
import
{
AssetBrowseReference
}
from
'../../../util/constant'
;
import
{
AssetBrowseReference
}
from
'../../../util/constant'
;
...
@@ -14,9 +14,6 @@ import { AssetBrowseReference } from '../../../util/constant';
...
@@ -14,9 +14,6 @@ import { AssetBrowseReference } from '../../../util/constant';
import
'./index.less'
;
import
'./index.less'
;
const
AssetBrowse
=
(
props
)
=>
{
const
AssetBrowse
=
(
props
)
=>
{
const
{
reference
=
AssetBrowseReference
}
=
props
;
const
[
nodeParams
,
setNodeParams
]
=
useState
({
centerId
:
''
,
expandId
:
''
,
nodeType
:
''
});
const
[
nodeParams
,
setNodeParams
]
=
useState
({
centerId
:
''
,
expandId
:
''
,
nodeType
:
''
});
const
[
expandTree
,
setExpandTree
]
=
useState
(
true
);
const
[
expandTree
,
setExpandTree
]
=
useState
(
true
);
const
[
expandRelation
,
setExpandRelation
]
=
useState
(
true
);
const
[
expandRelation
,
setExpandRelation
]
=
useState
(
true
);
...
@@ -77,25 +74,25 @@ const AssetBrowse = (props) => {
...
@@ -77,25 +74,25 @@ const AssetBrowse = (props) => {
axis=
'x'
axis=
'x'
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
Infinity
,
Infinity
]
}
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
Infinity
,
Infinity
]
}
>
>
<
AssetTree
centerId=
{
centerId
}
onSelect=
{
onTreeSelect
}
reference=
{
r
eference
}
{
...
props
}
/>
<
AssetTree
centerId=
{
centerId
}
onSelect=
{
onTreeSelect
}
reference=
{
AssetBrowseR
eference
}
{
...
props
}
/>
</
ResizableBox
>
</
ResizableBox
>
{
{
expandTree
&&
<
Separate
width=
{
15
}
/>
expandTree
&&
<
Separate
width=
{
15
}
/>
}
}
<
div
className=
{
rightClasses
}
>
<
div
className=
{
rightClasses
}
>
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
reference=
{
r
eference
}
nodeType=
{
nodeParams
.
nodeType
}
/>
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
reference=
{
AssetBrowseR
eference
}
nodeType=
{
nodeParams
.
nodeType
}
/>
<
Separate
height=
{
15
}
/>
<
Separate
height=
{
15
}
/>
<
div
className=
'flex'
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
<
div
className=
'flex'
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
{
{
expandRelation
&&
<
React
.
Fragment
>
expandRelation
&&
<
React
.
Fragment
>
<
div
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
<
div
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
<
RelationContainer
reference=
{
r
eference
}
nodeParams=
{
nodeParams
}
onChange=
{
onRelationChange
}
resize=
{
resizeRelation
}
/>
<
RelationContainer
reference=
{
AssetBrowseR
eference
}
nodeParams=
{
nodeParams
}
onChange=
{
onRelationChange
}
resize=
{
resizeRelation
}
/>
</
div
>
</
div
>
<
Separate
width=
{
15
}
/>
<
Separate
width=
{
15
}
/>
</
React
.
Fragment
>
</
React
.
Fragment
>
}
}
<
div
style=
{
{
flex
:
1
,
overflow
:
'hidden'
}
}
>
<
div
style=
{
{
flex
:
1
,
overflow
:
'hidden'
}
}
>
<
AssetTable
node
Id=
{
nodeId
}
nodeType=
{
nodeParams
.
nodeType
}
reference=
{
reference
}
onCountChange=
{
onAssetCountChange
}
onFullScreenChange=
{
onFullScreenChange
}
{
...
props
}
/>
<
AssetTable
node
=
{
{
nodeId
}
}
onFullScreenChange=
{
onFullScreenChange
}
{
...
props
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
...
...
src/view/Manage/AssetBrowse/table.jsx
0 → 100644
View file @
99f3d960
This diff is collapsed.
Click to expand it.
src/view/Manage/AssetManage/table.jsx
View file @
99f3d960
...
@@ -61,8 +61,6 @@ const FC = (props) => {
...
@@ -61,8 +61,6 @@ const FC = (props) => {
const
[
permissions
,
setPermissions
]
=
React
.
useState
([])
const
[
permissions
,
setPermissions
]
=
React
.
useState
([])
const
[
loadingPublishStatus
,
setLoadingPublishStatus
]
=
React
.
useState
(
false
)
const
[
loadingPublishStatus
,
setLoadingPublishStatus
]
=
React
.
useState
(
false
)
const
[
publishStatus
,
setPublishStatus
]
=
React
.
useState
()
const
[
publishStatus
,
setPublishStatus
]
=
React
.
useState
()
const
[
loadingRelatedMetadataStatus
,
setLoadingRelatedMetadataStatus
]
=
React
.
useState
(
false
)
const
[
relatedMetadataStatus
,
setRelatedMetadataStatus
]
=
React
.
useState
()
const
$keyword
=
React
.
useMemo
(()
=>
new
Subject
(),
[])
const
$keyword
=
React
.
useMemo
(()
=>
new
Subject
(),
[])
const
[
keyword
,
setKeyword
]
=
React
.
useState
()
const
[
keyword
,
setKeyword
]
=
React
.
useState
()
const
[
searchType
,
setSearchType
]
=
React
.
useState
(
'keyword'
)
const
[
searchType
,
setSearchType
]
=
React
.
useState
(
'keyword'
)
...
@@ -146,7 +144,6 @@ const FC = (props) => {
...
@@ -146,7 +144,6 @@ const FC = (props) => {
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
getElements
()
getElements
()
getPublishStatus
()
getPublishStatus
()
getResourceRelatedMetadataStatus
()
const
$$keyword
=
$keyword
.
pipe
(
debounceTime
(
1000
)).
subscribe
((
keyword
)
=>
{
const
$$keyword
=
$keyword
.
pipe
(
debounceTime
(
1000
)).
subscribe
((
keyword
)
=>
{
setArgsAndPage
({
keyword
})
setArgsAndPage
({
keyword
})
...
@@ -379,20 +376,6 @@ const FC = (props) => {
...
@@ -379,20 +376,6 @@ const FC = (props) => {
})
})
}
}
const
getResourceRelatedMetadataStatus
=
()
=>
{
setLoadingRelatedMetadataStatus
(
true
)
dispatch
({
type
:
'assetmanage.getResourceRelatedMetadataStatus'
,
callback
:
data
=>
{
setLoadingRelatedMetadataStatus
(
false
)
setRelatedMetadataStatus
(
data
)
},
error
:
()
=>
{
setLoadingRelatedMetadataStatus
(
false
)
}
})
}
const
getElements
=
()
=>
{
const
getElements
=
()
=>
{
setLoadingElements
(
true
)
setLoadingElements
(
true
)
dispatch
({
dispatch
({
...
...
src/view/Manage/AssetResourceBrowse/index.jsx
View file @
99f3d960
import
React
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
classNames
from
'classnames'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
ResizableBox
}
from
'react-resizable'
;
import
AssetBrowse
from
'../AssetBrowse'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
import
RelationContainer
from
'../AssetBrowse/Component/RelationContainer'
;
import
AssetTable
from
"./table"
;
import
Separate
from
'../AssetManage/Component/Separate'
;
import
{
ResourceBrowseReference
}
from
'../../../util/constant'
;
import
{
ResourceBrowseReference
}
from
'../../../util/constant'
;
const
AssetResourceBrowse
=
(
props
)
=>
{
import
'../AssetBrowse/index.less'
;
const
FC
=
(
props
)
=>
{
const
[
nodeParams
,
setNodeParams
]
=
useState
({
centerId
:
''
,
expandId
:
''
,
nodeType
:
''
});
const
[
expandTree
,
setExpandTree
]
=
useState
(
true
);
const
[
expandRelation
,
setExpandRelation
]
=
useState
(
true
);
const
[
assetCount
,
setAssetCount
]
=
useState
(
0
);
const
[
resizeRelation
,
setResizeRelation
]
=
useState
(
false
);
const
[
assetFullScreen
,
setAssetFullScreen
]
=
useState
(
false
);
const
{
centerId
,
expandId
}
=
nodeParams
;
const
onTreeSelect
=
(
value
,
type
)
=>
{
setNodeParams
({
centerId
:
value
||
''
,
expandId
:
''
,
nodeType
:
type
});
}
const
treeToggleClick
=
()
=>
{
setExpandTree
(
!
expandTree
);
setResizeRelation
(
!
resizeRelation
);
}
const
relationToggleClick
=
()
=>
{
setExpandRelation
(
!
expandRelation
);
setResizeRelation
(
!
resizeRelation
);
}
const
onRelationChange
=
(
data
)
=>
{
setNodeParams
(
data
);
}
const
onAssetCountChange
=
(
count
)
=>
{
setAssetCount
(
count
);
}
const
onFullScreenChange
=
(
value
)
=>
{
setAssetFullScreen
(
value
);
}
let
nodeId
=
''
;
if
((
expandId
||
''
)
!==
''
)
{
nodeId
=
expandId
;
}
else
{
nodeId
=
centerId
;
}
const
classes
=
classNames
(
'asset-browse'
,
{
'asset-browse-tree-collapse'
:
!
expandTree
,
'asset-browse-relation-collapse'
:
!
expandRelation
,
});
const
rightClasses
=
classNames
(
'right'
,
{
'right-fullscreen'
:
assetFullScreen
});
return
(
return
(
<
AssetBrowse
reference=
{
ResourceBrowseReference
}
{
...
props
}
/>
<
div
className=
{
classes
}
>
<
ResizableBox
className=
'left'
width=
{
230
}
height=
{
Infinity
}
axis=
'x'
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
Infinity
,
Infinity
]
}
>
<
AssetTree
centerId=
{
centerId
}
onSelect=
{
onTreeSelect
}
reference=
{
ResourceBrowseReference
}
{
...
props
}
/>
</
ResizableBox
>
{
expandTree
&&
<
Separate
width=
{
15
}
/>
}
<
div
className=
{
rightClasses
}
>
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
reference=
{
ResourceBrowseReference
}
nodeType=
{
nodeParams
.
nodeType
}
/>
<
Separate
height=
{
15
}
/>
<
div
className=
'flex'
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
{
expandRelation
&&
<
React
.
Fragment
>
<
div
style=
{
{
flex
:
1
,
height
:
'100%'
,
overflow
:
'hidden'
}
}
>
<
RelationContainer
reference=
{
ResourceBrowseReference
}
nodeParams=
{
nodeParams
}
onChange=
{
onRelationChange
}
resize=
{
resizeRelation
}
/>
</
div
>
<
Separate
width=
{
15
}
/>
</
React
.
Fragment
>
}
<
div
style=
{
{
flex
:
1
,
overflow
:
'hidden'
}
}
>
<
AssetTable
node=
{
{
nodeId
}
}
onFullScreenChange=
{
onFullScreenChange
}
{
...
props
}
/>
</
div
>
</
div
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
<
div
className=
'relation-toggle'
onClick=
{
relationToggleClick
}
>
{
expandRelation
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
</
div
>
)
)
}
}
export
default
AssetResourceBrowse
;
export
default
FC
;
\ No newline at end of file
\ No newline at end of file
src/view/Manage/AssetResourceBrowse/table.jsx
0 → 100644
View file @
99f3d960
This diff is collapsed.
Click to expand it.
src/view/Manage/AssetResourceManage/add-to-asset.jsx
View file @
99f3d960
...
@@ -240,7 +240,7 @@ export const Basic = React.forwardRef(function ({ items, defaultValue }, ref) {
...
@@ -240,7 +240,7 @@ export const Basic = React.forwardRef(function ({ items, defaultValue }, ref) {
label=
'资产信息'
label=
'资产信息'
rules=
{
[{
required
:
true
,
message
:
'请填写资产信息!'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请填写资产信息!'
}]
}
>
>
<
AssetInfoItem
/>
<
AssetInfoItem
elements=
{
defaultValue
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
React
.
Fragment
>
:
<
React
.
Fragment
>
</
React
.
Fragment
>
:
<
React
.
Fragment
>
<
Form
.
Item
<
Form
.
Item
...
@@ -264,9 +264,8 @@ export const Basic = React.forwardRef(function ({ items, defaultValue }, ref) {
...
@@ -264,9 +264,8 @@ export const Basic = React.forwardRef(function ({ items, defaultValue }, ref) {
)
)
})
})
const
AssetInfoItem
=
({
value
,
onChange
})
=>
{
const
AssetInfoItem
=
({
value
,
elements
,
onChange
})
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
elements
,
setElements
]
=
React
.
useState
()
const
[
groups
,
setGroups
]
=
React
.
useState
()
const
[
groups
,
setGroups
]
=
React
.
useState
()
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
...
@@ -280,29 +279,8 @@ const AssetInfoItem = ({ value, onChange }) => {
...
@@ -280,29 +279,8 @@ const AssetInfoItem = ({ value, onChange }) => {
},
[
value
])
},
[
value
])
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
getElements
()
setGroups
(
Array
.
from
(
new
Set
((
elements
??[]).
map
(
item
=>
item
.
type
))))
},
[])
},
[
elements
])
const
getElements
=
()
=>
{
setLoading
(
true
)
dispatch
({
type
:
'assetmanage.listElements'
,
payload
:
{
params
:
{
range
:
getAssetRange
(
ResourceManageReference
),
dataAssetType
:
getAssetType
(
ResourceManageReference
),
}
},
callback
:
data
=>
{
setLoading
(
false
)
setElements
(
data
)
setGroups
(
Array
.
from
(
new
Set
((
data
??[]).
map
(
item
=>
item
.
type
))))
},
error
:
()
=>
{
setLoading
(
false
)
}
})
}
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
const
newElements
=
[...
elements
]
const
newElements
=
[...
elements
]
...
...
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