|
|
|
@@ -1331,7 +1331,8 @@ export default {
|
|
|
|
|
const { annotation } = e.detail
|
|
|
|
|
if (!annotation.highlighted) return
|
|
|
|
|
if (!annotation) return
|
|
|
|
|
// if (!annotation.annotationId) return
|
|
|
|
|
const savedAnnotationId = annotation.id || annotation.annotationId
|
|
|
|
|
if (!savedAnnotationId && annotation.metadata.toolName !== 'Lengthscale') return
|
|
|
|
|
let i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
|
|
|
|
if (i === -1 && annotation.metadata.toolName !== 'Lengthscale') {
|
|
|
|
|
this.setToolsPassive()
|
|
|
|
@@ -1482,6 +1483,7 @@ export default {
|
|
|
|
|
try {
|
|
|
|
|
const measureData = Object.assign({}, annotation)
|
|
|
|
|
const params = {}
|
|
|
|
|
const savedAnnotationId = annotation.id || annotation.annotationId
|
|
|
|
|
const i = this.viewportInfos.findIndex(i => i.index === this.activeCanvasIndex)
|
|
|
|
|
this.loading = true
|
|
|
|
|
await this.getScreenshots({
|
|
|
|
@@ -1491,7 +1493,7 @@ export default {
|
|
|
|
|
this.loading = false
|
|
|
|
|
const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str)
|
|
|
|
|
let picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
|
|
|
|
if (annotation.id) params.Id = annotation.id
|
|
|
|
|
if (savedAnnotationId) params.Id = savedAnnotationId
|
|
|
|
|
if (!isNaN(parseFloat(ps))) params.Proportion = ps
|
|
|
|
|
params.PicturePath = picturePath
|
|
|
|
|
params.Path = annotation.path || ''
|
|
|
|
@@ -1505,6 +1507,7 @@ export default {
|
|
|
|
|
const res = await addNoneDicomMark(params)
|
|
|
|
|
annotation.markId = params.MarkId
|
|
|
|
|
annotation.id = res.Result
|
|
|
|
|
annotation.annotationId = res.Result
|
|
|
|
|
if (!isNaN(parseFloat(ps))) this.$emit('getEcrf', { type: "changePlottingScaleChangeAnswer", VisitTaskId: this.taskInfo.VisitTaskId, noneDicomFileId: annotation.noneDicomFileId, path: annotation.path || '', picturePath, psArr: this.psArr, isRemovePlottingScale: ps < 0 ? true : false })
|
|
|
|
|
|
|
|
|
|
this.$emit('getMarkedFileIds', { type: "add", visitTaskId: this.taskInfo.VisitTaskId, fileId: annotation.noneDicomFileId })
|
|
|
|
@@ -2154,6 +2157,14 @@ export default {
|
|
|
|
|
if (i === -1) return
|
|
|
|
|
if (this.curOperation.type === 'Modified') {
|
|
|
|
|
let annotation = this.curOperation.annotation
|
|
|
|
|
const savedAnnotationId = annotation.id || annotation.annotationId
|
|
|
|
|
if (!savedAnnotationId && annotation.metadata.toolName !== 'Lengthscale') {
|
|
|
|
|
this.curOperation = {
|
|
|
|
|
type: '',
|
|
|
|
|
annotation: null
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (annotation.metadata.toolName === 'Lengthscale') {
|
|
|
|
|
this.$emit('getEcrf', { type: "verifyFileIsBound", VisitTaskId: this.taskInfo.VisitTaskId, annotation })
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
@@ -2176,6 +2187,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
if ((annotation.metadata.toolName === 'ArrowAnnotate' && annotation.data.label === 'Annotation') || annotation.data.label === '') {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.saveCustomAnnotation(annotation)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|