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
6f00cc3e
Commit
6f00cc3e
authored
1 year ago
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '
parent
64c3555b
Pipeline
#79525
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
NewEditModal.jsx
...atformCenter/gis/schemeConfig/TileConfig/NewEditModal.jsx
+30
-3
No files found.
src/pages/platformCenter/gis/schemeConfig/TileConfig/NewEditModal.jsx
View file @
6f00cc3e
...
...
@@ -42,7 +42,16 @@ const { Item } = Form;
const
{
Option
}
=
Select
;
const
{
TreeNode
}
=
TreeSelect
;
const
NewEditModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
type
,
formObj
,
visible
,
baseMap
,
name
,
onCancel
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
type
,
formObj
,
visible
,
baseMap
,
name
,
onCancel
,
json
,
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
radio
,
setRadio
]
=
useState
();
const
[
alpha
,
setAlpha
]
=
useState
(
1
);
...
...
@@ -64,6 +73,7 @@ const NewEditModal = props => {
'assets/images/thumbnail/thumbnail_3.jpg'
,
'assets/images/thumbnail/thumbnail_4.jpg'
,
];
const
[
maplayer
,
setMaplayer
]
=
useState
([]);
// 提交
const
onSubmit
=
()
=>
{
...
...
@@ -178,11 +188,28 @@ const NewEditModal = props => {
const
onFinish
=
value
=>
{};
useEffect
(()
=>
{
// let data = [];
// jsonData.forEach(item => {
// data = [...data, ...item.items];
// });
// setKeepJsonData(data);
if
(
json
.
length
>
0
)
{
setMaplayer
(
json
);
let
data
=
[];
json
.
forEach
(
item
=>
{
data
=
[...
data
,
...
item
.
items
];
});
setKeepJsonData
(
data
);
}
else
{
setMaplayer
(
jsonData
);
let
data
=
[];
jsonData
.
forEach
(
item
=>
{
data
=
[...
data
,
...
item
.
items
];
});
setKeepJsonData
(
data
);
}
setLoading
(
false
);
setSpaceData
([]);
setKeyData
([]);
...
...
@@ -561,8 +588,8 @@ const NewEditModal = props => {
showCheckedStrategy
onChange=
{
handleChange
}
>
{
jsonData
?
(
jsonData
.
map
(
i
=>
mapTree
(
i
))
{
maplayer
?
(
maplayer
.
map
(
i
=>
mapTree
(
i
))
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
...
...
This diff is collapsed.
Click to expand it.
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