Commit 2aa7ad81 by zhaochengxiang

调整

parent 3211035b
import React,{ useState, useEffect, useRef, useMemo } from "react";
import { Button, Pagination, Space, Modal, Input, Table, Tooltip, Checkbox, Typography, Dropdown, Menu } from "antd";
import { Button, Pagination, Space, Modal, Input, Table, Tooltip, Checkbox, Typography, Dropdown, Menu, Select } from "antd";
import classNames from 'classnames';
import { Resizable } from 'react-resizable';
import ResizeObserver from 'rc-resize-observer';
......@@ -959,47 +959,88 @@ const AssetTable = (props) => {
}
}
return(
<div className={classes}>
<div
className='flex p-common'
style={{
alignItems: 'center',
justifyContent: 'space-between',
const ResourceHead = (
<React.Fragment>
<Space>
<Button onClick={onFilterElementClick}>可见列设置</Button>
</Space>
<Space>
<Select
onChange={(value) => {
}}
style={{ width: 140 }}
>
<Space size={15}>
{
//栏目和自定义目录 不允许新增资产
(reference===AssetManageReference && nodeLevel!==1 && nodeType!=='custom') && <PermissionButton
defaultPermission={canAdd}
onClick={addAsset}
<Select.Option value='current'>
当前目录
</Select.Option>
<Select.Option value='currentRecursive'>
当前及子孙目录
</Select.Option>
<Select.Option value='fullSearch'>
全部数据
</Select.Option>
</Select>
<Search
placeholder="请输入资产要素值"
allowClear
onSearch={onSearchInputChange}
enterButton
style={{ width: inputWidth }}
/>
<Tooltip title={fullScreen?'取消全屏':'全屏'}>
<Button onClick={onFullScreenClick} icon={fullScreen?<CancelFullScreenSvg style={{ width: 20, height: 20 }} />:<FullScreenSvg style={{ width: 20, height: 20 }} />} type='text'></Button>
</Tooltip>
</Space>
</React.Fragment>
)
const AssetHead = (
<React.Fragment>
<Space>
<Button onClick={onFilterElementClick}>可见列设置</Button>
</Space>
<Space>
<Select
onChange={(value) => {
}}
style={{ width: 140 }}
>
新增
</PermissionButton>
}
{
(compact && reference===AssetManageReference) ? <Dropdown overlay={moreMenu} placement="bottomCenter">
<Button>其他操作</Button>
</Dropdown> : <React.Fragment>
{
(reference===AssetManageReference && nodeType!=='custom') && <PermissionButton defaultPermission={canImport} onClick={importAsset}>导入</PermissionButton>
}
{
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment>
<PermissionButton defaultPermission={canExport} onClick={exportAsset} >导出</PermissionButton>
{
(reference === AssetManageReference) && <PermissionButton
defaultPermission={canChangeDir}
tip={(checkedKeys||[]).length===0?'请先选择资产':''}
onClick={onBatchCatalogChangeBtnClick}
disabled={(checkedKeys||[]).length===0}
<Select.Option value='current'>
当前目录
</Select.Option>
<Select.Option value='currentRecursive'>
当前及子孙目录
</Select.Option>
<Select.Option value='fullSearch'>
全部数据
</Select.Option>
</Select>
<Search
placeholder="请输入资产要素值"
allowClear
onSearch={onSearchInputChange}
enterButton
style={{ width: inputWidth }}
/>
<Tooltip title={fullScreen?'取消全屏':'全屏'}>
<Button onClick={onFullScreenClick} icon={fullScreen?<CancelFullScreenSvg style={{ width: 20, height: 20 }} />:<FullScreenSvg style={{ width: 20, height: 20 }} />} type='text'></Button>
</Tooltip>
</Space>
</React.Fragment>
)
const RecycleHead = (
<React.Fragment>
<Space>
<PermissionButton
defaultPermission={canExport}
onClick={exportAsset}
>
变更目录
导出
</PermissionButton>
}
{
(reference === AssetRecycleReference) && <PermissionButton
<PermissionButton
onClick={onBatchCatalogChangeBtnClick}
disabled={(checkedKeys||[]).length===0}
permissionKey='loadDataAsset'
......@@ -1008,9 +1049,6 @@ const AssetTable = (props) => {
>
挂载
</PermissionButton>
}
{
(reference===AssetRecycleReference) &&
<PermissionButton
onClick={recoveryAssets}
disabled={(checkedKeys||[]).length===0}
......@@ -1020,10 +1058,6 @@ const AssetTable = (props) => {
>
恢复
</PermissionButton>
}
{
//自定义目录下的资产不允许删除
(nodeType!=='custom') &&
<PermissionButton
defaultPermission={canDelete}
tip={(checkedKeys||[]).length===0?'请先选择资产':''}
......@@ -1032,20 +1066,9 @@ const AssetTable = (props) => {
>
删除
</PermissionButton>
}
</React.Fragment>
}
<Button onClick={onFilterElementClick}>可见列设置</Button>
</React.Fragment>
}
{
(reference!==AssetRecycleReference && isSzseEnv) && <Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox>
}
</Space>
<Space>
{
(reference!==AssetRecycleReference) && <Checkbox onChange={onFullSearchChange} checked={fullSearch}>全部数据</Checkbox>
}
<Search
placeholder="请输入资产要素值"
allowClear
......@@ -1053,12 +1076,28 @@ const AssetTable = (props) => {
enterButton
style={{ width: inputWidth }}
/>
</Space>
</React.Fragment>
)
return(
<div className={classes}>
<div
className='flex p-common'
style={{
alignItems: 'center',
justifyContent: 'space-between',
}}
>
{
(reference!==AssetRecycleReference) && <Tooltip title={fullScreen?'取消全屏':'全屏'}>
<Button onClick={onFullScreenClick} icon={fullScreen?<CancelFullScreenSvg style={{ width: 20, height: 20 }} />:<FullScreenSvg style={{ width: 20, height: 20 }} />} type='text'></Button>
</Tooltip>
reference === ResourceBrowseReference && ResourceHead
}
{
reference === AssetBrowseReference && AssetHead
}
{
reference === AssetRecycleReference && RecycleHead
}
</Space>
</div>
<div
className='px-common'
......
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