Commit 00ef24a3 by zhaochengxiang

重定向到资产问题

parent 65b166ad
......@@ -28,8 +28,6 @@ export default class App extends React.Component {
id = params.id||'';
}
console.log('params', params);
if (message === 'showDataModelDetail') {
return (
<ImportModal
......
......@@ -43,14 +43,20 @@ const AssetTable = (props) => {
const timestamp = getQueryParam(AnchorTimestamp, props.location.search);
const shouldScrollRef = useRef(false);
const urlChangeRef = useRef(false);
useEffect(() => {
if ((nodeId||'') !== '' ) {
if (shouldScrollRef.current === true) {
urlChangeRef.current = false;
getDataAssetLocation();
} else if (urlChangeRef.current) {
urlChangeRef.current = false;
} else {
setPagination({ ...pagination, pageNum: 1 });
......@@ -68,6 +74,7 @@ const AssetTable = (props) => {
if ((anchorId||'') !== '') {
shouldScrollRef.current = true;
urlChangeRef.current = true;
}
//eslint-disable-next-line react-hooks/exhaustive-deps
......@@ -88,9 +95,8 @@ const AssetTable = (props) => {
if (shouldScrollRef.current) {
SmoothScroll('a[href*="#"]');
const _id = getQueryParam(AnchorId, props.location.search);
var scroll = new SmoothScroll();
var anchor = document.querySelector(`#data-asset-${_id}`);
var anchor = document.querySelector(`#data-asset-${anchorId}`);
if (anchor) {
shouldScrollRef.current = false;
......
......@@ -114,7 +114,6 @@ const ImportAction = (props) => {
setTemplate(data.easyDataModelerModelingTemplate||{});
onChange && onChange(data||{});
getSupportedDatatypes();
validateDataModel(data||{});
if (action === 'edit') {
form.setFieldsValue({
......@@ -124,6 +123,8 @@ const ImportAction = (props) => {
easyDataModelerModelingTemplate: data.easyDataModelerModelingTemplate||''
});
}
validateDataModel(data||{});
},
error: () => {
setLoading(false);
......
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