Commit 6fd2d9d3 by hank

Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau into develop

parents 6a892db2 25735ecd
......@@ -4,7 +4,7 @@
}
.text-shadow{
text-shadow: .1rem 0rem .5rem rgba(255,255,255, 0.4), -.1rem 0rem .5rem rgba(255,255,255, 0.4), 0rem .1rem .5rem rgba(255,255,255, 0.4), 0rem -.1rem .5rem rgba(255,255,255,0.4);
text-shadow: 3px 0 5px rgba(255,255,255, 0.4), -3px 0 5px rgba(255,255,255, 0.4), 0 3px 5px rgba(255,255,255, 0.4), 0 -3px 5px rgba(255,255,255,0.4);
}
body,
html,
......@@ -98,4 +98,61 @@ body,
position: absolute;
left: 0;
top:-25%;
}
/* personpop */
#personpop{
position: fixed;
z-index: 999999;
left: 10px;
top: 10px;
/* border: 1px solid red; */
}
#personpop div{
/* border: 1px solid red; */
}
#box{
color: #fff;
width: 390px;
height: 390px;
background: url(../img/pop.png);
background-size: 100% 108%;
background-position: center bottom;
position: relative;
}
#close{
position: absolute;
right: 0;
top: 0;
width: 80px;
height: 40px;
z-index: 100;
}
#title{
text-align: center;
font-size: 24px;
line-height: 43px;
margin-bottom: 10px;
}
#contant{
width: 100%;
text-align: center;
font-size: 12px;
}
#contant div.li{
width: 80%;
height: 40px;
line-height: 43px;
font-size: 18px;
color: #dfe1e5;
margin: 0 auto;
border-bottom: 1px solid #27384e;
text-align: left;
clear: both;
}
#contant div:last-child{
border-bottom: none;
}
.li div{
width: 40%;
float: left;
}
\ No newline at end of file
......@@ -7,11 +7,28 @@
<title>MAP</title>
<link rel="stylesheet" href="css/main.css">
<style>
</style>
</head>
<body>
<!-- <div id=personpop>
<div id=box>
<div id=title>阿斯顿</div>
<div id=contant>
<div class=li>
<div>阿斯顿</div>1
</div>
<div class=li>
<div>阿斯顿</div>2
</div>
<div class=li>
<div>阿顿</div>啊实打实的
</div>
</div>
<div id=close onclick="popclose()"></div>
</div>
</div> -->
<div id="container"></div>
<div id=nav>
<div class="item" onclick="go(0)"><span class="icon"></span>预警信息</div>
......@@ -23,10 +40,11 @@
</div>
<div class="item" onclick="go(2)"><span class="icon"></span>人员</div>
<div class="subnav subnav2">
<div onclick="go(2,0)">联络人</div>
<div onclick="go(2,1)">人员2</div>
<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="https://webapi.amap.com/maps?v=1.4.15&key=ee7327615de4d673c4e455a772da45fd&plugin=Map3D,AMap.DistrictSearch,ElasticMarker,AMap.MarkerClusterer"></script>
......@@ -38,32 +56,56 @@
</style>
<script>
var oldi1 = 0, oldi2 = 0
function go(i1,i2){
console.log(oldi1,oldi2);
console.log(i1,i2);
if( i1 == oldi1 && i2 == oldi2 ){
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")
$(".item").eq(i1).addClass("active")
$(".item").removeClass("active").removeClass("text-shadow")
$(".item").eq(i1).addClass("active text-shadow")
$(".subnav").hide()
$(".subnav"+i1).show()
$(".subnav"+i1).find("div").removeClass("active")
if(typeof(i2) !='undefined'){
$(".subnav"+i1).find("div").eq(i2).addClass("active")
$(".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('./预警接口.json')
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 == 2&& i2 == 0){
addPoiByApi('./personal.json')
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 == 1){
addPoiByApi('./led.json','Single')
if (i1 == 1 && i2 == 2) {//北斗
addPoiByApi(`http://123.56.149.208:8091/external/get/early/warn/setEipment/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
}
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>
......@@ -71,44 +113,43 @@
//http://106.120.82.243:8080/qxyj/pageHtml/login.html wis 12379
import { Map3D } from './js/Map3D.js';
import { GetParams } from './js/tools.js';
var urlParams = GetParams()
window.urlParams = GetParams()
//成都 重庆 天津 北京 上海 大连 三沙 湖北 中国
//350200
//350500
//320300 370100
window.map3d = new Map3D(urlParams.adcode||'成都','container',urlParams,(_map3d)=>{
window.addPoiByApi('./led.json')
go(1,1)
});
window.review = function (params) {
map3d.review()
}
window.delPoi = function (params) {
try {
map3d.map.clearInfoWindow()
map3d.delPoi(pois)
window.pois = []
} catch (error) {
}
}
window.addPoiByApi = function (api,type) {
window.addPoiByApi = function (api,type,type1) {
console.log(api);
window.delPoi()
window.review()
$.getJSON(api).then(res => {
var currentDetailList = JSON.parse(res).currentDetailList.slice(
0,
2000
);
$.get(api).then(res => {
var currentDetailList =res.data
console.log(currentDetailList);
if(type == 'MassMarks'){
window.pois = map3d.addPoisMassMarks(currentDetailList)
}else if(type == 'Single'){
window.pois = map3d.addPoisSingle(currentDetailList)
if(type1 == 'MassMarks'){
map3d.addPoisMassMarks(currentDetailList,type).then(res=>window.pois = res)
}else if(type1 == 'Single'){
map3d.addPoisSingle(currentDetailList,type).then(res=>window.pois = res)
}else{
window.pois = map3d.addPoisMarkerClusterer(currentDetailList)
map3d.addPoisMarkerClusterer(currentDetailList,type).then(res=>window.pois = res)
}
});
}
// addPoiByApi('./personal.json')
// addPoiByApi('./led.json','Single')
</script>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment