增加新系统跳转老系统地图
							parent
							
								
									dc45aaa786
								
							
						
					
					
						commit
						90ae203db2
					
				|  | @ -47,10 +47,14 @@ router.beforeEach((to, from, next) => { | ||||||
|   } else { |   } else { | ||||||
|     if (to.path == `/login` || to.path == '/apiBI' || to.path == '/apivideomanager') { |     if (to.path == `/login` || to.path == '/apiBI' || to.path == '/apivideomanager') { | ||||||
|       next() |       next() | ||||||
|  |     } else { | ||||||
|  |       if (to.path == '/map' && to.query.userId) { | ||||||
|  |         next() | ||||||
|       } else { |       } else { | ||||||
|         next(`/login`) |         next(`/login`) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |   } | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| function formatRoutes(routes, baseUrl) { | function formatRoutes(routes, baseUrl) { | ||||||
|  |  | ||||||
|  | @ -1259,6 +1259,7 @@ export default { | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
|  |     this.initUser() | ||||||
|     this.initMap() |     this.initMap() | ||||||
|     this.pointBoxCfd = loadMapBoxCfd() |     this.pointBoxCfd = loadMapBoxCfd() | ||||||
|     this.pointBoxCmt = loadCmtMapBox() |     this.pointBoxCmt = loadCmtMapBox() | ||||||
|  | @ -1362,6 +1363,23 @@ export default { | ||||||
|     //     }) |     //     }) | ||||||
|     //   }) |     //   }) | ||||||
|     // }, |     // }, | ||||||
|  |     initUser() { | ||||||
|  |       const { userId } = this.$route.query | ||||||
|  |       if (!userId) return | ||||||
|  |       requestFN( | ||||||
|  |         '/admin/v2/login', | ||||||
|  |         { userId } | ||||||
|  |       ).then((res) => { | ||||||
|  |         console.log(res) | ||||||
|  |         if (res.result !== 'success') { | ||||||
|  |           alert('登录失败') | ||||||
|  |           window.close() | ||||||
|  |         } | ||||||
|  |       }).catch((e) => { | ||||||
|  |         alert('登录失败') | ||||||
|  |         window.close() | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|     initMap() { |     initMap() { | ||||||
|       viewer = new Cesium.Viewer('cesiumContainer', { |       viewer = new Cesium.Viewer('cesiumContainer', { | ||||||
|         // terrainProvider: Cesium.createWorldTerrain() |         // terrainProvider: Cesium.createWorldTerrain() | ||||||
|  | @ -1425,6 +1443,13 @@ export default { | ||||||
|       //     } |       //     } | ||||||
|       //   } |       //   } | ||||||
|       // }, 1000) |       // }, 1000) | ||||||
|  |       const { id, longitude, latitude, CORP_INFO_ID, type } = this.$route.query | ||||||
|  | 
 | ||||||
|  |       if (type === 'newToOld') { | ||||||
|  |         setTimeout(() => { | ||||||
|  |           this.clickPort({ id, longitude, latitude, height: 10000, CORP_INFO_ID }) | ||||||
|  |         }, 1000) | ||||||
|  |       } | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     loadTilesetHandler() { |     loadTilesetHandler() { | ||||||
|  | @ -1962,6 +1987,10 @@ export default { | ||||||
|     handleClickRightTools(index) { |     handleClickRightTools(index) { | ||||||
|       if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check |       if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check | ||||||
|       if (index === 0) { |       if (index === 0) { | ||||||
|  |         if (this.$route.query.userId) { | ||||||
|  |           window.close() | ||||||
|  |           return | ||||||
|  |         } | ||||||
|         if (this.gangkouActive === '00004') { |         if (this.gangkouActive === '00004') { | ||||||
|           // if (this.fwebsocket) { |           // if (this.fwebsocket) { | ||||||
|           //   this.fwebsocket.close() |           //   this.fwebsocket.close() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue