|
@@ -13,7 +13,7 @@ interface ServicePosition {
|
|
|
"id": number,
|
|
|
"tagId": number,
|
|
|
"modelId": number
|
|
|
- "tagPoint": SceneLocalPos,
|
|
|
+ "tagPoint": string,
|
|
|
}
|
|
|
|
|
|
export interface TaggingPosition {
|
|
@@ -30,14 +30,14 @@ const serviceToLocal = (position: ServicePosition, taggingId?: Tagging['id']): T
|
|
|
id: position.id.toString(),
|
|
|
modelId: position.modelId.toString(),
|
|
|
taggingId: taggingId || position.tagId.toString(),
|
|
|
- localPos: position.tagPoint
|
|
|
+ localPos: JSON.parse(position.tagPoint)
|
|
|
})
|
|
|
|
|
|
const localToService = (position: TaggingPosition, update = false): PartialProps<ServicePosition, 'id'> => ({
|
|
|
"id": update ? Number(position.id) : undefined,
|
|
|
"tagId": Number(position.taggingId),
|
|
|
"modelId": Number(position.modelId),
|
|
|
- "tagPoint": position.localPos,
|
|
|
+ "tagPoint": JSON.stringify(position.localPos),
|
|
|
})
|
|
|
|
|
|
|