Browse Source

可视化bug

彭宇 2 năm trước cách đây
mục cha
commit
b715dffaa7
2 tập tin đã thay đổi với 20 bổ sung9 xóa
  1. 7 0
      src/api/monitor.js
  2. 13 9
      src/views/monitor.vue

+ 7 - 0
src/api/monitor.js

@@ -15,3 +15,10 @@ export function selectCameraByDeptId(deptId) {
     data:{"deptId":deptId}
   })
 }
+// 获取重点区域
+export function selectKeyAreaList() {
+  return request({
+    url: '/center-data/importarea/listFegin',
+    method: 'get',
+  })
+}

+ 13 - 9
src/views/monitor.vue

@@ -75,16 +75,10 @@
 						<span>重点区域</span>
 					</div>
 					<div class="i-list-con h-25">
-						<div class="d-l-con" @click="">
+						<div class="d-l-con" v-for="(item,index) in keyAreaList" @click="">
 							<div class="d-l-l-text">
 								<i class="i-small"></i>
-								<h4>三门林场东</h4>
-							</div>
-						</div>
-						<div class="d-l-con" @click="">
-							<div class="d-l-l-text">
-								<i class="i-small"></i>
-								<h4>四家林场西</h4>
+								<h4>{{item.areaName}}</h4>
 							</div>
 						</div>
 					</div>
@@ -104,7 +98,8 @@
 <script>
 	import {
 		selectDeviceType,
-		selectCameraByDeptId
+		selectCameraByDeptId,
+    selectKeyAreaList
 	} from '@/api/monitor'
 
 	import supermap from '@/components/supermap' //超图
@@ -143,6 +138,7 @@
 		},
 		mounted() {
 			this.selectDeviceType()
+			this.selectKeyAreaList()
 		},
 		data() {
 			return {
@@ -159,6 +155,7 @@
 				visuForestCloudCameraBOList: [],
 				cameraMarkersList: [],
 				sourceData: [],
+        keyAreaList:[],//重点区域
 				iframeBoo: true,
 				open: false,
 				iframeVue: null,
@@ -297,6 +294,13 @@
 					}]
 				})
 			},
+      selectKeyAreaList() {
+        //获取重点区域
+        let that = this
+        selectKeyAreaList().then(res => {
+          that.keyAreaList=res
+        })
+      },
 			selectDeviceType(index) {
 				this.iconCurrentIndex1 = index
 				//获取左侧动态感知设备