Commit 844366a2 by zhaochengxiang

修改问题

parent 169771c0
......@@ -368,7 +368,7 @@ const EditModel = (props) => {
</Button>
}
{
editable && <Button type='primary' onClick={edit} danger >
!modelerData?.inheritedFromEasyDataModelerDataModel && editable && <Button type='primary' onClick={edit} danger >
编辑
</Button>
}
......
......@@ -548,7 +548,7 @@ const ImportAction = (props) => {
terms={terms}
supportedPartitionTypes={supportedPartitionTypes}
/>
<ImportActionInherited modelerData={modelerData} />
<ImportActionInherited modelerData={modelerData} action={action} />
<ImportActionTable
modelerData={modelerData||{}}
constraint={constraint}
......
import React, { useState, useEffect } from "react";
import { Popover } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { Action, ModelerId, PermitCheckOut, Editable, StateId, Holder, ReadOnly } from '../../../../util/constant';
......@@ -6,7 +8,7 @@ export const inheritanceHistoricalType = 'historical';
export const inheritanceZipperType = 'zipper';
const FC = (props) => {
const { modelerData } = props;
const { modelerData, action } = props;
const [relationModelerDatas, setRelationModelerDatas] = useState([]);
useEffect(() => {
......@@ -40,7 +42,12 @@ const FC = (props) => {
<div className='model-import-action-inherited'>
<div className='mb-3'>
<div className='flex' style={{ alignItems: 'center' }}>
<h2 className='mr-3' style={{ marginBottom: 0 }}>历史存储形式</h2>
<h2 className={action==='add'?'mr-1':'mr-3'} style={{ marginBottom: 0 }}>历史存储形式</h2>
{
action==='add' && <Popover className='mr-3' content='保存当前模型后方可选择历史存储形式'>
<QuestionCircleOutlined className='pointer' />
</Popover>
}
{
relationModelerDatas?.length===0 ? <span>暂无信息</span> : relationModelerDatas?.map((item, index) => <a className='mr-3' key={index} onClick={() => {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${Holder}=${item.holder||''}&${ReadOnly}=false`);
......
......@@ -1012,11 +1012,7 @@ export const ImportActionTable = (props) => {
icon={<DeleteOutlined style={{ color: 'red' }} />}
onClick={(event) => {
event.stopPropagation();
if (record.inherited || record.provided) {
showMessage('warn', '衍生表中自动生成的字段不允许删除');
} else {
remove(record);
}
remove(record);
}}
/>
</React.Fragment>
......
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