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
db8295c6
Commit
db8295c6
authored
Apr 25, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化GIS平台下方案管理页面
parent
1b1c261d
Pipeline
#26556
skipped with stages
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
36 deletions
+48
-36
AddModal.jsx
...s/platformCenter/schemeConfig/projectMessage/AddModal.jsx
+18
-29
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+28
-3
projectMessage.jsx
...formCenter/schemeConfig/projectMessage/projectMessage.jsx
+0
-2
api.js
src/services/webConfig/api.js
+2
-2
No files found.
src/pages/platformCenter/schemeConfig/projectMessage/AddModal.jsx
View file @
db8295c6
...
...
@@ -10,13 +10,13 @@ import { number } from 'prop-types';
const
{
Item
}
=
Form
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
}
=
props
;
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
,
serviceList
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
mapType
,
setMapType
]
=
useState
(
0
);
const
[
ImgIndex
,
setImgIndex
]
=
useState
(
''
);
const
[
baseMap
,
setBaseMap
]
=
useState
([]);
const
[
pipeArr
,
setPipeArr
]
=
useState
([]);
const
[
serviceList
,
setServiceList
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
// 提交
...
...
@@ -28,16 +28,16 @@ const AddModal = props => {
if
(
type
===
'add'
)
{
bindSchemeBaseMap
({
schemename
:
formObj
.
schemename
,
basemapName
:
obj
.
serverName
}).
then
(
res
=>
{
basemapName
:
obj
.
serverName
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
IsSuccess
)
{
if
(
res
.
IsSuccess
)
{
form
.
resetFields
();
callBackSubmit
();
prompt
(
'success'
,
'瓦片新增成功'
)
prompt
(
'success'
,
'瓦片新增成功'
)
}
else
{
prompt
(
'fail'
,
'瓦片新增失败'
)
else
{
prompt
(
'fail'
,
'瓦片新增失败'
)
}
})
}
else
{
...
...
@@ -46,15 +46,15 @@ const AddModal = props => {
}
});
};
const
prompt
=
(
type
,
content
)
=>
{
if
(
type
==
'success'
)
{
const
prompt
=
(
type
,
content
)
=>
{
if
(
type
==
'success'
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
content
,
});
}
else
{
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
...
...
@@ -82,9 +82,9 @@ const AddModal = props => {
if
(
res
.
IsSuccess
)
{
form
.
resetFields
();
callBackSubmit
();
prompt
(
'success'
,
'方案新增成功'
)
prompt
(
'success'
,
'方案新增成功'
)
}
else
{
prompt
(
'fail'
,
'方案新增失败'
)
prompt
(
'fail'
,
'方案新增失败'
)
}
})
.
catch
(
err
=>
{
...
...
@@ -92,7 +92,9 @@ const AddModal = props => {
});
};
const
onFinish
=
value
=>
{
};
const
onFinish
=
value
=>
{
};
useEffect
(()
=>
{
switch
(
type
)
{
case
'add'
:
...
...
@@ -108,24 +110,10 @@ const AddModal = props => {
//添加瓦片
const
addTile
=
()
=>
{
let
serverList
=
[]
if
(
JSON
.
stringify
(
formObj
)
!=
"{}"
)
{
GetAllConfig
({
terminalType
:
'base'
,
isBaseMap
:
true
}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
Result
&&
res
.
Result
.
length
)
{
res
.
Result
.
map
(
item
=>
{
if
(
formObj
.
baseMap
.
indexOf
(
item
.
servicename
)
==
-
1
)
{
serverList
.
push
(
item
.
servicename
)
}
})
setServiceList
(
serverList
)
form
.
setFieldsValue
({
serverName
:
serverList
[
0
]
})
}
serverName
:
serviceList
[
0
]
})
}
}
//获取管网及默认底图
const
pipeNetwork
=
()
=>
{
form
.
resetFields
();
...
...
@@ -169,6 +157,7 @@ const AddModal = props => {
url
:
`http://{IP}/CityInterface/rest/services/MapServer.svc/
${
value
}
`
})
}
//选择底图
const
handleBaseMap
=
()
=>
{
}
return
(
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
View file @
db8295c6
...
...
@@ -3,7 +3,7 @@ import classnames from 'classnames'
import
styles
from
'../../SchemeConfig.less'
import
{
Popconfirm
,
notification
,
Card
,
Button
}
from
'antd'
;
import
{
unbindSchemeBaseMap
unbindSchemeBaseMap
,
GetAllConfig
}
from
'@/services/webConfig/api'
;
import
{
CloseOutlined
,
PlusOutlined
...
...
@@ -15,6 +15,7 @@ const CardData = props => {
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 状态更新
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
formObj
,
setFormObj
]
=
useState
({});
const
[
serviceList
,
setServiceList
]
=
useState
([]);
//删除瓦片
const
deletebaseMap
=
(
item
,
baseMapItem
)
=>
{
unbindSchemeBaseMap
({
schemename
:
item
.
schemename
,
basemapName
:
baseMapItem
}).
then
(
res
=>
{
...
...
@@ -65,10 +66,33 @@ const CardData = props => {
deletebaseMaps
()
};
//增加瓦片
const
addTile
=
(
item
)
=>
{
setFormObj
(
item
);
const
addTile
=
(
value
)
=>
{
let
serverList
=
[]
setFormObj
(
value
);
if
(
JSON
.
stringify
(
value
)
!=
"{}"
)
{
GetAllConfig
({
terminalType
:
'base'
,
isBaseMap
:
true
}).
then
(
res
=>
{
if
(
res
.
Result
&&
res
.
Result
.
length
)
{
res
.
Result
.
map
(
item
=>
{
if
(
value
.
baseMap
.
indexOf
(
item
.
servicename
)
==
-
1
)
{
serverList
.
push
(
item
.
servicename
)
}
})
}
if
(
serverList
.
length
){
setServiceList
(
serverList
)
setType
(
'add'
);
setVisible
(
true
);
}
else
{
notification
.
warning
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先在基础配置-配置底图'
,
});
}
})
}
}
return
(
...
...
@@ -116,6 +140,7 @@ const CardData = props => {
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
serviceList=
{
serviceList
}
formObj=
{
formObj
}
/>
</>
...
...
src/pages/platformCenter/schemeConfig/projectMessage/projectMessage.jsx
View file @
db8295c6
...
...
@@ -46,8 +46,6 @@ const VectorData = props => {
}
)
};
return
(
<>
<
div
style=
{
{
width
:
'calc(100vw - 265px)'
}
}
>
...
...
src/services/webConfig/api.js
View file @
db8295c6
...
...
@@ -176,8 +176,8 @@ export const GetGISServerMapList = query =>
//发布原数据
export
const
publisService
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_Publish_GS_Service`
,
query
,
{
timeout
:
120000
}
);
export
const
publisService
=
(
query
,
timeout
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_Publish_GS_Service`
,
query
,
timeout
);
//解决方案名称
export
const
getSolutionList
=
(
query
)
=>
...
...
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