Commit 0d67cf58 by hanjixin

bug

parent 2490986f
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=0" />
<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>
<link rel="stylesheet" href="css/main.css" />
<style></style>
</head>
</style>
</head>
<body>
<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 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 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="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>
......@@ -43,104 +49,157 @@
</style>
<script src="./js/tools.js"></script>
<script src="./js/Map3D.js"></script>
<script language=javascript>
<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()
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) {
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)
window.pois = []
} catch (error) {
}
}
window.addPoiByApi = function (api, type, type1) {
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()
window.review()
window.delPoi(1);
window.review();
$.get(api).then(res => {
var currentDetailList = res.data
var currentDetailList = res.data;
console.log(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)
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 {
map3d.addPoisMarkerClusterer(currentDetailList, type).then(res => window.pois = res)
window.delPoi(0);
map3d
.addPoisMarkerClusterer(currentDetailList, type)
.then(res => (window.pois = res,console.log(1)));
}
});
}
};
</script>
<script>
var oldi1 = 0, oldi2 = 0
var oldi1 = 0,
oldi2 = 0;
function popclose() {
console.log('popclose');
map3d.map.clearInfoWindow()
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
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")
$(".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 == 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 == 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 == 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
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>
</body>
</html>
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