Преглед изворни кода

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

xushiting пре 2 година
родитељ
комит
a9bfd39378

Разлика између датотеке није приказан због своје велике величине
+ 14538 - 29251
public/static/lib/potree/potree.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/static/lib/potree/potree.js.map


BIN
server/test/SS-t-P1d6CwREny2/depthmap/0.png


BIN
server/test/SS-t-P1d6CwREny2/depthmap/1.png


+ 78 - 0
server/test/SS-t-P1d6CwREny2/vision.json

@@ -0,0 +1,78 @@
+{
+	"sweepLocations":[
+		{
+			"id":0
+,			"uuid":"0"
+,			"pose":{
+				"rotation":{
+					"x":0.0099402410918
+,					"y":-0.0052124638916
+,					"z":0.5362945891017
+,					"w":0.8439562402918
+				}
+,				"translation":{
+					"x":-1.435437676282
+,					"y":0.4472168050176
+,					"z":-0.0004155
+				}
+			}
+,			"puck":{
+				"x":-1.435437676282
+,				"y":0.4472168050176
+,				"z":-1.187017335004
+			}
+,			"group":1
+,			"subgroup":0
+,			"device":0
+,			"subdevice":0
+,			"room":0
+,			"ggaLocation":{
+				"StatusIndicator":4
+,				"satellitesCount":6
+,				"lat":"22.3671900576173"
+,				"lon":"113.594955288729"
+,				"alt":"2.34775097575039"
+			}
+,			"visibles":[1]
+,			"visibles2":[1]
+,			"visibles3":[1]
+		}
+,		{
+			"id":1
+,			"uuid":"1"
+,			"pose":{
+				"rotation":{
+					"x":0.016293247687
+,					"y":-0.0084664498034
+,					"z":0.4251707911406
+,					"w":0.9049268742105
+				}
+,				"translation":{
+					"x":1.435437676282
+,					"y":-0.4472168050176
+,					"z":0.0004155
+				}
+			}
+,			"puck":{
+				"x":1.435437676282
+,				"y":-0.4472168050176
+,				"z":-1.186186335004
+			}
+,			"group":1
+,			"subgroup":0
+,			"device":1
+,			"subdevice":0
+,			"room":0
+,			"ggaLocation":{
+				"StatusIndicator":4
+,				"satellitesCount":6
+,				"lat":"22.3672075577527"
+,				"lon":"113.594932907667"
+,				"alt":"2.3738650418818"
+			}
+,			"visibles":[0]
+,			"visibles2":[0]
+,			"visibles3":[0]
+		}
+	]
+}

BIN
server/test/SS-t-P1d6CwREny2/vision.modeldata


+ 122 - 115
src/hook/custom/setup.ts

