Commit c1a1d299 by zhaochengxiang

资产新增

parent f0254681
......@@ -15,6 +15,7 @@ import PermissionButton from '../../../util/Component/PermissionButton'
import PermissionMenuItem from '../../../util/Component/PermissionMenuItem'
import { FullScreenSvg, CancelFullScreenSvg } from './Component/AssetSvg'
import AddAsset from './Component/AddAssetModel'
import AddResources from './add-resources'
import ImportAsset from './Component/ImportAssetDrawer'
import ChangeCatalog from './change-catalog'
......@@ -65,6 +66,11 @@ const FC = (props) => {
const [keyword, setKeyword] = React.useState()
const [searchType, setSearchType] = React.useState('keyword')
const [resoureTagMap, setResourceTagMap] = React.useState()
const [addAssetParams, setAddAssetParams] = React.useState({
visible: false,
reference: undefined,
nodeId: undefined
})
const [addResourcesParams, setAddResourcesParams] = React.useState({
visible: false,
item: undefined
......@@ -555,9 +561,10 @@ const FC = (props) => {
}
const onAddClick = () => {
setAddResourcesParams({
setAddAssetParams({
visible: true,
item: undefined,
reference: AssetManageReference,
nodeId: node?.nodeId
})
}
......@@ -895,6 +902,17 @@ const FC = (props) => {
/>
</ResizeObserver>
</div>
<AddAsset
{...addAssetParams}
onCancel={(refresh = false) => {
setAddAssetParams({
visible: false,
reference: undefined,
nodeId: undefined
})
refresh && getAssets()
}}
/>
<AddResources
{...addResourcesParams}
onCancel={(refresh) => {
......
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