Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
079d3a90
authored
Apr 24, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map
parent
2fcd2bf2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
423 additions
and
7 deletions
+423
-7
admin/.env.development
+3
-2
admin/mock/user.js
+2
-4
admin/src/main.js
+1
-0
admin/src/utils/requestMock.js
+0
-1
map/css/main.css
+6
-0
map/index1.html
+205
-0
map/index2.html
+205
-0
map/js/Map3D.js
+1
-0
No files found.
admin/.env.development
View file @
079d3a90
...
...
@@ -2,8 +2,9 @@
ENV = 'development'
# base api
#VUE_APP_BASE_API = 'http://172.16.4.63:8090'
VUE_APP_BASE_API = 'http://123.56.149.208:8090'
# VUE_APP_BASE_API = 'http://172.16.4.63:8090'
# VUE_APP_BASE_API = 'http://123.56.149.208:8090'
VUE_APP_BASE_API = 'http://172.16.2.186:8090'
VUE_APP_BASE_API_MOCK = '/dev-api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
...
...
admin/mock/user.js
View file @
079d3a90
...
...
@@ -29,9 +29,8 @@ export default [
url
:
'/publics/login'
,
type
:
'post'
,
response
:
config
=>
{
const
{
username
}
=
config
.
body
const
token
=
tokens
[
username
]
const
{
userName
}
=
config
.
body
const
token
=
tokens
[
userName
]
// mock error
if
(
!
token
)
{
return
{
...
...
@@ -39,7 +38,6 @@ export default [
message
:
'Account and password are incorrect.'
}
}
return
{
code
:
20000
,
data
:
token
...
...
admin/src/main.js
View file @
079d3a90
...
...
@@ -28,6 +28,7 @@ import * as filters from './filters' // global filters
* please remove it before going online! ! !
*/
// import { mockXHR } from '../mock'
// mockXHR()
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
// mockXHR()
}
...
...
admin/src/utils/requestMock.js
View file @
079d3a90
...
...
@@ -14,7 +14,6 @@ const service = axios.create({
service
.
interceptors
.
request
.
use
(
config
=>
{
// do something before request is sent
if
(
store
.
getters
.
token
)
{
// let each request carry token
// ['X-Token'] is a custom headers key
...
...
map/css/main.css
View file @
079d3a90
...
...
@@ -169,4 +169,9 @@ body,
.li
div
{
width
:
40%
;
float
:
left
;
}
.hide
{
display
:
none
;
opacity
:
0
;
}
\ No newline at end of file
map/index1.html
0 → 100644
View file @
079d3a90
<!DOCTYPE html>
<html>
<head>
<meta
name=
"viewport"
content=
"width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=0"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
MAP
</title>
<link
rel=
"stylesheet"
href=
"css/main.css"
/>
<style></style>
</head>
<body>
<div
id=
"container"
></div>
<!-- <div id="nav">
<div class="item" onclick="go(0)">
<span class="icon icon1"></span>预警信息
</div>
<div class="item" onclick="go(1)">
<span class="icon icon2"></span>设备
</div>
<div class="subnav subnav1">
<div class="" onclick="go(1,0)">大喇叭</div>
<div onclick="go(1,1)">显示屏</div>
<div onclick="go(1,2)">北斗</div>
</div>
<div class="item" onclick="go(2)">
<span class="icon icon3"></span>人员
</div>
<div class="subnav subnav2">
<div onclick="go(2,0)">信息员</div>
<div onclick="go(2,1)">应急责任人</div>
</div>
</div> -->
<script
src=
"https://cache.amap.com/lbs/static/es5.min.js"
></script>
<!-- <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> -->
<script
src=
"./js/jq.js"
></script>
<script
src=
"./js/api.js"
></script>
<script
src=
"https://webapi.amap.com/maps?v=1.4.15&key=ee7327615de4d673c4e455a772da45fd&plugin=Map3D,AMap.DistrictSearch,ElasticMarker,AMap.MarkerClusterer"
></script>
<script
src=
"https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"
></script>
<style>
.amap-logo
,
.amap-copyright
{
opacity
:
0
;
display
:
none
!important
;
}
</style>
<script
src=
"./js/tools.js"
></script>
<script
src=
"./js/Map3D.js"
></script>
<script
language=
"javascript"
>
//
<
script
language
=
javascript
type
=
module
>
//http://106.120.82.243:8080/qxyj/pageHtml/login.html wis 12379
// import { Map3D } from './js/Map3D.js';
// import { GetParams } from './js/tools.js';
window
.
urlParams
=
GetParams
();
//成都 重庆 天津 北京 上海 大连 三沙 湖北 中国
//350200
//350500
//320300 370100
window
.
map3d
=
new
Map3D
(
urlParams
.
adcode
||
"610000"
||
"成都"
,
"container"
,
urlParams
,
_map3d
=>
{
go
(
0
);
}
);
window
.
review
=
function
(
params
)
{
map3d
.
review
();
};
window
.
delPoi
=
function
(
params
)
{
try
{
map3d
.
map
.
clearInfoWindow
();
map3d
.
delPoi
(
pois
);
map3d
.
map
.
remove
(
pois
);
map3d
.
cluster
.
clearMarkers
();
if
(
params
)
window
.
pois
=
[];
}
catch
(
error
)
{}
};
window
.
addPoiByApi
=
function
(
api
,
type
,
type1
)
{
console
.
log
(
api
);
window
.
delPoi
(
1
);
// window.review();
$
.
get
(
api
).
then
(
res
=>
{
var
currentDetailList
=
res
.
data
;
console
.
log
(
currentDetailList
);
if
(
type1
==
"MassMarks"
)
{
window
.
delPoi
(
0
);
map3d
.
addPoisMassMarks
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
else
if
(
type1
==
"Single"
)
{
window
.
delPoi
(
0
);
map3d
.
addPoisSingle
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
else
{
window
.
delPoi
(
0
);
map3d
.
addPoisMarkerClusterer
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
});
};
</script>
<script>
var
oldi1
=
0
,
oldi2
=
0
;
function
popclose
()
{
console
.
log
(
"popclose"
);
map3d
.
map
.
clearInfoWindow
();
}
function
go
(
i1
,
i2
)
{
console
.
log
(
oldi1
,
oldi2
);
console
.
log
(
i1
,
i2
);
if
(
i1
==
oldi1
&&
i2
==
oldi2
)
{
return
false
;
}
$
(
".item"
)
.
removeClass
(
"active"
)
.
removeClass
(
"text-shadow"
);
$
(
".item"
)
.
eq
(
i1
)
.
addClass
(
"active text-shadow"
);
$
(
".subnav"
).
hide
();
$
(
".subnav"
+
i1
).
show
();
$
(
".subnav"
+
i1
)
.
find
(
"div"
)
.
removeClass
(
"active"
)
.
removeClass
(
"text-shadow"
);
if
(
typeof
i2
!=
"undefined"
)
{
$
(
".subnav"
+
i1
)
.
find
(
"div"
)
.
eq
(
i2
)
.
addClass
(
"active text-shadow"
);
}
if
(
i1
==
0
&&
typeof
i2
==
"undefined"
)
{
//预警信息
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/city/two/list/"
+
urlParams
.
adcode
,
"setWarnPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
0
)
{
//大喇叭
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=1`
,
"setEquipmentPoint"
,
"Cluster"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
1
)
{
//显示屏
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=2`
,
"setEquipmentPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
2
)
{
//北斗
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=3`
,
"setEquipmentPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
2
&&
i2
==
0
)
{
//信息员
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/people/two/info/"
+
urlParams
.
adcode
,
"setPersonalPoint"
,
"Cluster"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
2
&&
i2
==
1
)
{
//应急责任人
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/people/two/principal/"
+
urlParams
.
adcode
,
"setPrincipalPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
}
// go(i1,i2)
</script>
</body>
</html>
map/index2.html
0 → 100644
View file @
079d3a90
<!DOCTYPE html>
<html>
<head>
<meta
name=
"viewport"
content=
"width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=0"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
MAP
</title>
<link
rel=
"stylesheet"
href=
"css/main.css?123"
/>
<style></style>
</head>
<body>
<div
id=
"container"
></div>
<div
id=
"nav"
>
<div
class=
"item hide"
onclick=
"go(0)"
>
<span
class=
"icon icon1"
></span>
预警信息
</div>
<div
class=
"item"
onclick=
"go(1)"
>
<span
class=
"icon icon2"
></span>
设备
</div>
<div
class=
"subnav subnav1"
>
<div
class=
""
onclick=
"go(1,0)"
>
大喇叭
</div>
<div
onclick=
"go(1,1)"
>
显示屏
</div>
<div
onclick=
"go(1,2)"
>
北斗
</div>
</div>
<div
class=
"item"
onclick=
"go(2)"
>
<span
class=
"icon icon3"
></span>
人员
</div>
<div
class=
"subnav subnav2"
>
<div
onclick=
"go(2,0)"
>
信息员
</div>
<div
onclick=
"go(2,1)"
>
应急责任人
</div>
</div>
</div>
<script
src=
"https://cache.amap.com/lbs/static/es5.min.js"
></script>
<!-- <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> -->
<script
src=
"./js/jq.js"
></script>
<script
src=
"./js/api.js"
></script>
<script
src=
"https://webapi.amap.com/maps?v=1.4.15&key=ee7327615de4d673c4e455a772da45fd&plugin=Map3D,AMap.DistrictSearch,ElasticMarker,AMap.MarkerClusterer"
></script>
<script
src=
"https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"
></script>
<style>
.amap-logo
,
.amap-copyright
{
opacity
:
0
;
display
:
none
!important
;
}
</style>
<script
src=
"./js/tools.js"
></script>
<script
src=
"./js/Map3D.js"
></script>
<script
language=
"javascript"
>
//
<
script
language
=
javascript
type
=
module
>
//http://106.120.82.243:8080/qxyj/pageHtml/login.html wis 12379
// import { Map3D } from './js/Map3D.js';
// import { GetParams } from './js/tools.js';
window
.
urlParams
=
GetParams
();
//成都 重庆 天津 北京 上海 大连 三沙 湖北 中国
//350200
//350500
//320300 370100
window
.
map3d
=
new
Map3D
(
urlParams
.
adcode
||
"610000"
||
"成都"
,
"container"
,
urlParams
,
_map3d
=>
{
go
(
1
,
0
)
}
);
window
.
review
=
function
(
params
)
{
map3d
.
review
();
};
window
.
delPoi
=
function
(
params
)
{
try
{
map3d
.
map
.
clearInfoWindow
();
map3d
.
delPoi
(
pois
);
map3d
.
map
.
remove
(
pois
);
map3d
.
cluster
.
clearMarkers
();
if
(
params
)
window
.
pois
=
[];
}
catch
(
error
)
{}
};
window
.
addPoiByApi
=
function
(
api
,
type
,
type1
)
{
console
.
log
(
api
);
window
.
delPoi
(
1
);
// window.review();
$
.
get
(
api
).
then
(
res
=>
{
var
currentDetailList
=
res
.
data
;
console
.
log
(
currentDetailList
);
if
(
type1
==
"MassMarks"
)
{
window
.
delPoi
(
0
);
map3d
.
addPoisMassMarks
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
else
if
(
type1
==
"Single"
)
{
window
.
delPoi
(
0
);
map3d
.
addPoisSingle
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
else
{
window
.
delPoi
(
0
);
map3d
.
addPoisMarkerClusterer
(
currentDetailList
,
type
)
.
then
(
res
=>
(
window
.
pois
=
res
,
console
.
log
(
1
)));
}
});
};
</script>
<script>
var
oldi1
=
0
,
oldi2
=
0
;
function
popclose
()
{
console
.
log
(
"popclose"
);
map3d
.
map
.
clearInfoWindow
();
}
function
go
(
i1
,
i2
)
{
console
.
log
(
oldi1
,
oldi2
);
console
.
log
(
i1
,
i2
);
if
(
i1
==
oldi1
&&
i2
==
oldi2
)
{
return
false
;
}
$
(
".item"
)
.
removeClass
(
"active"
)
.
removeClass
(
"text-shadow"
);
$
(
".item"
)
.
eq
(
i1
)
.
addClass
(
"active text-shadow"
);
$
(
".subnav"
).
hide
();
$
(
".subnav"
+
i1
).
show
();
$
(
".subnav"
+
i1
)
.
find
(
"div"
)
.
removeClass
(
"active"
)
.
removeClass
(
"text-shadow"
);
if
(
typeof
i2
!=
"undefined"
)
{
$
(
".subnav"
+
i1
)
.
find
(
"div"
)
.
eq
(
i2
)
.
addClass
(
"active text-shadow"
);
}
if
(
i1
==
0
&&
typeof
i2
==
"undefined"
)
{
//预警信息
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/city/two/list/"
+
urlParams
.
adcode
,
"setWarnPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
0
)
{
//大喇叭
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=1`
,
"setEquipmentPoint"
,
"Cluster"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
1
)
{
//显示屏
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=2`
,
"setEquipmentPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
1
&&
i2
==
2
)
{
//北斗
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=3`
,
"setEquipmentPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
2
&&
i2
==
0
)
{
//信息员
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/people/two/info/"
+
urlParams
.
adcode
,
"setPersonalPoint"
,
"Cluster"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
if
(
i1
==
2
&&
i2
==
1
)
{
//应急责任人
addPoiByApi
(
"http://123.56.149.208:8091/external/get/early/warn/people/two/principal/"
+
urlParams
.
adcode
,
"setPrincipalPoint"
,
"Single"
);
(
oldi1
=
i1
),
(
oldi2
=
i2
);
}
}
// go(i1,i2)
</script>
</body>
</html>
map/js/Map3D.js
View file @
079d3a90
...
...
@@ -65,6 +65,7 @@ class Map3D {
}
async
addPoisSingle
(
pois
,
poiFnStr
)
{
debugger
let
markers
=
[]
pois
.
map
(
item
=>
{
markers
.
push
(
this
[
poiFnStr
](
item
))
...
...
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