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
667a8890
Commit
667a8890
authored
Jun 18, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加资产字段详情
parent
aa39a48c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
1 deletion
+97
-1
App.js
src/App.js
+17
-1
AssetColumnDetail.tsx
src/view/Manage/AssetManage/Component/AssetColumnDetail.tsx
+80
-0
No files found.
src/App.js
View file @
667a8890
...
...
@@ -27,6 +27,7 @@ import AssetTask from './view/Manage/AssetTask';
import
AssetEvaluate
from
'./view/Manage/AssetEvaluate'
;
import
VersionCompare
from
'./view/Manage/AssetManage/Component/VersionCompare'
import
{
AssetBrowseReference
,
AssetDraftReference
,
AssetMountReference
}
from
'./util/constant'
;
import
AssetColumnDetail
from
'./view/Manage/AssetManage/Component/AssetColumnDetail'
;
const
AssetDraft
=
loadable
(()
=>
import
(
'./view/Manage/AssetDraft'
));
const
AssetAction
=
loadable
(()
=>
import
(
'./view/Manage/AssetManage/Component/AssetAction'
));
...
...
@@ -35,6 +36,7 @@ const AssetReviewDetail = loadable(()=> import('./view/Manage/AssetDraft/review'
const
DataMasterDefine
=
loadable
(()
=>
import
(
'./view/Manage/DataMaster/Define'
));
const
DataMasterManage
=
loadable
(()
=>
import
(
'./view/Manage/DataMaster/Manage'
));
export
const
AppContext
=
React
.
createContext
();
export
const
appId
=
generateUUID
();
...
...
@@ -69,10 +71,11 @@ export class App extends React.Component {
const
{
setGlobalState
,
onGlobalStateChange
}
=
this
.
props
;
const
{
hostParams
}
=
this
.
state
;
let
message
=
''
,
id
=
''
,
terms
=
[];
let
message
=
''
,
id
=
''
,
terms
=
[]
,
type
=
''
;
;
if
(
hostParams
)
{
message
=
hostParams
.
message
||
''
;
id
=
hostParams
.
id
||
''
;
type
=
hostParams
.
type
||
''
;
terms
=
hostParams
.
terms
||
[];
}
...
...
@@ -172,6 +175,19 @@ export class App extends React.Component {
);
}
if
(
message
===
'showAssetColumnDetail'
){
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
user
:
hostParams
?.
user
,
setGlobalState
,
onGlobalStateChange
}}
>
<
AssetColumnDetail
id
=
{
id
}
type
=
{
type
}
/
>
<
/AppContext.Provider
>
);
}
if
(
message
===
'showGrantedDataService'
)
{
return
(
<
AppContext
.
Provider
value
=
{{
...
...
src/view/Manage/AssetManage/Component/AssetColumnDetail.tsx
0 → 100644
View file @
667a8890
import
{
assetsActionManageService
}
from
"@/services"
import
{
httpUtil
}
from
"@/utils"
import
{
useSetState
}
from
"ahooks"
import
React
,
{
useEffect
}
from
"react"
import
{
Descriptions
,
Spin
}
from
"antd"
const
AssetColumnDetail
:
React
.
FC
<
any
>=
(
props
)
=>
{
const
{
id
,
type
}
=
props
const
[
state
,
setState
]
=
useSetState
({
loading
:
true
,
attrs
:[]
})
const
[
open
,
setOpen
]
=
useSetState
({
openshowmore
:
true
,
showmore
:
true
})
useEffect
(()
=>
{
if
(
id
&&
type
){
getDetialInfo
()
}
},[
id
,
type
])
const
getDetialInfo
=
async
()
=>
{
setState
({
loading
:
true
})
const
result
:
any
=
await
assetsActionManageService
.
getAssetColumnDetail
({
columnId
:
id
,
columnType
:
type
})
if
(
httpUtil
.
checkSuccess
(
result
,
1
)){
setState
({
loading
:
false
,
attrs
:
result
.
data
?.
columnValueList
||
[]})
}
else
{
httpUtil
.
showError
(
result
,
1
)
setState
({
loading
:
false
,
attrs
:[]})
}
}
return
(
<
div
>
<
h2
>
资产字段信息
</
h2
>
<
Spin
spinning=
{
state
.
loading
}
>
<
Descriptions
column=
{
2
}
size=
"small"
bordered=
{
false
}
>
{
state
.
attrs
.
map
((
item
:
any
,
key
:
number
)
=>
{
if
(
key
<
6
){
return
(
<
Descriptions
.
Item
span=
{
1
}
key=
{
key
}
label=
{
item
?.
cnName
}
>
{
item
?.
value
}
</
Descriptions
.
Item
>
)
}
else
{
if
(
open
.
openshowmore
){
if
(
open
.
showmore
){
return
(
<
Descriptions
.
Item
span=
{
1
}
key=
{
key
}
label=
{
item
?.
cnName
}
>
{
item
?.
value
}
</
Descriptions
.
Item
>
)
}
else
{
return
null
}
}
else
{
return
(
<
Descriptions
.
Item
span=
{
1
}
key=
{
key
}
label=
{
item
.
cnName
}
>
{
item
?.
value
}
</
Descriptions
.
Item
>
)
}
}
})
}
</
Descriptions
>
</
Spin
>
</
div
>
)
}
export
default
AssetColumnDetail
\ 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