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
e58aea02
Commit
e58aea02
authored
May 12, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接gis配置新接口
parent
297ab520
Pipeline
#27494
skipped with stages
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
146 additions
and
195 deletions
+146
-195
AddModal.jsx
...pages/platformCenter/schemeConfig/TileConfig/AddModal.jsx
+1
-1
TileConfig.jsx
...ges/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
+39
-40
AddModal.jsx
...pages/platformCenter/schemeConfig/VectorData/AddModal.jsx
+1
-31
VectorData.jsx
...ges/platformCenter/schemeConfig/VectorData/VectorData.jsx
+44
-42
AddModal.jsx
...s/platformCenter/schemeConfig/projectMessage/AddModal.jsx
+12
-13
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+6
-6
projectMessage.jsx
...formCenter/schemeConfig/projectMessage/projectMessage.jsx
+5
-4
AddModal.jsx
...s/platformCenter/schemeConfig/solutionConfig/AddModal.jsx
+2
-4
solutionConfig.jsx
...formCenter/schemeConfig/solutionConfig/solutionConfig.jsx
+18
-17
api.js
src/services/webConfig/api.js
+18
-37
No files found.
src/pages/platformCenter/schemeConfig/TileConfig/AddModal.jsx
View file @
e58aea02
...
@@ -39,7 +39,7 @@ const AddModal = props => {
...
@@ -39,7 +39,7 @@ const AddModal = props => {
SetServiceConfig
(
arr
)
SetServiceConfig
(
arr
)
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
form
.
resetFields
();
form
.
resetFields
();
callBackSubmit
();
callBackSubmit
();
notification
.
success
({
notification
.
success
({
...
...
src/pages/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
View file @
e58aea02
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
Get
AllConfig
,
Get
tMaplayer
,
deleteConfig
deleteConfig
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
import
AddModal
from
'./AddModal'
...
@@ -92,8 +92,7 @@ const TileData = props => {
...
@@ -92,8 +92,7 @@ const TileData = props => {
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
setTreeLoading
(
false
);
setTreeLoading
(
false
);
console
.
log
(
'res'
,
res
)
if
(
res
.
msg
===
'Ok'
)
{
if
(
res
.
IsSuccess
)
{
// form.resetFields();
// form.resetFields();
// callBackSubmit();
// callBackSubmit();
notification
.
success
({
notification
.
success
({
...
@@ -114,18 +113,18 @@ const TileData = props => {
...
@@ -114,18 +113,18 @@ const TileData = props => {
})
})
}
}
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
if
(
baseMap
.
length
)
{
if
(
baseMap
.
length
)
{
setType
(
'add'
);
setType
(
'add'
);
setVisible
(
true
);
setVisible
(
true
);
}
}
else
{
else
{
notification
.
warning
({
notification
.
warning
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
3
,
duration
:
3
,
description
:
'地图类型已都存在,可编辑修改'
,
description
:
'地图类型已都存在,可编辑修改'
,
});
});
}
}
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
renderTile
();
renderTile
();
...
@@ -134,18 +133,18 @@ const TileData = props => {
...
@@ -134,18 +133,18 @@ const TileData = props => {
const
renderTile
=
()
=>
{
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
setTreeLoading
(
true
);
const
baseMapData
=
[
'高德地形'
,
'高德影像'
,
'天地图地形'
,
'天地图影像'
]
const
baseMapData
=
[
'高德地形'
,
'高德影像'
,
'天地图地形'
,
'天地图影像'
]
Get
AllConfig
({
Get
tMaplayer
({
terminalType
:
'base'
,
terminalType
:
'base'
,
isBaseMap
:
true
isBaseMap
:
true
}).
then
(
}).
then
(
res
=>
{
res
=>
{
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
setTileData
(
res
.
Result
);
setTileData
(
res
.
data
.
general
.
baseMap
.
layers
);
res
.
Result
.
map
(
(
item
)
=>
{
res
.
data
.
general
.
baseMap
.
layers
.
map
((
item
)
=>
{
let
index
=
baseMapData
.
indexOf
(
item
.
servicename
);
let
index
=
baseMapData
.
indexOf
(
item
.
servicename
);
if
(
index
!=
-
1
)
{
if
(
index
!=
-
1
)
{
baseMapData
.
splice
(
index
,
1
);
baseMapData
.
splice
(
index
,
1
);
}
}
})
})
setBaseMap
(
baseMapData
)
setBaseMap
(
baseMapData
)
...
@@ -162,35 +161,35 @@ const TileData = props => {
...
@@ -162,35 +161,35 @@ const TileData = props => {
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
handleAdd
();
}
}
>
}
}
>
新增
新增
</
Button
>
</
Button
>
</
div
>
</
div
>
<
Table
<
Table
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
tileData
}
dataSource=
{
tileData
}
bordered
bordered
rowKey=
"type"
rowKey=
"type"
scroll=
{
{
y
:
400
}
}
scroll=
{
{
y
:
400
}
}
pagination=
{
{
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
`第${range[0]}-${range[1]} 条/共 ${total} 条`
}
}
}
}
>
>
</
Table
>
</
Table
>
<
AddModal
<
AddModal
visible=
{
visible
}
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
type=
{
type
}
formObj=
{
formObj
}
formObj=
{
formObj
}
baseMap
=
{
baseMap
}
baseMap=
{
baseMap
}
/>
/>
</
Spin
>
</
Spin
>
</>
</>
)
)
...
...
src/pages/platformCenter/schemeConfig/VectorData/AddModal.jsx
View file @
e58aea02
...
@@ -68,40 +68,12 @@ const AddModal = props => {
...
@@ -68,40 +68,12 @@ const AddModal = props => {
});
});
setLoading
(
false
);
setLoading
(
false
);
});
});
}
else
if
(
type
===
'edit'
)
{
handleEdit
();
}
}
}
}
});
});
};
};
const
handleEdit
=
()
=>
{
// SetServiceConfig({
// servicename: serviceName,
// terminalType: 'base',
// isBaseMap: true,
// jsonCfg: JSON.stringify(query)
// })
// .then(res => {
// setLoading(false);
// if (res.success) {
// form.resetFields();
// callBackSubmit();
// notification.success({
// message: '提示',
// duration: 3,
// description: res.message || '编辑成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.message || '编辑失败',
// });
// }
// })
// .catch(err => setLoading(false));
};
const
onFinish
=
value
=>
{
};
const
onFinish
=
value
=>
{
};
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -167,8 +139,6 @@ const AddModal = props => {
...
@@ -167,8 +139,6 @@ const AddModal = props => {
},
},
};
};
const
handleChange
=
()
=>
{
}
//选择工作空间
//选择工作空间
const
selectWorkspace
=
()
=>
{
const
selectWorkspace
=
()
=>
{
...
...
src/pages/platformCenter/schemeConfig/VectorData/VectorData.jsx
View file @
e58aea02
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
...
@@ -16,12 +16,12 @@ const VectorData = props => {
...
@@ -16,12 +16,12 @@ const VectorData = props => {
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
[
currentMetaData
,
setCurrentMetaData
]
=
useState
(
null
)
const
[
currentMetaData
,
setCurrentMetaData
]
=
useState
(
null
)
const
columns
=
[
const
columns
=
[
{
{
title
:
'服务名'
,
title
:
'服务名'
,
dataIndex
:
'
s
erviceName'
,
dataIndex
:
'
S
erviceName'
,
key
:
'
s
erviceName'
,
key
:
'
S
erviceName'
,
align
:
'center'
align
:
'center'
},
},
{
{
...
@@ -84,7 +84,7 @@ const VectorData = props => {
...
@@ -84,7 +84,7 @@ const VectorData = props => {
newLoadings
[
index
]
=
true
newLoadings
[
index
]
=
true
setLoading
(
newLoadings
)
setLoading
(
newLoadings
)
let
query
=
{
let
query
=
{
serviceName
:
record
.
s
erviceName
,
serviceName
:
record
.
S
erviceName
,
_version
:
9999
,
_version
:
9999
,
solution
:
solutionNames
solution
:
solutionNames
}
}
...
@@ -133,15 +133,17 @@ const VectorData = props => {
...
@@ -133,15 +133,17 @@ const VectorData = props => {
}
}
const
onSubmit
=
prop
=>
{
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
setVisible
(
false
);
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
};
};
const
delConfirm
=
(
record
)
=>
{
const
delConfirm
=
(
record
)
=>
{
console
.
log
(
' record.ServiceName'
,
record
.
ServiceName
.
split
(
"."
));
let
query
=
{
let
query
=
{
serviceName
:
record
.
serviceName
,
serviceName
:
record
.
ServiceName
.
split
(
"."
)[
0
]
,
_version
:
9999
,
_version
:
9999
,
solution
:
solutionNames
solution
:
solutionNames
}
}
deleteVectorService
(
query
).
then
(
res
=>
{
deleteVectorService
(
query
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
if
(
res
.
success
)
{
if
(
res
.
success
)
{
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
notification
.
success
({
notification
.
success
({
...
@@ -171,14 +173,14 @@ const VectorData = props => {
...
@@ -171,14 +173,14 @@ const VectorData = props => {
solutionName
();
solutionName
();
GetVectorService
().
then
(
GetVectorService
().
then
(
res
=>
{
res
=>
{
if
(
res
&&
res
.
length
>
0
)
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[]
let
arr
=
[]
res
.
map
(
item
=>
{
res
.
data
.
VectorList
.
map
(
item
=>
{
arr
.
push
(
false
)
arr
.
push
(
false
)
})
})
setLoading
(
arr
)
setLoading
(
arr
)
setTreeLoading
(
false
);
setTreeLoading
(
false
);
setTileData
(
res
);
setTileData
(
res
.
data
.
VectorList
);
}
else
{
}
else
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
notification
.
error
({
notification
.
error
({
...
@@ -194,40 +196,40 @@ const VectorData = props => {
...
@@ -194,40 +196,40 @@ const VectorData = props => {
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
handleAdd
();
}
}
>
}
}
>
新增
新增
</
Button
>
</
Button
>
</
div
>
</
div
>
<
Table
<
Table
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
tileData
}
dataSource=
{
tileData
}
bordered
bordered
rowKey=
"c
reateTime"
rowKey=
"C
reateTime"
scroll=
{
{
y
:
400
}
}
scroll=
{
{
y
:
400
}
}
pagination=
{
{
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
`第${range[0]}-${range[1]} 条/共 ${total} 条`
}
}
}
}
>
>
</
Table
>
</
Table
>
<
AddModal
<
AddModal
visible=
{
visible
}
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onCancel=
{
()
=>
setVisible
(
false
)
}
callBackSubmit=
{
onSubmit
}
callBackSubmit=
{
onSubmit
}
type=
{
type
}
type=
{
type
}
formObj=
{
formObj
}
formObj=
{
formObj
}
solutionNames=
{
solutionNames
}
solutionNames=
{
solutionNames
}
/>
/>
<
PreviewModal
<
PreviewModal
visible=
{
previewVisible
}
visible=
{
previewVisible
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
metaData=
{
currentMetaData
}
/>
/>
</
Spin
>
</
Spin
>
</>
</>
)
)
...
...
src/pages/platformCenter/schemeConfig/projectMessage/AddModal.jsx
View file @
e58aea02
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
Select
,
notification
}
from
'antd'
;
import
{
Form
,
Modal
,
Input
,
Select
,
notification
}
from
'antd'
;
import
{
import
{
Get
AllConfig
,
Get
tMaplayer
,
GetVectorService
,
GetVectorService
,
SetServiceConfig
,
SetServiceConfig
,
bindSchemeBaseMap
bindSchemeBaseMap
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
{
number
}
from
'prop-types'
;
const
{
Item
}
=
Form
;
const
{
Item
}
=
Form
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
,
serviceList
}
=
props
;
const
{
callBackSubmit
=
()
=>
{
},
type
,
formObj
,
visible
,
serviceList
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
mapType
,
setMapType
]
=
useState
(
0
);
const
[
ImgIndex
,
setImgIndex
]
=
useState
(
''
);
const
[
baseMap
,
setBaseMap
]
=
useState
([]);
const
[
baseMap
,
setBaseMap
]
=
useState
([]);
const
[
pipeArr
,
setPipeArr
]
=
useState
([]);
const
[
pipeArr
,
setPipeArr
]
=
useState
([]);
...
@@ -31,7 +28,7 @@ const AddModal = props => {
...
@@ -31,7 +28,7 @@ const AddModal = props => {
basemapName
:
obj
.
serverName
basemapName
:
obj
.
serverName
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
form
.
resetFields
();
form
.
resetFields
();
callBackSubmit
();
callBackSubmit
();
prompt
(
'success'
,
'瓦片新增成功'
)
prompt
(
'success'
,
'瓦片新增成功'
)
...
@@ -79,7 +76,7 @@ const AddModal = props => {
...
@@ -79,7 +76,7 @@ const AddModal = props => {
SetServiceConfig
(
query
)
SetServiceConfig
(
query
)
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
form
.
resetFields
();
form
.
resetFields
();
callBackSubmit
();
callBackSubmit
();
prompt
(
'success'
,
'方案新增成功'
)
prompt
(
'success'
,
'方案新增成功'
)
...
@@ -117,20 +114,22 @@ const AddModal = props => {
...
@@ -117,20 +114,22 @@ const AddModal = props => {
//获取管网及默认底图
//获取管网及默认底图
const
pipeNetwork
=
()
=>
{
const
pipeNetwork
=
()
=>
{
form
.
resetFields
();
form
.
resetFields
();
let
req1
=
Get
AllConfig
({
terminalType
:
'base'
,
isBaseMap
:
true
})
let
req1
=
Get
tMaplayer
({
terminalType
:
'base'
,
isBaseMap
:
true
})
let
req2
=
GetVectorService
()
let
req2
=
GetVectorService
()
let
pipeArr
=
[],
baseMap
=
[];
let
pipeArr
=
[],
baseMap
=
[];
Promise
.
all
([
req1
,
req2
]).
then
(
res
=>
{
Promise
.
all
([
req1
,
req2
]).
then
(
res
=>
{
if
(
res
[
0
].
Result
&&
res
[
0
].
Result
.
length
)
{
if
(
res
[
0
].
msg
===
'Ok'
)
{
res
[
0
].
Result
.
map
(
item
=>
{
(
res
[
0
].
data
.
general
.
baseMap
.
layers
||
[])
.
map
(
item
=>
{
baseMap
.
push
(
item
.
servicename
)
baseMap
.
push
(
item
.
servicename
)
})
})
}
}
if
(
res
[
1
]
&&
res
[
1
].
length
)
{
if
(
res
[
1
]
.
msg
===
'Ok'
)
{
res
[
1
]
.
map
(
item
=>
{
(
res
[
1
].
data
.
VectorList
||
[])
.
map
(
item
=>
{
pipeArr
.
push
(
item
.
serviceName
)
pipeArr
.
push
(
item
.
ServiceName
.
split
(
"."
)[
0
]
)
})
})
}
}
console
.
log
(
'pipeArr'
,
pipeArr
);
console
.
log
(
'baseMap'
,
baseMap
);
setPipeArr
(
pipeArr
)
setPipeArr
(
pipeArr
)
setBaseMap
(
baseMap
)
setBaseMap
(
baseMap
)
form
.
setFieldsValue
({
form
.
setFieldsValue
({
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
View file @
e58aea02
...
@@ -3,7 +3,7 @@ import classnames from 'classnames'
...
@@ -3,7 +3,7 @@ import classnames from 'classnames'
import
styles
from
'../../SchemeConfig.less'
import
styles
from
'../../SchemeConfig.less'
import
{
Popconfirm
,
notification
,
Card
,
Button
,
message
}
from
'antd'
;
import
{
Popconfirm
,
notification
,
Card
,
Button
,
message
}
from
'antd'
;
import
{
import
{
unbindSchemeBaseMap
,
Get
AllConfig
,
SetServiceConfig
,
deleteConfig
unbindSchemeBaseMap
,
Get
tMaplayer
,
SetServiceConfig
,
deleteConfig
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
{
import
{
CloseOutlined
,
PlusOutlined
CloseOutlined
,
PlusOutlined
...
@@ -47,7 +47,7 @@ const CardData = props => {
...
@@ -47,7 +47,7 @@ const CardData = props => {
terminalType
:
'scheme'
,
terminalType
:
'scheme'
,
isBaseMap
:
false
isBaseMap
:
false
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
msg
===
"Ok"
)
{
notification
.
success
({
notification
.
success
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
3
,
duration
:
3
,
...
@@ -73,9 +73,9 @@ const CardData = props => {
...
@@ -73,9 +73,9 @@ const CardData = props => {
let
serverList
=
[]
let
serverList
=
[]
setFormObj
(
value
);
setFormObj
(
value
);
if
(
JSON
.
stringify
(
value
)
!=
"{}"
)
{
if
(
JSON
.
stringify
(
value
)
!=
"{}"
)
{
Get
AllConfig
({
terminalType
:
'base'
,
isBaseMap
:
true
}).
then
(
res
=>
{
Get
tMaplayer
({
terminalType
:
'base'
,
isBaseMap
:
true
}).
then
(
res
=>
{
if
(
res
.
Result
&&
res
.
Result
.
length
)
{
if
(
res
.
msg
===
'Ok'
)
{
res
.
Result
.
map
(
item
=>
{
res
.
data
.
general
.
baseMap
.
layers
.
map
(
item
=>
{
if
(
value
.
baseMap
.
indexOf
(
item
.
servicename
)
==
-
1
)
{
if
(
value
.
baseMap
.
indexOf
(
item
.
servicename
)
==
-
1
)
{
serverList
.
push
(
item
.
servicename
)
serverList
.
push
(
item
.
servicename
)
}
}
...
@@ -116,7 +116,7 @@ const CardData = props => {
...
@@ -116,7 +116,7 @@ const CardData = props => {
}
}
).
then
(
).
then
(
res
=>
{
res
=>
{
if
(
res
.
IsSuccess
==
true
)
{
if
(
res
.
msg
===
"Ok"
)
{
setMapScopeVisible
(
true
)
setMapScopeVisible
(
true
)
message
.
info
(
"范围设置成功"
)
message
.
info
(
"范围设置成功"
)
}
}
...
...
src/pages/platformCenter/schemeConfig/projectMessage/projectMessage.jsx
View file @
e58aea02
...
@@ -2,7 +2,7 @@ import { Button,Spin } from 'antd';
...
@@ -2,7 +2,7 @@ import { Button,Spin } from 'antd';
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
Get
AllConfig
Get
MaplayerByTerminalType
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
import
AddModal
from
'./AddModal'
import
Cards
from
'./components/card'
import
Cards
from
'./components/card'
...
@@ -31,14 +31,15 @@ const VectorData = props => {
...
@@ -31,14 +31,15 @@ const VectorData = props => {
// 获取瓦片数据配置数据
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
const
renderTile
=
()
=>
{
setTreeLoading
(
true
);
setTreeLoading
(
true
);
Get
AllConfig
({
Get
MaplayerByTerminalType
({
terminalType
:
'scheme'
,
terminalType
:
'scheme'
,
isBaseMap
:
false
isBaseMap
:
false
}).
then
(
}).
then
(
res
=>
{
res
=>
{
if
(
res
&&
res
.
Result
.
length
>
0
)
{
console
.
log
(
'res'
,
res
);
if
(
res
.
msg
===
'Ok'
)
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
setTileData
(
res
.
Result
);
setTileData
(
res
.
data
.
scheme
.
optionalLayer
.
layers
);
}
else
{
}
else
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
...
...
src/pages/platformCenter/schemeConfig/solutionConfig/AddModal.jsx
View file @
e58aea02
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
Select
,
AutoComplete
,
Button
,
notification
}
from
'antd'
;
import
{
Form
,
Modal
,
Input
,
Select
,
AutoComplete
,
Button
,
notification
}
from
'antd'
;
import
styles
from
'../SchemeConfig.less'
import
{
import
{
SetServiceConfig
,
GetAllConfig
SetServiceConfig
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
...
@@ -27,7 +25,7 @@ const AddModal = props => {
...
@@ -27,7 +25,7 @@ const AddModal = props => {
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
form
.
resetFields
();
form
.
resetFields
();
callBackSubmit
();
callBackSubmit
();
notification
.
success
({
notification
.
success
({
...
...
src/pages/platformCenter/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
e58aea02
...
@@ -6,7 +6,7 @@ import {
...
@@ -6,7 +6,7 @@ import {
PlusOutlined
PlusOutlined
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
import
{
deleteConfig
,
GetAllConfig
,
setServiceType
,
SetServiceConfig
,
getUserRelationList
deleteConfig
,
setServiceType
,
SetServiceConfig
,
GetMaplayerByTerminalType
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
{
import
{
UserAddOutlined
UserAddOutlined
...
@@ -161,7 +161,7 @@ const VectorData = props => {
...
@@ -161,7 +161,7 @@ const VectorData = props => {
})
})
}
}
SetServiceConfig
(
query
).
then
(
res
=>
{
SetServiceConfig
(
query
).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
prompt
(
'success'
,
'关联角色成功'
)
prompt
(
'success'
,
'关联角色成功'
)
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
}
}
...
@@ -257,7 +257,7 @@ const VectorData = props => {
...
@@ -257,7 +257,7 @@ const VectorData = props => {
if
(
!
newLoadings
[
index
])
{
if
(
!
newLoadings
[
index
])
{
SetServiceConfig
(
query
).
then
(
res
=>
{
SetServiceConfig
(
query
).
then
(
res
=>
{
setCheckLoading
(
false
)
setCheckLoading
(
false
)
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
const
changehandData
=
[...
handData
];
const
changehandData
=
[...
handData
];
changehandData
[
index
].
isDefault
=
false
changehandData
[
index
].
isDefault
=
false
setHandData
(
changehandData
)
setHandData
(
changehandData
)
...
@@ -279,7 +279,7 @@ const VectorData = props => {
...
@@ -279,7 +279,7 @@ const VectorData = props => {
})
})
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setCheckLoading
(
false
)
setCheckLoading
(
false
)
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
const
changehandData
=
[...
handData
];
const
changehandData
=
[...
handData
];
changehandData
[
index
].
isDefault
=
true
changehandData
[
index
].
isDefault
=
true
setHandData
(
changehandData
)
setHandData
(
changehandData
)
...
@@ -333,7 +333,7 @@ const VectorData = props => {
...
@@ -333,7 +333,7 @@ const VectorData = props => {
terminalType
:
'web'
,
terminalType
:
'web'
,
isBaseMap
:
false
isBaseMap
:
false
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
prompt
(
'success'
,
'删除成功'
)
prompt
(
'success'
,
'删除成功'
)
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
...
@@ -349,7 +349,7 @@ const VectorData = props => {
...
@@ -349,7 +349,7 @@ const VectorData = props => {
terminalType
:
'phone'
,
terminalType
:
'phone'
,
isBaseMap
:
false
isBaseMap
:
false
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
if
(
res
.
msg
===
"Ok"
)
{
prompt
(
'success'
,
'删除成功'
)
prompt
(
'success'
,
'删除成功'
)
setFlag
(
flag
+
1
)
setFlag
(
flag
+
1
)
...
@@ -365,17 +365,17 @@ const VectorData = props => {
...
@@ -365,17 +365,17 @@ const VectorData = props => {
type
==
'add'
?
listData
=
webData
:
listData
=
handData
type
==
'add'
?
listData
=
webData
:
listData
=
handData
let
webSchemenameArr
=
[],
schemeArr
=
[]
let
webSchemenameArr
=
[],
schemeArr
=
[]
setTreeLoading
(
true
);
setTreeLoading
(
true
);
Get
AllConfig
({
Get
MaplayerByTerminalType
({
terminalType
:
'scheme'
,
terminalType
:
'scheme'
,
isBaseMap
:
false
isBaseMap
:
false
}).
then
(
}).
then
(
res
=>
{
res
=>
{
if
(
res
&&
res
.
Result
.
length
>
0
)
{
if
(
res
.
data
.
scheme
&&
res
.
data
.
scheme
.
optionalLayer
.
layers
.
length
)
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
listData
.
map
(
item
=>
{
listData
.
map
(
item
=>
{
webSchemenameArr
.
push
(
item
.
schemename
)
webSchemenameArr
.
push
(
item
.
schemename
)
})
})
res
.
Result
.
map
(
item
=>
{
res
.
data
.
scheme
.
optionalLayer
.
layers
.
map
(
item
=>
{
if
(
!
webSchemenameArr
.
includes
(
item
.
schemename
))
if
(
!
webSchemenameArr
.
includes
(
item
.
schemename
))
schemeArr
.
push
(
item
.
schemename
)
schemeArr
.
push
(
item
.
schemename
)
})
})
...
@@ -410,19 +410,20 @@ const VectorData = props => {
...
@@ -410,19 +410,20 @@ const VectorData = props => {
const
renderTile
=
()
=>
{
const
renderTile
=
()
=>
{
setCheckLoading
(
true
)
setCheckLoading
(
true
)
//查询手持方案
//查询手持方案
var
schemeConfigQueryRequest
=
Get
AllConfig
({
var
schemeConfigQueryRequest
=
Get
MaplayerByTerminalType
({
terminalType
:
'phone'
,
terminalType
:
'phone'
,
isBaseMap
:
false
isBaseMap
:
false
})
})
//查询web方案
//查询web方案
var
webSchemeQueryRequest
=
Get
AllConfig
({
var
webSchemeQueryRequest
=
Get
MaplayerByTerminalType
({
terminalType
:
'web'
,
terminalType
:
'web'
,
isBaseMap
:
false
isBaseMap
:
false
})
})
Promise
.
all
([
schemeConfigQueryRequest
,
webSchemeQueryRequest
]).
then
(
res
=>
{
Promise
.
all
([
schemeConfigQueryRequest
,
webSchemeQueryRequest
]).
then
(
res
=>
{
if
(
res
[
0
].
IsSuccess
)
{
console
.
log
(
'res'
,
res
);
if
(
res
[
0
].
msg
===
"Ok"
&&
res
[
0
].
data
.
phone
)
{
let
arr
=
[]
let
arr
=
[]
res
[
0
].
Result
.
map
((
item
,
index
)
=>
{
res
[
0
].
data
.
phone
.
optionalLayer
.
layers
.
map
((
item
,
index
)
=>
{
if
(
item
.
isDefault
)
{
if
(
item
.
isDefault
)
{
arr
.
push
(
true
)
arr
.
push
(
true
)
}
else
{
}
else
{
...
@@ -432,13 +433,13 @@ const VectorData = props => {
...
@@ -432,13 +433,13 @@ const VectorData = props => {
item
.
isStatus
=
'phone'
item
.
isStatus
=
'phone'
return
item
return
item
})
})
setHandData
(
res
[
0
].
Result
)
setHandData
(
res
[
0
].
data
.
phone
.
optionalLayer
.
layers
)
setHandStatus
(
arr
)
setHandStatus
(
arr
)
}
}
if
(
res
[
1
].
IsSuccess
)
{
if
(
res
[
1
].
msg
===
"Ok"
&&
res
[
1
].
data
.
web
)
{
let
arr
=
[]
let
arr
=
[]
res
[
1
].
Result
.
map
((
item
,
index
)
=>
{
res
[
1
].
data
.
web
.
optionalLayer
.
layers
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
===
"pipenet"
)
{
if
(
item
.
type
===
"pipenet"
)
{
arr
.
push
(
true
)
arr
.
push
(
true
)
}
else
{
}
else
{
...
@@ -447,7 +448,7 @@ const VectorData = props => {
...
@@ -447,7 +448,7 @@ const VectorData = props => {
item
.
isStatus
=
'web'
item
.
isStatus
=
'web'
return
item
return
item
})
})
setWebData
(
res
[
1
].
Result
)
setWebData
(
res
[
1
].
data
.
web
.
optionalLayer
.
layers
)
setWebStatus
(
arr
)
setWebStatus
(
arr
)
}
}
setCheckLoading
(
false
)
setCheckLoading
(
false
)
...
...
src/services/webConfig/api.js
View file @
e58aea02
...
@@ -157,32 +157,22 @@ export const editWebsite = params => {
...
@@ -157,32 +157,22 @@ export const editWebsite = params => {
export
const
omsDeleteWebsite
=
client
=>
export
const
omsDeleteWebsite
=
client
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/DeleteWebsite`
,
{
client
});
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/DeleteWebsite`
,
{
client
});
//
获取gis底图列表
//
获取全部
export
const
Get
AllConfig
=
query
=>
export
const
Get
MaplayerByTerminalType
=
query
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/GetAllConfig
`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/GetMaplayerByTerminalType
`
,
query
);
// 获取全部
export
const
GettMaplayer
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/GetMaplayer`
,
query
);
//获取gis底图列表
// export const GetAllConfig = query =>
// get(`${PUBLISH_SERVICE}/Maplayer/GetMaplayerByTerminalType`, query);
//设置底图数据
//设置底图数据
export
const
SetServiceConfig
=
query
=>
export
const
SetServiceConfig
=
query
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/SetServiceConfig`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/SetServiceConfig`
,
query
);
// //设置底图数据
// export const SetServiceConfig = query =>
// get(`${PUBLISH_SERVICE}/Maplayer/SetServiceConfig`, query);
// 获取方矢量数据列表
// 获取方矢量数据列表
export
const
GetVectorService
=
()
=>
export
const
GetVectorService
=
()
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_GetVectorService`
,
{
_version
:
9999
});
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/GetVectorService`
,
{
_version
:
9999
});
//获取方矢量数据列表
// export const GetVectorService = () =>
// get(`${PUBLISH_SERVICE}/Maplayer/GetVectorService`, { _version: 9999 });
//获取元数据的工作空间列表
//获取元数据的工作空间列表
export
const
GetGISServerMapList
=
query
=>
export
const
GetGISServerMapList
=
query
=>
...
@@ -190,52 +180,43 @@ export const GetGISServerMapList = query =>
...
@@ -190,52 +180,43 @@ export const GetGISServerMapList = query =>
//发布原数据
//发布原数据
export
const
publisService
=
(
query
,
timeout
)
=>
export
const
publisService
=
(
query
,
timeout
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_Publish_GS_Service`
,
query
,
timeout
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_Publish_GS_Service`
,
query
,
timeout
);
//解决方案名称
//解决方案名称
export
const
getSolutionList
=
(
query
)
=>
export
const
getSolutionList
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/W4_GetSolutionList`
,
query
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/W4_GetSolutionList`
,
query
);
//删除元数据
//删除元数据
export
const
deleteVectorService
=
(
query
)
=>
export
const
deleteVectorService
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_DeleteVectorService`
,
query
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_DeleteVectorService`
,
query
);
//更新元数据
//更新元数据
export
const
updatePublishedMetaData
=
(
query
)
=>
export
const
updatePublishedMetaData
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_UpdatePublishedMetaData`
,
query
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/D_UpdatePublishedMetaData`
,
query
);
//删除配置
// export const deleteConfig = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/DeleteConfig`, query );
//删除配置
//删除配置
export
const
deleteConfig
=
(
query
)
=>
export
const
deleteConfig
=
(
query
)
=>
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/DeletMaplayer`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/DeletMaplayer`
,
query
);
//增加瓦片
// export const bindSchemeBaseMap = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/BindSchemeBaseMap`, query );
//增加瓦片
//增加瓦片
export
const
bindSchemeBaseMap
=
(
query
)
=>
export
const
bindSchemeBaseMap
=
(
query
)
=>
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/BindSchemeBaseMap`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/BindSchemeBaseMap`
,
query
);
//删除瓦片
// export const unbindSchemeBaseMap = (query) =>
// get(`${CITY_SERVICE}/OMS.svc/UnbindSchemeBaseMap`, query );
//删除瓦片
//删除瓦片
export
const
unbindSchemeBaseMap
=
(
query
)
=>
export
const
unbindSchemeBaseMap
=
(
query
)
=>
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/UnBindSchemeBaseMap`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/UnBindSchemeBaseMap`
,
query
);
//设置web状态
//设置web状态
export
const
setServiceType
=
(
query
)
=>
export
const
setServiceType
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/SetServiceType`
,
query
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/SetServiceType`
,
query
);
//获取角色
//获取角色
export
const
getUserRelationList
=
(
query
)
=>
export
const
getUserRelationList
=
(
query
)
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/WebGIS_GetUserRelationList`
,
query
);
get
(
`
${
CITY_SERVICE
}
/OMS.svc/WebGIS_GetUserRelationList`
,
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