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
2acef775
Commit
2acef775
authored
Dec 06, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉不用的代码
parent
3cae61f7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
123 deletions
+60
-123
index.jsx
src/view/Manage/AssetDraft/index.jsx
+26
-2
update.jsx
src/view/Manage/AssetDraft/update.jsx
+33
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+1
-121
No files found.
src/view/Manage/AssetDraft/index.jsx
View file @
2acef775
...
...
@@ -8,7 +8,7 @@ import { dispatch } from '../../../model'
import
Table
from
'../ResizeableTable'
import
{
isSzseEnv
,
showMessage
}
from
"../../../util"
import
{
AssetItem
}
from
"../AssetManage/Component/AssetTable"
import
{
recommandEnglishWords
}
from
"../../../service/datamodeler
"
import
UpdateAsset
from
"./update
"
const
isAdmin
=
false
const
specialCol
=
[
'数据关键用户'
,
'业务数据owner'
,
'it责任人'
,
'创建人'
,
'更新人'
]
...
...
@@ -29,6 +29,11 @@ const FC = (props) => {
const
[
data
,
setData
]
=
React
.
useState
()
const
[
users
,
setUsers
]
=
React
.
useState
()
const
[
row
,
setRow
]
=
React
.
useState
()
const
[
updateAssetParams
,
setUpdateAssetParams
]
=
React
.
useState
({
visible
:
false
,
action
:
undefined
,
item
:
undefined
,
})
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
...
...
@@ -284,7 +289,11 @@ const FC = (props) => {
}
const onEditClick = (record) => {
setUpdateAssetParams({
visible: true,
action: 'edit',
item: record
})
}
const onDeleteClick = (record) => {
...
...
@@ -378,6 +387,11 @@ const FC = (props) => {
return {
onClick: (e) => {
setRow(record)
setUpdateAssetParams({
visible: true,
action: 'detail',
item: record
})
}
}
}}
...
...
@@ -404,6 +418,16 @@ const FC = (props) => {
showTotal={total => `
共
$
{
total
}
条
`}
/>
</div>
<UpdateAsset
{...updateAssetParams}
onCancel={() => {
setUpdateAssetParams({
visible: false,
action: undefined,
item: undefined,
})
}}
/>
{contextHolder}
</div>
)
...
...
src/view/Manage/AssetDraft/update.jsx
0 → 100644
View file @
2acef775
import
React
from
"react"
import
{
Drawer
}
from
"antd"
const
FC
=
(
props
)
=>
{
const
{
visible
,
item
,
action
,
onCancel
}
=
props
return
(
<
Drawer
visible=
{
visible
}
title=
'资产目录详情'
width=
'80%'
placement=
"right"
closable
destroyOnClose
onClose=
{
()
=>
{
onCancel
?.()
}
}
>
<
Basic
action=
{
action
}
item=
{
item
}
/>
</
Drawer
>
)
}
export
default
FC
const
Basic
=
({
action
,
item
})
=>
{
return
(
<
div
>
basic
</
div
>
)
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
2acef775
...
...
@@ -10,7 +10,6 @@ import { highlightSearchContentByTerms, showMessage, paginate } from '../../../.
import
{
AppContext
,
appId
}
from
'../../../../App'
;
import
Tag
from
'../../Tag'
;
import
Separate
from
'./Separate'
;
import
AssetTagModal
from
'./AssetTagModal'
;
import
{
AnchorId
,
AnchorDirId
,
AssetManageReference
,
AssetRecycleReference
}
from
'../../../../util/constant'
;
import
IndexCode
from
'./IndexCode'
;
import
Upload
from
'./Upload'
;
...
...
@@ -38,7 +37,6 @@ const AssetAction = (props) => {
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
[
fullScreen
,
setFullScreen
]
=
useState
(
false
);
const
[
assetPaths
,
setAssetPaths
]
=
useState
([]);
const
[
resourceRelations
,
setResourceRelations
]
=
useState
([]);
const
{
assets
,
attributes
,
attributesFoldMap
}
=
assetParams
;
const
[
assetTagModalVisible
,
setAssetTagModalVisible
]
=
useState
(
false
);
const
[
selectTag
,
setSelectTag
]
=
useState
({});
...
...
@@ -221,7 +219,6 @@ const AssetAction = (props) => {
if
((
id
||
''
)
!==
''
)
{
setPagination
({...
pagination
,
pageNum
:
1
});
getAssetPaths
();
getResourceRelations
();
checkDataAssetEditable
();
getAsset
();
...
...
@@ -373,32 +370,6 @@ const AssetAction = (props) => {
})
}
const
getResourceRelations
=
()
=>
{
dispatch
({
type
:
'assetmanage.getResourceRelations'
,
payload
:
{
dataAssetId
:
id
,
},
callback
:
data
=>
{
setResourceRelations
(
data
||
[]);
}
});
}
const
getUserElements
=
()
=>
{
setLoading
(
true
);
dispatch
({
type
:
'assetmanage.listUserElements'
,
callback
:
data
=>
{
setLoading
(
false
);
getAsset
(
data
||
[]);
},
error
:
()
=>
{
setLoading
(
false
);
}
})
}
const
checkDataAssetEditable
=
()
=>
{
dispatch
({
type
:
'assetmanage.checkDataAssetEditable'
,
...
...
@@ -413,7 +384,7 @@ const AssetAction = (props) => {
})
}
const
getAsset
=
(
userElements
=
null
)
=>
{
const
getAsset
=
()
=>
{
setLoading
(
true
);
dispatch
({
type
:
'assetmanage.getDataAssetDetail'
,
...
...
@@ -438,17 +409,6 @@ const AssetAction = (props) => {
}
}
if
(
userElements
)
{
const
userElementIds
=
[];
(
userElements
||
[]).
forEach
(
element
=>
{
userElementIds
.
push
(
element
?.
id
);
});
const
filterElements
=
(
data
?.
elements
||
[]).
filter
(
element
=>
userElementIds
.
indexOf
(
element
?.
id
)
!==
-
1
);
data
=
{
...
data
,
elements
:
filterElements
};
}
setElements
(
data
?.
elements
||
[]);
onElementsChange
&&
onElementsChange
(
data
?.
elements
||
[]);
...
...
@@ -679,13 +639,6 @@ const AssetAction = (props) => {
}
}
// const onFoldButtonClick = (attribute, fold) => {
// let newAttributesFoldMap = {...attributesFoldMap};
// newAttributesFoldMap[attribute] = fold;
// setAssetParams({...assetParams, attributesFoldMap: newAttributesFoldMap});
// }
const onFullScreenClick = () => {
setFullScreen(!fullScreen);
}
...
...
@@ -710,23 +663,6 @@ const AssetAction = (props) => {
})
}
const onAssetTag = (value) => {
setSelectTag(value);
setAssetTagModalVisible(true);
}
const onAssetTagModalCancel = (refresh = false) => {
setAssetTagModalVisible(false);
if (refresh) {
getResourceRelations();
let event = new Event('storage');
event.key = 'tagChange';
window?.dispatchEvent(event);
}
}
// const formItemLayout = {
// labelCol: {
// xs: { span: 24 },
...
...
@@ -979,29 +915,6 @@ const AssetAction = (props) => {
}
</div>
</Descriptions.Item>
{/* <Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 90 }}>资产目录标签</div>} style={{ paddingBottom: 15 }}>
<AppContext.Consumer>
{
value => {
return (currentAction==='add'||currentAction==='edit')?<Tag styleType='complex' id={id} creator={value?.user?.userName||''} onAssetTag={onAssetTag} />:<Tag id={id} creator={value?.user?.userName||''} />
}
}
</AppContext.Consumer>
</Descriptions.Item> */}
{/* <Descriptions.Item
label={<div className='title-text' style={{ textAlign: 'right', width: 80 }}>关联关系</div>}
style={{ paddingBottom: 0 }}
>
<div className='flex' style={{ flexDirection: 'column' }}>
{
(resourceRelations||[]).map((item, key) => {
return (
<a key={key} onClick={() => { jumpToRelation(item); }}>{item?.dataAssetName||''}</a>
);
})
}
</div>
</Descriptions.Item> */}
</Descriptions>
</div>
</div>
...
...
@@ -1182,24 +1095,6 @@ const AssetAction = (props) => {
}}
/>
{/* <Upload ref={uploadRef} accept={'.xls,.xlsx'} upload={(files) => {
dispatch({
type: 'assetmanage.importMetadataAttributes',
payload: {
fileList: [files[0]],
params: {
catalog: app?.env?.domainId||LocalStorage.get('assetsEnv'),
}
},
callback: (data) => {
getMetadataAttributes();
},
error: () => {
}
})
}} /> */}
<SelectStandard
visible={selectStandardParam.visible}
id={selectStandardParam.id}
...
...
@@ -1212,21 +1107,6 @@ const AssetAction = (props) => {
onCancel={onAttributeMaintainCancel}
onChange={onAttributeMaintainChange}
/>
<AppContext.Consumer>
{
value => {
return (
<AssetTagModal
visible={assetTagModalVisible}
id={id}
tag={selectTag}
creator={value?.user?.userName||''}
onCancel={onAssetTagModalCancel}
/>
);
}
}
</AppContext.Consumer>
{contextHolder}
</div>
)
...
...
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