|
@@ -67,7 +67,8 @@
|
|
|
clearLayers();
|
|
|
getSxtMarkers();
|
|
|
getLwtMarkers();
|
|
|
-
|
|
|
+ getSyMarkers();
|
|
|
+ getJywzMarkers();
|
|
|
getXfResources(["fhjcz","lyj","lc","jjd","phd","qxz"]);
|
|
|
var eventName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("eventName");
|
|
|
var deptId = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeId");
|
|
@@ -552,6 +553,108 @@
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 查询所有水源
|
|
|
+ * */
|
|
|
+ function getSyMarkers(){
|
|
|
+ $.post("[[@{/visualization/event/getSourcesWater}]]",function (res) {
|
|
|
+ console.log(res);
|
|
|
+ for(let i=0;i<res.length;i++) {
|
|
|
+ let json = {
|
|
|
+ id: res[i].id,
|
|
|
+ name: res[i].name,
|
|
|
+ size: res[i].size,
|
|
|
+ quantity: res[i].quantity,
|
|
|
+ deptName: res[i].deptName,
|
|
|
+ latitude: res[i].latitude,
|
|
|
+ longitude: res[i].longitude
|
|
|
+ };
|
|
|
+ syMarker(json);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function syMarker(option){
|
|
|
+ let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="sy"+option.id;
|
|
|
+ markName = L.marker(
|
|
|
+ [option.latitude , option.longitude],
|
|
|
+ {icon: icon}
|
|
|
+ );
|
|
|
+ resultLayer.addLayer(markName);
|
|
|
+
|
|
|
+ markName.on("mousemove", function () {
|
|
|
+ pop = L.popup({className:'div_tittle'})
|
|
|
+ .setLatLng([option.latitude,option.longitude])
|
|
|
+ .setContent(
|
|
|
+ "<span class='slfh_tit'>水源</span>"+
|
|
|
+ "<h4>水源名称:"+option.name+"</h4>"+
|
|
|
+ "<p>水源面积(平方米):"+option.size+"</p>"+
|
|
|
+ "<p>水量(平方米):"+option.quantity+"</p>"+
|
|
|
+ "<p>所属林场:"+option.deptName+"</p>"
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 查询所有救援物资
|
|
|
+ * */
|
|
|
+ function getJywzMarkers(){
|
|
|
+ $.post("[[@{/visualization/event/getForestDevice}]]",function (res) {
|
|
|
+ console.log(res);
|
|
|
+ for(let i=0;i<res.length;i++) {
|
|
|
+ let json = {
|
|
|
+ id: res[i].id,
|
|
|
+ code: res[i].code,
|
|
|
+ name: res[i].name,
|
|
|
+ manager: res[i].manager,
|
|
|
+ purchase: res[i].purchase,
|
|
|
+ maintenance: res[i].maintenance,
|
|
|
+ latitude: res[i].latitude,
|
|
|
+ longitude: res[i].longitude
|
|
|
+ };
|
|
|
+ jywzMarker(json);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function jywzMarker(option){
|
|
|
+ let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="jywz"+option.id;
|
|
|
+ markName = L.marker(
|
|
|
+ [option.latitude , option.longitude],
|
|
|
+ {icon: icon}
|
|
|
+ );
|
|
|
+ resultLayer.addLayer(markName);
|
|
|
+
|
|
|
+ markName.on("mousemove", function () {
|
|
|
+ pop = L.popup({className:'div_tittle'})
|
|
|
+ .setLatLng([option.latitude,option.longitude])
|
|
|
+ .setContent(
|
|
|
+ "<span class='slfh_tit'>救援物资</span>"+
|
|
|
+ "<h4>设备编号:"+option.code+"</h4>"+
|
|
|
+ "<p>物资名称:"+option.name+"</p>"+
|
|
|
+ "<p>管理人:"+option.manager+"</p>"+
|
|
|
+ "<p>采购人:"+option.purchase+"</p>"+
|
|
|
+ "<p>保养周期:"+option.maintenance+"</p>"
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 查询所有瞭望塔mark
|
|
|
* */
|
|
|
function getLwtMarkers(){
|
|
@@ -647,6 +750,12 @@
|
|
|
case 'sxt':
|
|
|
getSxtMarkers();
|
|
|
break;
|
|
|
+ case 'sy':
|
|
|
+ getSyMarkers();
|
|
|
+ break;
|
|
|
+ case 'jywz':
|
|
|
+ getJywzMarkers();
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
//加载消防资源
|