Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
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
田翔
xform
Commits
dc9a5488
Commit
dc9a5488
authored
Apr 26, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 地图值修改为按钮
parent
3ef4d574
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
index.js
...ccount/components/TablePack/components/CoordView/index.js
+24
-3
index.less
...ount/components/TablePack/components/CoordView/index.less
+3
-0
index.js
src/core/widgets/coord/DrawArea/index.js
+1
-1
index.js
src/core/widgets/coord/DrawPath/index.js
+1
-1
No files found.
src/core/Account/components/TablePack/components/CoordView/index.js
View file @
dc9a5488
import
React
,
{
useState
,
useRef
}
from
'react'
import
React
,
{
useState
,
useRef
,
useMemo
}
from
'react'
import
styles
from
'./index.less'
import
{
Button
}
from
'antd'
import
{
ArcGISSceneMap
,
ClickQuery
,
...
...
@@ -10,11 +11,11 @@ import {
SimpleLineSymbol
,
SimpleFillSymbol
,
}
from
'@wisdom-map/arcgismap/lib'
import
{
CompassOutlined
}
from
'@ant-design/icons'
import
Drag
from
'../../../../../components/Drag'
import
{
isJson
}
from
'../../../../../../utils/index'
import
point
from
'../../../../../../assets/images/cood/point.png'
let
geometrystr
=
''
let
gisInfo
=
{}
let
layer
=
0
...
...
@@ -27,6 +28,16 @@ const CoordView = (props) => {
let
clickref
=
useRef
(
null
)
let
view
=
useRef
(
null
)
const
btnText
=
useMemo
(()
=>
{
switch
(
widget
)
{
case
'Coordinate'
:
return
'查看位置'
case
'Device'
:
return
'查看设备'
case
'DrawPath'
:
return
'查看路径'
case
'DrawArea'
:
return
'查看区域'
default
:
return
}
},
[
widget
])
const
getMapInfo
=
(
mapObj
,
Map
)
=>
{
setTimeout
(()
=>
{
if
(
widget
===
'Device'
)
{
...
...
@@ -145,7 +156,17 @@ const CoordView = (props) => {
return
(
<
div
className
=
{
styles
.
coordView
}
>
<
span
onClick
=
{()
=>
setVisible
(
true
)}
>
{
value
}
<
/span
>
{
value
?
(
<
Button
size
=
'small'
icon
=
{
<
CompassOutlined
/>
}
onClick
=
{()
=>
setVisible
(
true
)}
>
{
btnText
}
<
/Button
>
)
:
null
}
<
Drag
visible
=
{
visible
}
title
=
{
title
}
...
...
src/core/Account/components/TablePack/components/CoordView/index.less
View file @
dc9a5488
.coordView {
display: flex;
justify-content: center;
align-items: center;
&:hover {
cursor: pointer;
color: #1890ff;
...
...
src/core/widgets/coord/DrawArea/index.js
View file @
dc9a5488
...
...
@@ -106,7 +106,7 @@ const DrawArea = (props) => {
<
Input
disabled
=
{
disabled
}
placeholder
=
{
placeholder
}
value
=
{
value
}
value
=
{
isJson
(
value
)
?
'已绘制'
:
''
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
style
=
{{
width
:
'100%'
}}
onClick
=
{
showMap
}
...
...
src/core/widgets/coord/DrawPath/index.js
View file @
dc9a5488
...
...
@@ -105,7 +105,7 @@ const DrawPath = (props) => {
<
Input
disabled
=
{
disabled
}
placeholder
=
{
placeholder
}
value
=
{
value
}
value
=
{
isJson
(
value
)
?
'已绘制'
:
''
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
style
=
{{
width
:
'100%'
}}
onClick
=
{
showMap
}
...
...
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