Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
CivWeb
Commits
cd7ae4fb
Commit
cd7ae4fb
authored
Mar 30, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复arcgis参数
parent
3720288d
Pipeline
#46934
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
107 deletions
+28
-107
micor.js
config/micor.js
+9
-9
proxy.js
config/proxy.js
+1
-1
index.js
src/pages/map/index.js
+18
-97
No files found.
config/micor.js
View file @
cd7ae4fb
...
...
@@ -4,17 +4,17 @@ export function genActiveRule(routerPrefix) {
export
default
{
dev
:
[
// {
// name: '
civ_energy
',
// entry: `//${window.location.hostname}:808
1/civ_energy
`,
// name: '
dosing-web
',
// entry: `//${window.location.hostname}:808
0/dosing-web
`,
// container: '#micro-container',
// activeRule: '/civbase/civ_energy',
// activeRule: '/civbase/dosing-web',
// },
// {
// name: 'civ_water',
// entry: `//${window.location.hostname}:8080/civ_water`,
// container: '#micro-container',
// activeRule: '/civbase/civ_water',
// },
{
name
:
'civ_water'
,
entry
:
`//
${
window
.
location
.
hostname
}
:8080/civ_water`
,
container
:
'#micro-container'
,
activeRule
:
'/civbase/civ_water'
,
},
// {
// name: 'civ_configuration',
// entry: `//${window.location.hostname}:8080/civ_configuration`,
...
...
config/proxy.js
View file @
cd7ae4fb
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
// const proxyURL = 'https://work.panda-water.cn';
const
proxyURL
=
'http
s://panda-water.cn
'
;
const
proxyURL
=
'http
://192.168.12.47:8082
'
;
module
.
exports
=
{
...
...
src/pages/map/index.js
View file @
cd7ae4fb
/* eslint-disable */
import
React
from
'react'
;
import
{
Spin
}
from
'antd'
;
import
{
connect
}
from
'react-redux'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
_
from
'lodash'
;
// import { AMapScene } from '@wisdom-map/Amap';
import
{
ArcGISMap
}
from
'@wisdom-map/arcgismap'
;
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
// import pkg from '../../../package.json';
// arcgisConfig.assetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`;
// window.arcgisAssetsPath = arcgisConfig.assetsPath;
class
Map
extends
React
.
PureComponent
{
import
MapComponent
from
'@/components/mapView'
;
class
CreateMap
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
options
=
_
.
merge
({},
props
.
options
);
this
.
state
=
{
type
:
props
.
options
.
type
,
loading
:
true
,
options
:
this
.
transformMapsetting
(
window
.
globalConfig
.
mapsettings
),
widgets
:
window
.
globalConfig
.
uiwidgets
,
}
}
transformMapsetting
(
mapsettings
)
{
let
layers
=
mapsettings
.
layers
;
layers
=
layers
.
map
(
item
=>
{
item
.
url
=
/^
\/
/
.
test
(
item
.
url
)
?
`/
${
item
.
url
}
`
:
item
.
url
;
return
item
;
})
return
Object
.
assign
({},
mapsettings
,
{
layers
:
layers
});
}
destroyAMap
()
{
// const mapKey = [
// '_AMap_AMap.MapType',
// '_AMap_labelcanvas',
// '_AMap_imagelayer',
// '_AMap_anole',
// '_AMap_AMap.Scale',
// '_AMap_rbush',
// '_AMap_AMap.IndoorMap',
// '_AMap_AMap.CustomLayer',
// '_AMap_AMap.MarkerClusterer',
// '_AMap_vectorlayer',
// '_AMap_AMap.OverView',
// '_AMap_sync',
// '_AMap_AMap.PlaceSearch',
// '_AMap_AMap.DistrictSearch',
// '_AMap_Map3D',
// '_AMap_AMap.Autocomplete',
// '_AMap_AMap.Heatmap',
// '_AMap_wgl',
// '_AMap_overlay',
// '_AMap_cvector',
// '_AMap_AMap.ToolBar',
// '_AMap_mouse',
// '_AMap_AMap.RangingTool',
// '_AMap_data.tileKeys'
// ];
// // eslint-disable-next-line no-plusplus
// for (let i = 0; i < mapKey.length; i++) {
// localStorage.removeItem(mapKey[i]);
// }
// delete window.AMap;
// delete window.AMapUI;
// delete window.AMapUI_DEBUG;
}
componentWillMount
()
{
// this.destroyAMap()
}
getAMap
(
AMapObj
,
AMap
)
{
// this.props.updageMapView({
// AMapObj,
// AMap
// });
this
.
mapManganerRef
=
React
.
createRef
();
}
getArcGISMap
(
map
)
{
this
.
props
.
updageMapView
(
map
);
}
show
()
{
}
hide
()
{
state
=
{
loading
:
true
,
config
:
window
.
globalConfig
.
mapsettings
,
widgets
:
window
.
globalConfig
.
uiwidgets
,
};
}
destroy
()
{
}
getView
=
view
=>
{
this
.
props
.
updageMapView
(
view
);
};
render
()
{
return
(
<>
{
this
.
state
.
type
===
'AMap'
?
(
<
div
{...
this
.
state
}
getMapInfo
=
{
this
.
getAMap
.
bind
(
this
)}
/
>
)
:
(
<
ArcGISMap
config
=
{
this
.
state
.
options
}
getMapInfo
=
{
this
.
getArcGISMap
.
bind
(
this
)}
/
>
)
}
<
MapComponent
{...
this
.
state
}
getMapInfo
=
{
this
.
getView
}
/
>
<
/
>
)
)
;
}
}
const
mapStateToProps
=
state
=>
({});
const
mapDispatchToProps
=
dispatch
=>
({
...
...
@@ -120,4 +41,4 @@ const mapDispatchToProps = dispatch => ({
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
,
)(
Map
);
)(
Create
Map
);
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