@@ -1,137 +1,144 @@
-import { SDK } from '@/sdk'
-import { watchEffect, watch, ref } from 'vue'
-import { Router } from 'vue-router'
-import { useCustom, useDisabled } from './hook'
+import { SDK } from "@/sdk";
+import { watchEffect, watch, ref } from "vue";
+import { Router } from "vue-router";
+import { useCustom, useDisabled } from "./hook";
 import {
-    laserModeStack,
-    disabledMap,
-    hotDisabledStack,
-    mapDisabledStack,
-    cloundDisabledStack,
-    fullViewStack,
-    spiltViewModeStack,
-    magnifierModeStack,
-    DisabledCom,
-    CustomCom,
-    customMap,
-    CustomMapStack,
-} from './preset'
+  laserModeStack,
+  disabledMap,
+  hotDisabledStack,
+  mapDisabledStack,
+  cloundDisabledStack,
+  fullViewStack,
+  spiltViewModeStack,
+  magnifierModeStack,
+  DisabledCom,
+  CustomCom,
+  customMap,
+  CustomMapStack,
+} from "./preset";
 
 // 全屏切换设置
 const fullScreenSetting = (sdk: SDK) => {
-    const disableSceneView = ref(false)
-    const disableMiniView = ref(false)
+  const disableSceneView = ref(false);
+  const disableMiniView = ref(false);
 
-    // 全屏切换
-    watch(
-        () => fullViewStack.current.value.value,
-        newFull => {
-            if (newFull === 'scene') {
-                mapDisabledStack.current.value === disableMiniView && mapDisabledStack.pop()
-                cloundDisabledStack.push(disableSceneView)
-                sdk.sceneFullShow()
-            } else {
-                cloundDisabledStack.current.value === disableSceneView && cloundDisabledStack.pop()
-                mapDisabledStack.push(disableMiniView)
-                sdk.mapFullShow()
-            }
-        },
-        { flush: 'sync' }
-    )
-}
+  // 全屏切换
+  watch(
+    () => fullViewStack.current.value.value,
+    (newFull) => {
+      if (newFull === "scene") {
+        mapDisabledStack.current.value === disableMiniView &&
+          mapDisabledStack.pop();
+        cloundDisabledStack.push(disableSceneView);
+        sdk.sceneFullShow();
+      } else {
+        cloundDisabledStack.current.value === disableSceneView &&
+          cloundDisabledStack.pop();
+        mapDisabledStack.push(disableMiniView);
+        sdk.mapFullShow();
+      }
+    },
+    { flush: "sync" }
+  );
+};
 
 // 分屏设置
 const spliceSetting = (sdk: SDK) => {
-    watch(
-        () => spiltViewModeStack.current.value.value,
-        (newSplice, oldSplice) => {
-            if (newSplice !== null) {
-                cloundDisabledStack.push(ref(false))
-                mapDisabledStack.push(ref(true))
-                hotDisabledStack.push(ref(true))
-                fullViewStack.push(ref('scene'))
-                sdk.openSplitScreen()
-                sdk.setSplitScreenSize(newSplice)
-            } else if (oldSplice) {
-                cloundDisabledStack.pop()
-                mapDisabledStack.pop()
-                hotDisabledStack.pop()
-                fullViewStack.pop()
-                sdk.setSplitScreenSize(0.5)
-                sdk.closeSplitScreen()
-            }
-        }
-    )
-}
+  watch(
+    () => spiltViewModeStack.current.value.value,
+    (newSplice, oldSplice) => {
+      if (newSplice !== null) {
+        cloundDisabledStack.push(ref(false));
+        mapDisabledStack.push(ref(true));
+        hotDisabledStack.push(ref(true));
+        fullViewStack.push(ref("scene"));
+        sdk.openSplitScreen();
+        sdk.setSplitScreenSize(newSplice);
+      } else if (oldSplice) {
+        cloundDisabledStack.pop();
+        mapDisabledStack.pop();
+        hotDisabledStack.pop();
+        fullViewStack.pop();
+        sdk.setSplitScreenSize(0.5);
+        sdk.closeSplitScreen();
+      }
+    }
+  );
+};
 
 // 放大镜模式
 const magnifierSetting = (sdk: SDK) => {
-    watch(
-        () => magnifierModeStack.current.value.value,
-        (magnifierMode, oldVal) => {
-            if (magnifierMode) {
-                fullViewStack.push(ref('scene'))
-                sdk.scene.openMagnifier()
-            } else if (oldVal) {
-                sdk.scene.closeMagnifier()
-                fullViewStack.pop()
-            }
-        }
-    )
-}
+  watch(
+    () => magnifierModeStack.current.value.value,
+    (magnifierMode, oldVal) => {
+      if (magnifierMode) {
+        fullViewStack.push(ref("scene"));
+        sdk.scene.openMagnifier();
+      } else if (oldVal) {
+        sdk.scene.closeMagnifier();
+        fullViewStack.pop();
+      }
+    }
+  );
+};
 
 export const setupSDK = (sdk: SDK) => {
-    // 基础设置
-    watchEffect(() => {
-        sdk.changeScene(!disabledMap[DisabledCom.Clound])
-    })
-    watchEffect(() => sdk.changeMap(!disabledMap[DisabledCom.Map]))
-    watchEffect(() => sdk.scene.changeMode(customMap[CustomCom.LaserMode]))
-    watchEffect(() => sdk.carry.setShowHots(!disabledMap[DisabledCom.Hot]))
-    watchEffect(() => sdk.carry.setShowMeasures(!disabledMap[DisabledCom.Measure]))
-    watchEffect(() => sdk.carry.setCoordType(disabledMap[DisabledCom.Coord] ? null : customMap[CustomCom.Coord]))
+  // 基础设置
+  watchEffect(() => {
+    sdk.changeScene(!disabledMap[DisabledCom.Clound]);
+  });
+  watchEffect(() => sdk.scene.changeMode(customMap[CustomCom.LaserMode]));
+  watchEffect(() => sdk.carry.setShowHots(!disabledMap[DisabledCom.Hot]));
+  watchEffect(() =>
+    sdk.carry.setShowMeasures(!disabledMap[DisabledCom.Measure])
+  );
+  watchEffect(() =>
+    sdk.carry.setCoordType(
+      disabledMap[DisabledCom.Coord] ? null : customMap[CustomCom.Coord]
+    )
+  );
 
-    fullScreenSetting(sdk)
-    spliceSetting(sdk)
-    magnifierSetting(sdk)
-}
+  fullScreenSetting(sdk);
+  spliceSetting(sdk);
+  magnifierSetting(sdk);
+};
 
 export type RouteCustomConfig = {
-    [key in any]: {
-        disabled?: DisabledCom[]
-        enabled?: DisabledCom[]
-        custom?: {
-            [key in CustomCom]?: CustomMapStack[key]['current']['value']
-        }
-    }
-}
+  [key in any]: {
+    disabled?: DisabledCom[];
+    enabled?: DisabledCom[];
+    custom?: {
+      [key in CustomCom]?: CustomMapStack[key]["current"]["value"];
+    };
+  };
+};
 
 export const setupRouteCustom = (router: Router, config: RouteCustomConfig) => {
-    const pops = []
-    const setting = name => {
-        const atom = config[name]
-        if (!atom) return
-        if (atom.custom) {
-            Object.keys(atom.custom).forEach((key: CustomCom) => {
-                pops.push(useCustom(key, atom.custom[key]))
-            })
-        }
+  const pops = [];
+  const setting = (name) => {
+    const atom = config[name];
+    if (!atom) return;
+    if (atom.custom) {
+      Object.keys(atom.custom).forEach((key: CustomCom) => {
+        pops.push(useCustom(key, atom.custom[key]));
+      });
+    }
 
-        if (atom.disabled) {
-            pops.push(useDisabled(atom.disabled, ref(true)))
-        }
+    if (atom.disabled) {
+      pops.push(useDisabled(atom.disabled, ref(true)));
+    }
 
-        if (atom.enabled) {
-            pops.push(useDisabled(atom.enabled, ref(false)))
-        }
+    if (atom.enabled) {
+      pops.push(useDisabled(atom.enabled, ref(false)));
     }
+  };
 
-    router.beforeEach((to, _, next) => {
-        while (pops.length) {
-            pops.pop()()
-        }
-        setting(to.name)
-        next()
-    })
-    setting(router.currentRoute.value.name)
-}
+  router.beforeEach((to, _, next) => {
+    while (pops.length) {
+      pops.pop()();
+    }
+    setting(to.name);
+    next();
+  });
+  setting(router.currentRoute.value.name);
+};

+ 0 - 3
src/hook/useLaser.ts

@@ -68,9 +68,6 @@ const relationStore = (sdk: SDK, { setting, setup }: typeof store) => {
   watchEffect(() => sdk.scene.changePointEdge(setting.edgeStrong));
   watchEffect(() => sdk.scene.changeDensityPercent(setting.detail));
 
-  watchEffect(() => {
-    sdk.setFloorplanEnable(!setup.disableFloorPan);
-  });
   watchEffect(
     () =>
       setup.pose &&

+ 0 - 1
src/preset/main.vue

@@ -247,7 +247,6 @@ onMounted(async () => {
 
 onUnmounted(() => {
   laser.value.scene.off("*");
-  laser.value.map.off("*");
 });
 </script>
 

+ 0 - 1
src/preset/traffic-main.vue

@@ -150,7 +150,6 @@ onMounted(async () => {
 
 onUnmounted(() => {
   laser.value?.scene.off("*");
-  laser.value?.map.off("*");
 });
 </script>
 

Разлика између датотеке није приказан због своје велике величине
+ 1224 - 2397
src/sdk/laser/core/enter.js


+ 0 - 2
src/sdk/types/sdk.ts

@@ -469,8 +469,6 @@ export type LaserSDK = {
   getEntityByPoint: (pos: Pos3D) => ModelModelAtom;
 
   // 设置地图可视
-  changeMap(show: boolean): void;
-  // 设置地图可视
   changeScene(show: boolean): void;
   // 是否禁用平面图
   setFloorplanEnable: (Enable: boolean) => void;

+ 0 - 7
src/views/sys/mouse-menu/index.vue

@@ -6,13 +6,6 @@
     @click="showHandler(sdk.scene, sceneMenus)"
     @select="(item, pos) => item.click(sdk.scene.getPointByScreen(), pos, false)"
   />
-  <MouseRight
-    v-if="mapMenus.length"
-    :options="mapMenus"
-    :mount="sdk.map.el"
-    @click="showHandler(sdk.map, mapMenus)"
-    @select="(item, pos) => item.click(sdk.map.getPointByScreen(), pos, true)"
-  />
 </template>
 
 <script setup lang="ts">