Commit eeff54a2 by zhaochengxiang

资产改为资产目录

parent 946cc452
...@@ -52,7 +52,7 @@ const AddAssetModel = (props) => { ...@@ -52,7 +52,7 @@ const AddAssetModel = (props) => {
callback: isExist => { callback: isExist => {
if (isExist === 'true') { if (isExist === 'true') {
setConfirmLoading(false); setConfirmLoading(false);
showMessage('warn', '已存在相同的资产编号,请重新输入'); showMessage('warn', '已存在相同的资产目录编号,请重新输入');
} else { } else {
dispatch({ dispatch({
type: 'assetmanage.addOrUpdateDataAsset', type: 'assetmanage.addOrUpdateDataAsset',
...@@ -86,7 +86,7 @@ const AddAssetModel = (props) => { ...@@ -86,7 +86,7 @@ const AddAssetModel = (props) => {
<Modal <Modal
forceRender forceRender
className='asset-add' className='asset-add'
title='新增资产信息' title='新增资产目录信息'
visible={ visible } visible={ visible }
width={ 600 } width={ 600 }
onCancel={() => { onCancel && onCancel(); } } onCancel={() => { onCancel && onCancel(); } }
......
...@@ -569,7 +569,7 @@ const AssetAction = (props) => { ...@@ -569,7 +569,7 @@ const AssetAction = (props) => {
data: assets data: assets
}) })
} else { } else {
showMessage("warn","该资产没有关联元数据信息"); showMessage("warn","该资产目录没有关联元数据信息");
} }
} }
...@@ -581,7 +581,7 @@ const AssetAction = (props) => { ...@@ -581,7 +581,7 @@ const AssetAction = (props) => {
} else if (item.resourceType==='dataAsset') { } else if (item.resourceType==='dataAsset') {
window.open(`/center-home/menu/asset-browse?${AnchorId}=${item?.dataAssetId}&${AnchorDirId}=${item?.dirId}&timestamp=${timestamp}`); window.open(`/center-home/menu/asset-browse?${AnchorId}=${item?.dataAssetId}&${AnchorDirId}=${item?.dirId}&timestamp=${timestamp}`);
} else { } else {
showMessage('warn', '资产类型不是资源也不是资产!'); showMessage('warn', '资产目录类型不是资源也不是资产!');
} }
} }
...@@ -594,7 +594,7 @@ const AssetAction = (props) => { ...@@ -594,7 +594,7 @@ const AssetAction = (props) => {
} else if (relation.resourceType==='dataAsset') { } else if (relation.resourceType==='dataAsset') {
window.open(`/center-home/menu/asset-browse?${AnchorId}=${relation?.dataAssetId}&${AnchorDirId}=${relation?.dirId}&timestamp=${timestamp}`); window.open(`/center-home/menu/asset-browse?${AnchorId}=${relation?.dataAssetId}&${AnchorDirId}=${relation?.dirId}&timestamp=${timestamp}`);
} else { } else {
showMessage('warn', '资产类型不是资源也不是资产!'); showMessage('warn', '资产目录类型不是资源也不是资产!');
} }
} }
...@@ -627,7 +627,7 @@ const AssetAction = (props) => { ...@@ -627,7 +627,7 @@ const AssetAction = (props) => {
callback: isExist => { callback: isExist => {
if (isExist === 'true') { if (isExist === 'true') {
setConfirmLoading(false); setConfirmLoading(false);
showMessage('warn', '已存在相同的资产编号,请重新输入'); showMessage('warn', '已存在相同的资产目录编号,请重新输入');
} else { } else {
dispatch({ dispatch({
type: 'assetmanage.addOrUpdateDataAsset', type: 'assetmanage.addOrUpdateDataAsset',
...@@ -842,6 +842,7 @@ const AssetAction = (props) => { ...@@ -842,6 +842,7 @@ const AssetAction = (props) => {
return <SelectUser return <SelectUser
type='detail' type='detail'
users={users} users={users}
terms={terms}
value={item.value||''} value={item.value||''}
/> />
} }
...@@ -932,7 +933,7 @@ const AssetAction = (props) => { ...@@ -932,7 +933,7 @@ const AssetAction = (props) => {
<div className='pl-common py-compact-common'> <div className='pl-common py-compact-common'>
<Descriptions column={1}> <Descriptions column={1}>
<Descriptions.Item <Descriptions.Item
label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产路径</div>} label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产目录路径</div>}
style={{ paddingBottom: 0 }} style={{ paddingBottom: 0 }}
> >
<div className='flex' style={{ flexDirection: 'column' }}> <div className='flex' style={{ flexDirection: 'column' }}>
...@@ -947,7 +948,7 @@ const AssetAction = (props) => { ...@@ -947,7 +948,7 @@ const AssetAction = (props) => {
} }
</div> </div>
</Descriptions.Item> </Descriptions.Item>
{/* <Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产标签</div>} style={{ paddingBottom: 15 }}> {/* <Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产目录标签</div>} style={{ paddingBottom: 15 }}>
<AppContext.Consumer> <AppContext.Consumer>
{ {
value => { value => {
...@@ -1063,7 +1064,7 @@ const AssetAction = (props) => { ...@@ -1063,7 +1064,7 @@ const AssetAction = (props) => {
{/* </div> */} {/* </div> */}
<div> <div>
<Divider orientation='left'>字段级资产信息</Divider> <Divider orientation='left'>字段级资产目录信息</Divider>
</div> </div>
<Space style={{ marginLeft: 'auto' }}> <Space style={{ marginLeft: 'auto' }}>
...@@ -1077,7 +1078,7 @@ const AssetAction = (props) => { ...@@ -1077,7 +1078,7 @@ const AssetAction = (props) => {
metadataId: metadata?.metadataTableId metadataId: metadata?.metadataTableId
}); });
} else { } else {
showMessage("warn","该资产没有关联元数据信息"); showMessage("warn","该资产目录没有关联元数据信息");
} }
}} }}
> >
......
...@@ -13,7 +13,7 @@ const AssetDeleteModal = (props) => { ...@@ -13,7 +13,7 @@ const AssetDeleteModal = (props) => {
return ( return (
<Modal <Modal
title="删除资产" title="删除资产目录"
visible={visible} visible={visible}
width={530} width={530}
onCancel={ onCancel={
...@@ -33,12 +33,12 @@ const AssetDeleteModal = (props) => { ...@@ -33,12 +33,12 @@ const AssetDeleteModal = (props) => {
> >
<Radio.Group onChange={onChange} value={value}> <Radio.Group onChange={onChange} value={value}>
<Radio value={1}> <Radio value={1}>
<span>删除本目录下的资产</span> <span>删除本目录下的资产目录</span>
&nbsp; &nbsp;
<Popover content={ <Popover content={
<span> <span>
当要删除的资产,只存在一个目录时,删除该资产并且设置为未分类资产;<br/> 当要删除的资产目录,只存在一个目录时,删除该资产目录并且设置为未分类资产目录;<br/>
存在多个目录时,只删除该目录下的这项资产,不会设置为未分类资产 存在多个目录时,只删除该目录下的这项资产目录,不会设置为未分类资产目录
</span> </span>
} }
> >
...@@ -46,9 +46,9 @@ const AssetDeleteModal = (props) => { ...@@ -46,9 +46,9 @@ const AssetDeleteModal = (props) => {
</Popover> </Popover>
</Radio> </Radio>
<Radio value={2}> <Radio value={2}>
<span>删除该资产(所有目录下的资产均删除)</span> <span>删除该资产目录(所有目录下的资产目录均删除)</span>
&nbsp; &nbsp;
<Popover content='该资产所在的目录内,均删除该项资产,并设置为未分类资产' > <Popover content='该资产目录所在的目录内,均删除该项资产目录,并设置为未分类资产目录' >
<QuestionCircleOutlined className='pointer' /> <QuestionCircleOutlined className='pointer' />
</Popover> </Popover>
</Radio> </Radio>
......
...@@ -12,7 +12,7 @@ const AssetDetailDrawer = (props) => { ...@@ -12,7 +12,7 @@ const AssetDetailDrawer = (props) => {
<Drawer <Drawer
forceRender forceRender
visible={ visible } visible={ visible }
title='资产详情' title='资产目录详情'
width='80%' width='80%'
placement="right" placement="right"
closable={ true } closable={ true }
......
...@@ -23,7 +23,7 @@ const AssetDetailPage = (props)=>{ ...@@ -23,7 +23,7 @@ const AssetDetailPage = (props)=>{
return( return(
<div className='asset-detail position-relative'> <div className='asset-detail position-relative'>
<div className='detail-header'> <div className='detail-header'>
<span style={{ fontSize: 16, fontWeight: 'bold', color: '#fff' }}>资产详情</span> <span style={{ fontSize: 16, fontWeight: 'bold', color: '#fff' }}>资产目录详情</span>
</div> </div>
<div className='detail-container'> <div className='detail-container'>
<div className='detail-container-card'> <div className='detail-container-card'>
......
...@@ -130,22 +130,22 @@ const AssetDirectory = (props) => { ...@@ -130,22 +130,22 @@ const AssetDirectory = (props) => {
<Menu> <Menu>
<Menu.Item> <Menu.Item>
<div className='text-center' onClick={onImportElementBtnClick}> <div className='text-center' onClick={onImportElementBtnClick}>
导入资产属性 导入资产目录属性
</div> </div>
</Menu.Item> </Menu.Item>
<Menu.Item> <Menu.Item>
<div className='text-center' onClick={onExportElementBtnClick}> <div className='text-center' onClick={onExportElementBtnClick}>
导出资产属性 导出资产目录属性
</div> </div>
</Menu.Item> </Menu.Item>
<Menu.Item> <Menu.Item>
<div className='text-center' onClick={onFilterElementClick}> <div className='text-center' onClick={onFilterElementClick}>
资产浏览管理 资产目录浏览管理
</div> </div>
</Menu.Item> </Menu.Item>
<Menu.Item> <Menu.Item>
<div className='text-center' onClick={onAttributeRelationBtnClick}> <div className='text-center' onClick={onAttributeRelationBtnClick}>
资产属性关联 资产目录属性关联
</div> </div>
</Menu.Item> </Menu.Item>
</Menu> </Menu>
......
...@@ -457,7 +457,7 @@ const AssetManageTree = (props) => { ...@@ -457,7 +457,7 @@ const AssetManageTree = (props) => {
} }
}) })
} else { } else {
showMessage("warn","目录下有资产信息,不允许删除!"); showMessage("warn","目录下有资产目录信息,不允许删除!");
} }
} }
}) })
......
...@@ -413,7 +413,7 @@ const AssetTable = (props) => { ...@@ -413,7 +413,7 @@ const AssetTable = (props) => {
} }
_metadataIndex = `element${index}`; _metadataIndex = `element${index}`;
} else if (name === '资产路径') { } else if (name === '资产目录路径') {
params.render = (text, record) => { params.render = (text, record) => {
return ( return (
<Tooltip title={text||''}> <Tooltip title={text||''}>
...@@ -623,7 +623,7 @@ const AssetTable = (props) => { ...@@ -623,7 +623,7 @@ const AssetTable = (props) => {
if ((checkedKeys||[]).length === 0) { if ((checkedKeys||[]).length === 0) {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '是否导出所有资产?', content: '是否导出所有资产目录?',
onOk: () => { onOk: () => {
window.open('/api/dataassetmanager/dataAssetApi/exportByDataAssetIds?exportAll=true'); window.open('/api/dataassetmanager/dataAssetApi/exportByDataAssetIds?exportAll=true');
} }
...@@ -638,7 +638,7 @@ const AssetTable = (props) => { ...@@ -638,7 +638,7 @@ const AssetTable = (props) => {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '是否确认订阅选中资产?', content: '是否确认订阅选中资产目录?',
onOk: () => { onOk: () => {
let payload = { let payload = {
dataAssetIds: (checkedKeys||[]).join(','), dataAssetIds: (checkedKeys||[]).join(','),
...@@ -669,7 +669,7 @@ const AssetTable = (props) => { ...@@ -669,7 +669,7 @@ const AssetTable = (props) => {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '您确定要删除这些资产吗?', content: '您确定要删除这些资产目录吗?',
onOk: () => { onOk: () => {
let payload = { let payload = {
data: checkedKeys data: checkedKeys
...@@ -773,7 +773,7 @@ const AssetTable = (props) => { ...@@ -773,7 +773,7 @@ const AssetTable = (props) => {
if ((checkedKeys||[]).length > 0) { if ((checkedKeys||[]).length > 0) {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '您确定要恢复这些资产吗?', content: '您确定要恢复这些资产目录吗?',
onOk: () => { onOk: () => {
let payload = { let payload = {
data: checkedKeys data: checkedKeys
...@@ -791,7 +791,7 @@ const AssetTable = (props) => { ...@@ -791,7 +791,7 @@ const AssetTable = (props) => {
} }
}) })
}else{ }else{
showMessage("warn","请选择资产"); showMessage("warn","请选择资产目录");
} }
} }
...@@ -835,7 +835,7 @@ const AssetTable = (props) => { ...@@ -835,7 +835,7 @@ const AssetTable = (props) => {
if (id === 'uncombed') { if (id === 'uncombed') {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '是否将该条非资产的资源转为未梳理状态?', content: '是否将该条非资产目录的资源转为未梳理状态?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'assetmanage.updateResourceState', type: 'assetmanage.updateResourceState',
...@@ -859,7 +859,7 @@ const AssetTable = (props) => { ...@@ -859,7 +859,7 @@ const AssetTable = (props) => {
} else if (id === 'notRelatedAsset') { } else if (id === 'notRelatedAsset') {
modal.confirm({ modal.confirm({
title: '提示', title: '提示',
content: '是否将该条未梳理的资源转为非资产?', content: '是否将该条未梳理的资源转为非资产目录?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'assetmanage.updateResourceState', type: 'assetmanage.updateResourceState',
...@@ -887,7 +887,7 @@ const AssetTable = (props) => { ...@@ -887,7 +887,7 @@ const AssetTable = (props) => {
data: record data: record
}) })
} else { } else {
showMessage("warn","该资产没有关联元数据信息"); showMessage("warn","该资产目录没有关联元数据信息");
} }
} }
} }
...@@ -986,7 +986,7 @@ const AssetTable = (props) => { ...@@ -986,7 +986,7 @@ const AssetTable = (props) => {
{ {
// (reference===AssetBrowseReference||reference===ResourceBrowseReference) && // (reference===AssetBrowseReference||reference===ResourceBrowseReference) &&
// <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> // <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产目录':''}>
// <Button onClick={onStartFlowClick} disabled={(checkedKeys||[]).length===0} >申请</Button> // <Button onClick={onStartFlowClick} disabled={(checkedKeys||[]).length===0} >申请</Button>
// </Tooltip> // </Tooltip>
} }
...@@ -997,31 +997,31 @@ const AssetTable = (props) => { ...@@ -997,31 +997,31 @@ const AssetTable = (props) => {
</Dropdown> : <React.Fragment> </Dropdown> : <React.Fragment>
{ {
// (reference===AssetManageReference) && // (reference===AssetManageReference) &&
// <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> // <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产目录':''}>
// <Button onClick={onStartFlowClick} disabled={(checkedKeys||[]).length===0} >申请</Button> // <Button onClick={onStartFlowClick} disabled={(checkedKeys||[]).length===0} >申请</Button>
// </Tooltip> // </Tooltip>
} }
{ {
(reference!==AssetRecycleReference) && (reference!==AssetRecycleReference) &&
<Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产目录':''}>
<Button onClick={subscriptAsset} disabled={(checkedKeys||[]).length===0} >订阅</Button> <Button onClick={subscriptAsset} disabled={(checkedKeys||[]).length===0} >订阅</Button>
</Tooltip> </Tooltip>
} }
{ {
(reference===AssetManageReference || reference===AssetRecycleReference) && <React.Fragment> (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>
{ {
(reference===AssetRecycleReference) && <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> (reference===AssetRecycleReference) && <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产目录':''}>
<Button onClick={recoveryAssets} disabled={(checkedKeys||[]).length===0} >恢复</Button> <Button onClick={recoveryAssets} disabled={(checkedKeys||[]).length===0} >恢复</Button>
</Tooltip> </Tooltip>
} }
{ {
//自定义目录下的资产不允许删除 //自定义目录下的资产不允许删除
(nodeType!=='custom') && <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产':''}> (nodeType!=='custom') && <Tooltip title={(checkedKeys||[]).length===0?'请先选择资产目录':''}>
<Button onClick={deleteAssets} disabled={(checkedKeys||[]).length===0} >删除</Button> <Button onClick={deleteAssets} disabled={(checkedKeys||[]).length===0} >删除</Button>
</Tooltip> </Tooltip>
} }
...@@ -1039,7 +1039,7 @@ const AssetTable = (props) => { ...@@ -1039,7 +1039,7 @@ const AssetTable = (props) => {
(reference!==AssetRecycleReference) && <Checkbox onChange={onFullSearchChange} checked={fullSearch}>全部数据</Checkbox> (reference!==AssetRecycleReference) && <Checkbox onChange={onFullSearchChange} checked={fullSearch}>全部数据</Checkbox>
} }
<Search <Search
placeholder="请输入资产要素值" placeholder="请输入资产目录要素值"
allowClear allowClear
onSearch={onSearchInputChange} onSearch={onSearchInputChange}
enterButton enterButton
......
...@@ -158,7 +158,7 @@ const AssetTagModal = (props) => { ...@@ -158,7 +158,7 @@ const AssetTagModal = (props) => {
callback: isExist => { callback: isExist => {
if (isExist === 'true') { if (isExist === 'true') {
setConfirmLoading(false); setConfirmLoading(false);
showMessage('warn', '已存在相同的资产编号,请重新输入'); showMessage('warn', '已存在相同的资产目录编号,请重新输入');
} else { } else {
dispatch({ dispatch({
type: 'assetmanage.addOrUpdateDataAsset', type: 'assetmanage.addOrUpdateDataAsset',
...@@ -228,7 +228,7 @@ const AssetTagModal = (props) => { ...@@ -228,7 +228,7 @@ const AssetTagModal = (props) => {
<Modal <Modal
forceRender forceRender
className='asset-add' className='asset-add'
title='资产打标签' title='资产目录打标签'
visible={ visible } visible={ visible }
width={ 600 } width={ 600 }
onCancel={() => { onCancel={() => {
...@@ -261,7 +261,7 @@ const AssetTagModal = (props) => { ...@@ -261,7 +261,7 @@ const AssetTagModal = (props) => {
return ( return (
<> <>
<Form.Item <Form.Item
label='资产标签' label='资产目录标签'
name='tag' name='tag'
> >
<span>{tag?.name||''}</span> <span>{tag?.name||''}</span>
......
...@@ -368,7 +368,7 @@ const AssetTree = (props) => { ...@@ -368,7 +368,7 @@ const AssetTree = (props) => {
} }
}) })
} else { } else {
showMessage("warn","目录下有资产信息,不允许删除!"); showMessage("warn","目录下有资产目录信息,不允许删除!");
} }
} }
}) })
......
...@@ -8,7 +8,7 @@ import { AppContext } from '../../../../App'; ...@@ -8,7 +8,7 @@ import { AppContext } from '../../../../App';
import download from '../../../../util/download'; import download from '../../../../util/download';
const catalogs = [ const catalogs = [
{ title: '字段级资产', key: '1' }, { title: '字段级资产目录', key: '1' },
{ title: '映射关系', key: '2' }, { title: '映射关系', key: '2' },
] ]
...@@ -265,7 +265,7 @@ const FC = (props) => { ...@@ -265,7 +265,7 @@ const FC = (props) => {
return ( return (
<Drawer <Drawer
visible={visible} visible={visible}
title='字段级资产维护' title='字段级资产目录维护'
width={900} width={900}
placement="right" placement="right"
closable={ true } closable={ true }
......
...@@ -389,7 +389,7 @@ const AttributeRelationModal = (props) => { ...@@ -389,7 +389,7 @@ const AttributeRelationModal = (props) => {
return ( return (
<Modal <Modal
forceRender forceRender
title={'资产属性关联'} title={'资产目录属性关联'}
visible={visible} visible={visible}
width={1000} width={1000}
onCancel={() => { onCancel={() => {
......
...@@ -254,10 +254,10 @@ const CustomDirectoryModal = (props) => { ...@@ -254,10 +254,10 @@ const CustomDirectoryModal = (props) => {
> >
<Row gutter={30}> <Row gutter={30}>
<Col span={8} style={{ borderRight: '1px solid #EFEFEF' }}> <Col span={8} style={{ borderRight: '1px solid #EFEFEF' }}>
<div className='mb-3'>资产要素</div> <div className='mb-3'>资产目录要素</div>
<Input <Input
value={keyword} value={keyword}
placeholder='请输入资产要素' placeholder='请输入资产目录要素'
style={{ marginBottom:10 }} style={{ marginBottom:10 }}
onChange={(e) => { onSearchChange(e) }} onChange={(e) => { onSearchChange(e) }}
/> />
......
...@@ -157,7 +157,7 @@ const FilterElementModal = (props) => { ...@@ -157,7 +157,7 @@ const FilterElementModal = (props) => {
<Modal <Modal
forceRender forceRender
visible={visible} visible={visible}
title={type==='global'?'资产浏览管理':'可见列设置'} title={type==='global'?'资产目录浏览管理':'可见列设置'}
width={520} width={520}
onCancel={cancel} onCancel={cancel}
footer={[ footer={[
......
...@@ -170,7 +170,7 @@ const ImportAssetDrawer = (props) => { ...@@ -170,7 +170,7 @@ const ImportAssetDrawer = (props) => {
<Drawer <Drawer
forceRender forceRender
visible={ visible } visible={ visible }
title='资产导入' title='资产目录导入'
width={900} width={900}
placement="right" placement="right"
closable={ true } closable={ true }
......
...@@ -62,7 +62,7 @@ const ImportElement = (props) => { ...@@ -62,7 +62,7 @@ const ImportElement = (props) => {
<Modal <Modal
forceRender forceRender
visible={visible} visible={visible}
title='资产属性导入' title='资产目录属性导入'
width={520} width={520}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
onCancel={() => { onCancel={() => {
......
...@@ -44,7 +44,7 @@ const StartFlowModal = (props) => { ...@@ -44,7 +44,7 @@ const StartFlowModal = (props) => {
reset(); reset();
if (data) { if (data) {
showNotifaction('申请提示', (data === 'ok')?'资产申请成功,请在我的流程》我的申请中查看详情':data, 5); showNotifaction('申请提示', (data === 'ok')?'资产目录申请成功,请在我的流程》我的申请中查看详情':data, 5);
} }
onCancel && onCancel(true); onCancel && onCancel(true);
...@@ -68,7 +68,7 @@ const StartFlowModal = (props) => { ...@@ -68,7 +68,7 @@ const StartFlowModal = (props) => {
<Modal <Modal
forceRender forceRender
visible={visible} visible={visible}
title='资产申请' title='资产目录申请'
width={520} width={520}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
onCancel={() => { onCancel={() => {
...@@ -84,7 +84,7 @@ const StartFlowModal = (props) => { ...@@ -84,7 +84,7 @@ const StartFlowModal = (props) => {
<Form.Item <Form.Item
label="申请原因" label="申请原因"
name="desc" name="desc"
rules={[{ required: true, message: '请在申请原因栏中描述用途说明以及必要性(资产和服务权限申请需要说明请求字段)' }]} rules={[{ required: true, message: '请在申请原因栏中描述用途说明以及必要性(资产目录和服务权限申请需要说明请求字段)' }]}
> >
<Input.TextArea rows={6} /> <Input.TextArea rows={6} />
</Form.Item> </Form.Item>
......
...@@ -106,7 +106,7 @@ const UpdateDirectoryModal = (props) => { ...@@ -106,7 +106,7 @@ const UpdateDirectoryModal = (props) => {
if (row.type === 'directory') { if (row.type === 'directory') {
if (dir === null) { if (dir === null) {
showMessage('warn', '资产目录节点信息正在加载中...'); showMessage('warn', '资产目录的目录节点信息正在加载中...');
return; return;
} }
...@@ -119,7 +119,7 @@ const UpdateDirectoryModal = (props) => { ...@@ -119,7 +119,7 @@ const UpdateDirectoryModal = (props) => {
} else { } else {
if (dir === null) { if (dir === null) {
showMessage('warn', '资产目录节点信息正在加载中...'); showMessage('warn', '资产目录的目录节点信息正在加载中...');
return; return;
} }
...@@ -164,7 +164,7 @@ const UpdateDirectoryModal = (props) => { ...@@ -164,7 +164,7 @@ const UpdateDirectoryModal = (props) => {
form.resetFields(); form.resetFields();
} else { } else {
if (dir === null) { if (dir === null) {
showMessage('warn', '资产目录节点信息正在加载中...'); showMessage('warn', '资产目录的目录节点信息正在加载中...');
return; return;
} }
...@@ -199,7 +199,7 @@ const UpdateDirectoryModal = (props) => { ...@@ -199,7 +199,7 @@ const UpdateDirectoryModal = (props) => {
return ( return (
<Modal <Modal
forceRender forceRender
title={'资产目录信息'} title={'资产目录的目录信息'}
visible={visible} visible={visible}
width={600} width={600}
onCancel={() => { onCancel={() => {
...@@ -232,7 +232,7 @@ const UpdateDirectoryModal = (props) => { ...@@ -232,7 +232,7 @@ const UpdateDirectoryModal = (props) => {
} }
{ {
((action==='add'&&isThemeAdd) || action!=='add') && <Form.Item ((action==='add'&&isThemeAdd) || action!=='add') && <Form.Item
label="资产类型" label="资产目录类型"
name="resourceType" name="resourceType"
rules={[{ required: false }]} rules={[{ required: false }]}
> >
......
...@@ -19,7 +19,7 @@ const AssetMount = (props) => { ...@@ -19,7 +19,7 @@ const AssetMount = (props) => {
const onOk = () => { const onOk = () => {
if ((dirIds||[]).length === 0) { if ((dirIds||[]).length === 0) {
showMessage('warn', '请先选择资产目录'); showMessage('warn', '请先选择资产目录的目录');
return; return;
} }
......
...@@ -2,11 +2,13 @@ import React, { useState, useMemo, useEffect } from "react" ...@@ -2,11 +2,13 @@ import React, { useState, useMemo, useEffect } from "react"
import {Select} from "antd" import {Select} from "antd"
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import { highlightSearchContentByTerms } from '../../../../util';
const {Option} = Select const {Option} = Select
const SelectUser:React.FC=(props)=>{ const SelectUser:React.FC=(props)=>{
const {value,onChange,users,type,loading} = props const {value,onChange,users,type,loading, terms} = props
const [searchValue, setSearchValue] = useState(undefined) const [searchValue, setSearchValue] = useState(undefined)
...@@ -52,9 +54,9 @@ const SelectUser:React.FC=(props)=>{ ...@@ -52,9 +54,9 @@ const SelectUser:React.FC=(props)=>{
}else if(type==='detail'){ }else if(type==='detail'){
try { try {
const user = users?.filter((item)=>(item.pernr===value)) const user = users?.filter((item)=>(item.pernr===value))
return `${user[0].nachn}(${user[0].pernr})`; return highlightSearchContentByTerms(`${user[0].nachn}(${user[0].pernr})`, terms);
} catch (error) { } catch (error) {
return value return highlightSearchContentByTerms(value, terms)
} }
}else{ }else{
return null return null
......
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