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
3b915da0
Commit
3b915da0
authored
Dec 22, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产收藏
parent
4a650544
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
7 deletions
+46
-7
assetmanage.js
src/model/assetmanage.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+27
-0
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+9
-7
No files found.
src/model/assetmanage.js
View file @
3b915da0
...
@@ -374,3 +374,7 @@ export function* offlineAsDraft(payload) {
...
@@ -374,3 +374,7 @@ export function* offlineAsDraft(payload) {
export
function
*
saveAsDraft
(
payload
)
{
export
function
*
saveAsDraft
(
payload
)
{
return
yield
call
(
service
.
saveAsDraft
,
payload
);
return
yield
call
(
service
.
saveAsDraft
,
payload
);
}
}
export
function
*
addSubscribe
(
payload
)
{
return
yield
call
(
service
.
addSubscribe
,
payload
);
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
3b915da0
...
@@ -360,3 +360,7 @@ export function offlineAsDraft(payload) {
...
@@ -360,3 +360,7 @@ export function offlineAsDraft(payload) {
export
function
saveAsDraft
(
payload
)
{
export
function
saveAsDraft
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/draftApi/saveAsDraft"
,
payload
)
return
PostJSON
(
"/dataassetmanager/draftApi/saveAsDraft"
,
payload
)
}
}
export
function
addSubscribe
(
payload
)
{
return
PostJSON
(
"/subscribe/subscribe/add"
,
payload
)
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
3b915da0
...
@@ -24,6 +24,7 @@ import SelectStandard from './SelectStandard';
...
@@ -24,6 +24,7 @@ import SelectStandard from './SelectStandard';
import
AttributeMaintain
from
'./AttributeMaintain'
;
import
AttributeMaintain
from
'./AttributeMaintain'
;
import
'./AssetAction.less'
;
import
'./AssetAction.less'
;
import
{
getTemplateType
}
from
'../../../../util/axios'
;
const
AssetAction
=
(
props
)
=>
{
const
AssetAction
=
(
props
)
=>
{
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
reference
,
form
,
onMetadataChange
,
onElementsChange
,
readonly
=
false
,
permissionId
,
catalog
}
=
props
;
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
reference
,
form
,
onMetadataChange
,
onElementsChange
,
readonly
=
false
,
permissionId
,
catalog
}
=
props
;
...
@@ -912,6 +913,31 @@ const AssetAction = (props) => {
...
@@ -912,6 +913,31 @@ const AssetAction = (props) => {
}
}
}
}
const onSubsrcibeClick = () => {
modal.confirm({
title: '提示',
content: '是否确认收藏该资产目录?',
onOk: () => {
dispatch({
type: 'assetmanage.addSubscribe',
payload: {
params: {
appType: 'dataAssetManager',
subType: getTemplateType(),
resourceIds: id,
env: app?.env?.domainId||catalog||LocalStorage.get('assetsEnv'),
}
},
callback: () => {
showMessage("success","收藏成功");
},
error: () => {
}
})
}
})
}
const onValuesChange = (changedValues, allValues) => {
const onValuesChange = (changedValues, allValues) => {
if (changedValues.hasOwnProperty('主题域分组')) {
if (changedValues.hasOwnProperty('主题域分组')) {
setCurrentDomainGroup(changedValues['主题域分组']);
setCurrentDomainGroup(changedValues['主题域分组']);
...
@@ -969,6 +995,7 @@ const AssetAction = (props) => {
...
@@ -969,6 +995,7 @@ const AssetAction = (props) => {
}
}
<Button onClick={shareAsset}>分享</Button>
<Button onClick={shareAsset}>分享</Button>
<Button onClick={onSubsrcibeClick}>收藏</Button>
<Dropdown overlay={
<Dropdown overlay={
<Menu onClick={({ key })=>{
<Menu onClick={({ key })=>{
if (metadata?.metadataTableId) {
if (metadata?.metadataTableId) {
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
3b915da0
...
@@ -662,14 +662,16 @@ const AssetTable = (props) => {
...
@@ -662,14 +662,16 @@ const AssetTable = (props) => {
title
:
'提示'
,
title
:
'提示'
,
content
:
'是否确认收藏选中的资产目录?'
,
content
:
'是否确认收藏选中的资产目录?'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
let
payload
=
{
dataAssetIds
:
(
checkedKeys
||
[]).
join
(
','
),
env
:
app
?.
env
?.
domainId
}
dispatch
({
dispatch
({
type
:
'assetmanage.subs'
,
type
:
'assetmanage.addSubscribe'
,
payload
,
payload
:
{
params
:
{
appType
:
'dataAssetManager'
,
subType
:
getTemplateType
(),
resourceIds
:
(
checkedKeys
??[]).
toString
(),
env
:
app
?.
env
?.
domainId
,
}
},
callback
:
()
=>
{
callback
:
()
=>
{
showMessage
(
"success"
,
"收藏成功"
);
showMessage
(
"success"
,
"收藏成功"
);
setCheckedKeys
([]);
setCheckedKeys
([]);
...
...
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