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
59975fa1
Commit
59975fa1
authored
Oct 16, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 'gis接口设置超时时间10s'
parent
ffeee370
Pipeline
#80066
waiting for manual action with stages
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
22 deletions
+148
-22
TileConfig.jsx
...platformCenter/gis/schemeConfig/TileConfig/TileConfig.jsx
+46
-4
VectorData.jsx
...platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
+21
-4
projectMessage.jsx
...Center/gis/schemeConfig/projectMessage/projectMessage.jsx
+21
-4
solutionConfig.jsx
...Center/gis/schemeConfig/solutionConfig/solutionConfig.jsx
+48
-5
gis.js
src/services/gis/gis.js
+2
-1
api.js
src/services/webConfig/api.js
+10
-4
No files found.
src/pages/platformCenter/gis/schemeConfig/TileConfig/TileConfig.jsx
View file @
59975fa1
...
...
@@ -111,13 +111,25 @@ const TileData = props => {
console
.
log
(
'res'
,
res
);
if
(
res
.
code
==
'0'
)
{
setTreeLoading
(
false
);
console
.
log
(
res
.
data
.
optionalLayer
.
layers
);
setCardData
(
res
.
data
.
optionalLayer
.
layers
);
}
else
{
setTreeLoading
(
false
);
}
})
.
catch
(()
=>
{
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
},
[
flagAdd
]);
...
...
@@ -188,10 +200,27 @@ const TileData = props => {
},
[
flag
]);
useEffect
(()
=>
{
QueryBaseMapItems
().
then
(
res
=>
{
QueryBaseMapItems
()
.
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
setJson
(
res
.
data
);
}
})
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
},
[]);
// 获取瓦片数据配置数据
...
...
@@ -231,7 +260,20 @@ const TileData = props => {
});
}
})
.
catch
(()
=>
{
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
...
...
src/pages/platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
View file @
59975fa1
...
...
@@ -192,7 +192,8 @@ const VectorData = props => {
const
renderTile
=
(
params
=
{
info
:
''
})
=>
{
setTreeLoading
(
true
);
solutionName
();
GetVectorService
(
params
).
then
(
res
=>
{
GetVectorService
(
params
)
.
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
let
arr
=
[];
res
.
data
.
VectorList
.
map
(
item
=>
{
...
...
@@ -208,6 +209,22 @@ const VectorData = props => {
description
:
res
.
message
,
});
}
})
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
// 搜索
...
...
@@ -224,7 +241,7 @@ const VectorData = props => {
version
:
9999
,
solution
:
solutionNames
,
};
for
(
const
[
index
,
item
]
of
tileData
.
entries
())
{
for
(
const
[
index
,
item
]
of
tileData
.
entries
())
{
setAllLoading
(
true
);
query
.
serviceName
=
item
.
ServiceName
;
let
res
=
null
;
...
...
@@ -245,8 +262,8 @@ const VectorData = props => {
description
:
'更新元数据失败'
,
});
}
if
(
index
===
tileData
.
length
-
1
)
{
setFlag
(
flag
+
1
)
if
(
index
===
tileData
.
length
-
1
)
{
setFlag
(
flag
+
1
)
;
}
}
};
...
...
src/pages/platformCenter/gis/schemeConfig/projectMessage/projectMessage.jsx
View file @
59975fa1
...
...
@@ -6,7 +6,7 @@
* @LastEditors: dengchao 754083046@qq.com
*/
/* eslint-disable indent */
import
{
Button
,
Spin
,
Empty
,
Input
}
from
'antd'
;
import
{
Button
,
Spin
,
Empty
,
Input
,
notification
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
OrderedListOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'../SchemeConfig.less'
;
...
...
@@ -52,9 +52,9 @@ const VectorData = props => {
terminalType
:
'scheme'
,
isBaseMap
:
false
,
...
params
,
}).
then
(
resdata
=>
{
})
.
then
(
resdata
=>
{
if
(
resdata
.
code
==
'0'
)
{
setTreeLoading
(
false
);
GettMaplayer
({
terminalType
:
'base'
,
isBaseMap
:
true
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
let
arr
=
[];
...
...
@@ -82,11 +82,28 @@ const VectorData = props => {
});
setNameData
(
list
);
setTileData
(
resdata
.
data
);
setTreeLoading
(
false
);
}
});
}
else
{
setTreeLoading
(
false
);
}
})
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
useEffect
(()
=>
{
...
...
@@ -148,7 +165,7 @@ const VectorData = props => {
<
div
style=
{
{
height
:
'calc(100%)'
,
width
:
'100%'
}
}
>
<
div
className=
{
styles
.
cardsList
}
>
{
/* {console.log(tileData)} */
}
{
tileData
&&
tileData
.
length
?
(
{
tileData
.
length
>
0
?
(
tileData
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
cardItem
}
...
...
src/pages/platformCenter/gis/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
59975fa1
...
...
@@ -535,7 +535,8 @@ const VectorData = props => {
GetMaplayerByTerminalType
({
terminalType
:
'scheme'
,
isBaseMap
:
false
,
}).
then
(
res
=>
{
})
.
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
setTreeLoading
(
false
);
listData
.
map
(
item
=>
{
...
...
@@ -564,6 +565,22 @@ const VectorData = props => {
description
:
'请先配置方案'
,
});
}
})
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
useEffect
(()
=>
{
...
...
@@ -608,8 +625,21 @@ const VectorData = props => {
}
setCheckLoading
(
false
);
})
.
catch
(
e
=>
{
setCheckLoading
(
false
);
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
...
...
@@ -650,8 +680,21 @@ const VectorData = props => {
}
setCheckLoading
(
false
);
})
.
catch
(
e
=>
{
setCheckLoading
(
false
);
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'timeout'
)
!==
-
1
)
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请求超时'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
.
message
,
});
}
setTreeLoading
(
false
);
});
};
...
...
src/services/gis/gis.js
View file @
59975fa1
...
...
@@ -7,7 +7,8 @@ export const GetMetaData = param => get(`${PANDA_GIS}/${param.mapServerName}`);
// 3.获取元数据新
export
const
GetMetaDataNew
=
param
=>
get
(
`
${
CITY_SERVICE
}
/MapServer.svc/
${
param
}
`
);
// 获取mapsetting配置
export
const
GetWebSiteConfig
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/LayerSetting`
,
param
);
export
const
GetWebSiteConfig
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/LayerSetting`
,
param
,
{
timeout
:
10000
});
// 获取图层列表
export
const
GetLayerList
=
param
=>
get
(
`
${
PANDA_GIS
}
/MetaData/D_GetLayerList`
,
param
);
...
...
src/services/webConfig/api.js
View file @
59975fa1
...
...
@@ -155,10 +155,11 @@ export const omsDeleteWebsite = client =>
// 获取全部
export
const
GetMaplayerByTerminalType
=
query
=>
get
(
`
${
PANDA_GIS
}
/Maplayer/GetMaplayerByTerminalType`
,
query
);
get
(
`
${
PANDA_GIS
}
/Maplayer/GetMaplayerByTerminalType`
,
query
,
{
timeout
:
10000
}
);
// 获取全部
export
const
GettMaplayer
=
query
=>
get
(
`
${
PANDA_GIS
}
/Maplayer/GetMaplayer`
,
query
);
export
const
GettMaplayer
=
query
=>
get
(
`
${
PANDA_GIS
}
/Maplayer/GetMaplayer`
,
query
,
{
timeout
:
10000
});
// 添加底图方案
export
const
SetBaseMapschemeName
=
param
=>
...
...
@@ -169,7 +170,11 @@ export const SetServiceConfig = query => post(`${PANDA_GIS}/Maplayer/SetServiceC
// 获取方矢量数据列表
export
const
GetVectorService
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/GetVectorService`
,
{
...
query
,
_version
:
9999
});
get
(
`
${
PUBLISH_SERVICE
}
/Maplayer/GetVectorService`
,
{
...
query
,
_version
:
9999
},
{
timeout
:
10000
},
);
// 获取元数据的工作空间列表
export
const
GetGISServerMapList
=
query
=>
...
...
@@ -329,7 +334,8 @@ export const SyncMapComponent = query => get(`${PUBLISH_SERVICE}/WebSite/SyncMap
export
const
BatchDragSingleWebsite
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/BatchDragSingleWebsite`
,
data
);
export
const
QueryBaseMapItems
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/QueryBaseMapItems`
,
param
);
export
const
QueryBaseMapItems
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/QueryBaseMapItems`
,
param
,
{
timeout
:
10000
});
// 通过client获取角色
export
const
GetRoleGroups
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetRoleGroups`
,
param
);
...
...
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