|
@@ -21,9 +21,8 @@
|
|
|
import { RightFillPano } from "@/layout";
|
|
|
import { postAddPathInPosition } from '@/api'
|
|
|
import mediaList from "./components/mediaList.vue";
|
|
|
-import { nextTick, reactive, ref, watchEffect, onUnmounted } from "vue";
|
|
|
-import { positionList, paths, enterOld, enterEdit } from "@/store";
|
|
|
-import { loadPack } from '@/utils'
|
|
|
+import { nextTick, ref, onUnmounted } from "vue";
|
|
|
+import { positionList, paths, initialPaths } from "@/store";
|
|
|
import { sdk } from "@/sdk";
|
|
|
|
|
|
const isRecord = ref(false);
|
|
@@ -79,9 +78,13 @@ const startRecord = (type: string) => {
|
|
|
// 这里调path接口传路线数据过去,有几个设备就生成几个path
|
|
|
console.log(paths, 8888)
|
|
|
let positionPaths = sdk.generateAniPathData() || []
|
|
|
- positionPaths.forEach((positionPath: any) => {
|
|
|
- postAddPathInPosition(positionPath, startTime.value, endTime.value)
|
|
|
+ positionPaths.forEach(async(positionPath: any) => {
|
|
|
+ await postAddPathInPosition(positionPath, startTime.value, endTime.value)
|
|
|
})
|
|
|
+ //获取一次列表
|
|
|
+ setTimeout(async () => {
|
|
|
+ await initialPaths()
|
|
|
+ }, 500)
|
|
|
// positionList.value.forEach((pos: any) => {
|
|
|
// // 寻找当前设备对应的path
|
|
|
// let positionPath = positionPaths.find((path: any) =>{return '00' + pos.macId == path.id})
|