Quellcode durchsuchen

新增历史记录和实时记录的显隐

wangfumin vor 4 Tagen
Ursprung
Commit
4008950199
3 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen
  1. 2 0
      src/sdk/sdk.ts
  2. 6 2
      src/views/guide/index.vue
  3. 6 1
      src/views/positioning/index.vue

+ 2 - 0
src/sdk/sdk.ts

@@ -229,6 +229,8 @@ export interface SDK {
   generateAniPathData: () => any
   startRecordPath: () => any
   setFollowDevice: (macId: any) => void
+  setHisPathDisplay: (display: boolean) => void
+  setLivePathDisplay: (display: boolean) => void
 }
 
 export type PathProps = {

+ 6 - 2
src/views/guide/index.vue

@@ -37,11 +37,11 @@
 import { RightFillPano } from "@/layout";
 import GuideEdit from "./guide/edit.vue";
 import PathEdit from "./path/edit.vue";
-import { nextTick, reactive, ref, watchEffect } from "vue";
+import { nextTick, reactive, ref, watchEffect, onMounted } from "vue";
 import { guides, isEdit, paths } from "@/store";
 import router from "@/router";
 import { currentIsFullView } from "@/utils/full";
-import { SDK, sdk as _sdk } from "@/sdk";
+import { sdk } from "@/sdk";
 
 const current = ref("path");
 const tabs = reactive([
@@ -62,6 +62,10 @@ const quiskAdd = async (key: string) => {
     quiskObj.value.add();
   }
 };
+onMounted(() => {
+  sdk.setHisPathDisplay(false)
+  sdk.setLivePathDisplay(false)
+});
 </script>
 
 <style lang="scss" scoped>

+ 6 - 1
src/views/positioning/index.vue

@@ -32,7 +32,7 @@
 import { RightFillPano } from "@/layout";
 import { postAddPathInPosition, postInsertAnimationModelInPosition } from "@/api";
 import mediaList from "./components/mediaList.vue";
-import { nextTick, ref, onUnmounted } from "vue";
+import { nextTick, ref, onMounted, onUnmounted } from "vue";
 import { positionList, paths, initialPaths } from "@/store";
 import { initialAnimationModels } from "@/store/animation";
 import { sdk } from "@/sdk";
@@ -44,6 +44,11 @@ const startTime = ref<number>(0);
 const endTime = ref<number>(0);
 const recordingTime = ref<number>(0);
 
+onMounted(() => {
+  sdk.setHisPathDisplay(true)
+  sdk.setLivePathDisplay(true)
+});
+
 nextTick(() => {
   //   enterEdit();
 });