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
470c8348
Commit
470c8348
authored
Apr 09, 2021
by
fanyongjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.9
parent
0200a1a6
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
58 deletions
+63
-58
AssetDetail.jsx
src/view/Manage/AssetManage/components/AssetDetail.jsx
+5
-2
AssetModal.jsx
src/view/Manage/AssetManage/components/AssetModal.jsx
+6
-5
AssetTable.jsx
src/view/Manage/AssetManage/components/AssetTable.jsx
+12
-5
LeftTree.jsx
src/view/Manage/AssetManage/components/LeftTree.jsx
+9
-6
ManageTitle.jsx
src/view/Manage/AssetManage/components/ManageTitle.jsx
+0
-24
ThemeFile.jsx
src/view/Manage/AssetManage/components/ThemeFile.jsx
+22
-7
TreeModal.jsx
src/view/Manage/AssetManage/components/TreeModal.jsx
+7
-6
index.jsx
src/view/Manage/AssetManage/index.jsx
+2
-3
No files found.
src/view/Manage/AssetManage/components/AssetDetail.jsx
View file @
470c8348
import
React
,{
useState
,
useEffect
,}
from
"react"
import
React
from
"react"
import
{
Modal
,
Descriptions
}
from
"antd"
export
default
(
props
)
=>
{
const
AssetDetail
=
(
props
)
=>
{
const
{
handleCancle
,
visible
,
boxDetail
}
=
props
return
(
<
Modal
...
...
@@ -28,3 +28,5 @@ export default (props)=>{
</
Modal
>
)
}
export
default
AssetDetail
;
\ No newline at end of file
src/view/Manage/AssetManage/components/AssetModal.jsx
View file @
470c8348
import
React
,{
useState
,
useEffect
,}
from
"react"
import
{
Modal
,
Tabs
,
Form
,
Input
,
Space
,
InputNumber
,
Button
,
Radio
}
from
"antd"
import
{
dispatch
Latest
,
dispatch
}
from
'../../../../model'
;
import
{
Modal
,
Form
,
Input
,
Space
,
Button
}
from
"antd"
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
const
{
TabPane
}
=
Tabs
export
default
(
props
)
=>
{
const
AssetModal
=
(
props
)
=>
{
const
{
handleCancle
,
visible
,
editBox
,
addType
,
attrBox
,
nodeId
,
attrBox2
,
setPageNumber
,
pageNumber
}
=
props
const
[
form
]
=
Form
.
useForm
()
const
[
saveLoad
,
setSaveLod
]
=
useState
(
false
)
...
...
@@ -129,3 +127,5 @@ export default (props)=>{
</
Modal
>
)
}
export
default
AssetModal
;
\ No newline at end of file
src/view/Manage/AssetManage/components/AssetTable.jsx
View file @
470c8348
...
...
@@ -10,7 +10,7 @@ import { showMessage } from '../../../../util';
const
{
Text
}
=
Typography
;
export
default
(
props
)
=>
{
const
AssetTable
=
(
props
)
=>
{
const
{
nodeId
,}
=
props
const
[
tableLoad
,
setTableLoad
]
=
useState
(
false
)
...
...
@@ -38,9 +38,14 @@ export default (props) =>{
useEffect
(()
=>
{
if
(
nodeId
)
getTable
()
},[
nodeId
,
rebuild
])
setPageNumber
({...
pageNumber
,
page
:
1
,
rebuild
:
new
Date
().
getTime
()})
},[
nodeId
])
useEffect
(()
=>
{
if
(
nodeId
&&
rebuild
!==
0
)
getTable
()
},[
rebuild
])
...
...
@@ -70,7 +75,7 @@ export default (props) =>{
setTableLoad
(
true
)
dispatch
({
type
:
'assetmanage.listDataAssetsByPage'
,
payload
:
{
dirId
:
nodeId
,
pageNum
:
page
,
pageSize
:
size
,
keyword
:
keyMessage
},
payload
:
{
dirId
:
nodeId
,
pageNum
:
page
,
pageSize
:
size
,
keyword
:
keyMessage
!==
''
?
keyMessage
:
undefined
},
callback
:
dataBox
=>
{
setTableBox
({
dataList
:
dataBox
.
data
,
total
:
dataBox
.
total
})
setSelectBox
([])
...
...
@@ -220,7 +225,6 @@ export default (props) =>{
itemLayout=
"vertical"
dataSource=
{
dataList
||
[]
}
footer=
{
null
}
Pagination=
{
false
}
renderItem=
{
(
item
)
=>
(
<
List
.
Item
actions=
{
[
...
...
@@ -274,3 +278,5 @@ export default (props) =>{
</
Card
>
)
}
export
default
AssetTable
;
\ No newline at end of file
src/view/Manage/AssetManage/components/LeftTree.jsx
View file @
470c8348
...
...
@@ -10,7 +10,7 @@ import ThemeFile from "./ThemeFile"
import
'./LeftTree.less'
;
const
{
TreeNode
}
=
Tree
export
default
(
props
)
=>
{
const
LeftTree
=
(
props
)
=>
{
const
{
setNodeId
,
nodeId
}
=
props
const
[
treeBox
,
setTreeBox
]
=
useState
([])
const
[
dataList
,
setDataList
]
=
useState
([])
...
...
@@ -119,11 +119,11 @@ export default (props)=>{
const
getPatentNode
=
(
data
,
id
)
=>
{
let
box
=
undefined
if
(
id
==
0
){
if
(
String
(
id
)
===
'0'
){
box
=
data
[
0
]
}
else
{
for
(
let
node
of
data
){
if
(
node
.
nodeId
==
id
){
if
(
String
(
node
.
nodeId
)
===
String
(
id
)
){
box
=
node
return
box
}
else
{
...
...
@@ -159,7 +159,7 @@ export default (props)=>{
if
(
!
type
){
window
.
open
(
`/api/dataassetmanager/directoryApi/export`
);
}
else
{
if
(
nodeBox
.
dataBox
.
nodeId
!=
undefined
){
if
(
nodeBox
.
dataBox
.
nodeId
!=
=
undefined
){
window
.
open
(
`/api/dataassetmanager/directoryApi/export?parentPath=
${
detailBox
.
path
}
`
);
}
else
{
showMessage
(
"warn"
,
"请选择目录"
)
...
...
@@ -212,7 +212,7 @@ export default (props)=>{
}
const
onSearch
=
()
=>
{
if
(
searchMessage
!=
''
){
if
(
searchMessage
!=
=
''
){
const
expandedKeys
=
dataList
.
map
(
item
=>
{
if
(
item
.
title
.
indexOf
(
searchMessage
)
>
-
1
)
{
...
...
@@ -220,7 +220,7 @@ export default (props)=>{
}
return
null
;
})
.
filter
((
item
,
i
,
self
)
=>
item
&&
self
.
indexOf
(
item
)
==
i
);
.
filter
((
item
,
i
,
self
)
=>
item
&&
self
.
indexOf
(
item
)
==
=
i
);
setAutoExpandParent
(
true
)
setNodeBox
({...
nodeBox
,
openNode
:
expandedKeys
})
setSearchValue
(
searchMessage
)
...
...
@@ -370,3 +370,5 @@ export default (props)=>{
)
}
export default LeftTree;
\ No newline at end of file
src/view/Manage/AssetManage/components/ManageTitle.jsx
deleted
100644 → 0
View file @
0200a1a6
import
React
,{
useState
,
useEffect
}
from
"react"
import
{
Card
,
Input
}
from
"antd"
export
default
(
props
)
=>
{
const
{}
=
props
const
[
keyWord
,
setKeyWord
]
=
useState
(
''
)
return
(
<
Card
bodyStyle=
{
{
padding
:
10
}
}
>
<
div
>
<
div
style=
{
{
display
:
'inline-block'
,
fontSize
:
18
,
fontWeight
:
800
,
color
:
'#767676'
,
marginRight
:
40
}
}
>
资产管理
</
div
>
<
Input
.
Search
style=
{
{
width
:
180
,
float
:
'right'
}
}
onChange=
{
e
=>
{
setKeyWord
(
e
.
target
.
value
)}
}
value=
{
keyWord
}
placeholder=
{
"请输入关键字"
}
enterButton
// onSearch={()=>{fetchTableList()}}
/>
</
div
>
</
Card
>
)
}
\ No newline at end of file
src/view/Manage/AssetManage/components/ThemeFile.jsx
View file @
470c8348
...
...
@@ -5,16 +5,17 @@ import { dispatch } from '../../../../model';
import
{
showMessage
}
from
'../../../../util'
;
export
default
(
props
)
=>
{
const
ThemeFile
=
(
props
)
=>
{
const
{
fileVisible
,
handleCancle
,
editBox
,
selectKey
,
setTreeRebuild
}
=
props
const
[
upLoad
,
setUpLoad
]
=
useState
(
false
)
const
[
message
,
setMessage
]
=
useState
(
''
)
const
[
form
]
=
Form
.
useForm
()
useEffect
(()
=>
{
if
(
fileVisible
){
setMessage
(
''
)
form
.
resetFields
()
}
},[
fileVisible
])
...
...
@@ -49,9 +50,13 @@ export default (props)=>{
payload
:
{
fileList
:
value
.
file
[
0
].
originFileObj
},
callback
:
data
=>
{
setTreeRebuild
({
build
:
new
Date
().
getTime
(),
type
:
'build'
})
showMessage
(
"success"
,
"导入成功"
)
// showMessage("success","导入成功")
form
.
resetFields
()
setUpLoad
(
false
)
handleCancle
()
if
(
data
){
let
msg
=
data
.
replace
(
RegExp
(
";"
,
"g"
),
"<br />"
)
setMessage
(
msg
)
}
},
error
:
()
=>
{
...
...
@@ -63,8 +68,11 @@ export default (props)=>{
payload
:
{
params
:{
parentPath
:
editBox
.
path
},
fileList
:
value
.
file
[
0
].
originFileObj
},
callback
:
data
=>
{
setUpLoad
(
false
)
handleCancle
()
showMessage
(
"success"
,
"导入成功"
)
if
(
data
){
let
msg
=
data
.
replace
(
RegExp
(
";"
,
"g"
),
"<br />"
)
setMessage
(
msg
)
}
form
.
resetFields
()
setTreeRebuild
({
build
:
new
Date
().
getTime
(),
type
:
'build'
})
},
...
...
@@ -136,7 +144,7 @@ export default (props)=>{
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
父节点导入
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!=
undefined
?
false
:
true
}
>
选中节点导入
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!=
=
undefined
?
false
:
true
}
>
选中节点导入
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
...
...
@@ -152,6 +160,12 @@ export default (props)=>{
</
Upload
>
</
Form
.
Item
>
</
Form
>
<
div
style=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
dangerouslySetInnerHTML=
{
{
__html
:
message
}
}
></
div
>
</
Modal
>
)
}
export
default
ThemeFile
;
\ No newline at end of file
src/view/Manage/AssetManage/components/TreeModal.jsx
View file @
470c8348
import
React
,{
useState
,
useEffect
,}
from
"react"
import
{
Modal
,
Tabs
,
Form
,
Input
,
Space
,
InputNumber
,
Button
,
Radio
}
from
"antd"
import
{
Modal
,
Form
,
Input
,
Space
,
InputNumber
,
Button
,
Radio
}
from
"antd"
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
const
{
TabPane
}
=
Tabs
export
default
(
props
)
=>
{
const
TreeModal
=
(
props
)
=>
{
const
{
handleCancle
,
visible
,
editBox
,
addType
,
selectKey
,
getNodeDetail
,
setTreeRebuild
,
treeRebuild
}
=
props
const
[
form
]
=
Form
.
useForm
()
const
[
saveLoad
,
setSaveLod
]
=
useState
(
false
)
...
...
@@ -21,7 +19,7 @@ export default (props)=>{
setSaveLod
(
true
)
form
.
validateFields
().
then
((
value
)
=>
{
if
(
addType
){
if
(
value
.
type
==
1
){
if
(
Number
(
value
.
type
)
=
==
1
){
let
box
=
{
"code"
:
value
.
code
,
"name"
:
value
.
name
,
...
...
@@ -148,7 +146,7 @@ export default (props)=>{
>
<
Radio
.
Group
>
<
Radio
value=
{
1
}
>
目录
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!=
undefined
?
false
:
true
}
>
主题
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
selectKey
!=
=
undefined
?
false
:
true
}
>
主题
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
}
<
Form
.
Item
...
...
@@ -183,3 +181,5 @@ export default (props)=>{
</
Modal
>
)
}
export
default
TreeModal
;
\ No newline at end of file
src/view/Manage/AssetManage/index.jsx
View file @
470c8348
import
React
from
'react'
;
import
{
Tabs
,
Row
,
Col
}
from
'antd'
;
import
{
Row
,
Col
}
from
'antd'
;
import
LeftTree
from
"./components/LeftTree"
import
AssetTable
from
"./components/AssetTable"
const
{
TabPane
}
=
Tabs
;
class
Index
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -22,7 +21,7 @@ class Index extends React.Component {
render
()
{
return
(
<
Row
gutter=
{
15
}
>
<
Row
gutter=
{
15
}
style=
{
{
backgroundColor
:
'#ededed'
}
}
>
<
Col
span=
{
6
}
>
<
LeftTree
setNodeId=
{
this
.
setNodeId
}
nodeId=
{
this
.
state
.
nodeId
}
/>
</
Col
>
...
...
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