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