Bladeren bron

事件列表点击定位层级放到最大,然后直接获取事件详情
网格化点击人员获取人员管理地图区域

彭宇 2 jaren geleden
bovenliggende
commit
1e6a3c6397
4 gewijzigde bestanden met toevoegingen van 54 en 61 verwijderingen
  1. 9 0
      src/api/leader.js
  2. 8 8
      src/views/datacenter.vue
  3. 4 3
      src/views/forest.vue
  4. 33 50
      src/views/leader.vue

+ 9 - 0
src/api/leader.js

@@ -25,6 +25,15 @@ export function getPlanList(userId) {
   })
 }
 
+
+// 获取林长管理对应地图
+export function getlinleaderMap(userId) {
+  return request({
+    url: '/center-data/linleader/getlinleaderMap/'+userId,
+    method: 'get',
+  })
+}
+
 // 巡林记录
 export function getRecordList(taskId) {
   return request({

+ 8 - 8
src/views/datacenter.vue

@@ -406,7 +406,7 @@ export default {
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_farm') { //林场
+            } else if (resourceTable == 'centerdata_t_forest_grid_level') { //林场
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-farm'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -422,21 +422,21 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>林场名称:' + res.data.resourceList[i].farmName + '</h4>' +
+                '                  <h4>林场名称:' + res.data.resourceList[i].name + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].farmPerson + '</h4>' +
+                '                  <h4>联系人:' + res.data.resourceList[i].person + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].farmTel + '</h4>' +
+                '                  <h4>电话:' + res.data.resourceList[i].tel + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
@@ -775,7 +775,7 @@ export default {
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (that.resourceTable == 'centerdata_t_forest_farm') { //林场
+            } else if (that.resourceTable == 'centerdata_t_forest_grid_level') { //林场
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-farm'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -791,21 +791,21 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>林场名称:' + res.data.resourceList[i].farmName + '</h4>' +
+                '                  <h4>林场名称:' + res.data.resourceList[i].name + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].farmPerson + '</h4>' +
+                '                  <h4>联系人:' + res.data.resourceList[i].person + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].farmTel + '</h4>' +
+                '                  <h4>电话:' + res.data.resourceList[i].tel + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'

+ 4 - 3
src/views/forest.vue

@@ -290,7 +290,7 @@
                   </el-input>
                 </div>
                 <div class="d-l-con padding-box nowrap" v-for="(item,index) in eventList"
-                     @click="dropLocation(item.latitude,item.longitude)" data-html2canvas-ignore>
+                     @click="dropLocation(item.latitude,item.longitude,item.eventCode)" data-html2canvas-ignore>
                   <div class="bgt-img">
                     <img v-if="item.picturePath!=null&&item.picturePath!=''&& item.pictureType=='image'"
                          :src="item.picturePath" style="width: 93px;height: 64px" loading="lazy"/>
@@ -630,8 +630,9 @@
     //     }
     //   })
     // },
-    dropLocation(lat, lng) {
-      this.$refs.supermap.dropLocation(lat, lng)
+    dropLocation(lat, lng,eventCode) {
+      this.$refs.supermap.dropLocation(lat, lng,18)
+      this.showEventDialog(eventCode)
     },
     showEventDialog(eventCode) {
       //事件信息弹出

+ 33 - 50
src/views/leader.vue

@@ -5,7 +5,7 @@
 		<!--主体-->
 		<div class="visual-body">
 			<!-- 左侧 -->
-			<div class="leftbar" :class="indentleft" ref="left">
+			<div class="leftbar" ref="left">
 				<div class="forthis">
 					<dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
 						<img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
@@ -63,7 +63,7 @@
 			<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
 				:mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
 			<!-- 右侧 -->
-			<div class="rightbar" :class="indentright" ref="right">
+			<div class="rightbar" ref="right">
 				<div class="forthis">
 					<dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
 						<img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
@@ -80,7 +80,7 @@
                            @click="getRecordList(item.id)">
                         <div class="d-l-l-text">
                           <el-tooltip class="item" effect="dark" placement="left"
-                                      style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
+                                      style="width:10rem ;" :disabled="(item.taskName!=null&&item.taskName.length <= 20)">
                             <div slot="content">
                               <h4 class="collapse-title" style="width: 200px;">
                                 {{ item.taskName}}</h4>
@@ -124,11 +124,6 @@
 
 			</div>
 			<vBottomMenu ref="bottomMenu"></vBottomMenu>
-			<!--      <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
-			<!--        <div class="mascot" ref="mascot" :class="indentStyle" @click="indent">-->
-			<!--          <img src="@/assets/images/mascot.png"/>-->
-			<!--        </div>-->
-			<!--      </el-tooltip>-->
 		</div>
 		<eventLocation ref="eventLocation"></eventLocation>
 		<TVWall ref="TVWall"></TVWall>
@@ -141,7 +136,8 @@
 		getPlanList,
 		getRecordList,
 		getPointList,
-		getRy
+		getRy,
+    getlinleaderMap
 	} from '@/api/leader'
 
 	import supermap from '@/components/supermap' //超图
@@ -164,12 +160,6 @@
 				iconCurrentIndex1: '1',
 				listCurrentIndex1: '',
 				listCurrentIndex2: '',
-				//左右缩进
-				indentStyle: '',
-				indentleft: '',
-				indentright: '',
-				indentText: '收起左右栏',
-				indentdisabled: false,
 				visuForestCloudRYBO: [], //人员类型列表
 				peopleList: [], //人员列表
 				connectList: [], //画线
@@ -280,45 +270,54 @@
 			},
 			//获取左侧人员列表
 			getForestLeader(linJob, linType) {
-				this.listCurrentIndex1 = ''
-				this.listCurrentIndex2 = ''
-				this.iconCurrentIndex1 = linJob
-				this.peopleList = []
+        let that = this
+				that.listCurrentIndex1 = ''
+				that.listCurrentIndex2 = ''
+				that.iconCurrentIndex1 = linJob
+				that.peopleList = []
 				getForestLeader(linJob, linType).then(res => {
-					this.peopleList = res.data
+					that.peopleList = res.data
 				})
-				this.connectList = []
-				this.$refs.supermap.clearC()
+				that.connectList = []
+				that.$refs.supermap.clearC()
 			},
 			//点击左侧人员列表获取 巡林计划
 			getPlanList(personId) {
-				this.showNothing = false;
-				this.recordList = [];
+        let that = this
+				that.showNothing = false;
+				that.recordList = [];
+        that.listCurrentIndex1 = personId
 				getPlanList(personId).then(res => {
-					this.xunLinListOne = res.data;
+					that.xunLinListOne = res.data;
+				})
+        getlinleaderMap(personId).then(res => {
+            that.choseLayerSwitching(res.data, true)
 				})
-				this.$refs.supermap.clearC()
+
+				that.$refs.supermap.clearC()
 			},
 			//点击右侧巡林计划获取 巡查记录
 			getRecordList(id) {
-				this.showNothing = false;
-				this.recordList = [];
+        let that = this
+				that.showNothing = false;
+				that.recordList = [];
 				getRecordList(id).then(res => {
-					this.recordList = res.data;
+					that.recordList = res.data;
 				})
-				this.$refs.supermap.clearC()
+				that.$refs.supermap.clearC()
 			},
 			//点击右侧巡查记录获取 巡查轨迹
 			getPointList(id) {
+        let that = this
 				getPointList(id).then(res => {
 					// console.log("落点",res.data);
-					this.setPointList(res);
+					that.setPointList(res);
 				})
 			},
 			//点击巡查轨迹时段 巡查轨迹落点
 			setPointList(res) {
 				let that = this;
-				this.connectList = [];
+				that.connectList = [];
 				console.log("落点", res.data)
 				if (res.data != null && res.data.length > 0) {
 					for (let i = 0; i < res.data.length; i++) {
@@ -326,11 +325,11 @@
 							lat: res.data[i].latitude,
 							lng: res.data[i].longitude
 						}
-						this.connectList.push(latlng)
+						that.connectList.push(latlng)
 					}
 					setTimeout(() => {
 						that.$refs.supermap.clearC()
-						that.$refs.supermap.setConnectList(this.connectList, 'red')
+						that.$refs.supermap.setConnectList(that.connectList, 'red')
 					}, 1000)
 				} else {
 					that.$refs.supermap.clearC()
@@ -345,22 +344,6 @@
 				}
 			},
 
-			//吉祥物收起左右框
-			indent() {
-				let list = document.getElementsByClassName('el-tooltip__popper')
-				list[list.length - 1].style.display = 'none'
-				if (this.indentStyle == '') {
-					this.indentStyle = 'indent-style'
-					this.indentleft = 'indent-left'
-					this.indentright = 'indent-right'
-					this.indentText = '展开左右栏'
-				} else if (this.indentText == '展开左右栏') {
-					this.indentStyle = ''
-					this.indentleft = ''
-					this.indentright = ''
-					this.indentText = '收起左右栏'
-				}
-			},
 			//人员chart
 			personnelChart() {
 				// 基于准备好的dom,初始化echarts实例