Commit c1a1d299 by zhaochengxiang

资产新增

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