拖拽标记延时保存

main
wangxiaoshuang 2025-07-14 10:28:35 +08:00
parent 45a54d69a4
commit dab5a44f2d
1 changed files with 16 additions and 2 deletions

View File

@ -783,6 +783,7 @@ export default {
loadingText: null,
toolNames: ['Length', 'Bidirectional', 'RectangleROI', 'ArrowAnnotate', 'CircleROI', 'Eraser'],
// resetAnnotation: false , // 使
saveCustomAnnotationTimer: null,
//
downloadImageVisible: false,
@ -1540,7 +1541,11 @@ export default {
if (this.isNumber(operateStateEnum)) {
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
} else {
setTimeout(()=>{this.saveCustomAnnotation(annotation)},500)
if (this.saveCustomAnnotationTimer) {
clearTimeout(this.saveCustomAnnotationTimer)
this.saveCustomAnnotationTimer = null
}
this.saveCustomAnnotationTimer = setTimeout(()=>{this.saveCustomAnnotation(annotation)},500)
}
}
}
@ -1572,6 +1577,7 @@ export default {
params.Id = annotation.id ? annotation.id : ''
params.MeasureData = JSON.stringify(measureData)
params.NumberOfFrames = annotation.numberOfFrames
params.MarkId = annotation.annotationUID
const res = await submitCustomTag(params)
annotation.id = res.Result
})
@ -1600,7 +1606,11 @@ export default {
if (isBound || this.isNumber(operateStateEnum)) {
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].updateAnnotationToQuestion(annotation)
} else {
this.saveCustomAnnotation(annotation)
if (this.saveCustomAnnotationTimer) {
clearTimeout(this.saveCustomAnnotationTimer)
this.saveCustomAnnotationTimer = null
}
this.saveCustomAnnotationTimer = setTimeout(()=>{this.saveCustomAnnotation(annotation)},1000)
}
}
this.setToolsPassive()
@ -3216,6 +3226,10 @@ export default {
DicomEvent.$off('isCanActiveNoneDicomTool')
DicomEvent.$off('removeNoneDicomMeasureData')
DicomEvent.$off('addNoneDicomMeasureData')
if (this.saveCustomAnnotationTimer) {
clearTimeout(this.saveCustomAnnotationTimer)
this.saveCustomAnnotationTimer = null
}
}
}
</script>