Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cd Comprehensive Web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cityLevel
Cd Comprehensive Web
Commits
a162d880
Commit
a162d880
authored
4 months ago
by
1437862981
Browse files
Options
Downloads
Patches
Plain Diff
接口联调
parent
63863f6e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/GlobalModalServices/modals/BridgeManage/components/MapBase/index.tsx
+18
-13
18 additions, 13 deletions
...Services/modals/BridgeManage/components/MapBase/index.tsx
with
18 additions
and
13 deletions
src/pages/GlobalModalServices/modals/BridgeManage/components/MapBase/index.tsx
+
18
−
13
View file @
a162d880
...
...
@@ -124,13 +124,15 @@ const MapBase: React.FC<MapBaseProps> = () => {
//桥梁位置分布底部数据
const
{
data
:
bridgeEarlyData
}
=
useRequest
(()
=>
services
.
DataBase
.
getSjdzInfoData
({
typeCode
:
'
zzcc-
a
q-yjdjtj
'
,
typeCode
:
'
zzcc-
d
q-yj
f
djtj
ql
'
,
params
:
{
type
:
'
桥梁
'
,
sshyXlCode
:
'
0401
'
,
},
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
);
return
res
?.
data
?.
data
?.
records
?.[
0
]?.
stat
;
}
throw
new
Error
(
'
获取数据失败
'
);
...
...
@@ -218,31 +220,35 @@ const MapBase: React.FC<MapBaseProps> = () => {
},
{
name
:
'
正常
'
,
count
:
isUsingValue
?
50
:
'
--
'
,
count
:
bridgeBotmTotal
-
bridgeEarlyData
?.
reduce
((
acc
,
curr
)
=>
{
return
acc
+
curr
.
num
;
},
0
),
unit
:
''
,
icon
:
bridge2Icon
,
},
{
name
:
'
黄色预警
'
,
//
count: bridgeEarlyData?.find((item) => item.risklevel === '黄色预警')
//
?.num,
count
:
'
--
'
,
count
:
bridgeEarlyData
?.
find
((
item
)
=>
item
.
risklevel
===
'
黄色预警
'
)
?.
num
,
unit
:
''
,
icon
:
bridge3Icon
,
},
{
name
:
'
橙色预警
'
,
//
count: bridgeEarlyData?.find((item) => item.risklevel === '橙色预警')
//
?.num,
count
:
'
--
'
,
count
:
bridgeEarlyData
?.
find
((
item
)
=>
item
.
risklevel
===
'
橙色预警
'
)
?.
num
,
unit
:
''
,
icon
:
bridge4Icon
,
},
{
name
:
'
红色预警
'
,
//
count: bridgeEarlyData?.find((item) => item.risklevel === '红色预警')
//
?.num,
count
:
'
--
'
,
count
:
bridgeEarlyData
?.
find
((
item
)
=>
item
.
risklevel
===
'
红色预警
'
)
?.
num
,
unit
:
''
,
icon
:
bridge5Icon
,
},
...
...
@@ -261,10 +267,9 @@ const MapBase: React.FC<MapBaseProps> = () => {
mapRef
?.
current
?.
flyTo
({
destination
:
{
x
:
Number
(
item
?.
longitude
),
y
:
Number
(
item
?.
latitude
)
+
0.005
,
y
:
Number
(
item
?.
latitude
)
+
0.005
,
z
:
2396
,
},
});
}
catch
(
error
)
{
console
.
log
(
error
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment