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
2 years ago
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
styles
from
'./index.less'
import
{
Button
}
from
'antd'
import
{
import
{
ArcGISSceneMap
,
ArcGISSceneMap
,
ClickQuery
,
ClickQuery
,
...
@@ -10,11 +11,11 @@ import {
...
@@ -10,11 +11,11 @@ import {
SimpleLineSymbol
,
SimpleLineSymbol
,
SimpleFillSymbol
,
SimpleFillSymbol
,
}
from
'@wisdom-map/arcgismap/lib'
}
from
'@wisdom-map/arcgismap/lib'
import
{
CompassOutlined
}
from
'@ant-design/icons'
import
Drag
from
'../../../../../components/Drag'
import
Drag
from
'../../../../../components/Drag'
import
{
isJson
}
from
'../../../../../../utils/index'
import
{
isJson
}
from
'../../../../../../utils/index'
import
point
from
'../../../../../../assets/images/cood/point.png'
import
point
from
'../../../../../../assets/images/cood/point.png'
let
geometrystr
=
''
let
geometrystr
=
''
let
gisInfo
=
{}
let
gisInfo
=
{}
let
layer
=
0
let
layer
=
0
...
@@ -27,6 +28,16 @@ const CoordView = (props) => {
...
@@ -27,6 +28,16 @@ const CoordView = (props) => {
let
clickref
=
useRef
(
null
)
let
clickref
=
useRef
(
null
)
let
view
=
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
)
=>
{
const
getMapInfo
=
(
mapObj
,
Map
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
widget
===
'Device'
)
{
if
(
widget
===
'Device'
)
{
...
@@ -145,7 +156,17 @@ const CoordView = (props) => {
...
@@ -145,7 +156,17 @@ const CoordView = (props) => {
return
(
return
(
<
div
className
=
{
styles
.
coordView
}
>
<
div
className
=
{
styles
.
coordView
}
>
<
span
onClick
=
{()
=>
setVisible
(
true
)}
>
{
value
}
<
/span
>
{
value
?
(
<
Button
size
=
'small'
icon
=
{
<
CompassOutlined
/>
}
onClick
=
{()
=>
setVisible
(
true
)}
>
{
btnText
}
<
/Button
>
)
:
null
}
<
Drag
<
Drag
visible
=
{
visible
}
visible
=
{
visible
}
title
=
{
title
}
title
=
{
title
}
...
...
This diff is collapsed.
Click to expand it.
src/core/Account/components/TablePack/components/CoordView/index.less
View file @
dc9a5488
.coordView {
.coordView {
display: flex;
justify-content: center;
align-items: center;
&:hover {
&:hover {
cursor: pointer;
cursor: pointer;
color: #1890ff;
color: #1890ff;
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/coord/DrawArea/index.js
View file @
dc9a5488
...
@@ -106,7 +106,7 @@ const DrawArea = (props) => {
...
@@ -106,7 +106,7 @@ const DrawArea = (props) => {
<
Input
<
Input
disabled
=
{
disabled
}
disabled
=
{
disabled
}
placeholder
=
{
placeholder
}
placeholder
=
{
placeholder
}
value
=
{
value
}
value
=
{
isJson
(
value
)
?
'已绘制'
:
''
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
onClick
=
{
showMap
}
onClick
=
{
showMap
}
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/coord/DrawPath/index.js
View file @
dc9a5488
...
@@ -105,7 +105,7 @@ const DrawPath = (props) => {
...
@@ -105,7 +105,7 @@ const DrawPath = (props) => {
<
Input
<
Input
disabled
=
{
disabled
}
disabled
=
{
disabled
}
placeholder
=
{
placeholder
}
placeholder
=
{
placeholder
}
value
=
{
value
}
value
=
{
isJson
(
value
)
?
'已绘制'
:
''
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
addonAfter
=
{
disabled
?
null
:
<
CompassOutlined
style
=
{{
color
:
'rgba(0, 0, 0, 0.25)'
}}
onClick
=
{
showMap
}
/>
}
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
onClick
=
{
showMap
}
onClick
=
{
showMap
}
...
...
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