ws 1 жил өмнө
parent
commit
0e295cf4b9

+ 1 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/dao/MapDataDao.java

@@ -117,7 +117,7 @@ public interface MapDataDao {
 	long pageCount(@Param("mapVo") MapVo mapVo);
 
 	Integer getMapDataCount(@Param("dictType") String[] dictType, @Param("type") String type, @Param("title") String title);
-	List<MapData> getMapDataType(@Param("dictType") String[] dictType, @Param("type") String type, @Param("title") String title);
+	List<MapData> getMapDataType(@Param("dictType") String[] dictType, @Param("type") String type, @Param("title") String[] title);
 
 	List<String> getHandMatterBySearch(@Param("queryVal") String queryVal);
 }

+ 5 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/MapDataServiceImpl.java

@@ -241,12 +241,16 @@ public class MapDataServiceImpl implements MapDataService {
         if (StrUtil.isNotEmpty(dictType)){
              split = dictType.split(",");
         }
+        String[] titles = null;
+        if (StrUtil.isNotEmpty(title)) {
+            titles = title.split(",");
+        }
 //        page = (page - 1) * limit;
 //        Integer mapDataCount = mapDataDao.getMapDataCount(split, type, title);
 //        if (mapDataCount == 0){
 //            return SendUtil.layuiTable(mapDataCount, null);
 //        }
-        return SendUtil.send(true,"", mapDataDao.getMapDataType(split, type, title));
+        return SendUtil.send(true,"", mapDataDao.getMapDataType(split, type, titles));
     }
 
     @Override

+ 5 - 1
nngkxxdp/src/main/resources/mapper/MapDataDao.xml

@@ -346,7 +346,11 @@
                 and type = #{type}
             </if>
             <if test="title!=null and title!=''">
