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
1cefe58c
Commit
1cefe58c
authored
Nov 29, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码编码
parent
41b0f123
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
49 deletions
+40
-49
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+8
-1
AssetDetail.jsx
src/view/Manage/AssetManage/Component/AssetDetail.jsx
+8
-1
AssetItem.jsx
src/view/Manage/AssetManage/Component/AssetItem.jsx
+0
-47
StandardCode.jsx
src/view/Manage/AssetManage/Component/StandardCode.jsx
+24
-0
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
1cefe58c
...
...
@@ -10,6 +10,7 @@ import Tag from '../../Tag';
import
Separate
from
'./Separate'
;
import
AssetTagModal
from
'./AssetTagModal'
;
import
{
AnchorId
,
AnchorDirId
}
from
'../../../../util/constant'
;
import
StandardCode
from
'./StandardCode'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
...
...
@@ -561,8 +562,14 @@ const AssetAction = (props) => {
(sameAttributeElements||[]).map((item, index) => {
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 }}>
{
item.name==='资产项' && <MetadataInfo config={false} value={item.value||''} terms={terms} />
}
{
item.name==='代码编码' && <StandardCode value={item.value||''} terms={terms} />
}
{
item.name
==='资产项' ? <MetadataInfo config={false} value={item.value||''} /> :
<span className='text-color'>{highlightSearchContentByTerms(item.value||'', terms)}</span>
item.name
!=='资产项' && item.name!=='代码编码' &&
<span className='text-color'>{highlightSearchContentByTerms(item.value||'', terms)}</span>
}
</Descriptions.Item>
);
...
...
src/view/Manage/AssetManage/Component/AssetDetail.jsx
View file @
1cefe58c
...
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
import
{
Spin
,
Descriptions
,
Divider
}
from
"antd"
;
import
MetadataInfo
from
'./MetadataInfo'
;
import
StandardCode
from
'./StandardCode'
;
import
{
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
dispatch
}
from
'../../../../model'
;
...
...
@@ -99,8 +100,14 @@ 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
}
/>
}
{
item
.
name
===
'代码编码'
&&
<
StandardCode
value=
{
item
.
value
||
''
}
terms=
{
terms
}
/>
}
{
item
.
name
===
'资产项'
?
<
MetadataInfo
config=
{
false
}
value=
{
item
.
value
||
''
}
terms=
{
terms
}
/>
:
<
span
>
{
highlightSearchContentByTerms
(
item
.
value
||
''
,
terms
)
}
</
span
>
item
.
name
!==
'资产项'
&&
item
.
name
!==
'代码编码'
&&
<
span
>
{
highlightSearchContentByTerms
(
item
.
value
||
''
,
terms
)
}
</
span
>
}
</
Descriptions
.
Item
>
);
...
...
src/view/Manage/AssetManage/Component/AssetItem.jsx
deleted
100644 → 0
View file @
41b0f123
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/StandardCode.jsx
0 → 100644
View file @
1cefe58c
import
React
from
'react'
;
import
{
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
AppContext
}
from
'../../../../App'
;
const
FC
=
({
value
=
''
,
terms
=
[]
})
=>
{
return
(
<
AppContext
.
Consumer
>
{
appValue
=>
<
a
onClick=
{
()
=>
{
appValue
?.
setGlobalState
&&
appValue
?.
setGlobalState
({
message
:
'data-govern-show-standard-detail-message'
,
data
:
{
name
:
value
}
})
}
}
>
<
span
>
{
highlightSearchContentByTerms
(
value
,
terms
)
}
</
span
>
</
a
>
}
</
AppContext
.
Consumer
>
);
}
export
default
FC
;
\ No newline at end of file
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