Commit 8f7d1cb0 by zhaochengxiang

草稿放开字段编辑

parent 5f6ccbbf
...@@ -1443,7 +1443,7 @@ const AssetAction = (props) => { ...@@ -1443,7 +1443,7 @@ const AssetAction = (props) => {
</div> </div>
<Space style={{ marginLeft: 'auto' }}> <Space style={{ marginLeft: 'auto' }}>
{ {
!readonly && (reference===AssetManageReference||(reference!==AssetDraftReference&&canEdit)) && <React.Fragment> !readonly && (reference===AssetManageReference||canEdit) && <React.Fragment>
{ {
isMetadataEdit ? <React.Fragment> isMetadataEdit ? <React.Fragment>
<Button onClick={() => { <Button onClick={() => {
...@@ -1545,6 +1545,7 @@ const AssetAction = (props) => { ...@@ -1545,6 +1545,7 @@ const AssetAction = (props) => {
<AttributeMaintain <AttributeMaintain
visible={attributeMaintainParam.visible} visible={attributeMaintainParam.visible}
metadataId={attributeMaintainParam.metadataId} metadataId={attributeMaintainParam.metadataId}
reference={reference}
onCancel={onAttributeMaintainCancel} onCancel={onAttributeMaintainCancel}
onChange={onAttributeMaintainChange} onChange={onAttributeMaintainChange}
/> />
......
import React, { useState, useEffect, useContext } from 'react'; import React, { useState, useEffect, useContext, useMemo } from 'react';
import { Button, Upload, Drawer, Table, Pagination, Divider, Form, Typography, Select, Space, Radio, Modal, Spin } from 'antd'; import { Button, Upload, Drawer, Table, Pagination, Divider, Form, Typography, Select, Space, Radio, Modal, Spin } from 'antd';
import { UploadOutlined, DownloadOutlined } from '@ant-design/icons'; import { UploadOutlined, DownloadOutlined } from '@ant-design/icons';
...@@ -6,14 +6,10 @@ import { dispatch } from '../../../../model'; ...@@ -6,14 +6,10 @@ import { dispatch } from '../../../../model';
import { showMessage, formatDate } from '../../../../util'; import { showMessage, formatDate } from '../../../../util';
import { AppContext } from '../../../../App'; import { AppContext } from '../../../../App';
import download from '../../../../util/download'; import download from '../../../../util/download';
import { AssetDraftReference, AssetManageReference } from '../../../../util/constant';
const catalogs = [
{ title: '字段级资产目录', key: '1' },
{ title: '映射关系', key: '2' },
]
const FC = (props) => { const FC = (props) => {
const { onCancel, onSuccess, visible, metadataId, onChange } = props; const { onCancel, onSuccess, visible, metadataId, onChange, reference } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [catalogId, setCatalogId] = useState('1'); const [catalogId, setCatalogId] = useState('1');
...@@ -94,6 +90,17 @@ const FC = (props) => { ...@@ -94,6 +90,17 @@ const FC = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [visible, pagination, catalogId]) }, [visible, pagination, catalogId])
const catalogs = useMemo(() => {
if (reference === AssetDraftReference) {
return [{ title: '字段级资产目录', key: '1' }]
}
return [
{ title: '字段级资产目录', key: '1' },
{ title: '映射关系', key: '2' },
]
}, [reference])
const getLogs = () => { const getLogs = () => {
setLoading(true); setLoading(true);
if (catalogId === '1') { if (catalogId === '1') {
......
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