Commit 8f7d1cb0 by zhaochengxiang

草稿放开字段编辑

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