Commit eeff54a2 by zhaochengxiang

资产改为资产目录

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