Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
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
ReactWeb5
CivManage
Commits
71889bab
Commit
71889bab
authored
Oct 28, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决站点管理编辑功能,数据不显示问题
parent
8418baa3
Pipeline
#36772
skipped with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
7 deletions
+47
-7
EditModal.jsx
src/pages/userCenter/siteManage/EditModal.jsx
+2
-2
siteManage.jsx
src/pages/userCenter/siteManageV2/siteManage.jsx
+45
-5
No files found.
src/pages/userCenter/siteManage/EditModal.jsx
View file @
71889bab
...
...
@@ -8,7 +8,7 @@ const EditModal = props => {
const
[
formLayout
,
setFormLayout
]
=
useState
(
'horizontal'
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
flag
=
useRef
();
const
{
confirmModal
,
stationObj
}
=
props
;
const
{
confirmModal
,
stationObj
,
des
}
=
props
;
const
onSubmit
=
()
=>
{
form
.
validateFields
()
...
...
@@ -54,7 +54,7 @@ const EditModal = props => {
useEffect
(()
=>
{
form
.
setFieldsValue
({
stationName
:
stationObj
.
text
,
description
:
stationObj
.
descri
ption
,
description
:
stationObj
.
descri
be
,
});
},
[
stationObj
]);
return
(
...
...
src/pages/userCenter/siteManageV2/siteManage.jsx
View file @
71889bab
...
...
@@ -31,7 +31,8 @@ import {
DoubleLeftOutlined
,
DoubleRightOutlined
,
DownOutlined
,
PlusOutlined
PlusOutlined
,
ApartmentOutlined
}
from
'@ant-design/icons'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
...
...
@@ -89,6 +90,11 @@ const SiteManageV2 = () => {
const
[
updatePageUser
,
setUpdatePageUser
]
=
useState
(
1
);
//
const
[
updateCheck
,
setUpdateCheck
]
=
useState
(
1
);
const
[
name
,
setName
]
=
useState
(
''
);
const
[
des
,
setDes
]
=
useState
(
''
)
const
[
data
,
setData
]
=
useState
(
''
)
const
[
ch
,
setCh
]
=
useState
(
''
)
let
a
=
[]
// 渲染机构树
const
mapTree
=
org
=>
{
...
...
@@ -169,6 +175,10 @@ const SiteManageV2 = () => {
updateTrees
();
},
[
flag
]);
useEffect
(()
=>
{
getValue
()
},[])
//切换站点,点击分页按钮,提交
useEffect
(()
=>
{
if
(
!
currentStation
)
return
;
...
...
@@ -282,8 +292,8 @@ const SiteManageV2 = () => {
}
//选中某个站点
const
onSelect
=
(
props
,
e
)
=>
{
console
.
log
(
e
)
console
.
log
(
'props[0]'
,
props
[
0
]);
setCh
(
props
[
0
])
if
(
!
props
[
0
])
{
setCurrentStation
(
currentStation
)
...
...
@@ -291,8 +301,37 @@ const SiteManageV2 = () => {
setCurrentStation
(
props
[
0
]);
}
setPage
({
pageNum
:
1
,
pageSize
:
10
});
console
.
log
(
data
)
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
props
[
0
]){
console
.
log
(
item
.
id
)
console
.
log
(
item
.
describe
)
setDes
(
item
.
describe
)
}
})
}
const
getValue
=
()
=>
{
getSiteTree
({
selectNode
:
-
1
}).
then
(
res
=>
{
console
.
log
(
res
.
data
)
getData1
(
res
.
data
)
}
)
}
const
getData1
=
e
=>
{
console
.
log
(
e
)
e
.
map
((
i
,
j
)
=>
{
a
.
push
(
i
)
if
(
i
.
children
.
length
>
0
){
getData1
(
i
.
children
)
}
})
console
.
log
(
a
)
setData
(
a
)
}
// 弹出模态框
const
handleShowModal
=
(
key
,
value
)
=>
{
setvisibleParams
({
...
visibleParams
,
[
key
]:
value
});
...
...
@@ -435,7 +474,7 @@ const SiteManageV2 = () => {
.
then
(
res
=>
{
handleShowModal
(
'btnLoading'
,
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setSelectList
([]);
setUpdateCheck
(
updateCheck
+
1
);
notification
.
success
({
...
...
@@ -538,6 +577,7 @@ const SiteManageV2 = () => {
<
EditModal
visible=
{
visibleParams
.
editVisible
}
stationObj=
{
currentStationMsg
}
des=
{
des
}
onCancel=
{
()
=>
handleShowModal
(
'editVisible'
,
false
)
}
confirmModal=
{
editModal
}
/>
...
...
@@ -565,7 +605,7 @@ const SiteManageV2 = () => {
/>
</
Col
>
<
Col
span=
{
3
}
/>
</
Row
>
</
Card
>
<
div
style=
{
{
background
:
'#fff'
}
}
>
...
...
@@ -654,7 +694,7 @@ const Panels = React.memo(props => {
<DownOutlined className={styles.siteIcon} />
)} */
}
{
/* <UpOutlined className={styles.siteIcon} /> */
}
<
User
Outlined
className=
{
styles
.
siteIcon
}
/>
<
Apartment
Outlined
className=
{
styles
.
siteIcon
}
/>
<
p
style=
{
{
color
}
}
>
{
GroupName
}
</
p
>
<
Checkbox
key=
"0"
...
...
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