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
61ea7163
Commit
61ea7163
authored
Oct 27, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉多余的代码
parent
01bba12d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
168 deletions
+3
-168
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+0
-2
AssetDetail.jsx
src/view/Manage/AssetManage/Component/AssetDetail.jsx
+3
-4
AssetItem.jsx
src/view/Manage/AssetManage/Component/AssetItem.jsx
+0
-47
AssetItem.less
src/view/Manage/AssetManage/Component/AssetItem.less
+0
-9
MetadataInfo.jsx
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
+0
-105
add-to-asset.jsx
src/view/Manage/AssetResourceManage/add-to-asset.jsx
+0
-1
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
61ea7163
...
...
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import
{
Form
,
Spin
,
Input
,
Descriptions
,
Space
,
Button
,
Tooltip
,
Select
}
from
'antd'
;
import
{
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
import
MetadataInfo
from
'./MetadataInfo'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
highlightSearchContentByTerms
,
showMessage
,
getAssetRange
,
checkMenuAdmit
,
getAssetType
}
from
'../../../../util'
;
import
{
AppContext
}
from
'../../../../App'
;
...
...
@@ -15,7 +14,6 @@ import ResourceItem from '../../AssetResourceManage/resource-item';
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
{
Subject
}
from
'rxjs'
;
import
{
element
}
from
'prop-types'
;
export
const
AssetActionSubject
=
new
Subject
();
...
...
src/view/Manage/AssetManage/Component/AssetDetail.jsx
View file @
61ea7163
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
Spin
,
Descriptions
,
Divider
}
from
"antd"
;
import
MetadataInfo
from
'./MetadataInfo'
;
import
{
getAssetRange
,
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
ElementItem
}
from
"./AssetAction"
;
import
{
AssetManageReference
}
from
"../../../../util/constant"
;
const
AssetDetail
=
(
props
)
=>
{
...
...
@@ -143,9 +144,7 @@ const AssetDetail = (props)=>{
(
_currentValues
||
[]).
map
((
item
,
index
)
=>
{
return
(
<
Descriptions
.
Item
label=
{
item
.
name
||
''
}
key=
{
index
}
>
{
item
.
name
===
'资产项'
?
<
MetadataInfo
config=
{
false
}
value=
{
item
.
value
||
''
}
terms=
{
terms
}
/>
:
<
span
>
{
highlightSearchContentByTerms
(
item
.
value
||
''
,
terms
)
}
</
span
>
}
<
ElementItem
type=
{
AssetManageReference
}
element=
{
item
}
value=
{
item
.
value
}
terms=
{
terms
}
/>
</
Descriptions
.
Item
>
);
})
...
...
src/view/Manage/AssetManage/Component/AssetItem.jsx
deleted
100644 → 0
View file @
01bba12d
import
React
from
'react'
;
import
{
Row
,
Col
,
Typography
}
from
'antd'
;
import
MetadataInfo
from
'./MetadataInfo'
;
import
'./AssetItem.less'
;
const
AssetItem
=
(
props
)
=>
{
const
{
data
}
=
props
;
return
(
<
div
className=
'asset-item'
>
{
(
data
.
elementsGroup
||
[]).
map
((
elementGroup
,
index
)
=>
{
const
_type
=
elementGroup
.
type
||
''
;
return
(
<
div
key=
{
index
}
>
<
div
className=
'flex'
style=
{
{
alignItems
:
'center'
,
padding
:
'15px 0'
}
}
>
<
div
style=
{
{
width
:
3
,
height
:
14
,
backgroundColor
:
'#0069AC'
,
marginRight
:
5
}
}
/>
<
span
style=
{
{
fontWeight
:
'bold'
,
color
:
'#464646'
}
}
>
{
_type
||
''
}
</
span
>
</
div
>
<
Row
>
{
elementGroup
&&
elementGroup
.
elements
&&
elementGroup
.
elements
.
map
((
element
,
_index
)
=>
{
return
(
<
Col
className=
'mb-3'
key=
{
_index
}
md=
{
8
}
>
<
Typography
.
Paragraph
title=
{
`${element.name||''}: ${element.value||''}`
}
style=
{
{
color
:
'#464646'
}
}
ellipsis
>
{
`${element.name||''}: `
}
{
element
.
name
===
'资产项'
?<
MetadataInfo
config=
{
false
}
value=
{
element
.
value
||
''
}
/>:
`${element.value||''}`
}
</
Typography
.
Paragraph
>
</
Col
>
);
})
}
</
Row
>
<
div
style=
{
{
width
:
'100%'
,
height
:
2
,
backgroundColor
:
'#ededed'
}
}
/>
</
div
>
)
})
}
</
div
>
);
}
export
default
AssetItem
;
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetItem.less
deleted
100644 → 0
View file @
01bba12d
.asset-item {
margin: 0px 0px 0px 30px;
.yy-divider-horizontal {
margin: 0 !important;
}
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
deleted
100644 → 0
View file @
01bba12d
import
React
from
'react'
import
{
Button
,
Tooltip
}
from
'antd'
import
{
SettingFilled
}
from
'@ant-design/icons'
import
{
highlightSearchContentByTerms
,
IsArr
}
from
'../../../../util'
import
{
AppContext
}
from
'../../../../App'
import
{
MetadataColumnTooltipTitle
}
from
'../../AssetResourceManage/table'
import
{
AssetManageReference
,
ResourceManageReference
}
from
'../../../../util/constant'
const
MetadataInfo
=
({
value
=
''
,
reference
=
AssetManageReference
,
config
=
true
,
terms
=
[]
})
=>
{
const
app
=
React
.
useContext
(
AppContext
)
const
decodeData
=
React
.
useMemo
(()
=>
{
if
(
value
)
{
try
{
return
JSON
.
parse
(
value
)
}
catch
(
error
)
{
return
value
}
}
return
[]
},
[
value
])
return
(
<
React
.
Fragment
>
{
reference
===
ResourceManageReference
?
<
ResourceItem
data=
{
decodeData
}
config=
{
config
}
terms=
{
terms
}
/>
:
<
AssetItem
data=
{
decodeData
}
config=
{
config
}
terms=
{
terms
}
/>
}
</
React
.
Fragment
>
)
}
export
default
MetadataInfo
const
ResourceItem
=
({
data
,
config
,
terms
})
=>
{
const
app
=
React
.
useContext
(
AppContext
)
return
(
<
div
className=
'flex'
style=
{
{
alignItems
:
'center'
}
}
>
{
(
typeof
data
===
'string'
)
?
<
span
style=
{
{
marginRight
:
5
}
}
>
{
highlightSearchContentByTerms
(
data
,
terms
)
}
</
span
>
:
((
IsArr
(
data
)
&&
data
.
length
>
0
)
?
<
span
>
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
MetadataColumnTooltipTitle
data=
{
data
}
/>
}
>
<
a
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-message'
,
data
:
data
[
0
]
})
}
}
style=
{
{
marginRight
:
5
}
}
>
{
highlightSearchContentByTerms
(
data
[
0
].
enName
,
terms
)
}
</
a
>
</
Tooltip
>
</
span
>
:
null
)
}
{
config
&&
<
Button
type=
'text'
icon=
{
<
SettingFilled
/>
}
onClick=
{
()
=>
{
app
?.
setGlobalState
?.({
message
:
'data-govern-show-metadata-list-message'
,
data
:
(
typeof
data
===
'string'
)
?
{}
:
data
[
0
]
})
}
}
/>
}
</
div
>
)
}
const
AssetItem
=
({
data
,
config
,
terms
})
=>
{
const
app
=
React
.
useContext
(
AppContext
)
return
(
<
div
className=
'flex'
style=
{
{
alignItems
:
'center'
}
}
>
{
(
typeof
data
===
'string'
)
?
<
span
style=
{
{
marginRight
:
5
}
}
>
{
highlightSearchContentByTerms
(
data
,
terms
)
}
</
span
>
:
(
IsArr
(
data
)
?
<
div
className=
'flex'
style=
{
{
flexDirection
:
'column'
,
lineHeight
:
'32px'
}
}
>
{
(
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/AssetResourceManage/add-to-asset.jsx
View file @
61ea7163
...
...
@@ -7,7 +7,6 @@ import produce from 'immer'
import
{
AssetManageReference
,
ResourceManageReference
}
from
'../../../util/constant'
import
{
getAssetRange
,
getAssetType
,
inputWidth
,
isSzseEnv
}
from
'../../../util'
import
{
AppContext
}
from
'../../../App'
import
MetadataInfo
from
'../AssetManage/Component/MetadataInfo'
import
{
defaultPage
,
usePage
}
from
'../../../util/hooks/page'
import
Table
from
'../../../util/Component/Table'
import
AssetItem
from
'../AssetManage/asset-item'
...
...
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