Jelajahi Sumber

修改指挥终端拖拽

xiaoyue5430 3 tahun lalu
induk
melakukan
601d8ef862

+ 0 - 57
spring-cloud/server-page/src/main/resources/static/ipad/index_zfzd.html

@@ -81,62 +81,5 @@
 		</div>
 		<div class="cont" style="display:none;position: absolute;bottom:1%;z-index: 999;height: 11%;transform: translate(-50%,-50%);opacity: 0.6;"></div>
 		<script type="module" src="js/basic/direct/index.js"></script>
-		<!-- <script src="lib/jquery.min.js" type="text/javascript" charset="utf-8"></script> -->
-		<!-- <script type="text/javascript">
-			$(".slide-item").on({
-				touchstart:function(e){
-					// 获取长按点距离容器左右的距离
-					var thatItem = this
-					tmerSw = setTimeout(function(){
-						//禁用轮播图
-						// that.swiperObj.disable()
-						initX = $(thatItem)[0].offsetLeft + $(thatItem)[0].clientWidth/2
-						$(".cont").css({"left":initX,"top":"90%"})
-						$(".cont").css("display","block").empty()
-						// 将长按的元素复制到容器中
-						var copyEl = $.clone($(thatItem)[0])
-						$(".cont").append(copyEl)
-						// 获取容器的初始位置值
-						// 移动容器
-						$(thatItem).on("touchmove",function(e1){
-							swX = e1.changedTouches[0].clientX
-							swY = e1.changedTouches[0].clientY
-							$(".cont").css({"left":swX,"top":swY})
-						})
-						idenSw = 1
-					},500)
-					
-					// that.swiperObj.on("touchMove",function(swiper,e){
-					// 	$(thatItem).off("touchmove")
-					// 	clearTimeout(tmerSw)
-					// })
-					
-				},
-				touchend:function(e){
-					// 判断是否长按
-					clearTimeout(tmerSw)
-					if(idenSw == 0){
-						console.log("取消长按")
-					}else{
-						// 获取当前画面的可放置区域
-						var curFrameWidth = $("iframe[id=mainIframe]")[0].clientWidth
-						var curFrameHeight = $("iframe[id=mainIframe]")[0].clientHeight + $(".header")[0].clientHeight + $(".cur_title")[0].clientHeight
-						var minX = 0
-						var maxX = curFrameWidth
-						var minY = 0
-						var maxY = curFrameHeight
-						
-						if(minX < swX && minY < swY && maxX > swX && maxY > swY){
-							console.log("当前页面")
-						}else{
-							console.log("未拖动到当前页面,无法替换当前页面")
-						}
-						//启用轮播图
-						$(".cont").css({"display":"none"})
-					}
-					idenSw = 0
-				}
-			})
-		</script> -->
 	</body>
 </html>

+ 20 - 48
spring-cloud/server-page/src/main/resources/static/ipad/js/basic/direct/index.js

@@ -129,56 +129,28 @@ const UI = {
 					const parentIndex = $('.foot_tab_item_active').attr('data-index');
 					const index = $(e.currentTarget).attr('data-index');
 					const data = UI.sceneData[parentIndex].sceneThemeList[index];
-					that.webSocket.send(JSON.stringify({
-						code: that.DEVICE_CODE_GROUP[5],
-						direct: 'openUrl',
-						content: {
-							url: data.systemInfo.login_address,
-							account: data.systemInfo.login_account,
-							password: data.systemInfo.password,
-							type: data.systemInfo.login_mode == 10 ? 1 : 0,
-							path: UI.DPZHD_PATH + 'browser/login/zhzxzhglpt'
+					// that.webSocket.send(JSON.stringify({
+					// 	code: that.DEVICE_CODE_GROUP[5],
+					// 	direct: 'openUrl',
+					// 	content: {
+					// 		url: data.systemInfo.login_address,
+					// 		account: data.systemInfo.login_account,
+					// 		password: data.systemInfo.password,
+					// 		type: data.systemInfo.login_mode == 10 ? 1 : 0,
+					// 		path: UI.DPZHD_PATH + 'browser/login/zhzxzhglpt'
+					// 	}
+					// }));
+					util.get({
+						url: DPZHD_PATH + 'browser/jjxdlt/switch',
+						data: {
+							id: data.systemInfo.system_id
+						},
+						success: function(res) {
+							console.log(res)
 						}
-					}));
+					});
 				}else{
-					// 获取当前画面的可放置区域
-					var curFrameWidth = $("iframe[id=mainIframe]")[0].clientWidth
-					var curFrameHeight = $("iframe[id=mainIframe]")[0].clientHeight + $(".header")[0].clientHeight + $(".cur_title")[0].clientHeight
-					var minX = 0
-					var maxX = curFrameWidth
-					var minY = 0
-					var maxY = curFrameHeight
-					
-					if(minX < swX && minY < swY && maxX > swX && maxY > swY){
-						const parentIndex = $('.foot_tab_item_active').attr('data-index');
-						const index = $(e.currentTarget).attr('data-index');
-						const data = UI.sceneData[parentIndex].sceneThemeList[index];
-						// that.webSocket.send(JSON.stringify({
-						// 	code: that.DEVICE_CODE_GROUP[5],
-						// 	direct: 'openUrl',
-						// 	content: {
-						// 		url: data.systemInfo.login_address,
-						// 		account: data.systemInfo.login_account,
-						// 		password: data.systemInfo.password,
-						// 		type: data.systemInfo.login_mode == 10 ? 1 : 0,
-						// 		path: UI.DPZHD_PATH + 'browser/login/zhzxzhglpt'
-						// 	}
-						// }));
-						util.get({
-							url: DPZHD_PATH + 'browser/jjxdlt/switch',
-							data: {
-								id: data.systemInfo.system_id
-							},
-							success: function(res) {
-								console.log(res)
-							}
-						});
-					}else{
-						console.log("未拖动到当前页面,无法替换当前页面")
-					}
-					//启用轮播图
-					that.swiperObj.enable()
-					$(".cont").css({"display":"none"})
+					console.log("未拖动到当前页面,无法替换当前页面")
 				}
 				//启用轮播图
 				// that.swiperObj.enable()