|
|
|
|
@ -1168,7 +1168,9 @@ import {
|
|
|
|
|
getLocalPositionRelativeToP4,
|
|
|
|
|
parseTime
|
|
|
|
|
} from '@/utils/tool'
|
|
|
|
|
const formUrl = 'https://192.168.1.123:5000/'
|
|
|
|
|
import {ScreenOrientation} from '@capacitor/screen-orientation';
|
|
|
|
|
import { StatusBar, Style } from '@capacitor/status-bar';
|
|
|
|
|
const formUrl = 'http://192.168.1.123:5000/'
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
const date1 = ref([])
|
|
|
|
|
@ -1350,7 +1352,7 @@ const table1Current1 = (e,) => {
|
|
|
|
|
// ws连接
|
|
|
|
|
const getSocket = () => {
|
|
|
|
|
|
|
|
|
|
const socket = new WebSocket("wss://192.168.1.123:7789/ws");
|
|
|
|
|
const socket = new WebSocket("ws://192.168.1.123:7789/ws");
|
|
|
|
|
|
|
|
|
|
socket.addEventListener("open", () => {
|
|
|
|
|
// console.log("✅ WebSocket 连接成功");
|
|
|
|
|
@ -2570,6 +2572,27 @@ onMounted(() => {
|
|
|
|
|
getShildTableList()
|
|
|
|
|
getObstacleList()
|
|
|
|
|
// testFun()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function lockLandscapeIfSmallWidth() {
|
|
|
|
|
const w = window.innerWidth;
|
|
|
|
|
|
|
|
|
|
if (w < 700) {
|
|
|
|
|
// 锁定横屏
|
|
|
|
|
ScreenOrientation.lock({orientation: 'landscape'});
|
|
|
|
|
StatusBar.hide();
|
|
|
|
|
} else {
|
|
|
|
|
// 允许自由旋转
|
|
|
|
|
ScreenOrientation.unlock();
|
|
|
|
|
StatusBar.show();
|
|
|
|
|
StatusBar.setStyle({ style: Style.Default });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化执行一次
|
|
|
|
|
lockLandscapeIfSmallWidth();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
const testFun = () => {
|
|
|
|
|
let areaData111 = [
|
|
|
|
|
|