标注序列图标维护
continuous-integration/drone/push Build is passing Details

uat
caiyiling 2025-04-18 16:46:27 +08:00
parent b0ae3cbd27
commit c657bb8783
2 changed files with 35 additions and 7 deletions

View File

@ -25,6 +25,7 @@
v-if="selectArr.includes(s.VisitTaskId) && s.StudyList.length > 0" v-if="selectArr.includes(s.VisitTaskId) && s.StudyList.length > 0"
:ref="s.VisitTaskId" :ref="s.VisitTaskId"
:visit-task-info="s" :visit-task-info="s"
:markedSeriesIds="markedSeriesIds"
@activeSeries="activeSeries" @activeSeries="activeSeries"
/> />
@ -573,7 +574,8 @@ export default {
lastViewportTaskId: '', lastViewportTaskId: '',
digitPlaces: 2, digitPlaces: 2,
instanceInfo: {}, instanceInfo: {},
lastViewportTaskIds: [] lastViewportTaskIds: [],
markedSeriesIds: []
} }
}, },
computed: { computed: {
@ -711,7 +713,16 @@ export default {
if (!this.selectArr.includes(item.VisitTaskId)) { if (!this.selectArr.includes(item.VisitTaskId)) {
this.selectArr.push(item.VisitTaskId) this.selectArr.push(item.VisitTaskId)
} }
if (item.IsCurrentTask) {
this.markedSeriesIds = []
annotations.map(i=> {
if (i.MeasureData && i.MeasureData.seriesId) {
this.markedSeriesIds.push(i.MeasureData.seriesId)
}
})
}
} }
this.visitTaskList.push({ this.visitTaskList.push({
...item, ...item,
StudyList: studyList, StudyList: studyList,
@ -1075,7 +1086,6 @@ export default {
}) })
}, },
addAnnotationListeners() { addAnnotationListeners() {
console.log(toolsEvents)
const debouncedCallback = this.debounce((evt) => { const debouncedCallback = this.debounce((evt) => {
this.annotationModifiedListener(evt) this.annotationModifiedListener(evt)
}, 100) }, 100)
@ -1109,7 +1119,7 @@ export default {
console.log(arr) console.log(arr)
}, },
annotationAddedListener(e) { annotationAddedListener(e) {
console.log('annotationAddedListener', e)
}, },
annotationCompletedListener(e) { annotationCompletedListener(e) {
console.log('Completed') console.log('Completed')
@ -1128,9 +1138,12 @@ export default {
annotation.sliceThickness = series.SliceThickness annotation.sliceThickness = series.SliceThickness
annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame) annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame)
annotation.markTool = annotation.metadata.toolName annotation.markTool = annotation.metadata.toolName
// this.$refs['ecrf'].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) // this.$refs['ecrf'].setAnnotation({ annotation, toolName: annotation.metadata.toolName })
this.$refs[`ecrf_${this.lastViewportTaskId}`][0].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) this.$refs[`ecrf_${this.lastViewportTaskId}`][0].setAnnotation({ annotation, toolName: annotation.metadata.toolName })
this.markedSeriesIds.push(series.Id)
} }
this.setToolsPassive() this.setToolsPassive()
}, },
annotationModifiedListener(e) { annotationModifiedListener(e) {
@ -1147,7 +1160,16 @@ export default {
this.setToolsPassive() this.setToolsPassive()
}, },
annotationRemovedListener(e) { annotationRemovedListener(e) {
if (this.readingTaskState === 2) return
const { annotation } = e.detail
if (!annotation) return
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
if (index !== -1) {
this.markedSeriesIds.splice(index, 1)
}
}
console.log(this.markedSeriesIds)
}, },
removeAnnotation(annotation) { removeAnnotation(annotation) {
cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID) cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID)

View File

@ -48,7 +48,7 @@
<div class="dicom-list-container"> <div class="dicom-list-container">
<div <div
v-for="(series, i) in study.SeriesList" v-for="(series, i) in study.SeriesList"
:key="i" :key="series.Id"
style="position:relative;margin-top:1px;" style="position:relative;margin-top:1px;"
@click="activeSeries(series, i, index)" @click="activeSeries(series, i, index)"
> >
@ -80,8 +80,8 @@
</span> </span>
<span v-show="series.LoadedImageCount >= series.InstanceCount">{{ series.Modality }}: {{ series.InstanceCount }} image</span> <span v-show="series.LoadedImageCount >= series.InstanceCount">{{ series.Modality }}: {{ series.InstanceCount }} image</span>
</div> </div>
<div v-show="series.IsBeMark"> <div style="line-height: 16px;">
<i class="el-icon-star-on" style="font-size: 16px;color: #ff5722;" /> <i v-show="series.IsBeMark || markedSeriesIds.includes(series.Id)" class="el-icon-star-on" style="font-size: 12px;color: #ff5722;" />
</div> </div>
</div> </div>
</div> </div>
@ -106,6 +106,12 @@ export default {
default() { default() {
return {} return {}
} }
},
markedSeriesIds: {
type: Array,
default() {
return []
}
} }
}, },
data() { data() {