Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
09121709
Commit
09121709
authored
Oct 10, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加资源类型
parent
287b85de
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
15 deletions
+40
-15
assetmanage.js
src/model/assetmanage.js
+6
-2
dataassetmanager.js
src/service/dataassetmanager.js
+6
-2
index.js
src/util/index.js
+4
-0
AssetDirectory.jsx
src/view/Manage/AssetManage/Component/AssetDirectory.jsx
+3
-2
AttributeRelationModal.jsx
...w/Manage/AssetManage/Component/AttributeRelationModal.jsx
+6
-1
ImportElement.jsx
src/view/Manage/AssetManage/Component/ImportElement.jsx
+9
-3
table.jsx
src/view/Manage/AssetResourceManage/table.jsx
+5
-4
tree.jsx
src/view/Manage/AssetResourceManage/tree.jsx
+1
-1
No files found.
src/model/assetmanage.js
View file @
09121709
...
...
@@ -69,6 +69,10 @@ export function* listDataAssetsByPage(payload) {
return
yield
call
(
service
.
listDataAssetsByPage
,
payload
);
}
export
function
*
listDataResourcesByPage
(
payload
)
{
return
yield
call
(
service
.
listDataResourcesByPage
,
payload
);
}
export
function
*
listDataAssetsByPersonalCustomType
(
payload
)
{
return
yield
call
(
service
.
listDataAssetsByPersonalCustomType
,
payload
);
}
...
...
@@ -189,8 +193,8 @@ export function* getAttributesByMetadataModel(payload) {
return
yield
call
(
service
.
getAttributesByMetadataModel
,
payload
);
}
export
function
*
loadElementWithoutCustom
()
{
return
yield
call
(
service
.
loadElementWithoutCustom
);
export
function
*
loadElementWithoutCustom
(
payload
)
{
return
yield
call
(
service
.
loadElementWithoutCustom
,
payload
);
}
export
function
*
saveEleAndAttrRel
(
payload
)
{
...
...
src/service/dataassetmanager.js
View file @
09121709
...
...
@@ -68,6 +68,10 @@ export function listDataAssetsByPage(payload) {
return
GetJSON
(
"/dataassetmanager/dataAssetApi/listDataAssetsByPage"
,
payload
);
}
export
function
listDataResourcesByPage
(
payload
)
{
return
GetJSON
(
"/dataassetmanager/resourceApi/listResourcesByPage"
,
payload
);
}
export
function
listDataAssetsByPersonalCustomType
(
payload
)
{
return
GetJSON
(
"/dataassetmanager/dataAssetApi/listDataAssetsByPersonalCustomType"
,
payload
);
}
...
...
@@ -200,8 +204,8 @@ export function getAttributesByMetadataModel(payload) {
return
GetJSON
(
"/dataassetmanager/eleAndAttrApi/getModelAttributes"
,
payload
);
}
export
function
loadElementWithoutCustom
()
{
return
GetJSON
(
"/dataassetmanager/eleAndAttrApi/loadElementWithoutCustom"
);
export
function
loadElementWithoutCustom
(
payload
)
{
return
GetJSON
(
"/dataassetmanager/eleAndAttrApi/loadElementWithoutCustom"
,
payload
);
}
export
function
saveEleAndAttrRel
(
payload
)
{
...
...
src/util/index.js
View file @
09121709
...
...
@@ -410,6 +410,10 @@ export function getDataModelerRole(user) {
return
DataModelerRoleAdmin
;
}
export
function
getAssetType
(
reference
)
{
return
(
reference
===
AssetManageReference
||
reference
===
AssetBrowseReference
)
?
'dataAsset'
:
'resource'
}
export
function
getAssetRange
(
menuName
)
{
if
(
menuName
===
ResourceManageReference
||
menuName
===
AssetManageReference
)
{
return
'dataAsset_dataAssetManage'
;
...
...
src/view/Manage/AssetManage/Component/AssetDirectory.jsx
View file @
09121709
...
...
@@ -6,7 +6,7 @@ import { AssetBrowseReference, AssetManageReference, ResourceBrowseReference, Re
import
ImportElement
from
'./ImportElement'
;
import
AttributeRelationModal
from
"./AttributeRelationModal"
;
import
FilterElementModal
from
'./FilterElementModal'
;
import
{
showNotifaction
,
getAssetRange
}
from
'../../../../util'
;
import
{
showNotifaction
,
getAssetRange
,
getAssetType
}
from
'../../../../util'
;
import
{
MoreSvg
}
from
'./AssetSvg'
;
import
Separate
from
'./Separate'
;
import
record
from
'../Assets/record.png'
;
...
...
@@ -108,7 +108,7 @@ const AssetDirectory = (props) => {
}
const
onExportElementBtnClick
=
()
=>
{
window
.
open
(
'/api/dataassetmanager/elementApi/export'
);
window
.
open
(
`/api/dataassetmanager/elementApi/export?dataAssetType=
${
getAssetType
(
reference
)}
`
);
}
const
onFilterElementClick
=
()
=>
{
...
...
@@ -322,6 +322,7 @@ const AssetDirectory = (props) => {
<
ImportElement
visible=
{
importElementVisible
}
type=
{
reference
}
onCancel=
{
onImportElementCancel
}
/>
...
...
src/view/Manage/AssetManage/Component/AttributeRelationModal.jsx
View file @
09121709
...
...
@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react';
import
{
Modal
,
Form
,
TreeSelect
,
Select
,
Space
,
Button
,
Row
,
Col
,
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
AssetManageReference
,
ResourceManageReference
}
from
'../../../../util/constant'
;
import
{
getAssetType
}
from
'../../../../util'
;
const
MetaModelSelect
=
({
value
=
{},
metaModelTreeData
=
[],
onChange
,
...
restProps
})
=>
{
const
[
attributes
,
setAttributes
]
=
useState
([]);
...
...
@@ -99,7 +101,7 @@ const MetaModelSelect = ({ value = {}, metaModelTreeData = [], onChange, ...rest
}
const
AttributeRelationModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
}
=
props
;
const
{
visible
,
onCancel
,
type
=
ResourceManageReference
}
=
props
;
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
[
metadataModelTreeData
,
setMetadataModelTreeData
]
=
useState
([]);
...
...
@@ -146,6 +148,9 @@ const AttributeRelationModal = (props) => {
const
loadElementWithoutCustom
=
()
=>
{
dispatch
({
type
:
'assetmanage.loadElementWithoutCustom'
,
payload
:
{
dataAssetType
:
getAssetType
(
type
)
},
callback
:
data
=>
{
setElements
(
data
||
[]);
getRelAttrByModel
();
...
...
src/view/Manage/AssetManage/Component/ImportElement.jsx
View file @
09121709
...
...
@@ -3,10 +3,11 @@ import { Button, Upload, Modal } from 'antd';
import
{
DownloadOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
import
{
getAssetType
,
showMessage
}
from
'../../../../util'
;
import
{
AssetManageReference
}
from
'../../../../util/constant'
;
const
ImportElement
=
(
props
)
=>
{
const
{
onCancel
,
visible
}
=
props
;
const
{
onCancel
,
visible
,
type
=
AssetManageReference
}
=
props
;
const
[
fileList
,
setFileList
]
=
useState
([]);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
...
...
@@ -42,7 +43,12 @@ const ImportElement = (props) => {
setConfirmLoading
(
true
);
dispatchLatest
({
type
:
'assetmanage.importElement'
,
payload
:
{
fileList
},
payload
:
{
params
:
{
dataAssetType
:
getAssetType
(
type
)
},
fileList
,
},
callback
:
data
=>
{
setConfirmLoading
(
false
);
reset
();
...
...
src/view/Manage/AssetResourceManage/table.jsx
View file @
09121709
...
...
@@ -7,7 +7,7 @@ import { debounceTime, Subject } from 'rxjs'
import
{
defaultPage
,
usePage
}
from
'../../../util/hooks/page'
import
Table
from
'../../../util/Component/Table'
import
{
dispatch
}
from
'../../../model'
import
{
getAssetRange
,
isSzseEnv
}
from
'../../../util'
import
{
getAssetRange
,
getAssetType
,
isSzseEnv
}
from
'../../../util'
import
{
ResourceManageReference
}
from
'../../../util/constant'
import
PermissionButton
from
'../../../util/Component/PermissionButton'
import
PermissionMenuItem
from
'../../../util/Component/PermissionMenuItem'
...
...
@@ -212,7 +212,8 @@ const FC = (props) => {
dispatch
({
type
:
'assetmanage.listFilterElementsGroupByType'
,
payload
:
{
range
:
'dataAsset_dataAssetManage'
range
:
getAssetRange
(
ResourceManageReference
),
dataAssetType
:
getAssetType
(
ResourceManageReference
)
},
callback
:
data
=>
{
setLoadingElements
(
false
)
...
...
@@ -227,13 +228,13 @@ const FC = (props) => {
const
getAssets
=
()
=>
{
setLoading
(
true
)
dispatch
({
type
:
'assetmanage.listData
Asset
sByPage'
,
type
:
'assetmanage.listData
Resource
sByPage'
,
payload
:
{
dirId
:
node
?.
nodeId
,
pageNum
:
args
.
params
.
page
,
pageSize
:
args
.
params
.
size
,
keyword
:
args
.
params
.
keyword
,
range
:
'dataAsset_dataAssetManage'
,
range
:
getAssetRange
(
ResourceManageReference
)
,
},
callback
:
data
=>
{
setLoading
(
false
)
...
...
src/view/Manage/AssetResourceManage/tree.jsx
View file @
09121709
...
...
@@ -179,7 +179,7 @@ const FC = (props) => {
setLoading
(
true
)
setSelectedKey
(
prevSelectedKey
=>
{
dispatch
({
type
:
'assetmanage.query
All
DirectoryAsTree'
,
type
:
'assetmanage.query
Resource
DirectoryAsTree'
,
callback
:
data
=>
{
setLoading
(
false
)
setLoadedKeys
([])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment