|  |  | @ -63,7 +63,6 @@ function Index (props) { | 
			
		
	
		
			
				
					|  |  |  |         const mainColor = "rgb(249,179,45)" | 
			
		
	
		
			
				
					|  |  |  |         if (type == 'xy') { | 
			
		
	
		
			
				
					|  |  |  |             // xy 视图
 | 
			
		
	
		
			
				
					|  |  |  |             console.log(xyCvs, xyCvs.current, canvasHeight); | 
			
		
	
		
			
				
					|  |  |  |             const xyCtx = xyCvs.current.getContext("2d"); | 
			
		
	
		
			
				
					|  |  |  |             xyCvs.current.height = canvasHeight | 
			
		
	
		
			
				
					|  |  |  |             xyCvs.current.width = canvasWidth | 
			
		
	
	
		
			
				
					|  |  | @ -434,13 +433,12 @@ function Index (props) { | 
			
		
	
		
			
				
					|  |  |  |         dispatch(getCrane()) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         // 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         ws = new WebSocket(`ws://10.8.30.183:4100/${ApiTable.dataLive}`); //建立websocket连接
 | 
			
		
	
		
			
				
					|  |  |  |         const root = window.FS_API_ROOT | 
			
		
	
		
			
				
					|  |  |  |         ws = new WebSocket(`${root.replace('http', 'ws')}/${ApiTable.dataLive}`); //建立websocket连接
 | 
			
		
	
		
			
				
					|  |  |  |         ws.onopen = function (e) { | 
			
		
	
		
			
				
					|  |  |  |             console.log("websocket 连接成功"); | 
			
		
	
		
			
				
					|  |  |  |             interval = setInterval(() => { | 
			
		
	
		
			
				
					|  |  |  |                 // console.log("发送心跳保持长连接不超时断开");
 | 
			
		
	
		
			
				
					|  |  |  |                 this.send(JSON.stringify({ "act": "ma_get_active_devices" })); | 
			
		
	
		
			
				
					|  |  |  |                 this.send(JSON.stringify({ "act": "long_live" })); | 
			
		
	
		
			
				
					|  |  |  |             }, 20000);//20秒一次
 | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         ws.onerror = e => { | 
			
		
	
	
		
			
				
					|  |  | @ -448,7 +446,6 @@ function Index (props) { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         ws.onmessage = evt => { | 
			
		
	
		
			
				
					|  |  |  |             let msg = JSON.parse(evt.data); | 
			
		
	
		
			
				
					|  |  |  |             console.log(msg); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             if (msg) { | 
			
		
	
		
			
				
					|  |  |  |                 setCraneParams(msg) | 
			
		
	
	
		
			
				
					|  |  | @ -464,7 +461,6 @@ function Index (props) { | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     }, []) | 
			
		
	
		
			
				
					|  |  |  |     console.log(darkColor, darkModde ? darkColor.textColor : 'auto'); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     const cardStyle = { | 
			
		
	
		
			
				
					|  |  |  |         boxShadow: `0 0 10px ${darkModde ? darkColor.shadow : 'rgba(0, 0, 0, 0.2)'}`, | 
			
		
	
	
		
			
				
					|  |  | 
 |