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
39b640b9
Commit
39b640b9
authored
Dec 22, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改我的资产草稿
parent
3ef2253c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
22 deletions
+34
-22
App.js
src/App.js
+13
-0
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+10
-1
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+11
-21
No files found.
src/App.js
View file @
39b640b9
...
@@ -159,6 +159,19 @@ export class App extends React.Component {
...
@@ -159,6 +159,19 @@ export class App extends React.Component {
);
);
}
}
if
(
message
===
'assetMange'
)
{
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
user
:
hostParams
?.
user
,
setGlobalState
,
onGlobalStateChange
}}
>
<
AssetManage
myAssets
=
{
hostParams
?.
myAssets
}
/
>
<
/AppContext.Provider
>
);
}
return
(
return
(
<
AppContext
.
Provider
value
=
{{
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
env
:
hostParams
?.
env
,
...
...
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
39b640b9
...
@@ -38,6 +38,7 @@ function updateTreeData(list, key, children) {
...
@@ -38,6 +38,7 @@ function updateTreeData(list, key, children) {
}
}
const
AssetManageTree
=
(
props
)
=>
{
const
AssetManageTree
=
(
props
)
=>
{
console
.
log
(
'AssetManageTreeProps'
,
props
);
const
MENU_ID
=
'asset-manage-tree'
;
const
MENU_ID
=
'asset-manage-tree'
;
...
@@ -45,7 +46,7 @@ const AssetManageTree = (props) => {
...
@@ -45,7 +46,7 @@ const AssetManageTree = (props) => {
id
:
MENU_ID
,
id
:
MENU_ID
,
});
});
const
{
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
AssetManageReference
,
onDirectoryChange
,
centerId
,
metadataIds
}
=
props
;
const
{
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
AssetManageReference
,
onDirectoryChange
,
centerId
,
metadataIds
,
myAssets
}
=
props
;
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
([]);
const
[
treeData
,
setTreeData
]
=
useState
([]);
...
@@ -802,6 +803,12 @@ const AssetManageTree = (props) => {
...
@@ -802,6 +803,12 @@ const AssetManageTree = (props) => {
(
templates
??[]).
map
((
item
,
index
)
=>
<
Select
.
Option
key=
{
index
}
value=
{
item
.
type
}
>
{
item
.
name
}
</
Select
.
Option
>)
(
templates
??[]).
map
((
item
,
index
)
=>
<
Select
.
Option
key=
{
index
}
value=
{
item
.
type
}
>
{
item
.
name
}
</
Select
.
Option
>)
}
}
</
Select
>
</
Select
>
{
myAssets
?
(
<
Tooltip
title=
"刷新目录"
>
<
ReloadOutlined
className=
'default'
onClick=
{
refreshTree
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
)
:
(
<>
<
Tooltip
title=
"新增目录"
>
<
Tooltip
title=
"新增目录"
>
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
onClick=
{
addDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
onClick=
{
addDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
...
@@ -816,6 +823,8 @@ const AssetManageTree = (props) => {
...
@@ -816,6 +823,8 @@ const AssetManageTree = (props) => {
<
ExportOutlined
className=
'default'
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
ExportOutlined
className=
'default'
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
</
Dropdown
>
</
Dropdown
>
</>
)
}
{
/* <Tooltip title="自定义目录">
{
/* <Tooltip title="自定义目录">
<SettingOutlined className='default' onClick={customDir} style={{ fontSize:16,cursor:'pointer' }} />
<SettingOutlined className='default' onClick={customDir} style={{ fontSize:16,cursor:'pointer' }} />
</Tooltip> */
}
</Tooltip> */
}
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
39b640b9
...
@@ -130,8 +130,9 @@ const ResizeableHeaderCell = props => {
...
@@ -130,8 +130,9 @@ const ResizeableHeaderCell = props => {
};
};
const
AssetTable
=
(
props
)
=>
{
const
AssetTable
=
(
props
)
=>
{
console
.
log
(
'AssetTableProps'
,
props
);
const
{
className
,
nodeId
,
nodeType
,
nodeLevel
,
elementsChanged
,
assetActionChanged
,
onSelect
,
onCountChange
,
reference
=
AssetManageReference
,
onFullScreenChange
}
=
props
;
const
{
className
,
nodeId
,
nodeType
,
nodeLevel
,
elementsChanged
,
assetActionChanged
,
onSelect
,
onCountChange
,
reference
=
AssetManageReference
,
onFullScreenChange
,
myAssets
}
=
props
;
const
MENU_ID
=
'asset-table'
;
const
MENU_ID
=
'asset-table'
;
...
@@ -563,6 +564,7 @@ const AssetTable = (props) => {
...
@@ -563,6 +564,7 @@ const AssetTable = (props) => {
keyword
:
encodeURIComponent
(
keyword
),
keyword
:
encodeURIComponent
(
keyword
),
orderName
:
sorter
?.
column
?.
title
??
''
,
orderName
:
sorter
?.
column
?.
title
??
''
,
order
:
order
,
order
:
order
,
filterByMyPermission
:
myAssets
};
};
if
(
reference
!==
AssetRecycleReference
)
{
if
(
reference
!==
AssetRecycleReference
)
{
...
@@ -1075,6 +1077,12 @@ const AssetTable = (props) => {
...
@@ -1075,6 +1077,12 @@ const AssetTable = (props) => {
}
}
}
}
>
>
<
Space
size=
{
15
}
>
<
Space
size=
{
15
}
>
{
myAssets
?
(
// 当 myAssets 为 true 时,只显示可见列设置按钮
<
Button
onClick=
{
onFilterElementClick
}
>
可见列设置
</
Button
>
)
:
(
// 当 myAssets 为 false 时,显示所有按钮
<>
{
{
//栏目和自定义目录 不允许新增资产
//栏目和自定义目录 不允许新增资产
// (reference===AssetManageReference && nodeLevel!==1 && nodeType!=='custom') && <Button onClick=
{
addAsset
}
>
新增
<
/Button>
// (reference===AssetManageReference && nodeLevel!==1 && nodeType!=='custom') && <Button onClick=
{
addAsset
}
>
新增
<
/Button>
...
@@ -1112,24 +1120,10 @@ const AssetTable = (props) => {
...
@@ -1112,24 +1120,10 @@ const AssetTable = (props) => {
}
}
{
{
// (reference===AssetBrowseReference||reference===ResourceBrowseReference) &&
// <Tooltip title=
{(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产目录'
:
''
}
>
// <Button onClick=
{
onStartFlowClick
}
disabled
=
{(
checkedKeys
||
[]).
length
===
0
}
>
申请
<
/Button>
// </Tooltip>
}
{
(
compact
&&
reference
!==
AssetRecycleReference
)
?
<
Dropdown
overlay=
{
moreMenu
}
placement=
"bottomCenter"
>
(
compact
&&
reference
!==
AssetRecycleReference
)
?
<
Dropdown
overlay=
{
moreMenu
}
placement=
"bottomCenter"
>
<
Button
>
其他操作
</
Button
>
<
Button
>
其他操作
</
Button
>
</
Dropdown
>
:
<
React
.
Fragment
>
</
Dropdown
>
:
<
React
.
Fragment
>
{
{
// (reference===AssetManageReference) &&
// <Tooltip title=
{(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产目录'
:
''
}
>
// <Button onClick=
{
onStartFlowClick
}
disabled
=
{(
checkedKeys
||
[]).
length
===
0
}
>
申请
<
/Button>
// </Tooltip>
}
{
(
reference
!==
AssetRecycleReference
)
&&
(
reference
!==
AssetRecycleReference
)
&&
<
Tooltip
title=
{
(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产目录'
:
''
}
>
<
Tooltip
title=
{
(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产目录'
:
''
}
>
<
Button
onClick=
{
subscriptAsset
}
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
订阅
</
Button
>
<
Button
onClick=
{
subscriptAsset
}
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
订阅
</
Button
>
...
@@ -1157,14 +1151,10 @@ const AssetTable = (props) => {
...
@@ -1157,14 +1151,10 @@ const AssetTable = (props) => {
<
Button
onClick=
{
onFilterElementClick
}
>
可见列设置
</
Button
>
<
Button
onClick=
{
onFilterElementClick
}
>
可见列设置
</
Button
>
</
React
.
Fragment
>
</
React
.
Fragment
>
}
}
{
/* {
</>
(reference!==AssetRecycleReference && isSzseEnv) && <Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox>
)
}
} */
}
</
Space
>
</
Space
>
<
Space
>
<
Space
>
{
/* {
(reference!==AssetRecycleReference) && <Checkbox onChange={onFullSearchChange} checked={fullSearch}>全部数据</Checkbox>
} */
}
<
Search
<
Search
placeholder=
"请输入资产目录要素值"
placeholder=
"请输入资产目录要素值"
allowClear
allowClear
...
...
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