Commit 9b6bccc8 by zhaochengxiang

调整样式 增加订阅

parent 9d425f2a
...@@ -11,12 +11,15 @@ module.exports = { ...@@ -11,12 +11,15 @@ module.exports = {
lessOptions: { lessOptions: {
modifyVars: { modifyVars: {
'@ant-prefix': 'yy', '@ant-prefix': 'yy',
// '@border-color-split': 'hsv(0, 0, 85%)', '@primary-color': '#c7000b',
'@border-radius-base': '4px',
'@primary-color': '#196AD2',
'@success-color': '#8FC31F', '@success-color': '#8FC31F',
'@warning-color': '#F7AB00', '@warning-color': '#F7AB00',
'@error-color': '#E94848', '@error-color': '#c7000b',
'@menu-dark-bg': '#c7000b',
'@menu-dark-submenu-bg': '#c7000b',
'@menu-dark-inline-submenu-bg': '#c7000b',
'@layout-header-background': '#c7000b',
'@border-radius-base': '4px',
}, },
javascriptEnabled: true, javascriptEnabled: true,
}, },
......
...@@ -78,6 +78,6 @@ ...@@ -78,6 +78,6 @@
"last 1 safari version" "last 1 safari version"
] ]
}, },
"proxy": "http://139.198.127.28:8089", "proxy": "http://139.198.126.96:8089",
"homepage": "http://myhost/data-govern" "homepage": "http://myhost/data-govern"
} }
...@@ -199,11 +199,11 @@ tr.drop-over-upward td { ...@@ -199,11 +199,11 @@ tr.drop-over-upward td {
} }
.primary-color { .primary-color {
color: #196AD2; color: #c7000b;
} }
.primary-bg-color { .primary-bg-color {
background-color: #196AD2; background-color: #c7000b;
} }
.title-color { .title-color {
...@@ -359,7 +359,7 @@ svg { ...@@ -359,7 +359,7 @@ svg {
} }
.primary-bg-container { .primary-bg-container {
background-color: #196AD2; background-color: #c7000b;
} }
.yy-card-head { .yy-card-head {
...@@ -373,4 +373,12 @@ svg { ...@@ -373,4 +373,12 @@ svg {
.yy-tree .yy-tree-treenode { .yy-tree .yy-tree-treenode {
white-space: nowrap; white-space: nowrap;
}
a {
color: #458FDB !important;
}
a.yy-typography-disabled {
color: rgba(0, 0, 0, 0.25) !important;
} }
\ No newline at end of file
...@@ -235,4 +235,8 @@ export function* getResourceRelations(payload) { ...@@ -235,4 +235,8 @@ export function* getResourceRelations(payload) {
export function* updateResourceState(payload) { export function* updateResourceState(payload) {
return yield call(service.updateResourceState, payload); return yield call(service.updateResourceState, payload);
}
export function* subs(payload) {
return yield call(service.subs, payload);
} }
\ No newline at end of file
import { PostJSON, GetJSON, PostFile, Post } from "../util/axios" import { PostJSON, GetJSON, PostFile, Post, Get } from "../util/axios"
export function importElement(payload) { export function importElement(payload) {
return PostFile("/dataassetmanager/elementApi/import", payload); return PostFile("/dataassetmanager/elementApi/import", payload);
...@@ -242,4 +242,8 @@ export function getResourceRelations(payload) { ...@@ -242,4 +242,8 @@ export function getResourceRelations(payload) {
export function updateResourceState(payload) { export function updateResourceState(payload) {
return PostJSON("/dataassetmanager/resourceApi/updateResourceState", payload); return PostJSON("/dataassetmanager/resourceApi/updateResourceState", payload);
}
export function subs(payload) {
return Get("/dataassetmanager/subApi/subs", payload);
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import { DataModelerRoleAdmin, DataModelerRoleUser, DataModelerRoleReader } from ...@@ -11,7 +11,7 @@ import { DataModelerRoleAdmin, DataModelerRoleUser, DataModelerRoleReader } from
//内网深交所环境 isSzseEnv true //内网深交所环境 isSzseEnv true
//元曜公网环境 isSzseEnv false //元曜公网环境 isSzseEnv false
export const isSzseEnv = false; export const isSzseEnv = true;
export const inputWidth = isSzseEnv?180:240; export const inputWidth = isSzseEnv?180:240;
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
@scroll-height: 15px; @scroll-height: 15px;
@icon-normal-color: #6F6F6F; @icon-normal-color: #6F6F6F;
@icon-hover-color: #196AD2; @icon-hover-color: #c7000b;
@icon-grey-color: #D5D5D5; @icon-grey-color: #D5D5D5;
@icon-disable-color: #bfbfbf; @icon-disable-color: #bfbfbf;
\ No newline at end of file
...@@ -428,7 +428,7 @@ const AssetAction = (props) => { ...@@ -428,7 +428,7 @@ const AssetAction = (props) => {
(assetPaths||[]).map((item, key) => { (assetPaths||[]).map((item, key) => {
return ( return (
<a key={key} onClick={() => { jumpToPath(item); }}> <a key={key} onClick={() => { jumpToPath(item); }}>
<span style={{ color: (item?.dataAssetName===assets.currentPath)?'#f50':'' }}>{item?.dataAssetName||''}</span> <span>{item?.dataAssetName||''}</span>
</a> </a>
); );
}) })
......
...@@ -555,6 +555,32 @@ const AssetTable = (props) => { ...@@ -555,6 +555,32 @@ const AssetTable = (props) => {
} }
} }
const subscriptAsset = () => {
if ((checkedKeys||[]).length === 0) return;
modal.confirm({
title: '提示',
content: '您确定要订阅这些资产吗?',
onOk: () => {
let payload = {
dataAssetIds: (checkedKeys||[]).join(','),
env: app?.env?.domainId
}
dispatch({
type: 'assetmanage.subs',
payload,
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}`);
...@@ -784,12 +810,25 @@ const AssetTable = (props) => { ...@@ -784,12 +810,25 @@ const AssetTable = (props) => {
} }
{ {
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment> (reference===AssetManageReference || reference===AssetRecycleReference) &&
<Menu.Item> <Menu.Item>
<div className='text-center' onClick={exportAsset}> <div className='text-center' onClick={exportAsset}>
导出 导出
</div> </div>
</Menu.Item> </Menu.Item>
}
{
(reference!==AssetRecycleReference) &&
<Menu.Item disabled={(checkedKeys||[]).length===0}>
<div className='text-center' onClick={subscriptAsset}>
订阅
</div>
</Menu.Item>
}
{
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment>
<Menu.Item disabled={(checkedKeys||[]).length===0}> <Menu.Item disabled={(checkedKeys||[]).length===0}>
<div className='text-center' onClick={onBatchCatalogChangeBtnClick}> <div className='text-center' onClick={onBatchCatalogChangeBtnClick}>
{(reference===AssetRecycleReference)?'挂载':'变更目录'} {(reference===AssetRecycleReference)?'挂载':'变更目录'}
...@@ -858,10 +897,21 @@ const AssetTable = (props) => { ...@@ -858,10 +897,21 @@ const AssetTable = (props) => {
(reference===AssetManageReference && nodeType!=='custom') && <Button onClick={importAsset}>导入</Button> (reference===AssetManageReference && nodeType!=='custom') && <Button onClick={importAsset}>导入</Button>
} }
{ {
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment> (reference===AssetManageReference || reference===AssetRecycleReference) &&
<Tooltip> <Tooltip>
<Button onClick={exportAsset} >导出</Button> <Button onClick={exportAsset} >导出</Button>
</Tooltip> </Tooltip>
}
{
(reference!==AssetRecycleReference) &&
<Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}>
<Button onClick={subscriptAsset} disabled={(checkedKeys||[]).length===0} >订阅</Button>
</Tooltip>
}
{
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment>
<Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}>
<Button onClick={onBatchCatalogChangeBtnClick} disabled={(checkedKeys||[]).length===0} >{(reference===AssetRecycleReference)?'挂载':'变更目录'}</Button> <Button onClick={onBatchCatalogChangeBtnClick} disabled={(checkedKeys||[]).length===0} >{(reference===AssetRecycleReference)?'挂载':'变更目录'}</Button>
</Tooltip> </Tooltip>
...@@ -881,9 +931,9 @@ const AssetTable = (props) => { ...@@ -881,9 +931,9 @@ const AssetTable = (props) => {
<Button onClick={onFilterElementClick}>可见列设置</Button> <Button onClick={onFilterElementClick}>可见列设置</Button>
</React.Fragment> </React.Fragment>
} }
{ {/* {
(reference!==AssetRecycleReference && isSzseEnv) && <Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox> (reference!==AssetRecycleReference && isSzseEnv) && <Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox>
} } */}
</Space> </Space>
<Space> <Space>
{ {
......
...@@ -43,7 +43,7 @@ export const AttentionSvg = (props) => ( ...@@ -43,7 +43,7 @@ export const AttentionSvg = (props) => (
</defs> </defs>
<path <path
d="M826.027 34.133H197.973c-37.546 0-68.266 30.72-68.266 68.267v887.467L512 791.893l382.293 197.974V102.4c0-37.547-30.72-68.267-68.266-68.267zm-148.48 337.92L612.693 435.2c-3.413 3.413-5.12 10.24-5.12 15.36l15.36 87.04c1.707 13.653-11.946 23.893-23.893 17.067L520.533 512c-5.12-3.413-10.24-3.413-15.36 0l-78.506 42.667c-11.947 6.826-27.307-3.414-23.894-17.067l15.36-87.04c1.707-5.12 0-10.24-5.12-15.36l-64.853-63.147c-10.24-10.24-5.12-27.306 8.533-29.013l88.747-13.653c5.12 0 10.24-3.414 11.947-8.534l39.253-80.213c6.827-11.947 23.893-11.947 30.72 0l39.253 80.213c1.707 5.12 6.827 8.534 11.947 8.534l88.747 13.653c13.653 1.707 18.773 18.773 10.24 29.013z" d="M826.027 34.133H197.973c-37.546 0-68.266 30.72-68.266 68.267v887.467L512 791.893l382.293 197.974V102.4c0-37.547-30.72-68.267-68.266-68.267zm-148.48 337.92L612.693 435.2c-3.413 3.413-5.12 10.24-5.12 15.36l15.36 87.04c1.707 13.653-11.946 23.893-23.893 17.067L520.533 512c-5.12-3.413-10.24-3.413-15.36 0l-78.506 42.667c-11.947 6.826-27.307-3.414-23.894-17.067l15.36-87.04c1.707-5.12 0-10.24-5.12-15.36l-64.853-63.147c-10.24-10.24-5.12-27.306 8.533-29.013l88.747-13.653c5.12 0 10.24-3.414 11.947-8.534l39.253-80.213c6.827-11.947 23.893-11.947 30.72 0l39.253 80.213c1.707 5.12 6.827 8.534 11.947 8.534l88.747 13.653c13.653 1.707 18.773 18.773 10.24 29.013z"
fill='#196AD2' fill='#c7000b'
/> />
</svg> </svg>
) )
......
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