增加新系统跳转老系统地图
							parent
							
								
									dc45aaa786
								
							
						
					
					
						commit
						90ae203db2
					
				|  | @ -48,7 +48,11 @@ router.beforeEach((to, from, next) => { | |||
|     if (to.path == `/login` || to.path == '/apiBI' || to.path == '/apivideomanager') { | ||||
|       next() | ||||
|     } else { | ||||
|       next(`/login`) | ||||
|       if (to.path == '/map' && to.query.userId) { | ||||
|         next() | ||||
|       } else { | ||||
|         next(`/login`) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| }) | ||||
|  |  | |||
|  | @ -1259,6 +1259,7 @@ export default { | |||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.initUser() | ||||
|     this.initMap() | ||||
|     this.pointBoxCfd = loadMapBoxCfd() | ||||
|     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() { | ||||
|       viewer = new Cesium.Viewer('cesiumContainer', { | ||||
|         // terrainProvider: Cesium.createWorldTerrain() | ||||
|  | @ -1425,6 +1443,13 @@ export default { | |||
|       //     } | ||||
|       //   } | ||||
|       // }, 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() { | ||||
|  | @ -1962,6 +1987,10 @@ export default { | |||
|     handleClickRightTools(index) { | ||||
|       if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check | ||||
|       if (index === 0) { | ||||
|         if (this.$route.query.userId) { | ||||
|           window.close() | ||||
|           return | ||||
|         } | ||||
|         if (this.gangkouActive === '00004') { | ||||
|           // if (this.fwebsocket) { | ||||
|           //   this.fwebsocket.close() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue