import {ref} from "vue"; import {PhotoRaw} from "@/store/photos"; import matruces from "@/utils/matruces"; export type RoadPhotoTable = { arrivalTime: string, weather: string, conditions: string, location: string, illustrate: string, date: number, url?: string, compassAngle: number[] imageTransform: number[] } export type RoadPhoto = { id: string photoUrl: string url: string title: string time: number, table?: RoadPhotoTable, data: any sceneData: { measures: PhotoRaw['measures'], fixPoints: PhotoRaw['fixPoints'], basePoints: PhotoRaw['basePoints'] baseLines: PhotoRaw['baseLines'] } } export const getDefaultTable = (road): RoadPhotoTable => { return road.table ? { ...road.table } : { arrivalTime: "2020-10-12", weather: "晴天", conditions: "普通", location: "", imageTransform: matruces.translateMatrix(0, 0, 0), compassAngle: matruces.translateMatrix(0, 0, 0), illustrate: "说明:绘图比例为1:215,单位为米。车辆甲为小轿车,无车号。车辆乙为小轿车,无车号。选取道路边缘线为基准线,井盖为基准点。", other: "", } } export const roadPhotos = ref([])