已阅片后阅片页面可添加临时标记
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
9cc1962b3b
commit
509f8f02b6
|
@ -280,11 +280,11 @@
|
||||||
>
|
>
|
||||||
<svg-icon icon-class="refresh" class="svg-icon" />
|
<svg-icon icon-class="refresh" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 更多 -->
|
<!-- 更多 :class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" -->
|
||||||
<div
|
<div
|
||||||
v-if="criterionType === 0"
|
v-if="criterionType === 0"
|
||||||
:title="$t('trials:reading:button:more')"
|
:title="$t('trials:reading:button:more')"
|
||||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']"
|
:class="['tool-item']"
|
||||||
@click.stop="showPanel($event)"
|
@click.stop="showPanel($event)"
|
||||||
@mouseleave="toolMouseout"
|
@mouseleave="toolMouseout"
|
||||||
>
|
>
|
||||||
|
@ -1510,14 +1510,32 @@ export default {
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
},
|
},
|
||||||
annotationRemovedListener(e) {
|
annotationRemovedListener(e) {
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation) return
|
try{
|
||||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
if (!annotation) return
|
||||||
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
if (this. readingTaskState === 2 && !annotation.data.label) return false
|
||||||
if (index !== -1) {
|
if (this.readingTaskState === 2) {
|
||||||
this.markedSeriesIds.splice(index, 1)
|
const errorMsg = { message: 'annotation Not allowed to operate' }
|
||||||
|
throw errorMsg
|
||||||
}
|
}
|
||||||
|
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
||||||
|
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
||||||
|
if (index !== -1) {
|
||||||
|
this.markedSeriesIds.splice(index, 1)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const errorMsg = { message: 'annotation Not allowed to operate' }
|
||||||
|
throw errorMsg
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
cornerstoneTools.annotation.state.addAnnotation(annotation)
|
||||||
|
const renderingEngine = getRenderingEngine(renderingEngineId)
|
||||||
|
for (let i = 0; i < this.cells.length; i++) {
|
||||||
|
const viewportId = `${this.viewportKey}-${i}`
|
||||||
|
const viewport = renderingEngine.getViewport(viewportId)
|
||||||
|
viewport.render()
|
||||||
|
}
|
||||||
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async customAnnotationCompletedListener(e) {
|
async customAnnotationCompletedListener(e) {
|
||||||
|
@ -1637,6 +1655,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
// if ( this.resetAnnotation && this.isFusion ) return false
|
// if ( this.resetAnnotation && this.isFusion ) return false
|
||||||
if (!annotation) return false
|
if (!annotation) return false
|
||||||
|
if (this.readingTaskState === 2 && !annotation.data.label) return false
|
||||||
if (this.readingTaskState === 2) {
|
if (this.readingTaskState === 2) {
|
||||||
const errorMsg = { message: 'annotation Not allowed to operate' }
|
const errorMsg = { message: 'annotation Not allowed to operate' }
|
||||||
throw errorMsg
|
throw errorMsg
|
||||||
|
@ -1665,10 +1684,10 @@ export default {
|
||||||
)
|
)
|
||||||
if (annotation.markId) {
|
if (annotation.markId) {
|
||||||
let res = await deleteCustomTag(annotation.markId)
|
let res = await deleteCustomTag(annotation.markId)
|
||||||
if (!res.IsSuccess) return false
|
if (!res.IsSuccess) throw ''
|
||||||
}else if (annotation.id) {
|
}else if (annotation.id) {
|
||||||
let res = await deleteCustomTag(annotation.id)
|
let res = await deleteCustomTag(annotation.id)
|
||||||
if (!res.IsSuccess) return false
|
if (!res.IsSuccess) throw ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
const index = this.markedSeriesIds.indexOf(annotation.seriesId)
|
||||||
|
@ -2093,7 +2112,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setMoreToolActive(toolName) {
|
setMoreToolActive(toolName) {
|
||||||
if (this.readingTaskState === 2) return
|
// if (this.readingTaskState === 2) return
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
|
|
|
@ -45,9 +45,8 @@
|
||||||
>
|
>
|
||||||
<svg-icon icon-class="polygon" class="svg-icon" />
|
<svg-icon icon-class="polygon" class="svg-icon" />
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<!--readingTaskState === 2 ? 'tool-disabled' : '',-->
|
||||||
<div
|
<div :class="['tool-item', activeTool === 'Eraser' ? 'tool-item-active' : '']"
|
||||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'Eraser' ? 'tool-item-active' : '']"
|
|
||||||
:title="$t('trials:dicom-show:Eraser')" @click.prevent="setAnnotateToolActive('Eraser')">
|
:title="$t('trials:dicom-show:Eraser')" @click.prevent="setAnnotateToolActive('Eraser')">
|
||||||
<svg-icon icon-class="clear" class="svg-icon" />
|
<svg-icon icon-class="clear" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,10 +68,9 @@
|
||||||
<div class="tool-item" :title="$t('trials:reading:button:reset')" @click.prevent="resetViewport">
|
<div class="tool-item" :title="$t('trials:reading:button:reset')" @click.prevent="resetViewport">
|
||||||
<svg-icon icon-class="refresh" class="svg-icon" />
|
<svg-icon icon-class="refresh" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 更多 -->
|
<!-- 更多:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" -->
|
||||||
<div v-if="criterionType === 0" :title="$t('trials:reading:button:more')"
|
<div v-if="criterionType === 0" :title="$t('trials:reading:button:more')" :class="['tool-item']"
|
||||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" @click.stop="showPanel($event)"
|
@click.stop="showPanel($event)" @mouseleave="toolMouseout">
|
||||||
@mouseleave="toolMouseout">
|
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<div class="icon" data-tool="more">
|
<div class="icon" data-tool="more">
|
||||||
<svg-icon icon-class="more" class="svg-icon" />
|
<svg-icon icon-class="more" class="svg-icon" />
|
||||||
|
@ -922,25 +920,41 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
async annotationRemovedListener(e) {
|
async annotationRemovedListener(e) {
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation) return
|
try {
|
||||||
if (annotation.annotationId) {
|
if (!annotation) return
|
||||||
await deleteTrialFileType(annotation.annotationId)
|
if (this.readingTaskState === 2 && !annotation.annotationId) {
|
||||||
} else {
|
cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID)
|
||||||
cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID)
|
return false
|
||||||
}
|
}
|
||||||
const renderingEngine = getRenderingEngine(renderingEngineId)
|
if (this.readingTaskState === 2) {
|
||||||
const viewport = renderingEngine.getViewport(`canvas-${this.activeCanvasIndex}`)
|
const errorMsg = { message: 'annotation Not allowed to operate' }
|
||||||
viewport.render()
|
throw errorMsg
|
||||||
const i = this.viewportInfos.findIndex(i => i.index === this.activeCanvasIndex)
|
}
|
||||||
const imageId = annotation.metadata.referencedImageId
|
if (annotation.annotationId) {
|
||||||
const path = imageId.split(`web:${this.OSSclientConfig.basePath}`)[1]
|
await deleteTrialFileType(annotation.annotationId)
|
||||||
const fileList = this.viewportInfos[i].fileList
|
} else {
|
||||||
const fileIndex = fileList.findIndex(f => f.Path === path)
|
cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID)
|
||||||
if (annotation.metadata.toolName === 'Lengthscale') {
|
}
|
||||||
this.$emit('setPS', { NoneDicomFileId: fileList[fileIndex].Id, Path: fileList[fileIndex].Path, PS: null })
|
const renderingEngine = getRenderingEngine(renderingEngineId)
|
||||||
|
const viewport = renderingEngine.getViewport(`canvas-${this.activeCanvasIndex}`)
|
||||||
|
viewport.render()
|
||||||
|
const i = this.viewportInfos.findIndex(i => i.index === this.activeCanvasIndex)
|
||||||
|
const imageId = annotation.metadata.referencedImageId
|
||||||
|
const path = imageId.split(`web:${this.OSSclientConfig.basePath}`)[1]
|
||||||
|
const fileList = this.viewportInfos[i].fileList
|
||||||
|
const fileIndex = fileList.findIndex(f => f.Path === path)
|
||||||
|
if (annotation.metadata.toolName === 'Lengthscale') {
|
||||||
|
this.$emit('setPS', { NoneDicomFileId: fileList[fileIndex].Id, Path: fileList[fileIndex].Path, PS: null })
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
cornerstoneTools.annotation.state.addAnnotation(annotation)
|
||||||
|
const renderingEngine = getRenderingEngine(renderingEngineId)
|
||||||
|
const viewport = renderingEngine.getViewport(`canvas-${this.activeCanvasIndex}`)
|
||||||
|
viewport.render()
|
||||||
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async annotationModifiedListener(e) {
|
async annotationModifiedListener(e) {
|
||||||
console.log('Modified')
|
console.log('Modified')
|
||||||
|
|
Loading…
Reference in New Issue