Commit eefa27b7 by zhaochengxiang

bug fix

parent b7e0058e
...@@ -18,7 +18,6 @@ import { FullScreenSvg, CancelFullScreenSvg } from '../AssetManage/Component/Ass ...@@ -18,7 +18,6 @@ import { FullScreenSvg, CancelFullScreenSvg } from '../AssetManage/Component/Ass
import FilterElement from '../AssetManage/Component/FilterElementModal' import FilterElement from '../AssetManage/Component/FilterElementModal'
import FilterElementValue from '../AssetResourceManage/filter-element-value' import FilterElementValue from '../AssetResourceManage/filter-element-value'
import { AssetDirectorySubject } from '../AssetManage/Component/AssetDirectory' import { AssetDirectorySubject } from '../AssetManage/Component/AssetDirectory'
import { AssetActionSubject } from '../AssetManage/Component/AssetAction'
import TagCell from '../Model/Component/tag-help' import TagCell from '../Model/Component/tag-help'
import { MetadataColumn } from '../AssetResourceManage/table' import { MetadataColumn } from '../AssetResourceManage/table'
import AssetDetailDrawer from '../AssetManage/Component/AssetDetailDrawer' import AssetDetailDrawer from '../AssetManage/Component/AssetDetailDrawer'
......
...@@ -18,7 +18,7 @@ import { Subject } from 'rxjs'; ...@@ -18,7 +18,7 @@ import { Subject } from 'rxjs';
export const AssetActionSubject = new Subject(); export const AssetActionSubject = new Subject();
const AssetAction = (props) => { const AssetAction = (props) => {
const { id, dirId, action, terms, onChange, readOnly = false, form, onMetadataChange, onElementsChange, reference = AssetManageReference } = props; const { id, dirId, action, terms, readOnly = false, form, onMetadataChange, onElementsChange, reference = AssetManageReference } = props;
const [ currentAction, setCurrentAction ] = useState(action); const [ currentAction, setCurrentAction ] = useState(action);
const [ assetParams, setAssetParams ] = useState({ assets: {}, attributes: [], attributesFoldMap: {} }); const [ assetParams, setAssetParams ] = useState({ assets: {}, attributes: [], attributesFoldMap: {} });
...@@ -286,11 +286,9 @@ const AssetAction = (props) => { ...@@ -286,11 +286,9 @@ const AssetAction = (props) => {
setConfirmLoading(false); setConfirmLoading(false);
setCurrentAction('detail'); setCurrentAction('detail');
getAsset(); getAsset();
getResourceRelations();
AssetActionSubject.next({ type: 'asset-change' })
showMessage("success",(action==='add')?"新增成功":"修改成功"); showMessage("success",(action==='add')?"新增成功":"修改成功");
onChange && onChange();
if (action !== 'add') {
AssetActionSubject.next({ type: 'asset-change' })
}
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
......
...@@ -18,7 +18,6 @@ import { FullScreenSvg, CancelFullScreenSvg } from '../AssetManage/Component/Ass ...@@ -18,7 +18,6 @@ import { FullScreenSvg, CancelFullScreenSvg } from '../AssetManage/Component/Ass
import FilterElement from '../AssetManage/Component/FilterElementModal' import FilterElement from '../AssetManage/Component/FilterElementModal'
import FilterElementValue from '../AssetResourceManage/filter-element-value' import FilterElementValue from '../AssetResourceManage/filter-element-value'
import { AssetDirectorySubject } from '../AssetManage/Component/AssetDirectory' import { AssetDirectorySubject } from '../AssetManage/Component/AssetDirectory'
import { AssetActionSubject } from '../AssetManage/Component/AssetAction'
import TagCell from '../Model/Component/tag-help' import TagCell from '../Model/Component/tag-help'
import { MetadataColumn } from '../AssetResourceManage/table' import { MetadataColumn } from '../AssetResourceManage/table'
import AssetDetailDrawer from '../AssetManage/Component/AssetDetailDrawer' import AssetDetailDrawer from '../AssetManage/Component/AssetDetailDrawer'
......
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