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
e89a5931
Commit
e89a5931
authored
Mar 19, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
草稿标识修改
parent
f5a82e06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
23 deletions
+43
-23
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+1
-21
AssetDetailDrawer.jsx
src/view/Manage/AssetManage/Component/AssetDetailDrawer.jsx
+29
-1
AssetDetailPage.jsx
src/view/Manage/AssetManage/Component/AssetDetailPage.jsx
+13
-1
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
e89a5931
...
...
@@ -1286,11 +1286,10 @@ const AssetAction = (props) => {
{
(action!=='add' && (id||'')!=='') && <div>
<div className='mb-3'>
<Descriptions column={
(reference===AssetDraftReference)?4:
1}>
<Descriptions column={1}>
<Descriptions.Item
label='资产目录路径'
style={{ paddingBottom: 0 }}
span={2}
>
<span>
{
...
...
@@ -1306,25 +1305,6 @@ const AssetAction = (props) => {
}
</span>
</Descriptions.Item>
{
(reference===AssetDraftReference) && <>
<Descriptions.Item
label='修改类型'
style={{ paddingBottom: 0 }}
>
{ assets?.operation==='release' && '新增'}
{ assets?.operation==='change' && '修改'}
{ assets?.operation==='offline' && '停用'}
</Descriptions.Item>
<Descriptions.Item
label='状态'
style={{ paddingBottom: 0 }}
>
{ assets?.state==='draft' && '待提交'}
{ assets?.operation==='auditing' && '审批中'}
</Descriptions.Item>
</>
}
</Descriptions>
</div>
</div>
...
...
src/view/Manage/AssetManage/Component/AssetDetailDrawer.jsx
View file @
e89a5931
...
...
@@ -2,24 +2,52 @@ import React from 'react';
import
{
Drawer
,
Form
}
from
'antd'
;
import
AssetAction
from
'./AssetAction'
;
import
{
AssetDraftReference
}
from
'../../../../util/constant'
;
import
{
dispatch
}
from
'../../../../model'
;
const
AssetDetailDrawer
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
id
,
dirId
,
reference
,
readonly
=
false
}
=
props
;
const
[
animated
,
setAnimated
]
=
React
.
useState
(
true
)
const
[
form
]
=
Form
.
useForm
();
const
[
draftAsset
,
setDraftAsset
]
=
React
.
useState
()
React
.
useEffect
(()
=>
{
if
(
visible
)
{
setTimeout
(()
=>
{
setAnimated
(
false
)
},
300
)
if
(
reference
===
AssetDraftReference
)
{
getDraft
()
}
}
},
[
visible
])
const
title
=
React
.
useMemo
(()
=>
{
if
(
draftAsset
?.
state
===
'draft'
)
return
'资产目录详情(待提交)'
if
(
draftAsset
?.
state
===
'auditing'
)
return
'资产目录详情(审批中)'
return
'资产目录详情'
},
[
draftAsset
])
const
getDraft
=
()
=>
{
dispatch
({
type
:
'assetmanage.getDraftDetail'
,
payload
:
{
params
:
{
draftId
:
id
,
}
},
callback
:
data
=>
{
setDraftAsset
(
data
)
}
})
}
return
(
<
Drawer
visible=
{
visible
}
title=
'资产目录详情'
title=
{
title
}
width=
'80%'
placement=
"right"
closable=
{
true
}
...
...
src/view/Manage/AssetManage/Component/AssetDetailPage.jsx
View file @
e89a5931
...
...
@@ -16,6 +16,8 @@ const AssetDetailPage = (props)=>{
const
[
data
,
setData
]
=
useState
({
id
:
''
,
dirId
:
''
,
isDraft
:
''
,
catalog
:
''
});
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
templateType
,
setTemplateType
]
=
useState
()
const
[
draftAsset
,
setDraftAsset
]
=
React
.
useState
()
const
{
id
,
dirId
,
isDraft
,
catalog
}
=
data
;
useEffect
(()
=>
{
...
...
@@ -31,6 +33,13 @@ const AssetDetailPage = (props)=>{
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
const
title
=
React
.
useMemo
(()
=>
{
if
(
draftAsset
?.
state
===
'draft'
)
return
'资产目录详情(待提交)'
if
(
draftAsset
?.
state
===
'auditing'
)
return
'资产目录详情(审批中)'
return
'资产目录详情'
},
[
draftAsset
])
const
getDataAssetDetail
=
()
=>
{
const
_id
=
getQueryParam
(
'id'
,
props
.
location
.
search
);
const
_dirId
=
getQueryParam
(
'dirId'
,
props
.
location
.
search
);
...
...
@@ -59,6 +68,9 @@ const AssetDetailPage = (props)=>{
setLoading
(
false
);
LocalStorage
.
set
(
`templateType-
${
appId
}
`
,
data
?.
templateType
)
setTemplateType
(
data
?.
templateType
)
if
(
_isDraft
===
'true'
)
{
setDraftAsset
(
data
)
}
},
error
:
()
=>
{
setLoading
(
false
);
...
...
@@ -70,7 +82,7 @@ const AssetDetailPage = (props)=>{
return
(
<
div
className=
'asset-detail position-relative'
>
<
div
className=
'detail-header'
>
<
span
style=
{
{
fontSize
:
16
,
fontWeight
:
'bold'
,
color
:
'#000'
}
}
>
资产目录详情
</
span
>
<
span
style=
{
{
fontSize
:
16
,
fontWeight
:
'bold'
,
color
:
'#000'
}
}
>
{
title
}
</
span
>
</
div
>
<
Spin
spinning=
{
loading
}
>
<
div
className=
'detail-container'
>
...
...
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