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
688c802f
Commit
688c802f
authored
Oct 24, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产管理
parent
3b52d2f5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
33 deletions
+90
-33
assetmanage.js
src/model/assetmanage.js
+6
-0
dataassetmanager.js
src/service/dataassetmanager.js
+9
-1
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+2
-2
MetadataInfo.jsx
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
+69
-26
change-catalog.jsx
src/view/Manage/AssetManage/change-catalog.jsx
+1
-1
tree.jsx
src/view/Manage/AssetManage/tree.jsx
+1
-1
change-catalog.jsx
src/view/Manage/AssetResourceManage/change-catalog.jsx
+1
-1
tree.jsx
src/view/Manage/AssetResourceManage/tree.jsx
+1
-1
No files found.
src/model/assetmanage.js
View file @
688c802f
...
@@ -96,6 +96,12 @@ export function* existDataAsset(payload) {
...
@@ -96,6 +96,12 @@ export function* existDataAsset(payload) {
export
function
*
queryAllDirectoryAsTree
()
{
export
function
*
queryAllDirectoryAsTree
()
{
return
yield
call
(
service
.
queryAllDirectoryAsTree
);
return
yield
call
(
service
.
queryAllDirectoryAsTree
);
}
}
export
function
*
queryResourceManageTree
()
{
return
yield
call
(
service
.
queryResourceManageTree
);
}
export
function
*
queryDataAssetManageTree
()
{
return
yield
call
(
service
.
queryDataAssetManageTree
);
}
export
function
*
queryResourceDirectoryAsTree
()
{
export
function
*
queryResourceDirectoryAsTree
()
{
return
yield
call
(
service
.
queryResourceDirectoryAsTree
);
return
yield
call
(
service
.
queryResourceDirectoryAsTree
);
}
}
...
...
src/service/dataassetmanager.js
View file @
688c802f
...
@@ -132,8 +132,16 @@ export function queryAllDirectoryAsTree() {
...
@@ -132,8 +132,16 @@ export function queryAllDirectoryAsTree() {
return
GetJSON
(
"/dataassetmanager/directoryApi/queryAllDirectoryAsTree"
);
return
GetJSON
(
"/dataassetmanager/directoryApi/queryAllDirectoryAsTree"
);
}
}
export
function
queryResourceManageTree
()
{
return
GetJSON
(
"/dataassetmanager/resourceApi/queryResourceManageTree"
)
}
export
function
queryDataAssetManageTree
()
{
return
GetJSON
(
"/dataassetmanager/dataAssetApi/queryDataAssetManageTree"
);
}
export
function
queryResourceDirectoryAsTree
()
{
export
function
queryResourceDirectoryAsTree
()
{
return
Pos
tJSON
(
"/dataassetmanager/directoryApi/querySourceTypeAsTree"
);
return
Ge
tJSON
(
"/dataassetmanager/directoryApi/querySourceTypeAsTree"
);
}
}
export
function
queryAssetDirectoryAsTree
()
{
export
function
queryAssetDirectoryAsTree
()
{
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
688c802f
...
@@ -564,7 +564,7 @@ const AssetAction = (props) => {
...
@@ -564,7 +564,7 @@ const AssetAction = (props) => {
key={_index}
key={_index}
style={{ marginBottom: (_index===sameAttributeElements.length-1)? 0 : 15 }}
style={{ marginBottom: (_index===sameAttributeElements.length-1)? 0 : 15 }}
>
>
{ (element.metadataItem==='是') ? <MetadataInfo /> : <Input disabled={element.manualMaintain==='否'} /> }
{ (element.metadataItem==='是') ? <MetadataInfo
reference={reference}
/> : <Input disabled={element.manualMaintain==='否'} /> }
</Form.Item>
</Form.Item>
);
);
})
})
...
@@ -577,7 +577,7 @@ const AssetAction = (props) => {
...
@@ -577,7 +577,7 @@ const AssetAction = (props) => {
return (
return (
<Descriptions.Item label={<div className='title-common' style={{ textAlign: 'right', width: 60 }}>{item.name||''}</div>} key={index} style={{ paddingBottom: (index===sameAttributeElements.length-1)? 0 : 10 }}>
<Descriptions.Item label={<div className='title-common' style={{ textAlign: 'right', width: 60 }}>{item.name||''}</div>} key={index} style={{ paddingBottom: (index===sameAttributeElements.length-1)? 0 : 10 }}>
{
{
item.name==='资产项' ? <MetadataInfo config={false} value={item.value||''} /> : <span className='text-color'>{highlightSearchContentByTerms(item.value||'', terms)}</span>
item.name==='资产项' ? <MetadataInfo
reference={reference}
config={false} value={item.value||''} /> : <span className='text-color'>{highlightSearchContentByTerms(item.value||'', terms)}</span>
}
}
</Descriptions.Item>
</Descriptions.Item>
);
);
...
...
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
View file @
688c802f
...
@@ -5,8 +5,9 @@ import { SettingFilled } from '@ant-design/icons'
...
@@ -5,8 +5,9 @@ import { SettingFilled } from '@ant-design/icons'
import
{
highlightSearchContentByTerms
,
IsArr
}
from
'../../../../util'
import
{
highlightSearchContentByTerms
,
IsArr
}
from
'../../../../util'
import
{
AppContext
}
from
'../../../../App'
import
{
AppContext
}
from
'../../../../App'
import
{
MetadataColumnTooltipTitle
}
from
'../../AssetResourceManage/table'
import
{
MetadataColumnTooltipTitle
}
from
'../../AssetResourceManage/table'
import
{
AssetManageReference
,
ResourceManageReference
}
from
'../../../../util/constant'
const
MetadataInfo
=
({
value
=
''
,
config
=
true
,
terms
=
[]
})
=>
{
const
MetadataInfo
=
({
value
=
''
,
reference
=
AssetManageReference
,
config
=
true
,
terms
=
[]
})
=>
{
const
app
=
React
.
useContext
(
AppContext
)
const
app
=
React
.
useContext
(
AppContext
)
const
decodeData
=
React
.
useMemo
(()
=>
{
const
decodeData
=
React
.
useMemo
(()
=>
{
if
(
value
)
{
if
(
value
)
{
...
@@ -21,44 +22,86 @@ const MetadataInfo = ({ value = '', config = true, terms = [] }) => {
...
@@ -21,44 +22,86 @@ const MetadataInfo = ({ value = '', config = true, terms = [] }) => {
},
[
value
])
},
[
value
])
return
(
return
(
<
div
className=
'flex'
>
<
React
.
Fragment
>
{
{
(
typeof
decodeData
===
'string'
)
?
<
span
style=
{
{
marginRight
:
5
}
}
>
reference
===
ResourceManageReference
?
<
ResourceItem
data=
{
decodeData
}
config=
{
config
}
terms=
{
terms
}
/>
:
<
AssetItem
data=
{
decodeData
}
config=
{
config
}
terms=
{
terms
}
/>
{
highlightSearchContentByTerms
(
decodeData
,
terms
)
}
}
</
span
>
:
(
IsArr
(
decodeData
)
?
<
div
className=
'flex'
style=
{
{
flexDirection
:
'column'
}
}
>
</
React
.
Fragment
>
{
)
(
decodeData
??[]).
map
((
item
,
index
)
=>
<
span
key=
{
index
}
>
}
export
default
MetadataInfo
const
ResourceItem
=
({
data
,
config
,
terms
})
=>
{
const
app
=
React
.
useContext
(
AppContext
)
return
(
<
div
className=
'flex'
>
{
(
typeof
data
===
'string'
)
?
<
span
style=
{
{
marginRight
:
5
}
}
>
{
highlightSearchContentByTerms
(
data
,
terms
)
}
</
span
>
:
(
IsArr
(
data
)
?
<
div
className=
'flex'
style=
{
{
flexDirection
:
'column'
}
}
>
{
(
data
??[]).
length
>
0
&&
<
span
>
<
Tooltip
<
Tooltip
overlayClassName=
'tooltip-common'
overlayClassName=
'tooltip-common'
title=
{
<
MetadataColumnTooltipTitle
data=
{
[
item
]
}
/>
}
title=
{
<
MetadataColumnTooltipTitle
data=
{
data
}
/>
}
>
>
<
a
<
a
onClick=
{
()
=>
{
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-message'
,
message
:
'data-govern-show-metadata-message'
,
data
:
item
data
:
data
[
0
]
})
})
}
}
}
}
style=
{
{
marginRight
:
5
,
marginTop
:
config
?
5
:
0
}
}
style=
{
{
marginRight
:
5
,
marginTop
:
config
?
5
:
0
}
}
>
>
{
highlightSearchContentByTerms
(
item
.
enName
,
terms
)
}
{
highlightSearchContentByTerms
(
data
[
0
]
.
enName
,
terms
)
}
</
a
>
</
a
>
</
Tooltip
>
</
Tooltip
>
{
config
&&
<
Button
type=
'text'
icon=
{
<
SettingFilled
/>
}
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-list-message'
,
data
:
(
typeof
decodeData
===
'string'
)
?
{}
:
item
})
}
}
/>
}
</
span
>
</
span
>
)
}
}
</
div
>
:
null
)
</
div
>
:
null
)
}
}
{
config
&&
<
Button
type=
'text'
icon=
{
<
SettingFilled
/>
}
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-list-message'
,
data
:
(
typeof
data
===
'string'
)
?
{}
:
data
[
0
]
})
}
}
/>
}
</
div
>
</
div
>
)
)
}
}
export
default
MetadataInfo
const
AssetItem
=
({
data
,
config
,
terms
})
=>
{
\ No newline at end of file
return
(
<
div
className=
'flex'
>
{
(
typeof
data
===
'string'
)
?
<
span
style=
{
{
marginRight
:
5
}
}
>
{
highlightSearchContentByTerms
(
data
,
terms
)
}
</
span
>
:
(
IsArr
(
data
)
?
<
div
className=
'flex'
style=
{
{
flexDirection
:
'column'
}
}
>
{
(
data
??[]).
map
((
item
,
index
)
=>
<
span
key=
{
index
}
>
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
MetadataColumnTooltipTitle
data=
{
[
item
]
}
/>
}
>
<
a
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-message'
,
data
:
item
})
}
}
style=
{
{
marginRight
:
5
,
marginTop
:
config
?
5
:
0
}
}
>
{
highlightSearchContentByTerms
(
item
.
enName
,
terms
)
}
</
a
>
</
Tooltip
>
</
span
>
)
}
</
div
>
:
null
)
}
</
div
>
)
}
\ No newline at end of file
src/view/Manage/AssetManage/change-catalog.jsx
View file @
688c802f
...
@@ -136,7 +136,7 @@ export const Basic = React.forwardRef(function ({ items, onCheck }, ref) {
...
@@ -136,7 +136,7 @@ export const Basic = React.forwardRef(function ({ items, onCheck }, ref) {
const
getTreeData
=
()
=>
{
const
getTreeData
=
()
=>
{
setLoading
(
true
)
setLoading
(
true
)
dispatch
({
dispatch
({
type
:
'assetmanage.query
AllDirectoryAs
Tree'
,
type
:
'assetmanage.query
DataAssetManage
Tree'
,
callback
:
data
=>
{
callback
:
data
=>
{
setLoading
(
false
)
setLoading
(
false
)
const
newData
=
(
data
??[]).
filter
(
item
=>
item
.
resourceType
!==
'custom'
)
const
newData
=
(
data
??[]).
filter
(
item
=>
item
.
resourceType
!==
'custom'
)
...
...
src/view/Manage/AssetManage/tree.jsx
View file @
688c802f
...
@@ -172,7 +172,7 @@ const FC = (props) => {
...
@@ -172,7 +172,7 @@ const FC = (props) => {
setLoading
(
true
)
setLoading
(
true
)
setSelectedKey
(
prevSelectedKey
=>
{
setSelectedKey
(
prevSelectedKey
=>
{
dispatch
({
dispatch
({
type
:
'assetmanage.query
AllDirectoryAs
Tree'
,
type
:
'assetmanage.query
DataAssetManage
Tree'
,
callback
:
data
=>
{
callback
:
data
=>
{
setLoading
(
false
)
setLoading
(
false
)
setLoadedKeys
([])
setLoadedKeys
([])
...
...
src/view/Manage/AssetResourceManage/change-catalog.jsx
View file @
688c802f
...
@@ -136,7 +136,7 @@ export const Basic = React.forwardRef(function ({ items, onCheck }, ref) {
...
@@ -136,7 +136,7 @@ export const Basic = React.forwardRef(function ({ items, onCheck }, ref) {
const
getTreeData
=
()
=>
{
const
getTreeData
=
()
=>
{
setLoading
(
true
)
setLoading
(
true
)
dispatch
({
dispatch
({
type
:
'assetmanage.queryResource
DirectoryAs
Tree'
,
type
:
'assetmanage.queryResource
Manage
Tree'
,
callback
:
data
=>
{
callback
:
data
=>
{
setLoading
(
false
)
setLoading
(
false
)
const
newData
=
(
data
??[]).
filter
(
item
=>
item
.
resourceType
!==
'custom'
)
const
newData
=
(
data
??[]).
filter
(
item
=>
item
.
resourceType
!==
'custom'
)
...
...
src/view/Manage/AssetResourceManage/tree.jsx
View file @
688c802f
...
@@ -203,7 +203,7 @@ const FC = (props) => {
...
@@ -203,7 +203,7 @@ const FC = (props) => {
setLoading
(
true
)
setLoading
(
true
)
setSelectedKey
(
prevSelectedKey
=>
{
setSelectedKey
(
prevSelectedKey
=>
{
dispatch
({
dispatch
({
type
:
'assetmanage.queryResource
DirectoryAs
Tree'
,
type
:
'assetmanage.queryResource
Manage
Tree'
,
callback
:
data
=>
{
callback
:
data
=>
{
setLoading
(
false
)
setLoading
(
false
)
setLoadedKeys
([])
setLoadedKeys
([])
...
...
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