Commit c391f1e0 by zhaochengxiang

bug fix

parent 77015a6b
......@@ -63,7 +63,7 @@ const EditModel = (props) => {
const importActionRef = useRef(undefined);
useEffect(() => {
const _action = getQueryParam(Action, props.location.search);
let _action = getQueryParam(Action, props.location.search);
const _catalogId = getQueryParam(CatalogId, props.location.search);
const _modelerId = getQueryParam(ModelerId, props.location.search);
const _hintsStr = getQueryParam(Hints, props.location.search);
......@@ -80,6 +80,10 @@ const EditModel = (props) => {
const _taskId = getQueryParam(TaskId, props.location.search)
const _logicId = getQueryParam(LogicId, props.location.search)
if (_logicId) {
_action = 'add'
}
let _hints = [];
if ((_hintsStr||'') !== '') {
_hints = _hintsStr.split(',');
......
......@@ -75,12 +75,12 @@ const ImportAction = React.forwardRef((props, ref) => {
type: 'datamodel.getAllConstraints',
callback: data => {
setConstraints(data);
if (logicId) {
conceptualModelCreateDataModel()
} else if (action === 'add') {
if (action === 'add') {
// setConstraint(data?.length>0?data[0]:{});
// setTemplate({});
if ((hints||[]).length>0) {
if (logicId) {
conceptualModelCreateDataModel()
} else if ((hints||[]).length>0) {
getDraft(data?.length>0?data[0]:{}, {} ,hints);
} else if ((ddl||'').length>0) {
getDraftUsingDDL(data?.length>0?data[0]:{}, {} ,ddl);
......
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