accidentPhotos.ts 681 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. type?: string
  11. sceneData: {
  12. meterPerPixel: number
  13. measures: PhotoRaw['measures'],
  14. fixPoints: PhotoRaw['fixPoints'],
  15. basePoints: PhotoRaw['basePoints']
  16. baseLines: PhotoRaw['baseLines']
  17. }
  18. }
  19. export const types = [
  20. "概览照片",
  21. "中心照片",
  22. "细目照片",
  23. "方位照片"
  24. ]
  25. export const accidentPhotos = ref<AccidentPhoto[]>([])
  26. watch(accidentPhotos, (val) => {
  27. console.error(accidentPhotos.value[1])
  28. }, { deep: true, flush: "sync"})