瀏覽代碼

2023.7.21

nanMing 1 年之前
父節點
當前提交
5b933ecb7a

二進制
ruoyi-ui/src/assets/images/bigScreen/monitor.png


二進制
ruoyi-ui/src/assets/images/bigScreen/oldman.png


二進制
ruoyi-ui/src/assets/images/bigScreen/sqyljg.png


二進制
ruoyi-ui/src/assets/images/bigScreen/wlfw.png


二進制
ruoyi-ui/src/assets/images/bigScreen/yljg.png


二進制
ruoyi-ui/src/assets/images/bigScreen/zcd.png


+ 14 - 7
ruoyi-ui/src/views/bigScreen/resources/index.vue

@@ -131,8 +131,7 @@ export default {
 			showDrawer: false,  // 右侧模块显隐
 			pattern: 0,   // 模式选择
 
-			map: null,
-			markerList: [],
+			// map: null,
 			Icons: {
 				yljg: null,
 				sqyljg: null
@@ -171,12 +170,12 @@ export default {
 			this.Icons.yljg = new AMap.Icon({
 				size: new AMap.Size(50, 50),
 				imageSize: new AMap.Size(50, 50),
-				image: require('@/assets/images/bigScreen/wlfw.png')
+				image: require('@/assets/images/bigScreen/yljg.png')
 			})
 			this.Icons.sqyljg = new AMap.Icon({
 				size: new AMap.Size(50, 50),
 				imageSize: new AMap.Size(50, 50),
-				image: require('@/assets/images/bigScreen/yljg.png')
+				image: require('@/assets/images/bigScreen/sqyljg.png')
 			})
 		},
 
@@ -190,6 +189,7 @@ export default {
 		},
 
 		setMarker(data) {
+			console.log(data)
 			let markerList = []
 			this.setIcon()
 			data.forEach((item) => {
@@ -235,18 +235,25 @@ export default {
 					version: '2.0'
 				}
 			}).then((AMap) => {
-				this.map = new AMap.Map('container', {
+				let map = new AMap.Map('container', {
 					resizeEnable: true, //是否监控地图容器尺寸变化
 					mapStyle: 'amap://styles/blue',
 					showIndoorMap: true,
 					pitch: 60,
 					viewMode: '3D',
 					terrain: true,
+					center:[125.320113,43.833376],
 					zoom: 16,
 					zooms: [2, 22]
 				})
-				this.map.add(this.setMarker(markers))
-				this.map.setFitView()
+				map.add(this.setMarker(markers))
+				map.setFitView()
+				map.on('zoomend', () => {
+					console.log(map.getZoom())
+				})
+				map.on('moveend', () => {
+					console.log(map.getCenter())
+				})
 			})
 		},