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
b5426710
Commit
b5426710
authored
Apr 09, 2021
by
fanyongjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.9.5
parent
b22c90b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
12 deletions
+28
-12
LeftTree.jsx
src/view/Manage/AssetManage/components/LeftTree.jsx
+20
-8
ThemeFile.jsx
src/view/Manage/AssetManage/components/ThemeFile.jsx
+6
-2
TreeModal.jsx
src/view/Manage/AssetManage/components/TreeModal.jsx
+2
-2
No files found.
src/view/Manage/AssetManage/components/LeftTree.jsx
View file @
b5426710
import
React
,{
useState
,
useEffect
}
from
"react"
import
React
,{
useState
,
useEffect
}
from
"react"
import
{
Card
,
Spin
,
Button
,
Tooltip
,
Modal
,
Tree
,
Input
,
Dropdown
,
Menu
}
from
"antd"
import
{
Card
,
Spin
,
Button
,
Tooltip
,
Modal
,
Tree
,
Input
,
Dropdown
,
Menu
,
Space
}
from
"antd"
import
{
PlusOutlined
,
ImportOutlined
,
EditOutlined
,
DeleteOutlined
,
ExportOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
ImportOutlined
,
EditOutlined
,
DeleteOutlined
,
ExportOutlined
,
SyncOutlined
}
from
'@ant-design/icons'
;
import
{
showMessage
,
generateList
}
from
'../../../../util'
;
import
{
showMessage
,
generateList
}
from
'../../../../util'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
TreeModal
from
"./TreeModal"
import
TreeModal
from
"./TreeModal"
...
@@ -280,6 +280,11 @@ const LeftTree = (props)=>{
...
@@ -280,6 +280,11 @@ const LeftTree = (props)=>{
}
}
});
});
const
rebuildTree
=
()
=>
{
setTreeRebuild
({
build
:
new
Date
().
getTime
(),
type
:
'build'
})
}
const
menu
=
(
const
menu
=
(
<
Menu
>
<
Menu
>
<
Menu
.
Item
>
<
Menu
.
Item
>
...
@@ -299,7 +304,7 @@ const LeftTree = (props)=>{
...
@@ -299,7 +304,7 @@ const LeftTree = (props)=>{
<
Card
<
Card
className=
{
"asset-tree"
}
className=
{
"asset-tree"
}
title=
{
<
div
>
title=
{
<
Space
>
<
Tooltip
title=
"新增目录"
>
<
Tooltip
title=
"新增目录"
>
<
Button
<
Button
shape=
"circle"
shape=
"circle"
...
@@ -307,14 +312,21 @@ const LeftTree = (props)=>{
...
@@ -307,14 +312,21 @@ const LeftTree = (props)=>{
onClick=
{
add
}
onClick=
{
add
}
/>
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"修改"
className=
'ml-3'
>
<
Tooltip
title=
"修改"
>
<
Button
<
Button
shape=
"circle"
shape=
"circle"
icon=
{
<
EditOutlined
/>
}
icon=
{
<
EditOutlined
/>
}
onClick=
{
update
}
onClick=
{
update
}
/>
/>
</
Tooltip
>
</
Tooltip
>
<
Tooltip
title=
"导入"
className=
'ml-3'
>
<
Tooltip
title=
"刷新"
>
<
Button
shape=
"circle"
icon=
{
<
SyncOutlined
/>
}
onClick=
{
rebuildTree
}
/>
</
Tooltip
>
<
Tooltip
title=
"导入"
>
<
Button
<
Button
shape=
"circle"
shape=
"circle"
icon=
{
<
ImportOutlined
/>
}
icon=
{
<
ImportOutlined
/>
}
...
@@ -322,7 +334,7 @@ const LeftTree = (props)=>{
...
@@ -322,7 +334,7 @@ const LeftTree = (props)=>{
/>
/>
</
Tooltip
>
</
Tooltip
>
<
Dropdown
overlay=
{
menu
}
placement=
"bottomLeft"
>
<
Dropdown
overlay=
{
menu
}
placement=
"bottomLeft"
>
<
Tooltip
title=
"导出"
className=
'ml-3'
>
<
Tooltip
title=
"导出"
>
<
Button
<
Button
shape=
"circle"
shape=
"circle"
icon=
{
<
ExportOutlined
/>
}
icon=
{
<
ExportOutlined
/>
}
...
@@ -332,14 +344,14 @@ const LeftTree = (props)=>{
...
@@ -332,14 +344,14 @@ const LeftTree = (props)=>{
</
Dropdown
>
</
Dropdown
>
<
Tooltip
title=
"删除"
className=
'ml-3'
>
<
Tooltip
title=
"删除"
>
<
Button
<
Button
shape=
"circle"
shape=
"circle"
icon=
{
<
DeleteOutlined
/>
}
icon=
{
<
DeleteOutlined
/>
}
onClick=
{
deleteNode
}
onClick=
{
deleteNode
}
/>
/>
</
Tooltip
>
</
Tooltip
>
</
div
>
}
</
Space
>
}
bordered=
{
false
}
bordered=
{
false
}
style=
{
{
width
:
'100%'
}
}
style=
{
{
width
:
'100%'
}
}
bodyStyle=
{
{
padding
:
10
}
}
bodyStyle=
{
{
padding
:
10
}
}
...
...
src/view/Manage/AssetManage/components/ThemeFile.jsx
View file @
b5426710
...
@@ -30,6 +30,9 @@ const ThemeFile = (props)=>{
...
@@ -30,6 +30,9 @@ const ThemeFile = (props)=>{
if
(
!
isLt20M
)
{
if
(
!
isLt20M
)
{
return
showMessage
(
"warn"
,
"上传文件不能超过 20MB!"
)
return
showMessage
(
"warn"
,
"上传文件不能超过 20MB!"
)
}
}
if
(
file
.
type
!==
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)
{
return
showMessage
(
"warn"
,
"上传格式错误"
)
}
return
false
;
return
false
;
},
},
...
@@ -54,8 +57,9 @@ const ThemeFile = (props)=>{
...
@@ -54,8 +57,9 @@ const ThemeFile = (props)=>{
handleCancle
()
handleCancle
()
},
},
error
:
()
=>
{
error
:
(
error
)
=>
{
console
.
log
(
error
)
setUpLoad
(
false
)
}
}
})
})
}
else
{
}
else
{
...
...
src/view/Manage/AssetManage/components/TreeModal.jsx
View file @
b5426710
...
@@ -145,8 +145,8 @@ const TreeModal = (props)=>{
...
@@ -145,8 +145,8 @@ const TreeModal = (props)=>{
rules=
{
[{
required
:
true
,
message
:
'必填项'
}]
}
rules=
{
[{
required
:
true
,
message
:
'必填项'
}]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
目录
</
Radio
>
<
Radio
value=
{
1
}
>
主题
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!==
undefined
?
false
:
true
}
>
主题
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!==
undefined
?
false
:
true
}
>
目录
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
}
</
Form
.
Item
>
}
<
Form
.
Item
<
Form
.
Item
...
...
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