Commit 2a678b49 by zhaochengxiang

bug fix

parent 8ddc7b0a
......@@ -418,6 +418,10 @@ export function getAssetTypeByRange(range) {
return (range==='dataAsset_dataAssetManage' || range==='dataAsset_dataAssetBrowse') ? 'dataAsset' : 'resource'
}
export function getAssetTypeName(menuName) {
return (menuName===ResourceManageReference || menuName===ResourceBrowseReference) ? '资源' : '资产'
}
export function getAssetRange(menuName) {
if (menuName === ResourceManageReference ) {
return 'dataAsset_resourceManage';
......
......@@ -3,7 +3,7 @@ import { Form, Spin, Input, Descriptions, Space, Button, Tooltip, Select } from
import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { dispatch } from '../../../../model';
import { highlightSearchContentByTerms, showMessage, getAssetRange, checkMenuAdmit, getAssetType } from '../../../../util';
import { highlightSearchContentByTerms, showMessage, getAssetRange, checkMenuAdmit, getAssetType, getAssetTypeName } from '../../../../util';
import { AppContext } from '../../../../App';
import Separate from './Separate';
import { AnchorId, AnchorDirId, AssetManageReference, ResourceManageReference } from '../../../../util/constant';
......@@ -15,6 +15,7 @@ import ResourceItem from '../../AssetResourceManage/resource-item';
import { CancelSvg, EditSvg, SaveSvg, FullScreenSvg, CancelFullScreenSvg } from './AssetSvg';
import { Subject } from 'rxjs';
import { AssetDirectorySubject } from './AssetDirectory';
import { refreshDataModelCatalog } from '../../../../service/datamodeler';
export const AssetActionSubject = new Subject();
......@@ -378,7 +379,7 @@ const AssetAction = (props) => {
color: '#fff',
}}
>
<div>资产详情</div>
<div>{`${getAssetTypeName(reference)}详情`}</div>
<Space>
{
((id||'')!=='') && <React.Fragment>
......@@ -420,7 +421,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 }}>{`${getAssetTypeName(reference)}路径`}</div>}
style={{ paddingBottom: 15 }}
>
<div className='flex' style={{ flexDirection: 'column' }}>
......@@ -437,7 +438,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 }}>{`${getAssetTypeName(reference)}标签`}</div>} style={{ paddingBottom: 15 }}>
{
assets?.id && <DataQuality
type={DataQualityFeignTagList}
......
......@@ -2,6 +2,7 @@ import React from 'react';
import { Drawer, Form } from 'antd';
import AssetAction from './AssetAction';
import { getAssetTypeName } from '../../../../util';
const AssetDetailDrawer = (props) => {
const { onCancel, visible, id, dirId, previewAble, reference } = props;
......@@ -11,7 +12,7 @@ const AssetDetailDrawer = (props) => {
<Drawer
forceRender
visible={ visible }
title='资产详情'
title={`${getAssetTypeName(reference)}详情`}
width={600}
placement="right"
closable={ true }
......
......@@ -7,7 +7,7 @@ import ImportElement from './ImportElement';
import AttributeRelationModal from "./AttributeRelationModal";
import FilterElementModal from './FilterElementModal';
import ChangeElementValue from './change-element-value';
import { showNotifaction, getAssetRange, getAssetType } from '../../../../util';
import { showNotifaction, getAssetRange, getAssetType, getAssetTypeName } from '../../../../util';
import { MoreSvg } from './AssetSvg';
import Separate from './Separate';
import record from '../Assets/record.png';
......@@ -179,7 +179,7 @@ const AssetDirectory = (props) => {
permissions={permissions}
>
<div className='text-center'>
导入资产属性
{`导入${getAssetTypeName(reference)}属性`}
</div>
</PermissionMenuItem>
<PermissionMenuItem
......@@ -188,7 +188,7 @@ const AssetDirectory = (props) => {
permissions={permissions}
>
<div className='text-center'>
导出资产属性
{`导出${getAssetTypeName(reference)}属性`}
</div>
</PermissionMenuItem>
<PermissionMenuItem
......@@ -197,7 +197,7 @@ const AssetDirectory = (props) => {
permissions={permissions}
>
<div className='text-center'>
资产属性管理
{`${getAssetTypeName(reference)}属性管理`}
</div>
</PermissionMenuItem>
{
......@@ -207,7 +207,7 @@ const AssetDirectory = (props) => {
permissions={permissions}
>
<div className='text-center'>
资产属性关联
{`${getAssetTypeName(reference)}属性关联`}
</div>
</PermissionMenuItem>
}
......
......@@ -3,7 +3,7 @@ import { Modal, Form, TreeSelect, Select, Space, Button, Row, Col, } from 'antd'
import { dispatch } from '../../../../model';
import { AssetManageReference, ResourceManageReference } from '../../../../util/constant';
import { getAssetType } from '../../../../util';
import { getAssetType, getAssetTypeName } from '../../../../util';
const MetaModelSelect = ({ value = {}, metaModelTreeData = [], onChange, ...restProps }) => {
const [ attributes, setAttributes ] = useState([]);
......@@ -240,7 +240,7 @@ const AttributeRelationModal = (props) => {
return (
<Modal
forceRender
title={'资产属性关联'}
title={`${getAssetTypeName(type)}属性关联`}
visible={visible}
width={600}
onCancel={() => {
......
......@@ -3,7 +3,7 @@ import { Row, Col, Checkbox, Typography, Button, Switch, Modal } from 'antd';
import { dispatch } from '../../../../model';
import './FilterElementModal.less';
import { getAssetRange, getAssetType } from '../../../../util';
import { getAssetRange, getAssetType, getAssetTypeName } from '../../../../util';
//type
//global 全局设置
......@@ -168,7 +168,7 @@ const FilterElementModal = (props) => {
<Modal
forceRender
visible={visible}
title={type==='global'?'资产属性管理':'可见列设置'}
title={type==='global'?`${getAssetTypeName(reference)}属性管理`:'可见列设置'}
width={520}
onCancel={cancel}
footer={[
......
......@@ -3,7 +3,7 @@ import { Button, Upload, Modal } from 'antd';
import { DownloadOutlined, UploadOutlined } from '@ant-design/icons';
import { dispatchLatest } from '../../../../model';
import { getAssetType, showMessage } from '../../../../util';
import { getAssetType, getAssetTypeName, showMessage } from '../../../../util';
import { AssetManageReference } from '../../../../util/constant';
const ImportElement = (props) => {
......@@ -68,7 +68,7 @@ const ImportElement = (props) => {
<Modal
forceRender
visible={visible}
title='资产属性导入'
title={`${getAssetTypeName(type)}属性导入`}
width={520}
confirmLoading={confirmLoading}
onCancel={() => {
......
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