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
667c0333
Commit
667c0333
authored
Apr 25, 2021
by
mayongxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方案添加范围设置
parent
31e7efcc
Pipeline
#26606
skipped with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
17 deletions
+67
-17
index.jsx
src/components/MapScope/index.jsx
+4
-4
EditModal.jsx
...nter/messageManage/projectManage/components/EditModal.jsx
+4
-4
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+47
-7
UserManage.js
src/pages/userCenter/userManage/UserManage.js
+2
-1
gis.jsx
src/services/platform/gis.jsx
+1
-0
transformUtil.jsx
src/utils/transformUtil.jsx
+9
-1
No files found.
src/components/MapScope/index.jsx
View file @
667c0333
...
...
@@ -10,7 +10,7 @@ const MapScope = props => {
const
[
options
,
setOptions
]
=
useState
([])
//const [mouseTool,setMouseTool] = useState(null)
const
{
confirmModal
,
stationId
,
distinct
,
extent
}
=
props
const
{
confirmModal
,
extent
,
mapId
}
=
props
const
[
currentExtent
,
setCurrentExtent
]
=
useState
()
const
[
isDistrict
,
setIsDistrict
]
=
useState
(
false
)
const
[
currentAreaName
,
setCurrentAreaName
]
=
useState
(
null
)
...
...
@@ -21,10 +21,10 @@ const MapScope = props => {
useEffect
(()
=>
{
if
(
document
.
getElementById
(
"map-container"
))
{
if
(
document
.
getElementById
(
mapId
))
{
if
(
!
mapID
.
current
)
{
//1.加载底图
let
m
=
new
window
.
AMap
.
Map
(
'map-container'
);
let
m
=
new
window
.
AMap
.
Map
(
mapId
);
mapID
.
current
=
m
//2.加载管网配置
GetAllConfig
().
then
(
...
...
@@ -205,7 +205,7 @@ const MapScope = props => {
>
<
div
style=
{
{
width
:
"750px"
,
height
:
"500px"
}
}
>
<
div
style=
{
{
width
:
"750px"
,
height
:
"500px"
,
position
:
"absolute"
}
}
>
<
div
id=
"map-container"
style=
{
{
width
:
"750px"
,
height
:
"500px"
}
}
></
div
>
<
div
id=
{
mapId
}
style=
{
{
width
:
"750px"
,
height
:
"500px"
}
}
></
div
>
<
div
style=
{
{
top
:
"10px"
,
left
:
"10px"
,
position
:
"absolute"
}
}
>
<
Cascader
...
...
src/pages/platformCenter/messageManage/projectManage/components/EditModal.jsx
View file @
667c0333
...
...
@@ -268,10 +268,10 @@ const EditModal = props => {
>
<
VisibleRoleModal
onSubmit=
{
onPushSubmit
}
title=
{
"推送人员"
}
initValues=
{
[
"58"
,
"13"
]
}
/>
onSubmit=
{
onPushSubmit
}
title=
{
"推送人员"
}
/>
</
Item
>
<
Item
label=
"定时计划"
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
View file @
667c0333
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
classnames
from
'classnames'
import
styles
from
'../../SchemeConfig.less'
import
{
Popconfirm
,
notification
,
Card
,
Button
}
from
'antd'
;
import
{
Popconfirm
,
notification
,
Card
,
Button
,
message
}
from
'antd'
;
import
{
unbindSchemeBaseMap
,
GetAll
Config
unbindSchemeBaseMap
,
GetAllConfig
,
SetService
Config
}
from
'@/services/webConfig/api'
;
import
{
CloseOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddModal
from
'../AddModal'
import
MapScope
from
'@/components/MapScope'
import
{
createGuid
}
from
'@/utils/transformUtil'
const
CardData
=
props
=>
{
const
{
deletebaseMaps
=
()
=>
{
}
}
=
props
;
const
{
deletebaseMaps
=
()
=>
{
}
,
item
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 状态更新
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
formObj
,
setFormObj
]
=
useState
({});
const
[
serviceList
,
setServiceList
]
=
useState
([]);
const
[
mapScopeVisible
,
setMapScopeVisible
]
=
useState
(
false
)
const
[
currentAreaName
,
setCurrentAreaName
]
=
useState
(
""
)
//删除瓦片
const
deletebaseMap
=
(
item
,
baseMapItem
)
=>
{
unbindSchemeBaseMap
({
schemename
:
item
.
schemename
,
basemapName
:
baseMapItem
}).
then
(
res
=>
{
...
...
@@ -78,21 +82,47 @@ const CardData = props => {
}
})
}
if
(
serverList
.
length
)
{
if
(
serverList
.
length
)
{
setServiceList
(
serverList
)
setType
(
'add'
);
setVisible
(
true
);
}
else
{
else
{
notification
.
warning
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先在基础配置-配置底图'
,
});
});
}
})
}
}
const
submitExtent
=
(
extent
,
areaName
)
=>
{
const
jsConfig
=
{
extent
:
extent
,
areaName
:
areaName
,
boundColor
:
"#86c8f8"
,
boundWidth
:
"10px"
,
backgroundColor
:
"#000000"
,
backgroundOpacity
:
"0.6"
}
SetServiceConfig
(
{
schemename
:
item
.
schemename
,
terminalType
:
"web"
,
isBaseMap
:
false
,
jsconCfg
:
JSON
.
stringify
(
jsConfig
)
}
).
then
(
res
=>
{
if
(
res
.
IsSuccess
==
true
){
setMapScopeVisible
(
true
)
message
.
info
(
"范围设置成功"
)
}
}
)
}
return
(
...
...
@@ -134,6 +164,10 @@ const CardData = props => {
</
div
>
})
:
''
}
</
div
>
<
div
>
<
span
className=
{
styles
.
schemeName
}
>
矢量
</
span
>
<
Button
onClick=
{
()
=>
setMapScopeVisible
(
true
)
}
>
选择范围
</
Button
>
</
div
>
</
Card
>
<
AddModal
visible=
{
visible
}
...
...
@@ -143,6 +177,12 @@ const CardData = props => {
serviceList=
{
serviceList
}
formObj=
{
formObj
}
/>
<
MapScope
mapId=
{
createGuid
()
}
visible=
{
mapScopeVisible
}
onCancel=
{
()
=>
setMapScopeVisible
(
false
)
}
confirmModal=
{
submitExtent
}
/>
</>
)
}
...
...
src/pages/userCenter/userManage/UserManage.js
View file @
667c0333
...
...
@@ -57,7 +57,7 @@ import EditUserModal from './EditUserModal';
import
ChangePasswordModal
from
'./ChangePasswordModal'
;
import
MapScopeEditModal
from
'@/components/MapScope'
import
styles
from
'./UserManage.less'
;
import
{
useTheme
}
from
'bizcharts'
;
import
{
createGuid
}
from
'@/utils/transformUtil'
const
UserManage
=
()
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
...
...
@@ -1043,6 +1043,7 @@ const UserManage = () => {
<
/p
>
<
/Modal
>
<
MapScopeEditModal
mapId
=
{
createGuid
()}
visible
=
{
editOrgExtentVisible
}
stationId
=
{
currentSelectOrg
}
onCancel
=
{()
=>
setEditOrgExtentVisible
(
false
)}
...
...
src/services/platform/gis.jsx
View file @
667c0333
...
...
@@ -7,3 +7,4 @@ export const GetMetaData = param =>
get
(
`
${
CITY_SERVICE
}
/MapServer.svc/
${
param
}
`
);
src/utils/transformUtil.jsx
View file @
667c0333
...
...
@@ -201,7 +201,14 @@ const positionByGaode = (callback) => {
});
});
}
// 生成随机
const
createGuid
=
()
=>
{
return
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
const
r
=
Math
.
random
()
*
16
|
0
,
v
=
c
==
'x'
?
r
:
(
r
&
0x3
|
0x8
);
return
v
.
toString
(
16
);
}).
toUpperCase
();
}
export
{
...
...
@@ -213,4 +220,5 @@ export {
lngLat2WebMercator
,
plan2AMapbound
,
gcj_decrypt
,
createGuid
};
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