|
@@ -410,6 +410,7 @@ $(function () {
|
|
|
$('.right-search').hide().css('top', '0px');
|
|
|
// $('.top_search').show();
|
|
|
$('.top_search').fadeIn(500);
|
|
|
+ $('.wrap_handle').hide()
|
|
|
}
|
|
|
|
|
|
// 点击弹窗以外的区域隐藏弹窗
|
|
@@ -464,26 +465,6 @@ $(function () {
|
|
|
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;
|
|
@@ -775,11 +756,6 @@ $(function () {
|
|
|
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 {
|
|
@@ -883,7 +859,13 @@ $(function () {
|
|
|
}
|
|
|
sContnet += "</p>"
|
|
|
}
|
|
|
- sContnet += "<a class='detailCheck'>点击查看详情</a>"
|
|
|
+ if (arr[index].sptype == '受理场所'){
|
|
|
+ sContnet += " <div class='handle_business'>点击查看详情</div>"
|
|
|
+ }else if(arrdep == '重庆市南岸区民政局婚姻登记处(茶园)' || arrdep == '重庆市南岸区民政局婚姻登记处(南坪)'){
|
|
|
+ sContnet += " <div class='handle_business1'>点击查看详情</div>"
|
|
|
+ }else{
|
|
|
+ sContnet += "<a class='detailCheck'>点击查看详情</a>"
|
|
|
+ }
|
|
|
sContnet += "</li>"
|
|
|
sContnet += "</div>"
|
|
|
sContnet += "<li class='btn_box'>"
|
|
@@ -892,136 +874,229 @@ $(function () {
|
|
|
sContnet += "</li>"
|
|
|
sContnet += "</ul>";
|
|
|
})
|
|
|
- $('.pad_box').empty().append(sContnet);
|
|
|
+ $('.show-fifth .pad_box').empty().append(sContnet);
|
|
|
$('.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();
|
|
|
+ $(document).on('click','.handle_business',async function(){
|
|
|
+ var rmHeight = window.outerHeight - $('.right-map').innerHeight() - $('.head').innerHeight();
|
|
|
+ $('.show-sixth').show().css('height',rmHeight).siblings().hide();
|
|
|
+ $('.wrap_handle').show();
|
|
|
+ $('.wrap_result .title-second h6').text('办理业务');
|
|
|
+ var dep = $(this).parents('.address_box').siblings('.title_flex').children('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);
|
|
|
- }
|
|
|
+ var addText = $(this).parent('.address_box').find('p:nth-child(1)').text();
|
|
|
+ var discriptText = addText.split(':')[1];
|
|
|
+ var addFirst,count;
|
|
|
+ var firstpage = 1;
|
|
|
+ var pagetype = 0;
|
|
|
+ scrollListHeight = $('.wrap_result').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 = getAllArr.filter(i => {
|
|
|
+ return i.address == discriptText;
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- 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);
|
|
|
+ $('.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);
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+ page(getClick,firstpage,pagetype,dep);
|
|
|
+ function page(getClick,page,pagetype,dep){
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ // url: PATH + '/mapdata/getHandMatterPage',
|
|
|
+ url: "http://192.168.0.40: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) {
|
|
|
+ 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) {
|
|
|
+ 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 == "") {
|
|
|
+ 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 == "") {
|
|
|
+ discript += ''
|
|
|
+ } else if (getClick[i].content == undefined) {
|
|
|
+ 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 == "") {
|
|
|
+ discript += ''
|
|
|
+ } else if (getClick[i].img == undefined) {
|
|
|
+ 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) {
|
|
|
+ discript += ""
|
|
|
+ } else {
|
|
|
+ discript += "<p><span class='flex_address'>办公时间:</span>"
|
|
|
+ discript += getClick[i].time
|
|
|
+ discript += "</p>"
|
|
|
+ }
|
|
|
+ if (getClick[i].tel == '' || getClick[i].tel == undefined){
|
|
|
+ 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) {
|
|
|
+ addMarker(getClick, address);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ 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;
|
|
|
+ map.setCenter(addFirst);
|
|
|
+ resolve();
|
|
|
}
|
|
|
- }
|
|
|
+ }, '重庆市')
|
|
|
});
|
|
|
- }
|
|
|
+ });
|
|
|
|
|
|
// 封装渲染列表
|
|
|
function xrResultList(arrey){
|
|
|
+ $('.wrap_handle').hide();
|
|
|
var discript = ''
|
|
|
$.each(arrey,function(i){
|
|
|
discrptAddress = arrey[i].address;
|
|
@@ -1184,6 +1259,319 @@ $(function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ $(document).on('click','.handle_business1',async function(){
|
|
|
+ var rmHeight = window.outerHeight - $('.right-map').innerHeight() - $('.head').innerHeight();
|
|
|
+ $('.show-sixth').show().css('height',rmHeight).siblings().hide();
|
|
|
+ $('.wrap_handle').show();
|
|
|
+ $('.content_from_ajax').hide().siblings('.marrige').show();
|
|
|
+ $('.wrap_result .title-second h6').text('办理业务');
|
|
|
+ var addText = $(this).parent('.address_box').find('p:nth-child(1)').text();
|
|
|
+ var discriptText = addText.split(':')[1];
|
|
|
+ var addFirst,count;
|
|
|
+ var firstpage = 1;
|
|
|
+ var pagetype = 3;
|
|
|
+ scrollListHeight = $('.wrap_result').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 = getAllArr.filter(i => {
|
|
|
+ return i.address == discriptText;
|
|
|
+ });
|
|
|
+ $('.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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ page(getClick,firstpage,pagetype);
|
|
|
+ function page(getClick,page,pagetype){
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ // url: PATH + '/mapdata/getHandMatterPage',
|
|
|
+ url: "http://192.168.0.40:7777/mapdata/getHandMatterPage",
|
|
|
+ async: false,
|
|
|
+ dataType: 'json',
|
|
|
+ data: {
|
|
|
+ page: page,
|
|
|
+ limit: 4,
|
|
|
+ type: pagetype
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data != null) {
|
|
|
+ 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) {
|
|
|
+ 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 == "") {
|
|
|
+ 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 == "") {
|
|
|
+ discript += ''
|
|
|
+ } else if (getClick[i].content == undefined) {
|
|
|
+ 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 == "") {
|
|
|
+ discript += ''
|
|
|
+ } else if (getClick[i].img == undefined) {
|
|
|
+ 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) {
|
|
|
+ discript += ""
|
|
|
+ } else {
|
|
|
+ discript += "<p><span class='flex_address'>办公时间:</span>"
|
|
|
+ discript += getClick[i].time
|
|
|
+ discript += "</p>"
|
|
|
+ }
|
|
|
+ if (getClick[i].tel == '' || getClick[i].tel == undefined){
|
|
|
+ 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>"
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $('.marrige').empty().append(html);
|
|
|
+ $('.show-sixth .pad_box').empty().append(discript);
|
|
|
+ if (discriptText == discrptAddress) {
|
|
|
+ addMarker(getClick, address);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ blList = 1;
|
|
|
+ map.setCenter(addFirst);
|
|
|
+ resolve();
|
|
|
+ }
|
|
|
+ }, '重庆市')
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).on('click','.content_from_ajax .layui-tab-title li',function(){
|
|
|
+ var rmHeight = window.outerHeight - $('.right-map').innerHeight() - $('.head').innerHeight();
|
|
|
+ $('.show-sixth').show().css('height',rmHeight).siblings().hide();
|
|
|
+ $('.back_wrap h6').text('办理业务');
|
|
|
+ $('.right-map').css('height', hlHeight);
|
|
|
+ var windowHeight = $('.right-map').innerHeight() - $('.head').innerHeight() + 45;
|
|
|
+ var spWidth = ($('.show-sixth').innerWidth() - $('.wrap_handle').innerWidth())/2;
|
|
|
+ $('.wrap_handle').css({'top': spWidth,'left': spWidth});
|
|
|
+ $('.title-second').css({'top':windowHeight,'left': spWidth});
|
|
|
+ $('.right-search').hide().css('top', '0px');
|
|
|
+ var getdep = $(this).parents('.layui-tab-title').find('li:nth-child(1)').attr('id');
|
|
|
+ var getText = $(this).text();
|
|
|
+ if(getText == '个人办事'){
|
|
|
+ var count;
|
|
|
+ var firstpage = 1;
|
|
|
+ var pagetype = 0;
|
|
|
+ page(firstpage,pagetype,getdep)
|
|
|
+ function page(page,pagetype,dep){
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ url: PATH + '/mapdata/getHandMatterPage',
|
|
|
+ // url: "http://192.168.0.40:7777/mapdata/getHandMatterPage",
|
|
|
+ async: false,
|
|
|
+ dataType: 'json',
|
|
|
+ data: {
|
|
|
+ page: page,
|
|
|
+ limit: 6,
|
|
|
+ type: pagetype,
|
|
|
+ matterDept: dep
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data != null) {
|
|
|
+ count = res.count;
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ 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(obj.curr,pagetype,getdep)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ blList = 1;
|
|
|
+ }else if(getText == '法人办事'){
|
|
|
+ var count;
|
|
|
+ var firstpage = 1;
|
|
|
+ var pagetype = 1;
|
|
|
+ page(firstpage,pagetype,getdep)
|
|
|
+ function page(page,pagetype,dep){
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ url: PATH + '/mapdata/getHandMatterPage',
|
|
|
+ // url: "http://192.168.0.40:7777/mapdata/getHandMatterPage",
|
|
|
+ async: false,
|
|
|
+ dataType: 'json',
|
|
|
+ data: {
|
|
|
+ page: page,
|
|
|
+ limit: 4,
|
|
|
+ type: pagetype,
|
|
|
+ matterDept: dep
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.data != null) {
|
|
|
+ count = res.count;
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ 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 = 1
|
|
|
+ page(obj.curr,pagetype,getdep)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ blList = 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
function addMarker(arrey, point) {
|
|
|
var myIcon = new BMap.Icon("./img/location.png", new BMap.Size(40, 40));
|
|
|
var marker = new BMap.Marker(point, {
|
|
@@ -2310,8 +2698,11 @@ $(function () {
|
|
|
$('.right-search').hide();
|
|
|
$('.right-map').show().siblings('.top_search').show();
|
|
|
$('.right-map').css('height', hlHeight);
|
|
|
- $('.show-fifth .back_top').show();
|
|
|
- $('.title-second h6').text('搜索结果')
|
|
|
+ // $('.show-fifth .back_top').show();
|
|
|
+ $('.title-second h6').text('搜索结果');
|
|
|
+ $('.content_from_ajax .layui-tab-title>li:nth-child(1)').addClass('layui-this').siblings().removeClass('layui-this');
|
|
|
+ $('.content_from_ajax .layui-tab-content .layui-tab-item:nth-child(1)').addClass('layui-show').siblings().removeClass('layui-show');
|
|
|
+ $('.result_form_ajax').empty();
|
|
|
xrList(getAllArr);
|
|
|
blList = 2;
|
|
|
ssList = 2
|