Commit ccdd7eb9 by zhaochengxiang

订阅

parent 1ab3706d
...@@ -414,15 +414,15 @@ export function changeToPendingSubmitDraft(payload) { ...@@ -414,15 +414,15 @@ export function changeToPendingSubmitDraft(payload) {
} }
export function addSubscribe(payload) { export function addSubscribe(payload) {
return PostJSON("/informationmanagement/subscribe/add", payload) return PostJSON("/subscribe/subscribe/add", payload)
} }
export function deleteSubsribe(payload) { export function deleteSubsribe(payload) {
return Delete("/informationmanagement/subscribe/dels", payload) return Delete("/subscribe/subscribe/dels", payload)
} }
export function subsribeDataList(payload) { export function subsribeDataList(payload) {
return GetJSON("/informationmanagement/subscribe/subscribeDataList", payload) return GetJSON("/subscribe/subscribe/subscribeDataList", payload)
} }
export function startProcess(payload) { export function startProcess(payload) {
......
...@@ -818,11 +818,10 @@ const AssetAction = React.forwardRef(function (props, ref) { ...@@ -818,11 +818,10 @@ const AssetAction = React.forwardRef(function (props, ref) {
{ {
reference !== AssetRecycleReference && <Button onClick={shareAsset}>分享</Button> reference !== AssetRecycleReference && <Button onClick={shareAsset}>分享</Button>
} }
{
{/*
{
reference !== AssetDraftReference && reference !== AssetRecycleReference && <SubsribeButton id={assets?.id} appType='dataAssetManager' subType={assets?.templateType} env={app?.env?.domainId||catalog||LocalStorage.get('assetsEnv')} /> reference !== AssetDraftReference && reference !== AssetRecycleReference && <SubsribeButton id={assets?.id} appType='dataAssetManager' subType={assets?.templateType} env={app?.env?.domainId||catalog||LocalStorage.get('assetsEnv')} />
} }
{/*
{ {
!isPostAsset(assets?.templateType) && <Dropdown overlay={ !isPostAsset(assets?.templateType) && <Dropdown overlay={
<Menu onClick={({ key })=>{ <Menu onClick={({ key })=>{
......
...@@ -827,6 +827,34 @@ const AssetTable = (props) => { ...@@ -827,6 +827,34 @@ const AssetTable = (props) => {
} }
} }
const subscriptAsset = () => {
if ((checkedKeys||[]).length === 0) return;
modal.confirm({
title: '提示',
content: '是否确认收藏选中的资产目录?',
onOk: () => {
dispatch({
type: 'assetmanage.addSubscribe',
payload: {
params: {
appType: 'dataAssetManager',
subType: getTemplateType(),
resourceIds: (checkedKeys??[]).toString(),
env: app?.env?.domainId,
}
},
callback: () => {
showMessage("success","收藏成功");
setCheckedKeys([]);
},
error: () => {
}
})
}
})
}
// const detailAsset = (item)=>{ // const detailAsset = (item)=>{
// setCurrentAssetId(item.id); // setCurrentAssetId(item.id);
// window.open(`/center-home/asset-detail?id=${item.id}&dirId=${nodeId}`); // window.open(`/center-home/asset-detail?id=${item.id}&dirId=${nodeId}`);
...@@ -1168,6 +1196,14 @@ const AssetTable = (props) => { ...@@ -1168,6 +1196,14 @@ const AssetTable = (props) => {
导出 导出
</PermissionButton> </PermissionButton>
} }
<PermissionButton
defaultPermission={subscribeAble}
onClick={subscriptAsset}
tip={(checkedKeys||[]).length===0?'请先选择资产':''}
disabled={(checkedKeys||[]).length===0}
>
收藏
</PermissionButton>
{ {
reference===AssetManageReference && <PermissionButton reference===AssetManageReference && <PermissionButton
defaultPermission={changeDirectoryAble} defaultPermission={changeDirectoryAble}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment