Commit 7c4bf046 by zhaochengxiang

调整资产浏览页面

parent d331d5c4
...@@ -177,8 +177,9 @@ const RelationContainer = (props) => { ...@@ -177,8 +177,9 @@ const RelationContainer = (props) => {
} }
return ( return (
<div style={{ width: '100%', height: '100%' }}> <div style={{ width: '100%', height: '100%', position: 'relative' }}>
<Relation data={relationData} expandTree={expandTree} onCenterClick={onCenterClick} onExpandClick={onExpandClick} /> <Relation data={relationData} expandTree={expandTree} onCenterClick={onCenterClick} onExpandClick={onExpandClick} />
<div className='title-text' style={{ position: 'absolute', left: 15, top: 24, fontWeight: 'bold' }} >关系图</div>
</div> </div>
); );
} }
......
...@@ -6,6 +6,7 @@ import AssetTree from '../AssetManage/Component/AssetTree'; ...@@ -6,6 +6,7 @@ import AssetTree from '../AssetManage/Component/AssetTree';
import AssetDirectory from '../AssetManage/Component/AssetDirectory'; import AssetDirectory from '../AssetManage/Component/AssetDirectory';
import RelationContainer from './Component/RelationContainer'; import RelationContainer from './Component/RelationContainer';
import AssetTable from "../AssetManage/Component/AssetTable"; import AssetTable from "../AssetManage/Component/AssetTable";
import Separate from '../AssetManage/Component/Separate';
import { AssetBrowseReference } from '../../../util/constant'; import { AssetBrowseReference } from '../../../util/constant';
...@@ -53,22 +54,25 @@ const AssetBrowse = (props) => { ...@@ -53,22 +54,25 @@ const AssetBrowse = (props) => {
<div className='left'> <div className='left'>
<AssetTree centerId={centerId} onSelect={onTreeSelect} reference={reference} {...props} /> <AssetTree centerId={centerId} onSelect={onTreeSelect} reference={reference} {...props} />
</div> </div>
<div className='tree-toggle-wrap'> {
<div className='tree-toggle' onClick={treeToggleClick}> expandTree && <Separate width={15} />
{ expandTree ? <CaretLeftOutlined /> : <CaretRightOutlined /> } }
</div>
</div>
<div className='right'> <div className='right'>
<AssetDirectory id={nodeId} assetCount={assetCount} reference={reference} /> <AssetDirectory id={nodeId} assetCount={assetCount} reference={reference} />
<div className='flex' style={{ height: '100%' }}> <Separate height={15} />
<div style={{ width: '50%', height: '100%' }}> <div className='flex' style={{ flex: 1, height: '100%', overflow: 'hidden' }}>
<div style={{ flex: 1, height: '100%', overflow: 'hidden' }}>
<RelationContainer reference={reference} nodeParams={nodeParams} onChange={onRelationChange} expandTree={expandTree} /> <RelationContainer reference={reference} nodeParams={nodeParams} onChange={onRelationChange} expandTree={expandTree} />
</div> </div>
<div style={{ width: '50%' }}> <Separate width={15} />
<div style={{ flex: 1, overflow: 'hidden' }}>
<AssetTable nodeId={nodeId} reference={reference} onCountChange={onAssetCountChange} {...props} /> <AssetTable nodeId={nodeId} reference={reference} onCountChange={onAssetCountChange} {...props} />
</div> </div>
</div> </div>
</div> </div>
<div className='tree-toggle' onClick={treeToggleClick}>
{ expandTree ? <CaretLeftOutlined /> : <CaretRightOutlined /> }
</div>
</div> </div>
) )
} }
......
...@@ -10,31 +10,27 @@ ...@@ -10,31 +10,27 @@
overflow: hidden; overflow: hidden;
} }
.tree-toggle-wrap { .tree-toggle {
position: relative; display: flex;
width: 20px; justify-content: center;
height: calc(100vh - 94px); align-items: center;
left: 245px;
.tree-toggle { right: 0;
display: flex; background: #f2f5fc;
justify-content: center; position: absolute;
align-items: center; top: calc(50% - 40px);
left: 0; width: 12px;
right: 0; height: 80px;
background: #f2f5fc; border-radius: 0 12px 12px 0;
position: absolute; -ms-transform: translateY(-50%);
top: calc(50% - 40px); transform: translateY(-50%);
width: 12px; cursor: pointer;
height: 80px;
border-radius: 0 12px 12px 0;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
cursor: pointer;
}
} }
.right { .right {
width: calc(100% - 250px); display: flex;
width: calc(100% - 245px);
flex-direction: column;
} }
} }
...@@ -43,7 +39,11 @@ ...@@ -43,7 +39,11 @@
width: 0; width: 0;
} }
.tree-toggle {
left: 0;
}
.right { .right {
width: calc(100% - 20px); width: 100%;
} }
} }
\ No newline at end of file
...@@ -80,6 +80,7 @@ const AddAssetModel = (props) => { ...@@ -80,6 +80,7 @@ const AddAssetModel = (props) => {
<Button type="primary" onClick={ onOk } loading={ confirmLoading }>确定</Button> <Button type="primary" onClick={ onOk } loading={ confirmLoading }>确定</Button>
</Space> </Space>
} }
bodyStyle={{ padding: '10px' }}
> >
<AssetAction <AssetAction
form={form} form={form}
......
...@@ -422,7 +422,7 @@ const AssetAction = (props) => { ...@@ -422,7 +422,7 @@ const AssetAction = (props) => {
</div> </div>
{ {
(index < (attributes.length-1)) && <Separate height={8} /> currentAction!=='add' && (index < (attributes.length-1)) && <Separate height={8} />
} }
</div> </div>
); );
......
...@@ -136,7 +136,7 @@ const AssetDirectory = (props) => { ...@@ -136,7 +136,7 @@ const AssetDirectory = (props) => {
</Tooltip> </Tooltip>
</Paragraph> </Paragraph>
</div> </div>
<div className='mb-common'> <div className={(reference===AssetManageReference)?'mb-common':''}>
<Paragraph> <Paragraph>
<Tooltip title={dir?.desc||''}> <Tooltip title={dir?.desc||''}>
<Text className='title-color' ellipsis={true}> <Text className='title-color' ellipsis={true}>
......
...@@ -515,9 +515,9 @@ const AssetTable = (props) => { ...@@ -515,9 +515,9 @@ const AssetTable = (props) => {
} else if (reference===AssetManageReference) { } else if (reference===AssetManageReference) {
scrollY = 'calc(100vh - 182px - 139px - 15px - 80px)'; scrollY = 'calc(100vh - 182px - 139px - 15px - 80px)';
} else if (reference===AssetBrowseReference||reference===ResourceBrowseReference) { } else if (reference===AssetBrowseReference||reference===ResourceBrowseReference) {
scrollY = 'calc(100vh - 182px - 84px - 52px - 12px)'; scrollY = 'calc(100vh - 182px - 102px - 15px - 80px)';
} else if (reference===AssetRecycleReference) { } else if (reference===AssetRecycleReference) {
scrollY = 'calc(100vh - 182px - 52px - 12px)'; scrollY = 'calc(100vh - 182px - 80px)';
} }
} }
......
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