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
f1cc21d5
Commit
f1cc21d5
authored
Dec 07, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
草稿分享
parent
82780f73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+1
-1
AssetDetailPage.jsx
src/view/Manage/AssetManage/Component/AssetDetailPage.jsx
+26
-10
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
f1cc21d5
...
...
@@ -851,7 +851,7 @@ const AssetAction = (props) => {
const shareAsset = () => {
if ((assets?.dirIds??[]).length > 0) {
copy(`
$
{
window
.
location
.
origin
}
/center-home/
asset
-
detail
?
id
=
$
{
id
}
&
dirId
=
$
{
assets
?.
dirIds
[
0
]}
`);
copy(`
$
{
window
.
location
.
origin
}
/center-home/
asset
-
detail
?
id
=
$
{
id
}
&
dirId
=
$
{
assets
?.
dirIds
[
0
]}
&
isDraft
=
$
{
reference
===
AssetDraftReference
}
`);
showMessage('success', '已复制到剪贴板');
}
}
...
...
src/view/Manage/AssetManage/Component/AssetDetailPage.jsx
View file @
f1cc21d5
...
...
@@ -9,19 +9,22 @@ import { dispatch } from '../../../../model';
import
'./AssetDetailPage.less'
;
import
{
getDataAssetDetail
}
from
"../../../../service/dataassetmanager"
;
import
{
appId
}
from
"../../../../App"
;
import
{
AssetBrowseReference
,
AssetDraftReference
}
from
"../../../../util/constant"
;
const
AssetDetailPage
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
({
id
:
''
,
dirId
:
''
});
const
[
data
,
setData
]
=
useState
({
id
:
''
,
dirId
:
''
,
isDraft
:
''
});
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
templateType
,
setTemplateType
]
=
useState
()
const
{
id
,
dirId
}
=
data
;
const
{
id
,
dirId
,
isDraft
}
=
data
;
useEffect
(()
=>
{
const
_id
=
getQueryParam
(
'id'
,
props
.
location
.
search
);
const
_dirId
=
getQueryParam
(
'dirId'
,
props
.
location
.
search
);
setData
({
id
:
_id
,
dirId
:
_dirId
});
const
_isDraft
=
getQueryParam
(
'isDraft'
,
props
.
location
.
search
);
setData
({
id
:
_id
,
dirId
:
_dirId
,
isDraft
:
_isDraft
});
getDataAssetDetail
()
//eslint-disable-next-line react-hooks/exhaustive-deps
...
...
@@ -30,14 +33,27 @@ const AssetDetailPage = (props)=>{
const
getDataAssetDetail
=
()
=>
{
const
_id
=
getQueryParam
(
'id'
,
props
.
location
.
search
);
const
_dirId
=
getQueryParam
(
'dirId'
,
props
.
location
.
search
);
const
_isDraft
=
getQueryParam
(
'isDraft'
,
props
.
location
.
search
);
let
url
=
'assetmanage.getDataAssetDetail'
;
let
payload
=
{
dataAssetId
:
_id
,
dirId
:
_dirId
||
''
,
checkPermission
:
true
};
if
(
_isDraft
===
'true'
)
{
url
=
'assetmanage.getDraftDetail'
;
payload
=
{
params
:
{
draftId
:
_id
,
}
}
}
dispatch
({
type
:
'assetmanage.getDataAssetDetail'
,
payload
:
{
dataAssetId
:
_id
,
dirId
:
_dirId
||
''
,
checkPermission
:
true
},
type
:
url
,
payload
:
payload
,
callback
:
data
=>
{
setLoading
(
false
);
LocalStorage
.
set
(
`templateType-
${
appId
}
`
,
data
?.
templateType
)
...
...
@@ -59,7 +75,7 @@ const AssetDetailPage = (props)=>{
<
div
className=
'detail-container'
>
<
div
className=
'detail-container-card'
>
{
templateType
&&
<
AssetAction
id=
{
id
}
dirId=
{
dirId
}
action=
'detail'
/>
templateType
&&
<
AssetAction
id=
{
id
}
dirId=
{
dirId
}
reference=
{
(
isDraft
===
'true'
)?
AssetDraftReference
:
AssetBrowseReference
}
action=
'detail'
/>
}
</
div
>
</
div
>
...
...
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