|
@@ -67,6 +67,8 @@
|
|
|
clearLayers();
|
|
|
getSxtMarkers();
|
|
|
getLwtMarkers();
|
|
|
+
|
|
|
+ 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");
|
|
|
var deptName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeName");
|
|
@@ -636,19 +638,24 @@
|
|
|
* */
|
|
|
function reloadMarks(arr) {
|
|
|
clearLayers();//搜索后需要清空瞭望塔等标记
|
|
|
- for(var i=0;i<arr.length;i++){
|
|
|
- if(arr[i] == 'lwt'){
|
|
|
- getLwtMarkers();
|
|
|
- }
|
|
|
- if(arr[i] == 'sxt'){
|
|
|
- getSxtMarkers();
|
|
|
+ //加载摄像头和瞭望塔
|
|
|
+ for(let i=0;i<arr.length;i++){
|
|
|
+ switch(arr[i]){
|
|
|
+ case 'lwt':
|
|
|
+ getLwtMarkers();
|
|
|
+ break;
|
|
|
+ case 'sxt':
|
|
|
+ getSxtMarkers();
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- var eventName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("eventName");
|
|
|
- var deptId = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeId");
|
|
|
- var deptName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeName");
|
|
|
- var starttime = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("starttime");
|
|
|
- var endtime = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("endtime");
|
|
|
+ //加载消防资源
|
|
|
+ getXfResources(arr);
|
|
|
+ let eventName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("eventName");
|
|
|
+ let deptId = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeId");
|
|
|
+ let deptName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeName");
|
|
|
+ let starttime = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("starttime");
|
|
|
+ let endtime = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("endtime");
|
|
|
$.post("[[@{/visualization/event/getAllPendingList}]]", {
|
|
|
EVENTNAME:eventName,
|
|
|
STARTTIME:starttime,
|
|
@@ -671,6 +678,249 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function getXfResources(arr){
|
|
|
+ let typeArr = new Array();
|
|
|
+ for(let i=0;i<arr.length;i++){
|
|
|
+ switch(arr[i]){
|
|
|
+ case 'fhjcz':
|
|
|
+ typeArr.push(0);//防火检查站
|
|
|
+ break;
|
|
|
+ case 'lyj':
|
|
|
+ typeArr.push(1);//林业局
|
|
|
+ break;
|
|
|
+ case 'lc':
|
|
|
+ typeArr.push(2);//林场
|
|
|
+ break;
|
|
|
+ case 'jjd':
|
|
|
+ typeArr.push(3);//机降点
|
|
|
+ break;
|
|
|
+ case 'phd':
|
|
|
+ typeArr.push(4);//扑火队
|
|
|
+ break;
|
|
|
+ case 'qxz':
|
|
|
+ typeArr.push(5);//气象站
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(typeArr);
|
|
|
+ $.post("[[@{/visualization/event/getXfResources}]]",{typeArr:typeArr},function(res){
|
|
|
+ console.log(res);
|
|
|
+ for(let i=0;i<res.length;i++){
|
|
|
+ let json = {
|
|
|
+ id:res[i].id,
|
|
|
+ name:res[i].name,
|
|
|
+ latitude:res[i].latitude,
|
|
|
+ longitude:res[i].longitude,
|
|
|
+ contact_USER:res[i].contact_USER,
|
|
|
+ contact_PHONE:res[i].contact_PHONE,
|
|
|
+ address:res[i].address
|
|
|
+ };
|
|
|
+ let forest_TYPE = res[i].forest_TYPE;
|
|
|
+ switch(forest_TYPE){
|
|
|
+ case '0':
|
|
|
+ jczMarker(json);////防火检查站
|
|
|
+ break;
|
|
|
+ case '1':
|
|
|
+ lyjMarker(json);//林业局
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ lcMarker(json);//林场
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ jjdMarker(json);//机降点
|
|
|
+ break;
|
|
|
+ case '4':
|
|
|
+ phdMarker(json);//扑火队
|
|
|
+ break;
|
|
|
+ case '5':
|
|
|
+ qxzMarker(json);//气象站
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function jczMarker(option){//防火检查站
|
|
|
+ let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="xfjcz"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function lyjMarker(option){//林业局
|
|
|
+ let iconUrl = '[[@{/visualization/images/lyj.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="lyj"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function lcMarker(option){//林场
|
|
|
+ let iconUrl = '[[@{/visualization/images/lc.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="lc"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function jjdMarker(option){//机降点
|
|
|
+ let iconUrl = '[[@{/visualization/images/jjd.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="jjd"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function phdMarker(option){//扑火队
|
|
|
+ let iconUrl = '[[@{/visualization/images/phd.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="phd"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function qxzMarker(option){//气象站
|
|
|
+ let iconUrl = '[[@{/visualization/images/qxz.gif}]]';
|
|
|
+ let icon = L.icon({
|
|
|
+ iconUrl: iconUrl,
|
|
|
+ iconSize: [65, 67],
|
|
|
+ iconAnchor: [37, 57]
|
|
|
+ });
|
|
|
+ let markName="qxz"+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.contact_USER+"</p>"+
|
|
|
+ "<p>联系电话:"+option.contact_PHONE+"</p>"+
|
|
|
+ "<p>地址:"+option.address+"</p>"
|
|
|
+
|
|
|
+ ).openOn(map);
|
|
|
+ });
|
|
|
+ markName.on("mouseout", function () {
|
|
|
+ map.closePopup(pop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
function markMarkers(json,type,arr){
|
|
|
featureIds.length = 0;
|
|
|
if (type == 'reserveplan_type_1') {
|