-                and dep like  CONCAT('%',#{title},'%')
+                and (
+                    <foreach collection="title" item="item" index="index" separator=" or ">
+                        dep like CONCAT('%',#{item},'%')
+                    </foreach>
+                )
             </if>
         </where>
     </select>

+ 21 - 1
nngkxxdp/src/main/resources/static/district/js/sy.js

@@ -1,6 +1,26 @@
 var is_mobi = navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
 if (is_mobi) {
-    window.location.href = "sy_mobile.html";
+	if (getUrlParams().isfooter) {
+		window.location.href = "sy_mobile.html?isfooter="+getUrlParams().isfooter;
+	} else {
+		window.location.href = "sy_mobile.html";
+	}
+}
+
+
+function getUrlParams() {
+	let url = window.location.search; //获取url中"?"符后的字串
+	let paramsObj = new Object();
+	if (url.indexOf("?") != -1) {
+		let str = url.substr(1);
+		strs = str.split("&");
+		for (let i = 0; i < strs.length; i++) {
+ 
+			paramsObj[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
+ 
+		}
+	}
+	return paramsObj;
 }
 $(function() {
 	// 百度地图API功能

+ 33 - 5
nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

@@ -1083,7 +1083,7 @@ $(function () {
 	            sContnet += "<button class='one_bus'>公交</button><button class='two_car'>自驾</button>"
 	            sContnet += "</li></ul>";
 	        }
-	        $('.show-fourth .result_form_ajax').empty().append(sContnet);
+			$('.show-fourth .result_form_ajax').empty().append(sContnet);
 	    }
 	}
 
@@ -1266,6 +1266,7 @@ $(function () {
     // 点击列表之一,中心重新渲染
     $(document).on('click', '.detailCheck', async function() {
         $('.show-fourth').hide();
+		$('.content_from_ajax3').parent().removeClass('layui-hide')
         var addText = $(this).parent('.address_box').find('p:nth-child(1)').text();
         var discriptText = addText.split(':')[1];
 		var addFirst;
@@ -3285,12 +3286,15 @@ $(function () {
         if (searchInp == '' || searchInp == null) {
             layer.msg('输入的值不能为空!');
         }else{
+			document.activeElement.blur();
+			setTimeout(function() {
             var wsHeight = window.outerHeight - $('.right-map').innerHeight() - $('.head').innerHeight() - 11;
             var rmHeight = window.outerHeight - $('.right-map').innerHeight() - $('.head').innerHeight();
             $('.wrap_result1').css('height',wsHeight);
             $('.show-fourth').css('height',rmHeight);
 			searchEvent(searchInp);
             searchJSON(searchInp);
+			 }, 800);
         }
 	});
 
@@ -3311,7 +3315,7 @@ $(function () {
 				   $('.show-fourth').css('height',rmHeight);
 				   searchEvent(searchInp);
 				   searchJSON(searchInp);
-			   }, 500);
+			   }, 800);
 			}
             // document.activeElement.blur();  // 关闭软键盘
 		}
@@ -3515,6 +3519,7 @@ $(function () {
             indexList = 2;
             $('.show-fifth .back_top').show();
             $('.wrap_result').scrollTop(scrollListHeight)
+			$('.content_from_ajax3').parent().addClass('layui-hide')
         } else if (indexList == 2) {
             window.location.reload();
         }
@@ -3573,17 +3578,24 @@ $(function () {
     $('.show-fifth .back_top').click(function() {
         $('.wrap_result').scrollTop(0)
     });
-	
+	var markerInfo = {
+		markers: [],
+		data: [],
+		myMark: null
+	}
     var geolocation = new BMap.Geolocation();
     geolocation.getCurrentPosition(function(r){
         if(this.getStatus() == BMAP_STATUS_SUCCESS){
 			var mk = new BMap.Marker(r.point);
+			markerInfo.myMark = r.point
 			let ccount = 0;
 			for (let i = 0; i < ggfwzx.length; i++) {
 				myGeo.getPoint(ggfwzx[i].address, function(point) {
 					if (point) {
 						const addr = map.getDistance(r.point, point);
-						if (addr <= 500) {
+						if (addr <= 1000) {
+							markerInfo.data.push(ggfwzx[i])
+							markerInfo.markers.push(point)
 							ccount++;
 							var myIcon = new BMap.Icon("./img/location.png", new BMap.Size(40, 40));
 							var marker = new BMap.Marker(point, {
@@ -3602,7 +3614,9 @@ $(function () {
 				myGeo.getPoint(xzfwzx[i].address, function(point) {
 					if (point) {
 						const addr = map.getDistance(r.point, point);
-						if (addr <= 500) {
+						if (addr <= 1000) {
+							markerInfo.data.push(xzfwzx[i])
+							markerInfo.markers.push(point)
 							ccount++;
 							var myIcon = new BMap.Icon("./img/location.png", new BMap.Size(40, 40));
 							var marker = new BMap.Marker(point, {
@@ -4010,5 +4024,19 @@ $(function () {
 	        blList = 1;
 	    }
 	});
+	$(document).on('click','#aroundEvent',function(){
+		if (!markerInfo.myMark) {
+			layer.msg('初始定位还未完成,请稍后再试')
+			return
+		}
+		if(!markerInfo.data || !markerInfo.data.length) {
+			layer.msg('附近一公里没有办事地点')
+			return
+		}
+		indexList = 2;
+		applyClickList();
+		xrList(markerInfo.data);
+		getPointPostAjax(markerInfo.data);
+	})
 })
 

+ 8 - 7
nngkxxdp/src/main/resources/static/district/sy.html

@@ -28,19 +28,20 @@
 </style>
 
 <body>
-    <iframe id="childshell" width="100%" height="1000px" src="syDteail.html"></iframe>
+    <iframe id="childshell" width="100%" height="1000px" src="syDteail.html?isfooter=true"></iframe>
     <!--<div style="width:100%;" id="footer"></div>-->
-    <iframe width="100%" height="358px" src="https://www.cqna.gov.cn/data/footer/footer.html"></iframe>
+    <!-- <iframe width="100%" height="358px" src="https://www.cqna.gov.cn/data/footer/footer.html"></iframe> -->
+	<div style="width:100%;" id="footer"></div>
 
 </body>
 <script src="js/jquery-3.5.1.min.js"></script>
 <script type="text/javascript">
 
-    // setFooter()
-    //
-    // function setFooter(){
-    //     $("#footer").load("https://www.cqna.gov.cn/data/footer/footer.html")
-    // }
+    setFooter()
+    
+    function setFooter(){
+        $("#footer").load("https://www.cqna.gov.cn/data/footer/footer.html")
+    }
 
 </script>
 

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

@@ -30,8 +30,25 @@
     setFooter()
 
     function setFooter(){
-        $("#footer").load("https://www.cqna.gov.cn/data/footer/footer.html")
+		if (!getUrlParams().isfooter) {
+			$("#footer").load("https://www.cqna.gov.cn/data/footer/footer.html")
+		}
     }
+	
+	function getUrlParams() {
+		let url = window.location.search; //获取url中"?"符后的字串
+		let paramsObj = new Object();
+		if (url.indexOf("?") != -1) {
+			let str = url.substr(1);
+			strs = str.split("&");
+			for (let i = 0; i < strs.length; i++) {
+	 
+				paramsObj[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
+	 
+			}
+		}
+		return paramsObj;
+	}
 
 </script>
 

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

@@ -56,7 +56,7 @@
         </div>
 		
         <div class="right-search">
-			<span style="padding: 15px;">附近共有<span id="bsddNum" style="color: red;">0</span>个办事地点</span>
+			<span id="aroundEvent" style="padding: 15px;">附近一公里共有<span id="bsddNum" style="color: red;">0</span>个办事地点</span>
             <div class="layui-tab">
                 <ul class="layui-tab-title search-change">
                     <!-- <li>搜索</li> -->
@@ -634,7 +634,7 @@
                         <button type="button" class="back_btn">返回</button>
                     </div>
                     <div class="pad_box"></div>
-					<div style="margin-top: -6.53333vw;">
+					<div style="margin-top: -6.53333vw;" class="layui-hide">
 						
 						<div class="layui-tab layui-tab-brief content_from_ajax3" lay-filter="docDemoTabBrief">
 							<ul class="layui-tab-title">

BIN
nngkxxdp/src/main/resources/static/images/llzx-bg.png


BIN
nngkxxdp/src/main/resources/static/images/sjpt-bg.png


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
nnzwminiapp/libs/qqmap-wx-jssdk.min.js.bak


+ 2 - 2
nnzwminiapp/package.json

@@ -11,8 +11,8 @@
   "keywords": [],
   "author": "",
   "license": "ISC",
-  "description": "",
   "devDependencies": {
     "tailwindcss": "^3.3.3"
-  }
+  },
+  "description": ""
 }

+ 3 - 2
nnzwminiapp/pages/api/request.js

@@ -1,6 +1,6 @@
 const baseUrl = "https://www.cqna.gov.cn/mnazw"
 const imgUrl = "https://www.cqna.gov.cn/mnazw/applet/"
-
+const newImgUrl = "https://www.cqna.gov.cn/data/"
 import {
 	cacheGet,
 	cacheSet
@@ -121,7 +121,8 @@ function showDialog() {
 
 export {
 	request,
-	imgUrl,
+  imgUrl,
+  newImgUrl,
   baseUrl,
   request2
 }

+ 26 - 1
nnzwminiapp/pages/api/yxna-api.js

@@ -47,4 +47,29 @@ export function getMapDataType(data) {
 	  method: 'GET',
 	  data: data
 	})
-  }
+  }
+
+export function getHandMatterPage(data) {
+  return request({
+    url: `mapdata/getHandMatterPage`,
+    method: 'GET',
+    data: data
+  })
+}
+
+export function getHandMatterBySearch(data) {
+  return request({
+    url: `mapdata/getHandMatterBySearch`,
+    method: 'GET',
+    data: {
+      queryVal: data
+    }
+  })
+}
+
+export function getMapDataAll() {
+  return request({
+    url: `mapdata/getMapDataAll`,
+    method: 'GET',
+  })
+}

+ 14 - 2
nnzwminiapp/pages/index/index.js

@@ -5,7 +5,8 @@ import {
 } from "../api/request";
 
 import {
-	imgUrl,
+  imgUrl,
+  newImgUrl,
   request,
   request2
 } from "../api/request"
@@ -32,7 +33,8 @@ const app = getApp()
 Page({
 	data: {
 		hideAll: true,
-		imgUrl: imgUrl,
+    imgUrl: imgUrl,
+    newImgUrl: newImgUrl,
 		// 屏幕高度
 		navHeight: '',
 		searchInput: '',
@@ -1464,6 +1466,16 @@ Page({
 		wx.navigateTo({
 			url: '/pages/web/web?url=' + "https://data.cqna.gov.cn/zdjc/symobile.html",
 		})
+  },
+  gotoSJKF(){
+		wx.navigateTo({
+			url: '/pages/web/web?url=' + "https://www.cqna.gov.cn/sjkf/",
+		})
+  },
+  gotoLLZX(){
+		wx.navigateTo({
+			url: '/pages/web/web?url=' + "https://www.cqna.gov.cn/llzx/",
+		})
 	},
 	showLogoDialog(e) {
 		this.setData({

+ 6 - 1
nnzwminiapp/pages/index/index.wxml

@@ -210,6 +210,11 @@
 			</view>
 			<!-- 浮动 -->
 		</view>
+
+    <view class="outside-view">
+      <view class="outside-view-sjkf" bindtap="gotoSJKF" style="background-image: url({{newImgUrl}}images/sjpt-bg.png);"></view>
+      <view class="outside-view-llzx" bindtap="gotoLLZX" style="background-image: url({{newImgUrl}}images/llzx-bg.png);"></view>
+    </view>
     
 		<view class="three" style="height:163rpx;width:100%;padding-left:15rpx;background-color: #F5F5F5; margin-top: 10rpx;">
 			
@@ -309,7 +314,7 @@
 						<t-loading theme="spinner" size="64rpx" text="加载中..." inheritColor></t-loading>
 					</view>
 					<view wx:elif="{{isVideoEmpty}}" style="display: flex;justify-content: center;align-items: center;height: 100%;">
-						<t-empty icon="info-circle-filled" description="暂无数据" />
+						<t-empty icon="info-circle-filled" description="请登录后查看" />
 					</view>
 					<swiper style="height: 180rpx;" wx:else display-multiple-items="{{videoInfo.length >= 2 ? 2 : 1}}" current="{{0}}" autoplay="{{false}}">
 						<swiper-item wx:for="{{videoInfo}}" wx:key="index" bindtap="gotoVideoDetail" data-url="{{item.shareUrl}}">

+ 18 - 0
nnzwminiapp/pages/index/index.wxss

@@ -654,4 +654,22 @@ scroll-view ::-webkit-scrollbar {
     font-weight: 500;
     margin-right: 20rpx;
 
+}
+
+.outside-view {
+  display: flex;
+  width: 720rpx;
+  justify-content: space-between;
+  margin: 0 auto;
+  height: 150rpx;
+}
+.outside-view .outside-view-sjkf {
+  width: 48%;
+  height: 100%;
+  background-size: 100% 100%;
+}
+.outside-view .outside-view-llzx {
+  width: 48%;
+  height: 100%;
+  background-size: 100% 100%;
 }

+ 23 - 0
nnzwminiapp/pages/map/item-info.wxml

@@ -28,4 +28,27 @@
       <view class="item-bus" bindtap="changeItem" data-type="0" data-index="{{detail_index}}">公交</view>
       <view class="item-car" bindtap="changeItem" data-type="1" data-index="{{detail_index}}">自驾</view>
     </view>
+    <view wx:if="{{itemInfo.deptShow}}" style="width: 95%;margin: 0 auto;">
+      <view class="dept-title">入驻部门</view>
+      <view class="dept-list">
+        <view class="dept-item {{(itemInfo.deptNow == '' || itemInfo.deptNow == detail_dep) ? 'active': ''}}" bindtap="clickDept" data-dept="{{detail_dep}}">全部</view>
+        <view class="dept-item {{itemInfo.deptNow == item ? 'active': ''}}" bindtap="clickDept" data-dept="{{item}}" wx:for="{{itemInfo.deptList}}">{{item}}</view>
+      </view>
+    </view>
+    <view wx:if="{{itemInfo.matterStatus}}" style="padding-bottom: 20rpx;">
+      <view class="matter-tab">
+        <view class="matter-tab-li {{itemInfo.navType == 0 ? 'active': ''}}" bindtap="matterTab" data-type="0">个人办事</view>
+        <view class="matter-tab-li {{itemInfo.navType == 1 ? 'active': ''}}" bindtap="matterTab" data-type="1">法人办事</view>
+      </view>
+      <view class="matter-content">
+        <view class="matter-content-item item-text-size" wx:for="{{itemInfo.matterList}}" bindtap="toDetailWeb" data-url="{{item.matterUrl}}">
+          <view class="matter-content-item-round"></view>
+          {{item.itemName}}
+        </view>
+      </view>
+      <view class="matter-page">
+        <view class="matter-page-prev {{itemInfo.pagePrev ? 'txt' : ''}}" bindtap="clickPageTo" data-type="0">{{'<'}}上一页</view>
+        <view class="matter-page-next {{itemInfo.pageNext ? 'txt' : ''}}" bindtap="clickPageTo" data-type="1">下一页></view>
+      </view>
+    </view>
   </view>

+ 490 - 19
nnzwminiapp/pages/map/map.js

@@ -2,7 +2,10 @@ import {
     imgUrl
 } from "../api/request"
 import{
-    getMapDataType
+    getMapDataType,
+    getHandMatterPage,
+    getHandMatterBySearch,
+    getMapDataAll
 } from "../api/yxna-api"
 var QQMapWX = require('../../libs/qqmap-wx-jssdk.min.js');
 const popType = [
@@ -84,7 +87,31 @@ Page({
         showSet: false,
         trafficType: 0,
         page:0,
-        limit:15
+        limit:15,
+        marksInfo: [],
+        marksView: [],
+        marksNum: 0,
+        searchInfo: {
+          navType: 0,
+          isShow: false
+        },
+        itemInfo: {
+          page: 1,
+          limit: 6,
+          navType: 0,
+          deptNow: '',
+          pageNext: true,
+          pagePrev: false,
+          matterStatus: true,
+          matterList: [{
+            itemName: '',
+            matterUrl: ''
+          }],
+          '重庆市南岸区政务服务中心(江南新城中心)': ['重庆市南岸区残联', '重庆市南岸区财政局', '重庆市南岸区文化和旅游发展委员会', '重庆市南岸区档案馆', '重庆市南岸区卫生健康委员会', '重庆市南岸区交通局', '重庆市南岸区规划自然资源局', '重庆市南岸区住房和城乡建设委员会', '重庆市南岸区生态环境局', '重庆市南岸区农业农村委员会', '重庆市南岸区发展和改革委员会', '重庆市南岸区消防救援支队', '重庆市南岸区城市管理局', '重庆市公安局南岸分局'],
+	        '重庆市南岸区政务服务中心(南坪中心)': ['重庆市南岸区市场监管局', '重庆市公安局南岸分局', '国家税务总局重庆市南岸区税务局'],
+        },
+        jnxc: ['重庆市南岸区残联', '重庆市南岸区财政局', '重庆市南岸区文化和旅游发展委员会', '重庆市南岸区档案馆', '重庆市南岸区卫生健康委员会', '重庆市南岸区交通局', '重庆市南岸区规划自然资源局', '重庆市南岸区住房和城乡建设委员会', '重庆市南岸区生态环境局', '重庆市南岸区农业农村委员会', '重庆市南岸区发展和改革委员会', '重庆市南岸区消防救援支队', '重庆市南岸区城市管理局', '重庆市公安局南岸分局'],
+        npzx: ['重庆市南岸区市场监管局', '重庆市公安局南岸分局', '国家税务总局重庆市南岸区税务局'],
     },
 
     onLoad: function (options) {
@@ -107,9 +134,24 @@ Page({
     },
     onReady:function () {
         
-        
+        const that = this
         this.loadItem();
-        this.setMap();
+        getMapDataAll().then((res) => {
+          let arr = []
+          Array.prototype.push.apply(arr, res.data.xzfwzxs);
+          Array.prototype.push.apply(arr, res.data.ggfwzxs);
+          for (let j = 0; j < arr.length; j++) {
+            if(arr[j].tel && !(arr[j].tel instanceof Array)){
+              arr[j].tel = arr[j].tel.split(";")
+            }
+          }
+          that.setData({
+            xzfwzxs: res.data.xzfwzxs,
+            marksInfo: arr
+          })
+          this.setMap();
+        });
+        // this.setMap();
 
     },
     async setMap(){
@@ -121,21 +163,23 @@ Page({
         wx.getLocation({
             type: 'gcj02', //返回可以用于wx.openLocation的经纬度
             success(res) {
+              console.log(res)
                 const latitude = res.latitude
                 const longitude = res.longitude
+                initMapDataAll(that, latitude, longitude)
                 that.setData({
                     latitude: latitude,
                     longitude: longitude,
                     trafficStart: "我的位置",
-                    markers: [{
-                        latitude: latitude,
-                        longitude: longitude,
-                        iconPath:  "/location.png",
-                        width: '30px',
-                        height: '30px',
-                        rotate: 0,
-                        alpha: 1
-                    }]
+                    // markers: [{
+                    //     latitude: latitude,
+                    //     longitude: longitude,
+                    //     iconPath:  "/location.png",
+                    //     width: '30px',
+                    //     height: '30px',
+                    //     rotate: 0,
+                    //     alpha: 1
+                    // }]
                 });
             }
         });
@@ -187,7 +231,7 @@ Page({
             console.log(res.data[0].tel);
             let data = []
             res.data.forEach((item) => {  
-                if(item.tel!=null && item.tel!=""){
+                if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
                     item.tel = item.tel.split(";")
                 }
                 data.push(item)
@@ -207,6 +251,11 @@ Page({
     },
     changeInfo(e) {
         // console.log(e.currentTarget.dataset.data);
+        let searchInfo = this.data.searchInfo
+        searchInfo.isShow = false
+        this.setData({
+          searchInfo: searchInfo
+        })
         let dataitem =  e.currentTarget.dataset.data;
         console.log(dataitem);
         let params ={
@@ -242,7 +291,7 @@ Page({
             }
             let renderData = []
             data.forEach((item) => {  
-                if(item.tel!=null && item.tel!=""){
+                if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
                     item.tel = item.tel.split(";")
                 }
                 renderData.push(item)
@@ -277,10 +326,13 @@ Page({
         console.info(e)
         let value = e.currentTarget.dataset.value;
         if (value === "none") {
+          let searchInfo = that.data.searchInfo
+          searchInfo.isShow = false
             that.setData({
                 isList: false,
                 showSearch: false,
                 showSet: false,
+                searchInfo: searchInfo
             });
         } else {
             // 控制公交自驾选中状态
@@ -313,6 +365,47 @@ Page({
             address = item.address;
         }
         console.log(item.time);
+        let itemInfo = that.data.itemInfo
+        if (itemInfo[item.dep]) {
+          let arr = []
+          for (let i = 0; i < itemInfo[item.dep].length; i++) {
+            arr.push(itemInfo[item.dep][i].replace('重庆市', '').replace('南岸', ''))
+          }
+          itemInfo.deptList = arr
+          itemInfo.oldDeptList = itemInfo[item.dep]
+        }
+        itemInfo.deptShow = itemInfo[item.dep] ? true : false
+        itemInfo.navType = 0
+        itemInfo.page = 1
+        itemInfo.deptNow = ''
+        let params = {
+          page: 1,
+          limit: itemInfo.limit,
+          type: itemInfo.navType,
+        }
+        if (itemInfo.deptShow) {
+          params.matterDept = itemInfo.oldDeptList.join(',')
+        } else {
+          params.matterDept = item.dep.replace('政府', '').replace('便民服务中心', '')
+        }
+        const _this = this
+        getHandMatterPage(params).then((res) => {
+          if (!(res && res.count > 0)) {
+            itemInfo.matterStatus = false
+            _this.setData({
+              itemInfo: itemInfo
+            })
+            return
+          }
+          itemInfo.matterStatus = true
+          itemInfo.pagePrev = itemInfo.page == 1
+          itemInfo.pageNext = itemInfo.page * itemInfo.limit >= res.count
+          itemInfo.matterList = res.data
+          _this.setData({
+            itemInfo: itemInfo
+          })
+        });
+
         that.setData({
             detail_dep: item.dep,
             detail_content: item.content,
@@ -321,7 +414,8 @@ Page({
             detail_time: item.time,
             detail_tel: item.tel,
             detail_index: index,
-            trafficEnd: address
+            trafficEnd: address,
+            itemInfo: itemInfo
         });
         
         BMap.geocoder({
@@ -404,7 +498,7 @@ Page({
         getMapDataType(params).then((res) => {
             let data = []
             res.data.forEach((item) => {  
-                if(item.tel!=null && item.tel!=""){
+                if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
                     item.tel = item.tel.split(";")
                 }
                 data.push(item)
@@ -427,6 +521,12 @@ Page({
      * @param {*} e 
      */
     searchTap(e) {
+      let searchInfo = this.data.searchInfo
+      searchInfo.isShow = true
+      searchInfo.navType = 0
+      this.setData({
+        searchInfo: searchInfo
+      })
         let searchVal = this.data.searchVal;
 
         wx.showToast({
@@ -444,7 +544,7 @@ Page({
         getMapDataType(params).then((res) => {
             let data = []
             res.data.forEach((item) => {  
-                if(item.tel!=null && item.tel!=""){
+                if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
                     item.tel = item.tel.split(";")
                 }
                 data.push(item)
@@ -523,6 +623,11 @@ Page({
 
     backSearch() {
       let that =this
+      let searchInfo = that.data.searchInfo
+      searchInfo.isShow = that.data.searchVal ? true : false
+      that.setData({
+        searchInfo: searchInfo
+      })
         if (!that.data.isList) {
             this.setData({
                 isList: true,
@@ -562,6 +667,256 @@ Page({
          changeValue = "transit";
     },
 
+    matterTab(e) {
+      let itemInfo = this.data.itemInfo
+      itemInfo.navType = e.currentTarget.dataset?.type
+      let params = {
+        page: 1,
+        limit: itemInfo.limit,
+        type: itemInfo.navType,
+      }
+      if (itemInfo.deptShow) {
+        if (itemInfo.deptList && itemInfo.deptList.indexOf(itemInfo.deptNow) > -1) {
+          params.matterDept = itemInfo.deptNow.replace('政府', '').replace('便民服务中心', '')
+        } else {
+          params.matterDept = itemInfo.oldDeptList.join(',')
+        }
+      } else {
+        params.matterDept = this.data.detail_dep.replace('政府', '').replace('便民服务中心', '')
+      }
+      
+      const _this = this
+      getHandMatterPage(params).then((res) => {
+        if (!(res && res.count > 0)) {
+          itemInfo.matterStatus = false
+          _this.setData({
+            itemInfo: itemInfo
+          })
+          return
+        }
+        itemInfo.matterStatus = true
+        itemInfo.page = 1
+        itemInfo.pagePrev = itemInfo.page == 1
+        itemInfo.pageNext = itemInfo.page * itemInfo.limit >= res.count
+        itemInfo.matterList = res.data
+        _this.setData({
+          itemInfo: itemInfo
+        })
+      });
+    },
+    clickDept(e) {
+      console.log(e)
+      let itemInfo = this.data.itemInfo
+      itemInfo.deptNow = e.currentTarget.dataset.dept
+      itemInfo.page = 1
+      this.setData({
+        itemInfo: itemInfo
+      })
+      let params = {
+        page: itemInfo.page,
+        limit: itemInfo.limit,
+        type: itemInfo.navType,
+      }
+      if (itemInfo.deptShow) {
+        if (itemInfo.deptList && itemInfo.deptList.indexOf(itemInfo.deptNow) > -1) {
+          params.matterDept = itemInfo.deptNow
+        } else {
+          params.matterDept = itemInfo.oldDeptList.join(',')
+        }
+      } else {
+        params.matterDept = this.data.detail_dep
+      }
+      const _this = this
+      getHandMatterPage(params).then((res) => {
+        if (!(res && res.count > 0)) {
+          itemInfo.matterStatus = false
+          _this.setData({
+            itemInfo: itemInfo
+          })
+          return
+        }
+        itemInfo.pagePrev = itemInfo.page == 1
+        itemInfo.pageNext = itemInfo.page * itemInfo.limit >= res.count
+        itemInfo.matterList = res.data
+        _this.setData({
+          itemInfo: itemInfo
+        })
+      });
+    },
+    clickPageTo(e) {
+      let itemInfo = this.data.itemInfo
+      let page = 1
+      if (e.currentTarget.dataset.type == 0) {
+        // 上一页
+        if (itemInfo.pagePrev) return
+        page = itemInfo.page - 1
+      } else {
+        if (itemInfo.pageNext) return
+        page = itemInfo.page + 1
+      }
+      let params = {
+        page: page,
+        limit: itemInfo.limit,
+        type: itemInfo.navType,
+      }
+      if (itemInfo.deptShow) {
+        if (itemInfo.deptList && itemInfo.deptList.indexOf(itemInfo.deptNow) > -1) {
+          params.matterDept = itemInfo.deptNow.replace('政府', '').replace('便民服务中心', '')
+        } else {
+          params.matterDept = itemInfo.oldDeptList.join(',')
+        }
+      } else {
+        params.matterDept = this.data.detail_dep.replace('政府', '').replace('便民服务中心', '')
+      }
+      const _this = this
+      getHandMatterPage(params).then((res) => {
+        if (!(res && res.count > 0)) {
+          itemInfo.matterStatus = false
+          _this.setData({
+            itemInfo: itemInfo
+          })
+          return
+        }
+        itemInfo.matterStatus = true
+        itemInfo.page = page
+        itemInfo.pagePrev = itemInfo.page == 1
+        itemInfo.pageNext = itemInfo.page * itemInfo.limit >= res.count
+        itemInfo.matterList = res.data
+        _this.setData({
+          itemInfo: itemInfo
+        })
+      });
+    },
+    searchTab(e) {
+      let searchInfo = this.data.searchInfo
+      searchInfo.navType = e.currentTarget.dataset.type
+      this.setData({
+        searchInfo: searchInfo
+      })
+      const _this = this
+      if (searchInfo.navType == 0) {
+        let params ={
+          "title": _this.data.searchVal,
+        };
+        getMapDataType(params).then((res) => {
+          let data = []
+          res.data.forEach((item) => {  
+              if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
+                  item.tel = item.tel.split(";")
+              }
+              data.push(item)
+          });
+          this.setData({
+              showTraffic: false,
+              popData: data,
+          })
+        });
+      } else {
+        searchHandMatter(_this)
+      }
+    },
+    markClick(e) {
+      if(!e.markerId) {
+        return
+      }
+      const arr = this.data.marksInfo
+      const that = this
+      this.setData({
+        popData: arr
+      })
+      for (let i = 0; i < arr.length; i++) {
+        if (arr[i].id == e.markerId) {
+
+          let searchInfo = that.data.searchInfo
+          searchInfo.isShow = false
+            that.setData({
+                isList: false,
+                showSearch: false,
+                showSet: false,
+                showTraffic: false,
+                searchInfo: searchInfo
+            });
+            let item = arr[i];
+            console.info(item);
+            if(item.tel && !(item.tel instanceof Array)){
+              item.tel = item.tel.split(";")
+            }
+            let address = item.address
+            console.log(item.time);
+            let itemInfo = that.data.itemInfo
+            if (itemInfo[item.dep]) {
+              let arr = []
+              for (let i = 0; i < itemInfo[item.dep].length; i++) {
+                arr.push(itemInfo[item.dep][i].replace('重庆市', '').replace('南岸', ''))
+              }
+              itemInfo.deptList = arr
+              itemInfo.oldDeptList = itemInfo[item.dep]
+            }
+            itemInfo.deptShow = itemInfo[item.dep] ? true : false
+            itemInfo.navType = 0
+            itemInfo.page = 1
+            itemInfo.deptNow = ''
+            let params = {
+              page: 1,
+              limit: itemInfo.limit,
+              type: itemInfo.navType,
+            }
+            if (itemInfo.deptShow) {
+              params.matterDept = itemInfo.oldDeptList.join(',')
+            } else {
+              params.matterDept = item.dep.replace('政府', '').replace('便民服务中心', '')
+            }
+            console.log(params)
+            const _this = this
+            getHandMatterPage(params).then((res) => {
+              if (!(res && res.count > 0)) {
+                itemInfo.matterStatus = false
+                _this.setData({
+                  itemInfo: itemInfo
+                })
+                return
+              }
+              itemInfo.matterStatus = true
+              itemInfo.pagePrev = itemInfo.page == 1
+              itemInfo.pageNext = itemInfo.page * itemInfo.limit >= res.count
+              itemInfo.matterList = res.data
+              _this.setData({
+                itemInfo: itemInfo
+              })
+            });
+    
+            that.setData({
+                detail_dep: item.dep,
+                detail_content: item.content,
+                detail_img: item.img,
+                detail_address: item.address,
+                detail_time: item.time,
+                detail_tel: item.tel,
+                detail_index: i,
+                trafficEnd: address,
+                itemInfo: itemInfo
+            });
+
+          break;
+        }
+      }
+    },
+    aroundEvent(e) {
+      const _this = this
+      this.setData({
+        isList: true,
+        showSearch: false,
+        showSet: false,
+        showTraffic: false,
+        popData: _this.data.marksView
+      })
+    },
+    toDetailWeb(e) {
+      console.log(e.currentTarget.dataset.url)
+      // wx.navigateTo({
+      //   url: '/pages/web/web?gzUrl=' + e.currentTarget.dataset.url,
+      // })
+    },
     onchange(e) {
         let that = this;
         if (e.detail.value == 0) {
@@ -590,4 +945,120 @@ Page({
 		}
 	}
 });
-let changeValue = "transit";
+let changeValue = "transit";
+
+function searchHandMatter(that) {
+  getHandMatterBySearch(that.data.searchVal).then((res) => {
+    if (res.data && res.data.length) {
+      searchDepVal(that, res.data.join(','), res.data)
+    }
+  });
+}
+
+function searchDepVal(that, queryVal, deptArr) {
+  let params = {
+    title: queryVal
+  }
+  wx.showToast({
+    title: '加载中...',
+    icon: 'loading'
+});
+  getMapDataType(params).then((res) => {
+    let data = []
+    let st = true, st2 = true
+    deptArr.forEach((item) => {
+      if (that.data.jnxc.indexOf(item) > -1 && st) {
+        st = false
+        let ite = that.data.xzfwzxs[0]
+        if(ite.tel && !(ite.tel instanceof Array)){
+          ite.tel = ite.tel.split(";")
+        }
+        data.push(ite)
+      }
+      if (that.data.npzx.indexOf(item) > -1 && st2) {
+        st2 = false
+        let ite = that.data.xzfwzxs[1]
+        if(ite.tel && !(ite.tel instanceof Array)){
+          ite.tel = ite.tel.split(";")
+        }
+        data.push(ite)
+      }
+    })
+    res.data.forEach((item) => {  
+        if(item.tel!=null && item.tel!="" && !(item.tel instanceof Array)){
+            item.tel = item.tel.split(";")
+        }
+        data.push(item)
+    });
+  
+    that.setData({
+        showTraffic: false,
+        popData: data,
+    })
+    wx.hideLoading()
+  });
+  wx.hideLoading()
+}
+
+function initMapDataAll(that, lat, lng) {
+    let arr = that.data.marksInfo
+    let index = 0;
+    let addrArr = []
+    let marksView = []
+    let task = setInterval(function() {
+      if (index >= arr.length) {
+        addrArr.push({
+          latitude: lat,
+          longitude: lng,
+          iconPath:  "/location.png",
+          width: '30px',
+          height: '30px',
+          rotate: 0,
+          alpha: 1
+      })
+      console.log(addrArr)
+        that.setData({
+          markers: addrArr,
+          marksView: marksView,
+          marksNum: addrArr.length - 1
+        })
+        clearInterval(task)
+        return
+      }
+      const address = arr[index]
+      index++
+      BMap.geocoder({
+        address: address.address,
+        success: (addr) => {
+          BMap.calculateDistance({
+            mode: 'straight',
+            from: {
+              latitude: lat,
+              longitude: lng
+            },
+            to: [{
+              latitude: addr.result.location.lat,
+              longitude: addr.result.location.lng
+            }],
+            success: (json) => {
+              console.log(json)
+              const jl = parseInt(json.result.elements[0].distance)
+              if (jl <= 1000) {
+                marksView.push(address)
+                addrArr.push({
+                  id: address.id,
+                  latitude: json.result.elements[0].to.lat,
+                  longitude: json.result.elements[0].to.lng,
+                  iconPath: imgUrl+"/location.png",
+                  width: '34px',
+                  height: '34px',
+                  rotate: 0,
+                  alpha: 1
+                })
+              }
+            }
+          })
+        }
+      })
+    }, 300);
+}

+ 7 - 2
nnzwminiapp/pages/map/map.wxml

@@ -30,11 +30,12 @@
     </view>
 
     <view class="right-map" id="right-map">
-      <map id="map" longitude="{{longitude}}"  latitude="{{latitude}}" scale="18"   markers="{{markers}}" class="map"></map>
+      <map id="map" longitude="{{longitude}}"  latitude="{{latitude}}" scale="18" bindmarkertap="markClick"   markers="{{markers}}" class="map"></map>
     </view>
 
     <view wx:if="{{showTraffic}}">
-      <view class="right-search" style="position: absolute; left: 22rpx; top: 257px; width: 708rpx; height: 300rpx; display: block; box-sizing: border-box; padding-top: 10rpx;">
+      <view class="right-search" style="position: absolute; left: 22rpx; top: 257px; width: 708rpx; height: 370rpx; display: block; box-sizing: border-box; padding-top: 10rpx;">
+        <view style="margin-left: 15rpx;padding: 10rpx;color: #5f5d5d;" bindtap="aroundEvent">附近一公里共有<text style="color: red;">{{marksNum}}</text>个办事地点</view>
         <t-tabs defaultValue="{{trafficType}}" bindchange="onchange" theme="tag" style="height: 292rpx; ">
           <t-tab-panel label="公交" value="0" style=" height: 180rpx; ">
             <include src="./quert"></include>
@@ -64,6 +65,10 @@
             <button type="button" class="back_btn" bindtap="backSearch">返回</button>
           </view>
           <view class="pad_box">
+            <view wx:if="{{searchInfo.isShow}}" class="matter-tab search-nav">
+            <view class="matter-tab-li {{searchInfo.navType == 0 ? 'active': ''}}" bindtap="searchTab" data-type="0">地点搜索</view>
+            <view class="matter-tab-li {{searchInfo.navType == 1 ? 'active': ''}}" bindtap="searchTab" data-type="1">事项搜索</view>
+          </view>
             <include wx:if="{{isList}}" src="./item"></include>
             <include wx:else src="./item-info"></include>
           </view>

+ 82 - 2
nnzwminiapp/pages/map/map.wxss

@@ -64,7 +64,7 @@ a {
   background-color: white;
   /* overflow-y: auto; */
   /* overflow-x: hidden; */
-  margin-top: 50px;
+  margin-top: 80px;
 }
 
 .right-map .map {
@@ -469,7 +469,7 @@ a {
 }
 
 .pad_box {
-  margin-top: 60rpx;
+  margin-top: 80rpx;
   width: 100%;
 }
 
@@ -1401,4 +1401,84 @@ a {
   width: 80rpx;
   height: 98rpx;
   margin-bottom: -15rpx;
+}
+.dept-title {
+  margin: 30rpx 15rpx;
+  font-size: 16px;
+  font-family: Microsoft YaHei;
+  font-weight: 500;
+}
+.dept-list {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, 30%);
+  grid-gap: 20rpx;
+  justify-content: center;
+  margin-bottom: 30rpx;
+}
+.dept-item {
+  width: 90%;
+  text-align: left;
+  border: 1rpx #176AB7 solid;
+  padding: 15rpx 5rpx;
+  color: #176AB7;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+.dept-list .active {
+  color: #009688;
+  border: 1rpx #009688 solid;
+}
+
+.matter-tab {
+  margin: 0 auto;
+  display: flex;
+  width: 95%;
+  border-bottom: 1rpx #d9dcdf solid;
+}
+.matter-tab .matter-tab-li {
+  width: 50%;
+  height: 60rpx;
+  text-align: center;
+}
+.matter-tab>.active {
+  color: #176AB7;
+  border-bottom: 1rpx #176AB7 solid;
+}
+.matter-content {
+  width: 95%;
+  margin: 0 auto;
+}
+.matter-content-item {
+  display: flex;
+  padding: 20rpx;
+  line-height: 40rpx;
+  border-bottom: 0.5rpx #d9dcdf solid;
+}
+.matter-content-item-round {
+  width: 10rpx;
+  height: 10rpx;
+  background-color: #176AB7;
+  border-radius: 50%;
+  margin-top: 15rpx;
+  margin-right: 15rpx;
+}
+.matter-page {
+  display: flex;
+  padding: 20rpx 30rpx;
+}
+.matter-page .matter-page-prev {
+  width: 50%;
+  text-align: left;
+}
+.matter-page .matter-page-next {
+  width: 50%;
+  text-align: right;
+}
+.matter-page .txt {
+  color: #d2d2d2;
+}
+.search-nav {
+  background-color: #fff;
+  padding-top: 20rpx;
 }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно