elis il y a 1 an
Parent
commit
bf8bfdb56f

+ 1 - 1
nngkxxdp/src/main/resources/static/district/css/sy_mobile_new.css

@@ -1183,6 +1183,6 @@ a {
 	right: 15px;
 	top: 160px;
 	z-index: 999;
-	border-radius: 8px;
+	border-radius: 15px;
 	height: 60px;
 }

BIN
nngkxxdp/src/main/resources/static/district/img/icon-shq.jpg


BIN
nngkxxdp/src/main/resources/static/district/img/icon-shq.png


+ 247 - 356
nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

@@ -32,7 +32,7 @@ var deptArr = {
   npzx: 1,
 };
 
-const custGap = 5000;
+const custGap = 1000;
 var myPoint = {}
 var load;
 var addressArr = [];
@@ -199,7 +199,7 @@ $(function () {
           background:'#2775cc',
           color:'#ffffff'
         });
-          console.log(addressArr[i].dep)
+          console.log(addressArr[i].address)
           getInfo(this.content,addressArr[i].address)
         // $('#goto').attr('href', '#goto-' + addressArr[i].id)
         // $('#goto')[0].click()
@@ -227,361 +227,48 @@ $(function () {
   }
 
  async function getInfo(name,addr){
-    var dep = name
-    $(".content_from_ajax .layui-tab-title")
-        .find(".layui-this")
-        .attr("id", name);
-    $(".content_from_ajax").show().siblings(".marrige").hide();
-    // var addText =addr;
-    var discriptText = addr;
-    var addFirst, count;
-    var firstpage = 1;
-    var pagetype = 0;
-    scrollListHeight = $(".wrap_result").scrollTop();
-    const sign = $(this).attr("data-sign");
+   $(".show-fourth").hide();
+   $(".content_from_ajax3").parent().removeClass("layui-hide");
+   var addText = $(this).parent(".address_box").find("p:nth-child(1)").text();
+   var discriptText = addr;
+   var addFirst;
+   getAllArr = getAllJson
+   scrollListHeight = $(".wrap_result").scrollTop();
+   scrollListHeight1 = $(".wrap_result1").scrollTop();
    await new Promise((resolve, reject) => {
-      myGeo.getPoint(
-          discriptText,
-          function (point) {
-            if (point) {
-              var address = new BMap.Point(point.lng, point.lat);
-              addFirst = address;
-              let getClick = getAllJson.filter((i) => {
-                return i.address == address;
-              });
-              $(".right-search").hide().css("top", "0px");
-              $(".top_search").hide();
-              for (let i = 0; i < getClick.length; i++) {
-                for (let j = i + 1; j < getClick.length; j++) {
-                  if (getClick[j].dep === getClick[i].dep) {
-                    getClick.splice(j, 1);
-                  }
-                }
-              }
-              if ($("#deptDiv").prev().hasClass("isDel")) {
-                $("#deptDiv").prev().remove();
-                $("#deptDiv").empty();
-              }
-              if (sign == "isflag") {
-                getClick = digitGroupItem.filter((i) => {
-                  return i.address == discriptText;
-                });
-                if (getClick[0].searchDept) {
-                  dep = getClick[0].searchDept.join(",");
-                  $(".show-sixth .pad_box").attr("data-dep", dep);
-                  let html =
-                      '<div class="layui-border-green dept-sty" data-dep="">全部</div>';
-                  for (let n = 0; n < getClick[0].searchDept.length; n++) {
-                    html += `<div class="layui-border-blue dept-sty" data-dep="${
-                        getClick[0].searchDept[n]
-                    }">
-					${getClick[0].searchDept[n].replace("重庆市", "").replace("南岸", "")}</div>`;
-                  }
-                  $("#deptDiv").empty().append(html);
-                  $("#deptDiv").before(
-                      `<div class="isDel" style="background: #fff;font-size: 20px;padding-left: 20px;">入驻部门</div>`
-                  );
-                }
-              } else {
-                if (deptArr[dep]) {
-                  dep = deptArr[dep].join(",");
-                  $(".show-sixth .pad_box").attr("data-dep", dep);
-                  let html =
-                      '<div class="layui-border-green dept-sty" data-dep="">全部</div>';
-                  let depArr = dep.split(",");
-                  for (let n = 0; n < depArr.length; n++) {
-                    html += `<div class="layui-border-blue dept-sty" data-dep="${
-                        depArr[n]
-                    }">
-								${depArr[n].replace("重庆市", "").replace("南岸", "")}</div>`;
-                  }
-                  $("#deptDiv").empty().append(html);
-                  $("#deptDiv").before(
-                      `<div class="isDel" style="background: #fff;font-size: 20px;padding-left: 20px;">入驻部门</div>`
-                  );
-                }
-              }
-              page(getClick, firstpage, pagetype, dep);
-              function page(getClick, page, pagetype, dep) {
-                $.ajax({
-                  type: "GET",
-                  url: PATH + "/mapdata/getHandMatterPage",
-                  // url: "http://192.168.0.230:7777/mapdata/getHandMatterPage",
-                  async: false,
-                  dataType: "json",
-                  data: {
-                    page: page,
-                    limit: 4,
-                    type: pagetype,
-                    matterDept: dep,
-                  },
-                  success: function (res) {
-                    if (res.data == null) {
-                      applyClickList();
-                      $(".show-sixth").fadeOut(0);
-                      $(".show-fifth").fadeIn(100);
-                      xrResultList(getClick);
-                      indexList = 1;
-                    } else if (res.data != null) {
-                      var rmHeight =
-                          window.outerHeight -
-                          $(".right-map").innerHeight() -
-                          $(".head").innerHeight();
-                      $(".show-sixth")
-                          .show()
-                          .css("height", rmHeight)
-                          .siblings()
-                          .hide();
-                      $(".wrap_handle").show();
-                      count = res.count;
-                      var discript = "";
-                      var html = "";
-                      $.each(getClick, function (i) {
-                        discrptAddress = getClick[i].address;
-                        discript += "<ul class='titleFirst'>";
-                        discript += "<div class='wrap_apply'>";
-                        discript += "<li class='title_flex'>";
-                        discript += "<p style='width:100%'>";
-                        discript += getClick[i].dep;
-                        discript += "</p>";
-                        if (
-                            getClick[i].type == "" ||
-                            getClick[i].type == undefined ||
-                            getClick[i].type == null
-                        ) {
-                          discript += "";
-                        } else {
-                          if (getClick[i].specialtype == "中学") {
-                            if (getClick[i].type == "中学") {
-                              discript += "";
-                            } else {
-                              discript += "<p class='flex_blue'>· ";
-                              discript += getClick[i].type;
-                              discript += "</p>";
-                            }
-                            discript += "<p class='flex_blue'>· ";
-                            discript += getClick[i].specialtype;
-                            discript += "</p>";
-                          } else {
-                            discript += "<p class='flex_blue'>· ";
-                            discript += getClick[i].type;
-                            discript += "</p>";
-                          }
-                          discript += "</li>";
-                        }
-                        if (
-                            getClick[i].tag == undefined ||
-                            getClick[i].tag == "" ||
-                            getClick[i].tag == null
-                        ) {
-                          discript += "";
-                        } else {
-                          discript += "<li class='flex_orange'>";
-                          discript += "<div class='three_tag'>";
-                          discript += getClick[i].tag;
-                          discript += "</div>";
-                          if (
-                              getClick[i].tag2 == undefined ||
-                              getClick[i].tag2 == ""
-                          ) {
-                            discript += "";
-                          } else {
-                            discript += "<div class='three_tag'>";
-                            discript += getClick[i].tag2;
-                            discript += "</div>";
-                          }
-                          if (
-                              getClick[i].tag3 == undefined ||
-                              getClick[i].tag3 == ""
-                          ) {
-                            discript += "";
-                          } else {
-                            discript += "<div class='three_tag'>";
-                            discript += getClick[i].tag3;
-                            discript += "</div>";
-                          }
-                        }
-                        discript += "<li>";
-                        if (
-                            getClick[i].content == undefined ||
-                            getClick[i].content == null ||
-                            getClick[i].content == ""
-                        ) {
-                          discript += "";
-                        } else {
-                          discript += "<a class='a_blue'>";
-                          discript += "<p class='content_p'>";
-                          discript += getClick[i].content;
-                          discript += "</p>";
-                          discript += "</a>";
-                        }
-                        discript += "</li>";
-                        discript += "<li class='img_box'>";
-                        if (
-                            getClick[i].img == undefined ||
-                            getClick[i].img == null ||
-                            getClick[i].img == ""
-                        ) {
-                          discript += "";
-                        } else {
-                          discript +=
-                              "<img data-src='" +
-                              PATH +
-                              getClick[i].img +
-                              "' class='two_img' src='" +
-                              PATH +
-                              getClick[i].img +
-                              "'>";
-                        }
-                        discript += "</li>";
-                        discript += "<li class='address_box'>";
-                        discript += "<p><span class='flex_address'>地址:</span>";
-                        discript += getClick[i].address;
-                        discript += "</p>";
-                        if (
-                            getClick[i].time == "" ||
-                            getClick[i].time == undefined ||
-                            getClick[i].time == null
-                        ) {
-                          discript += "";
-                        } else if (getClick[i].sptype == "查阅场所") {
-                          discript +=
-                              "<p><span class='flex_address'>查询时间:</span>";
-                          discript += getClick[i].time;
-                          discript += "</p>";
-                        } else if (getClick[i].sptype == "受理场所") {
-                          discript +=
-                              "<p><span class='flex_address'>受理时间:</span>";
-                          discript += getClick[i].time;
-                          discript += "</p>";
-                        } else if (
-                            getClick[i].sptype == "政务服务" ||
-                            getClick[i].sptype == "办税服务"
-                        ) {
-                          discript +=
-                              "<p><span class='flex_address'>办理时间:</span>";
-                          discript += getClick[i].time;
-                          discript += "</p>";
-                        } else {
-                          discript +=
-                              "<p><span class='flex_address'>办公时间:</span>";
-                          discript += getClick[i].time;
-                          discript += "</p>";
-                        }
-                        if (
-                            getClick[i].tel == "" ||
-                            getClick[i].tel == undefined ||
-                            getClick[i].tel == null
-                        ) {
-                          discript += "";
-                        } else {
-                          var discriptone_tel = getClick[i].tel.split(";")[0];
-                          var discripttwo_tel = getClick[i].tel.split(";")[1];
-                          var discripthree_tel = getClick[i].tel.split(";")[2];
-                          var discriptfour_tel = getClick[i].tel.split(";")[3];
-                          discript +=
-                              "<p><span class='flex_address'>办公电话:</span>";
-                          discript +=
-                              "<a href='tel:" +
-                              discriptone_tel +
-                              "' style='color: #2775CC;text-decoration:underline'>" +
-                              discriptone_tel +
-                              "</a>";
-                          if (discripttwo_tel == undefined) {
-                            discript += "";
-                          } else {
-                            discript +=
-                                ";<a href='tel:" +
-                                discripttwo_tel +
-                                "' style='color: #2775CC;text-decoration:underline'>" +
-                                discripttwo_tel +
-                                "</a>";
-                          }
-                          if (discripthree_tel == undefined) {
-                            discript += "";
-                          } else {
-                            discript +=
-                                ";<a href='tel:" +
-                                discripthree_tel +
-                                "' style='color: #2775CC;text-decoration:underline'>" +
-                                discripthree_tel +
-                                "</a>";
-                          }
-                          if (discriptfour_tel == undefined) {
-                            discript += "";
-                          } else {
-                            discript +=
-                                ";<a href='tel:" +
-                                discriptfour_tel +
-                                "' style='color: #2775CC;text-decoration:underline'>" +
-                                discriptfour_tel +
-                                "</a>";
-                          }
-                          discript += "</p>";
-                        }
-                        discript += "</li>";
-                        discript += "</div>";
-                        discript += "<li class='btn_box'>";
-                        discript += "<button class='one_bus'>公交</button>";
-                        discript += "<button class='two_car'>自驾</button>";
-                        discript += "</li>";
-                        discript += "</ul>";
-                        $.each(res.data, function (j) {
-                          if (
-                              res.data[j].itemName == undefined &&
-                              res.data[j].matterUrl == undefined &&
-                              res.data[j].matterDept == undefined
-                          ) {
-                            html += "";
-                          } else {
-                            html +=
-                                "<a href='" +
-                                res.data[j].matterUrl +
-                                "' target='_blank' class='url_from_ajax'>";
-                            html += "<h6 class='point_from_ajax'></h6>";
-                            html +=
-                                "<p title='" +
-                                res.data[j].itemName +
-                                "' class='text_from_ajax'>" +
-                                res.data[j].itemName +
-                                "</p>";
-                            html += "</a>";
-                          }
-                        });
-                      });
-                      $(".layui-show .result_form_ajax").empty().append(html);
-                      $(".show-sixth .pad_box").empty().append(discript);
-                    }
-                  },
-                });
-                // if (discriptText == discrptAddress) {
-                // }
-              }
-              layui.use(["laypage", "layer"], function () {
-                var laypage = layui.laypage,
-                    layer = layui.layer;
-                laypage.render({
-                  elem: "demo",
-                  count: count,
-                  limit: 4,
-                  layout: ["prev", "next"],
-                  prev: '<i class="layui-icon layui-icon-left"></i><span>上一页</span>',
-                  next: '<span>下一页</span><i class="layui-icon layui-icon-right"></i>',
-                  jump: function (obj, first) {
-                    pagetype = 0;
-                    page(getClick, obj.curr, pagetype, dep);
-                  },
-                });
-              });
-              blList = 1;
-              addMarker(getClick, address);
-              map.setCenter(addFirst);
-              resolve();
-            }
-          },
-          "重庆市"
-      );
-    });
+     myGeo.getPoint(
+         discriptText,
+         function (point) {
+           if (point) {
+             var address = new BMap.Point(point.lng, point.lat);
+             addFirst = address;
+             let getClick = getAllJson.filter((i) => {
+               return i.address == discriptText;
+             });
+             applyClickList();
+             $(".right-search").hide().css("top", "0px");
+             $(".top_search").hide();
+             for (let i = 0; i < getClick.length; i++) {
+               for (let j = i + 1; j < getClick.length; j++) {
+                 if (getClick[j].dep === getClick[i].dep) {
+                   getClick.splice(j, 1);
+                 }
+               }
+             }
+             xrResultList(getClick);
+             if (discriptText == discrptAddress) {
+               addMarker(getClick, address);
+             }
+             $(".content_from_ajax3 .layui-tab-title li").eq(0).click();
+             indexList = 2;
+             ssList = 1;
+             map.setCenter(addFirst);
+             resolve();
+           }
+         },
+         "重庆市"
+     );
+   });
   }
   // 根据经纬度计算距离,参数分别为第一点的纬度,经度;第二点的纬度,经度
 function getDistances(lat1, lng1, lat2, lng2) {
@@ -1874,6 +1561,7 @@ function getDistances(lat1, lng1, lat2, lng2) {
 
   // 封装渲染列表
   function xrResultList(arrey, isSign) {
+    debugger
     $("#deptDiv2").empty();
     $("#deptDiv2").prev().remove();
     $(".wrap_handle").hide();
@@ -2073,6 +1761,207 @@ function getDistances(lat1, lng1, lat2, lng2) {
       $(".pad_box").attr("sign", "");
     }
   }
+  function xrResultList2(arrey, isSign) {
+    debugger
+    $("#deptDiv2").empty();
+    $("#deptDiv2").prev().remove();
+    $(".wrap_handle").hide();
+    var discript = "";
+    $.each(arrey, function (i) {
+      discrptAddress = arrey[i].address;
+      discript += "<ul class='titleFirst'>";
+      discript += "<div class='wrap_apply'>";
+      discript += "<li class='title_flex'>";
+      discript += "<p style='width:100%'>";
+      discript += arrey[i].dep;
+      discript += "</p>";
+      if (
+          arrey[i].type == "" ||
+          arrey[i].type == undefined ||
+          arrey[i].type == null
+      ) {
+        discript += "";
+      } else {
+        if (arrey[i].specialtype == "中学") {
+          if (arrey[i].type == "中学") {
+            discript += "";
+          } else {
+            discript += "<p class='flex_blue'>· ";
+            discript += arrey[i].type;
+            discript += "</p>";
+          }
+          discript += "<p class='flex_blue'>· ";
+          discript += arrey[i].specialtype;
+          discript += "</p>";
+        } else {
+          discript += "<p class='flex_blue'>· ";
+          discript += arrey[i].type;
+          discript += "</p>";
+        }
+        discript += "</li>";
+      }
+      if (
+          arrey[i].tag == undefined ||
+          arrey[i].tag == "" ||
+          arrey[i].tag == null
+      ) {
+        discript += "";
+      } else {
+        discript += "<li class='flex_orange'>";
+        discript += "<div class='three_tag'>";
+        discript += arrey[i].tag;
+        discript += "</div>";
+        if (
+            arrey[i].tag2 == undefined ||
+            arrey[i].tag2 == "" ||
+            arrey[i].tag2 == null
+        ) {
+          discript += "";
+        } else {
+          discript += "<div class='three_tag'>";
+          discript += arrey[i].tag2;
+          discript += "</div>";
+        }
+        if (
+            arrey[i].tag3 == undefined ||
+            arrey[i].tag3 == "" ||
+            arrey[i].tag3 == null
+        ) {
+          discript += "";
+        } else {
+          discript += "<div class='three_tag'>";
+          discript += arrey[i].tag3;
+          discript += "</div>";
+        }
+      }
+      discript += "<li>";
+      if (
+          arrey[i].content == "" ||
+          arrey[i].content == undefined ||
+          arrey[i].content == null
+      ) {
+        discript += "";
+      } else {
+        discript += "<a class='a_blue'>";
+        discript += "<p class='content_p'>";
+        discript += arrey[i].content;
+        discript += "</p>";
+        discript += "</a>";
+      }
+      discript += "</li>";
+      discript += "<li class='img_box'>";
+      if (
+          arrey[i].img == "" ||
+          arrey[i].img == undefined ||
+          arrey[i].img == null
+      ) {
+        discript += "";
+      } else {
+        discript +=
+            "<img data-src='" +
+            PATH +
+            arrey[i].img +
+            "' class='two_img' src='" +
+            PATH +
+            arrey[i].img +
+            "'>";
+      }
+      discript += "</li>";
+      discript += "<li class='address_box'>";
+      discript += "<p><span class='flex_address'>地址:</span>";
+      discript += arrey[i].address;
+      discript += "</p>";
+      if (
+          arrey[i].time == "" ||
+          arrey[i].time == undefined ||
+          arrey[i].time == null
+      ) {
+        discript += "";
+      } else if (arrey[i].sptype == "查阅场所") {
+        discript += "<p><span class='flex_address'>查询时间:</span>";
+        discript += arrey[i].time;
+        discript += "</p>";
+      } else if (arrey[i].sptype == "受理场所") {
+        discript += "<p><span class='flex_address'>受理时间:</span>";
+        discript += arrey[i].time;
+        discript += "</p>";
+      } else if (
+          arrey[i].sptype == "政务服务" ||
+          arrey[i].sptype == "办税服务"
+      ) {
+        discript += "<p><span class='flex_address'>办理时间:</span>";
+        discript += arrey[i].time;
+        discript += "</p>";
+      } else {
+        discript += "<p><span class='flex_address'>办公时间:</span>";
+        discript += arrey[i].time;
+        discript += "</p>";
+      }
+      if (
+          arrey[i].tel == "" ||
+          arrey[i].tel == undefined ||
+          arrey[i].tel == null
+      ) {
+        discript += "";
+      } else {
+        var discriptone_tel = arrey[i].tel.split(";")[0];
+        var discripttwo_tel = arrey[i].tel.split(";")[1];
+        var discripthree_tel = arrey[i].tel.split(";")[2];
+        var discriptfour_tel = arrey[i].tel.split(";")[3];
+        discript += "<p><span class='flex_address'>办公电话:</span>";
+        discript +=
+            "<a href='tel:" +
+            discriptone_tel +
+            "' style='color: #2775CC;text-decoration:underline'>" +
+            discriptone_tel +
+            "</a>";
+        if (discripttwo_tel == undefined) {
+          discript += "";
+        } else {
+          discript +=
+              ";<a href='tel:" +
+              discripttwo_tel +
+              "' style='color: #2775CC;text-decoration:underline'>" +
+              discripttwo_tel +
+              "</a>";
+        }
+        if (discripthree_tel == undefined) {
+          discript += "";
+        } else {
+          discript +=
+              ";<a href='tel:" +
+              discripthree_tel +
+              "' style='color: #2775CC;text-decoration:underline'>" +
+              discripthree_tel +
+              "</a>";
+        }
+        if (discriptfour_tel == undefined) {
+          discript += "";
+        } else {
+          discript +=
+              ";<a href='tel:" +
+              discriptfour_tel +
+              "' style='color: #2775CC;text-decoration:underline'>" +
+              discriptfour_tel +
+              "</a>";
+        }
+        discript += "</p>";
+      }
+      discript += "</li>";
+      discript += "</div>";
+      discript += "<li class='btn_box'>";
+      discript += "<button class='one_bus'>公交</button>";
+      discript += "<button class='two_car'>自驾</button>";
+      discript += "</li>";
+      discript += "</ul>";
+    });
+    $(".pad_box").empty().append(discript);
+    if (isSign == "isShowAddress") {
+      $(".pad_box").attr("sign", "isShowAddress");
+    } else {
+      $(".pad_box").attr("sign", "");
+    }
+  }
 
   // 点击列表之一,中心重新渲染
   $(document).on("click", ".detailCheck", async function () {
@@ -3363,6 +3252,7 @@ function getDistances(lat1, lng1, lat2, lng2) {
 
   // 点击按钮公交实现路线规划
   $(document).on("click", ".one_bus", async function () {
+    debugger
     var address_text = $(this)
       .parent(".btn_box")
       .siblings(".wrap_apply")
@@ -3386,6 +3276,7 @@ function getDistances(lat1, lng1, lat2, lng2) {
       myGeo.getPoint(
         discript_text,
         function (point) {
+          debugger
           if (point) {
             var address = new BMap.Point(point.lng, point.lat);
             addFirst = address;

+ 1 - 1
nngkxxdp/src/main/resources/static/district/sy_mobileDetail.html

@@ -55,7 +55,7 @@
 					<img src="img/ss2.png" class="inp-icon1">
 				</div>
 			</div>
-			<img class="icon-shq" src="./img/icon-shq.jpg"/>
+			<img class="icon-shq" src="./img/icon-shq.png"/>
 			<div class="right-search">
 				<span id="aroundEvent" style="padding: 15px;">附近1公里共有<span id="bsddNum"
 						style="color: red;">0</span>个办事地点</span>