소스 검색

添加办事业务

李雪梅 2 년 전
부모
커밋
493cd8353c
1개의 변경된 파일425개의 추가작업 그리고 180개의 파일을 삭제
  1. 425 180
      nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

+ 425 - 180
nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

@@ -426,175 +426,252 @@ $(function () {
         var xxtx = $(this).text();
         indexList = 2;
         $('.show-fifth .title-second>h6').text(xxtx);
-        if (xxtx == '小学') {
-            applyClickList();
-            xrList(xx);
-        } else if (xxtx == '中学') {
-            applyClickList();
-            xrList(zx);
-        } else if (xxtx == '特殊教育学校') {
-            applyClickList();
-            xrList(tsjy);
-        } else if (xxtx == '高等院校') {
-            applyClickList();
-            xrList(dx)
-        } else if (xxtx == '职业教育学校') {
-            applyClickList();
-            xrList(zyyx);
-        } else if (xxtx == '幼儿园') {
-            applyClickList();
-            xrList(yey);
-        } else if (xxtx == '镇(街道)公共服务中心') {
-            applyClickList();
-            xrList(ggfwzx);
-		} else if (xxtx == '村(社区)便民服务中心') {
-            applyClickList();
-			xrList(bmfwzx);
-		} else if (xxtx == '党群服务中心') {
-            applyClickList();
-			xrList(dqfwzx);
-		} else if (xxtx == '受理场所') {
-            applyClickList();
-			xrList(qjjz);
-		} else if (xxtx == '查阅场所') {
-            applyClickList();
-			xrList(cycsbms);
-		}else if(xxtx == "殡仪服务机构") {
-            applyClickList();
-			xrList(byfwjg);
-		}else if(xxtx == "村卫生室") {
-            applyClickList();
-			xrList(cwss);
-		}else if(xxtx == "社区卫生服务站"){
-            applyClickList();
-			xrList(sqwsfwz);
-		}else if(xxtx == "儿科诊疗服务机构"){
-            applyClickList();
-			xrList(ekzlfwjg);
-		}else if(xxtx == "狂犬病、破伤风处置门诊"){
-            applyClickList();
-			xrList(kqbpsfczmz);
-		}else if(xxtx == "免疫规划预防接种门诊"){
-            applyClickList();
-			xrList(myghyfjzmz);
-		}else if(xxtx == "二级医疗机构"){
-            applyClickList();
-			xrList(ejyljg);
-		}else if(xxtx == "三级医疗机构"){
-            applyClickList();
-			xrList(sjyljg);
-		}else if(xxtx == "社区卫生服务机构"){
-            applyClickList();
-			xrList(sqwsfwjg);
-		}else if(xxtx == "职业病诊断机构"){
-            applyClickList();
-			xrList(zybzdjg);
-		}else if(xxtx == "公园"){
-            applyClickList();
-			xrList(gy);
-		}else if(xxtx == "婚姻登记机构"){
-            applyClickList();
-			xrList(hydjjg);
-		}else if(xxtx == "助产医疗机构"){
-            applyClickList();
-			xrList(zcyljg);
-		}else if(xxtx == "产科门诊服务机构"){
-            applyClickList();
-			xrList(ckmzfwjg);
-		}else if(xxtx == "派出所"){
-            applyClickList();
-			xrList(pcs);
-		}else if(xxtx == "出入境业务办理机构"){
-            applyClickList();
-			xrList(crjywbljg);
-		}else if(xxtx == "交通支大队"){
-            applyClickList();
-			xrList(jtxljcdd);
-		}else if(xxtx == "交通违法处理机构"){
-            applyClickList();
-			xrList(jtwfcljg);
-		}else if(xxtx == "交通事故处理机构"){
-            applyClickList();
-			xrList(jtsgcljg);
-		}else if(xxtx == "车管所"){
-            applyClickList();
-			xrList(cgs);
-		}else if(xxtx == "机动车检测场所"){
-            applyClickList();
-			xrList(jdcjccs);
-		}else if(xxtx == "驾驶人体检医院"){
-            applyClickList();
-			xrList(jsrtjz);
-		}else if(xxtx == "养老机构"){
-            applyClickList();
-			xrList(ylfwjg);
-		}else if(xxtx == "图书馆"){
-            applyClickList();
-			xrList(tsg);
-		}else if(xxtx == "文化馆"){
-            applyClickList();
-			xrList(whg);
-		}else if(xxtx == "文管所"){
-            applyClickList();
-			xrList(wgs);
-		}else if(xxtx == "公共体育馆"){
-            applyClickList();
-			xrList(ggty);
-		}else if(xxtx == "旅游景点"){
-            applyClickList();
-			xrList(jq);
-		}else if(xxtx == "残疾人服务中心"){
-            applyClickList();
-			xrList(cjrfwzx);
-		}else if(xxtx == "定点残疾人服务机构"){
-            applyClickList();
-			xrList(ddcjrfwjg);
-		}else if(xxtx == "公证处"){
-            applyClickList();
-			xrList(gzc);
-		}else if(xxtx == "司法鉴定机构"){
-            applyClickList();
-			xrList(sfjdjg);
-		}else if(xxtx == "基层司法所"){
-            applyClickList();
-			xrList(jcfwfws);
-		}else if(xxtx == "法律援助机构"){
-            applyClickList();
-			xrList(flyzzx);
-		}else if(xxtx == "市场监督管理所"){
-            applyClickList();
-			xrList(scjdglj);
-		}else if(xxtx == "医疗保障事务中心"){
-            applyClickList();
-			xrList(yb);
-		}else if(xxtx == "生源地助学贷款办理点"){
-            applyClickList();
-			xrList(dkbld);
-		}else if(xxtx == "车驾管社会服务站"){
-            applyClickList();
-			xrList(cjgshfwz);
-		}else if(xxtx == "教育考试中心"){
-            applyClickList();
-			xrList(jykszx);
-		}else if(xxtx == "区级行政服务中心"){
-            applyClickList();
-			xrList(xzfwzx);
-		}else if(xxtx == "矫正中心"){
-            applyClickList();
-			xrList(jzzx);
-		}else if(xxtx == "就业和人才中心"){
-            applyClickList();
-			xrList(jyhrczx);
-		}else if(xxtx == "社会保险事务中心"){
-            applyClickList();
-			xrList(shbxswzx);
-		}else if(xxtx == "商圈"){
-            applyClickList();
-			xrList(sq);
-		}else if(xxtx == "核酸采样点"){
-            applyClickList();
-			xrList(hscyd);
-		}
+        switch(xxtx){
+            case "小学":
+                applyClickList();
+                xrList(xx);
+				break;
+            case "中学":
+                applyClickList();
+                xrList(zx);
+                break;
+            case "特殊教育学校":
+                applyClickList();
+                xrList(tsjy);
+                break;
+            case "高等院校":
+                applyClickList();
+                xrList(dx)
+                break;
+            case "职业教育学校":
+                applyClickList();
+                xrList(zyyx);
+                break;
+            case "幼儿园":
+                applyClickList();
+                xrList(yey);
+                break;
+            case "镇(街道)公共服务中心":
+                applyClickList();
+                xrList(ggfwzx);
+                break;
+            case "村(社区)便民服务中心":
+                applyClickList();
+                xrList(bmfwzx);
+                break;
+            case "党群服务中心":
+                applyClickList();
+                xrList(dqfwzx);
+                break;
+            case "受理场所":
+                // $.ajax({
+                //     type: 'GET',
+                //     // url: PATH + '/mapdata/getHandMatterPage',
+                //     url: "http://192.168.1.253:7777/mapdata/getHandMatterPage",
+                //     async: false,
+                //     dataType: 'json',
+                //     data: {
+                //         page: 1,
+                //         limit: 754,
+                //         type: 0
+                //     },
+                //     success: function(res) {
+                //         if (res.data != null) {
+                //             qjjz.map(function(item, index) {
+                //                 qjjz.push(Object.assign({},item,{point: 1}))
+                //             });
+                //         }
+                //     }
+                // });
+                // console.log(qjjz);
+                applyClickList();
+                xrList(qjjz);
+                break;
+            case "查阅场所":
+                applyClickList();
+                xrList(cycsbms);
+                break;
+            case "殡仪服务机构":
+                applyClickList();
+                xrList(byfwjg);
+                break;
+            case "村卫生室":
+                applyClickList();
+                xrList(cwss);
+                break;
+            case "社区卫生服务站":
+                applyClickList();
+                xrList(sqwsfwz);
+                break;
+            case "儿科诊疗服务机构":
+                applyClickList();
+                xrList(ekzlfwjg);
+                break;
+            case "狂犬病、破伤风处置门诊":
+                applyClickList();
+                xrList(kqbpsfczmz);
+                break;
+            case "免疫规划预防接种门诊":
+                applyClickList();
+                xrList(myghyfjzmz);
+                break;
+            case "二级医疗机构":
+                applyClickList();
+                xrList(ejyljg);
+                break;
+            case "三级医疗机构":
+                applyClickList();
+                xrList(sjyljg);
+                break;
+            case "社区卫生服务机构":
+                applyClickList();
+                xrList(sqwsfwjg);
+                break;
+            case "职业病诊断机构":
+                applyClickList();
+                xrList(zybzdjg);
+                break;
+            case "公园":
+                applyClickList();
+                xrList(gy);
+                break;
+            case "婚姻登记机构":
+                applyClickList();
+                xrList(hydjjg);
+                break;
+            case "助产医疗机构":
+                applyClickList();
+                xrList(zcyljg);
+                break;
+            case "产科门诊服务机构":
+                applyClickList();
+                xrList(ckmzfwjg);
+                break;
+            case "派出所":
+                applyClickList();
+                xrList(pcs);
+                break;
+            case "出入境业务办理机构":
+                applyClickList();
+                xrList(crjywbljg);
+                break;
+            case "交通支大队":
+                applyClickList();
+                xrList(jtxljcdd);
+                break;
+            case "交通违法处理机构":
+                applyClickList();
+                xrList(jtwfcljg);
+                break;
+            case "交通事故处理机构":
+                applyClickList();
+                xrList(jtsgcljg);
+                break;
+            case "车管所":
+                applyClickList();
+                xrList(cgs);
+                break;
+            case "机动车检测场所":
+                applyClickList();
+                xrList(jdcjccs);
+                break;
+            case "驾驶人体检医院":
+                applyClickList();
+                xrList(jsrtjz);
+                break;
+            case "养老机构":
+                applyClickList();
+                xrList(ylfwjg);
+                break;
+            case "图书馆":
+                applyClickList();
+                xrList(tsg);
+                break;
+            case "文化馆":
+                applyClickList();
+                xrList(whg);
+                break;
+            case "文管所":
+                applyClickList();
+                xrList(wgs);
+                break;
+            case "公共体育馆":
+                applyClickList();
+                xrList(ggty);
+                break;
+            case "旅游景点":
+                applyClickList();
+                xrList(jq);
+                break;
+            case "残疾人服务中心":
+                applyClickList();
+                xrList(cjrfwzx);
+                break;
+            case "定点残疾人服务机构":
+                applyClickList();
+                xrList(ddcjrfwjg);
+                break;
+            case "公证处":
+                applyClickList();
+                xrList(gzc);
+                break;
+            case "司法鉴定机构":
+                applyClickList();
+                xrList(sfjdjg);
+                break;
+            case "基层司法所":
+                applyClickList();
+                xrList(jcfwfws);
+                break;
+            case "法律援助机构":
+                applyClickList();
+                xrList(flyzzx);
+                break;
+            case "市场监督管理所":
+                applyClickList();
+                xrList(scjdglj);
+                break;
+            case "医疗保障事务中心":
+                applyClickList();
+                xrList(yb);
+                break;
+            case "生源地助学贷款办理点":
+                applyClickList();
+                xrList(dkbld);
+                break;
+            case "车驾管社会服务站":
+                applyClickList();
+                xrList(cjgshfwz);
+                break;
+            case "教育考试中心":
+                applyClickList();
+                xrList(jykszx);
+                break;
+            case "区级行政服务中心":
+                applyClickList();
+                xrList(xzfwzx);
+                break;
+            case "矫正中心":
+                applyClickList();
+                xrList(jzzx);
+                break;
+            case "就业和人才中心":
+                applyClickList();
+                xrList(jyhrczx);
+                break;
+            case "社会保险事务中心":
+                applyClickList();
+                xrList(shbxswzx);
+                break;
+            case "商圈":
+                applyClickList();
+                xrList(sq);
+                break;
+            case "核酸采样点":
+                applyClickList();
+                xrList(hscyd);
+                break;
+        }
         var getimgs = $('.pad_box').children('.titleFirst').find('.two_img');
         function callback(entries){
             for (let i of entries) {
@@ -691,12 +768,18 @@ $(function () {
             var arrimg = arr[index].img;
             var arrtel = arr[index].tel;
             var arrtime = arr[index].time;
+            // var point = arr[index].point;
             sContnet += "<ul class='titleFirst'>"
             sContnet += "<div class='wrap_apply'>"
             sContnet += "<li class='title_flex'>"
             sContnet += "<p style='width:100%'>"
             sContnet += arrdep
             sContnet += "</p>"
+            if (arr[index].sptype == '受理场所'){
+                sContnet += " <div class='handle_business'><img src='./img/icon.png'><p>办理业务</p></div>"
+            }else if(arrdep == '重庆市南岸区民政局婚姻登记处(茶园)' || arrdep == '重庆市南岸区民政局婚姻登记处(南坪)'){
+                sContnet += " <div class='handle_business1'><img src='./img/icon.png'><p>办理业务</p></div>"
+            }
             if (arrtype == "" || arrtype == undefined) {
                 sContnet += ''
             } else {
@@ -719,7 +802,7 @@ $(function () {
                 sContnet += "</li>"	
             }
             if (arrtag == "" || arrtag == undefined) {
-                sContnet += "<li>"
+                sContnet += ''
             } else {
                 sContnet += "<li class='flex_orange'>"
                 sContnet += "<div class='three_tag'>"
@@ -754,15 +837,15 @@ $(function () {
                 sContnet += "</a>"
             }
             sContnet += "</li>"
-            sContnet += "<li class='img_box'>"
             if (arrimg == "") {
                 sContnet += ''
             } else if (arrimg == undefined) {
                 sContnet += ''
             } else {
+                sContnet += "<li class='img_box'>"
                 sContnet += "<img data-src='"+PATH+arrimg+"' class='two_img' src='" +PATH+arrimg + "'>"
+                sContnet += "</li>"
             }
-            sContnet += "</li>"
             sContnet += "<li class='address_box'>"
             sContnet += "<p><span class='flex_address'>地址:</span>"
             sContnet += arraddre
@@ -813,6 +896,130 @@ $(function () {
         $('.show-fourth .pad_box').empty().append(sContnet);
     }
 
+    $(document).on('click','.handle_business',function(){
+        $('.show-sixth').show().siblings().hide();
+        $('.right-map').hide().siblings('.top_search').hide();
+        $('.back_wrap h6').text('办理业务');
+        var dep = $(this).siblings('p').text();
+        $('.content_from_ajax .layui-tab-title').find('.layui-this').attr('id',dep);
+        $('.content_from_ajax').show().siblings('.marrige').hide();
+        $.ajax({
+            type: 'GET',
+            url: PATH + '/mapdata/getHandMatterPage',
+            // url: "http://192.168.1.253:7777/mapdata/getHandMatterPage",
+            async: false,
+            dataType: 'json',
+            data: {
+                page: 1,
+                limit: 4,
+                type: 0,
+                matterDept: dep
+            },
+            success: function(res) {
+                if (res.data != null) {
+                    var sContnet = ''
+                    $.each(res.data,function(j){
+                        if ((res.data[j].itemName == undefined && res.data[j].matterUrl == undefined) && res.data[j].matterDept == undefined) {
+                            sContnet += ''
+                        } else {
+                            sContnet += "<a href='"+res.data[j].matterUrl+"' target='_blank' class='url_from_ajax'>"
+                            sContnet += "<h6 class='point_from_ajax'></h6>"
+                            sContnet += "<p title='"+res.data[j].itemName+"' class='text_from_ajax'>"+res.data[j].itemName+"</p>"
+                            sContnet += "</a>"
+                            $('.result_form_ajax').empty().append(sContnet);
+                        }
+                    });
+                }
+            }
+        });
+        blList = 1;
+    });
+
+    $(document).on('click','.handle_business1',function(){
+        $('.show-sixth').show().siblings().hide();
+        $('.right-map').hide().siblings('.top_search').hide();
+        $('.back_wrap h6').text('办理业务');
+        $('.content_from_ajax').hide().siblings('.marrige').show();
+        $.ajax({
+            type: 'GET',
+            url: PATH + '/mapdata/getHandMatterPage',
+            // url: "http://192.168.1.253:7777/mapdata/getHandMatterPage",
+            async: false,
+            dataType: 'json',
+            data: {
+                page: 1,
+                limit: 4,
+                type: 3
+            },
+            success: function(res) {
+                if (res.data != null) {
+                    var sContnet = ''
+                    $.each(res.data,function(j){
+                        if ((res.data[j].itemName == undefined && res.data[j].matterUrl == undefined) && res.data[j].matterDept == undefined) {
+                            sContnet += ''
+                        } else {
+                            sContnet += "<a href='"+res.data[j].matterUrl+"' target='_blank' class='url_from_ajax'>"
+                            sContnet += "<h6 class='point_from_ajax'></h6>"
+                            sContnet += "<p title='"+res.data[j].itemName+"' class='text_from_ajax'>"+res.data[j].itemName+"</p>"
+                            sContnet += "</a>"
+                            $('.marrige').empty().append(sContnet);
+                        }
+                    });
+                }
+            }
+        });
+        blList = 1;
+    });
+
+    $('.content_from_ajax .layui-tab-title li').click(function(){
+        $('.show-sixth').show().siblings().hide();
+        $('.right-map').hide().siblings('.top_search').hide();
+        $('.back_wrap h6').text('办理业务');
+        var getdep = $(this).parents('.layui-tab-title').find('li:nth-child(1)').attr('id');
+        var getText = $(this).text();
+        var passnum;
+        if(getText == '法人办事'){
+            passnum = 1;
+            getAjaxFrom(getdep,passnum)
+        }else if(getText == '个人办事'){
+            passnum = 0;
+            getAjaxFrom(getdep,passnum)
+        }
+    });
+
+    function getAjaxFrom(getdep,passnum){
+        $.ajax({
+            type: 'GET',
+            url: PATH + '/mapdata/getHandMatterPage',
+            // url: "http://192.168.1.253:7777/mapdata/getHandMatterPage",
+            async: false,
+            dataType: 'json',
+            data: {
+                page: 1,
+                limit: 4,
+                type: passnum,
+                matterDept: getdep
+            },
+            success: function(res) {
+                if (res.data != null) {
+                    var sContnet = ''
+                    $.each(res.data,function(j){
+                        if ((res.data[j].itemName == undefined && res.data[j].matterUrl == undefined) && res.data[j].matterDept == undefined) {
+                            sContnet += ''
+                        } else {
+                            sContnet += "<a href='"+res.data[j].matterUrl+"' target='_blank' class='url_from_ajax'>"
+                            sContnet += "<h6 class='point_from_ajax'></h6>"
+                            sContnet += "<p title='"+res.data[j].itemName+"' class='text_from_ajax'>"+res.data[j].itemName+"</p>"
+                            sContnet += "</a>"
+                            $('.result_form_ajax').empty().append(sContnet);
+                        }
+                    });
+                    blList = 1;
+                }
+            }
+        });
+    }
+
     // 封装渲染列表
     function xrResultList(arrey){
         var discript = ''
@@ -957,7 +1164,13 @@ $(function () {
                     applyClickList();
                     $('.right-search').hide().css('top', '0px');
                     $('.top_search').hide();
-                    // $('.wrap_result').scrollTop(0);
+                    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);
@@ -985,11 +1198,9 @@ $(function () {
         var discript_text = address_text.split(':')[1];
         $('#gj-two').val(discript_text);
         $('.content-input .layui-tab-item:nth-child(1)').addClass('layui-show').siblings().removeClass('layui-show');
-        $('.search-change li:nth-child(1)').addClass('layui-this').siblings().removeClass('layui-this');$('.right-search').show();
-        // $('.right-search').show();
-        // $('.right-search').css('top', '3.06666vw');
+        $('.search-change li:nth-child(1)').addClass('layui-this').siblings().removeClass('layui-this');
+        $('.right-search').show();
         $('.right-search').animate({top: '3.06666vw'},400);
-        // $('.top_search').hide();
         $('.top_search').fadeOut(50);
 		var addFirst;
         await new Promise((resolve, reject) => {
@@ -1000,6 +1211,13 @@ $(function () {
                     let getClick = getAllArr.filter(i => {
                         return i.address == discript_text;
                     });
+                    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 (discript_text == discrptAddress) {
                         addMarker(getClick, address);
@@ -1020,10 +1238,8 @@ $(function () {
         $('#zj-two').val(discript_text);
         $('.content-input .layui-tab-item:nth-child(2)').addClass('layui-show').siblings().removeClass('layui-show');
         $('.search-change li:nth-child(2)').addClass('layui-this').siblings().removeClass('layui-this');
-        // $('.right-search').show();
-        // $('.right-search').css('top', '3.06666vw');
+        $('.right-search').show();
         $('.right-search').animate({top: '3.06666vw'},400);
-        // $('.top_search').hide();
         $('.top_search').fadeOut(50);
         var addFirst;
         await new Promise((resolve, reject) => {
@@ -1034,6 +1250,13 @@ $(function () {
                     let getClick = getAllArr.filter(i => {
                         return i.address == discript_text;
                     });
+                    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 (discript_text == discrptAddress) {
                         addMarker(getClick, address);
@@ -2075,6 +2298,28 @@ $(function () {
 			$(this).removeClass('layui-icon-down').addClass('layui-icon-up');
         }
 	});
+
+    $('.btn_back').click(function(){
+        if (blList == 1) {
+            map.clearOverlays();
+            $('.show-fourth').show().siblings().hide();
+            var windowHeight = $('.right-map').innerHeight() - $('.head').innerHeight() + 45;
+            var spWidth = ($('.show-fourth').innerWidth() - $('.wrap_result1').innerWidth())/2;
+            $('.wrap_result1').css({'top': spWidth,'left': spWidth});
+            $('.title-second').css({'top':windowHeight,'left': spWidth});
+            $('.right-search').hide();
+            $('.right-map').show().siblings('.top_search').show();
+            $('.right-map').css('height', hlHeight);
+            $('.show-fifth .back_top').show();
+            $('.title-second h6').text('搜索结果')
+            xrList(getAllArr);
+            blList = 2;
+            ssList = 2
+            $('.wrap_result1').scrollTop(scrollListHeight1)
+        } else if (blList == 2) {
+            window.location.reload();
+        }
+    })
     
     // 点击搜索的出现结果部分的返回到首页
 	$('.backBtn').click(function() {