accidentPhotos.ts 725 B

1234567891011121314151617181920212223242526272829303132
  1. import { ref, watch, watchEffect } from "vue";
  2. import type { PhotoRaw } from "./photos";
  3. export type AccidentPhoto = {
  4. id: string;
  5. photoUrl: string;
  6. title: string;
  7. url: string;
  8. time: number;
  9. data: any;
  10. updateTime?: number;
  11. type?: string;
  12. sceneData: {
  13. meterPerPixel: number;
  14. measures: PhotoRaw["measures"];
  15. fixPoints: PhotoRaw["fixPoints"];
  16. basePoints: PhotoRaw["basePoints"];
  17. baseLines: PhotoRaw["baseLines"];
  18. };
  19. };
  20. export const types = ["概览照片", "中心照片", "细目照片", "方位照片"];
  21. export const accidentPhotos = ref<AccidentPhoto[]>([]);
  22. watch(
  23. accidentPhotos,
  24. (val) => {
  25. console.error(accidentPhotos.value[1]);
  26. },
  27. { deep: true, flush: "sync" }
  28. );