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
131b9ec0
Commit
131b9ec0
authored
May 10, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '管网配置批量更新功能添加'
parent
d18f2d51
Pipeline
#72091
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
VectorData.jsx
...platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
+44
-1
No files found.
src/pages/platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
View file @
131b9ec0
...
...
@@ -18,6 +18,7 @@ const VectorData = props => {
const
[
meteDataVisible
,
setMeteDataVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
allLoading
,
setAllLoading
]
=
useState
(
false
);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
...
...
@@ -70,7 +71,7 @@ const VectorData = props => {
<
Button
type=
"primary"
size=
"small"
loading=
{
loading
[
index
]
}
loading=
{
loading
[
index
]
||
allLoading
}
onClick=
{
()
=>
enterLoading
(
record
,
index
)
}
>
更新
...
...
@@ -218,6 +219,38 @@ const VectorData = props => {
setSearchValue
(
e
.
target
.
value
);
};
const
updateAll
=
async
()
=>
{
let
query
=
{
version
:
9999
,
solution
:
solutionNames
,
};
for
(
const
[
index
,
item
]
of
tileData
.
entries
())
{
setAllLoading
(
true
);
query
.
serviceName
=
item
.
ServiceName
;
let
res
=
null
;
res
=
await
updatePublishedMetaData
(
query
);
if
(
res
.
success
)
{
setAllLoading
(
false
);
notification
.
success
({
message
:
'提示'
,
duration
:
1
,
// description: `${item.ServiceName}更新辣`,
description
:
`更新元数据成功`
,
});
}
else
{
setAllLoading
(
false
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'更新元数据失败'
,
});
}
if
(
index
===
tileData
.
length
-
1
)
{
setFlag
(
flag
+
1
)
}
}
};
return
(
<>
<
div
className=
{
styles
.
pipeNetwork
}
>
...
...
@@ -233,6 +266,16 @@ const VectorData = props => {
enterButton
style=
{
{
width
:
'300px'
,
marginRight
:
'20px'
}
}
/>
<
Button
type=
"primary"
onClick=
{
()
=>
{
updateAll
();
}
}
loading=
{
allLoading
}
style=
{
{
marginRight
:
'20px'
}
}
>
批量更新
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
...
...
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