roadPhotos.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import {ref} from "vue";
  2. import {PhotoRaw} from "@/store/photos";
  3. import matruces from "@/utils/matruces";
  4. export type RoadPhotoTable = {
  5. arrivalTime: string,
  6. weather: string,
  7. conditions: string,
  8. location: string,
  9. illustrate: string,
  10. date: number,
  11. url?: string,
  12. compassAngle: number[]
  13. imageTransform: number[]
  14. }
  15. export type RoadPhoto = {
  16. id: string
  17. photoUrl: string
  18. url: string
  19. title: string
  20. time: number,
  21. table?: RoadPhotoTable,
  22. data: any
  23. sceneData: {
  24. measures: PhotoRaw['measures'],
  25. fixPoints: PhotoRaw['fixPoints'],
  26. basePoints: PhotoRaw['basePoints']
  27. baseLines: PhotoRaw['baseLines']
  28. }
  29. }
  30. export const getDefaultTable = (road): RoadPhotoTable => {
  31. return road.table ? { ...road.table } : {
  32. arrivalTime: "2020-10-12",
  33. weather: "晴天",
  34. conditions: "普通",
  35. location: "",
  36. imageTransform: matruces.translateMatrix(0, 0, 0),
  37. compassAngle: matruces.translateMatrix(0, 0, 0),
  38. illustrate: "说明:绘图比例为1:215,单位为米。车辆甲为小轿车,无车号。车辆乙为小轿车,无车号。选取道路边缘线为基准线,井盖为基准点。",
  39. other: "",
  40. }
  41. }
  42. export const roadPhotos = ref<RoadPhoto[]>([])