自定义阅片更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
43a221de00
commit
f1b816fd85
|
@ -595,7 +595,7 @@ const { createCameraPositionSynchronizer, createVOISynchronizer } = synchronizer
|
|||
const newStyles = {
|
||||
global: {
|
||||
color: 'rgb(255, 0, 0)',
|
||||
colorHighlighted: 'rgb(255, 0, 0)',
|
||||
colorHighlighted: 'rgb(0, 255, 0)',
|
||||
colorSelected: 'rgb(255, 0, 0)',
|
||||
colorLocked: 'rgb(255, 0, 0)',
|
||||
lineWidth: '1',
|
||||
|
@ -605,7 +605,7 @@ const newStyles = {
|
|||
textBoxFontFamily: 'Helvetica Neue, Helvetica, Arial, sans-serif',
|
||||
textBoxFontSize: '14px',
|
||||
textBoxColor: 'rgb(255, 0, 0)',
|
||||
textBoxColorHighlighted: 'rgb(255, 0, 0)',
|
||||
textBoxColorHighlighted: 'rgb(0, 255, 0)',
|
||||
textBoxColorSelected: 'rgb(255, 0, 0)',
|
||||
textBoxColorLocked: 'rgb(255, 0, 0)',
|
||||
textBoxBackground: '',
|
||||
|
@ -1328,6 +1328,11 @@ export default {
|
|||
toolsEvents.ANNOTATION_REMOVED,
|
||||
this.criterionType === 0 ? this.customAnnotationRemovedListener : this.annotationRemovedListener
|
||||
)
|
||||
eventTarget.addEventListener(
|
||||
toolsEvents.ANNOTATION_SELECTION_CHANGE,
|
||||
this.criterionType === 0 ? this.customAnnotationSelectionChangeListener : this.annotationSelectionChangeListener
|
||||
)
|
||||
|
||||
// eventTarget.addEventListener(
|
||||
// toolsEvents.ANNOTATION_ADDED,
|
||||
// this.annotationAddedListener
|
||||
|
@ -1427,8 +1432,9 @@ export default {
|
|||
annotation.data.text = markName
|
||||
}
|
||||
this.saveCustomAnnotation(annotation)
|
||||
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
|
||||
}
|
||||
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
|
||||
|
||||
}
|
||||
|
||||
this.setToolsPassive()
|
||||
|
@ -1485,6 +1491,14 @@ export default {
|
|||
// 临时标记
|
||||
return
|
||||
}
|
||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId) {
|
||||
let isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation)
|
||||
if (isBound) {
|
||||
this.$alert('该标记已与问题进行绑定,不允许删除!')
|
||||
throw 'annotation Not allowed to operate'
|
||||
}
|
||||
}
|
||||
|
||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
||||
if (this.activeTool === 'Eraser') {
|
||||
await this.$confirm(
|
||||
|
@ -1529,6 +1543,20 @@ export default {
|
|||
viewport.render()
|
||||
}
|
||||
},
|
||||
customAnnotationSelectionChangeListener(e) {
|
||||
if (this.readingTaskState === 2) return
|
||||
const {detail} = e
|
||||
const annotations = cornerstoneTools.annotation.state.getAllAnnotations()
|
||||
const i = annotations.findIndex(i => i.annotationUID === detail.selection[0])
|
||||
if (i > -1) {
|
||||
if (annotations[i].visitTaskId !== this.taskInfo.VisitTaskId) {
|
||||
return
|
||||
} else {
|
||||
this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotations[i])
|
||||
}
|
||||
}
|
||||
},
|
||||
annotationSelectionChangeListener(e) {},
|
||||
async getAnnotations(visitTaskId) {
|
||||
if (this.readingTaskState === 2) return
|
||||
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
|
||||
|
|
|
@ -241,43 +241,43 @@
|
|||
</template>
|
||||
</el-input>
|
||||
<!-- 标记 -->
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && !questionsMarkStatus[question.Id]"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 1, question})"
|
||||
>
|
||||
标记
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
<!-- 查看 -->
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-if="questionsMarkStatus[question.Id]"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 2, question})"
|
||||
>
|
||||
查看
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
<!-- 更改 -->
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 3, question})"
|
||||
>
|
||||
更改
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
<!-- 移除 -->
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="operateImageMarker({operateStateEnum: 4, question})"
|
||||
>
|
||||
移除
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -287,7 +287,7 @@
|
|||
<i class="el-icon-warning" style="color:red" />
|
||||
</el-tooltip>
|
||||
保存
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="question.Type === 'number'">
|
||||
|
|
|
@ -347,6 +347,10 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
verifyAnnotationIsBound(annotation) {
|
||||
let i = this.questionMarkInfoList.findIndex(i=>i.MeasureData && i.MeasureData.annotationUID === annotation.annotationUID)
|
||||
return i > -1
|
||||
},
|
||||
async operateImageMarker(obj) {
|
||||
this.operateStateEnum = obj.operateStateEnum
|
||||
this.operateQuestionId = obj.question.Id
|
||||
|
@ -363,7 +367,7 @@ export default {
|
|||
|
||||
} else if (obj.operateStateEnum === 3) {
|
||||
// 更改标记
|
||||
this.$set(this.questionsMarkStatus, obj.question.Id, 1)
|
||||
// this.$set(this.questionsMarkStatus, obj.question.Id, 1)
|
||||
} else if (obj.operateStateEnum === 4) {
|
||||
// 移除标记
|
||||
this.$set(this.questionForm, obj.question.Id, '')
|
||||
|
@ -402,9 +406,24 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
bindAnnotationToQuestion(annotation) {
|
||||
console.log('bindAnnotationToQuestion', annotation)
|
||||
if (this.operateStateEnum === 1 && this.operateQuestionId) {
|
||||
async bindAnnotationToQuestion(annotation) {
|
||||
try {
|
||||
if (!(this.operateStateEnum === 1 || this.operateStateEnum === 3)) return
|
||||
if (!this.operateQuestionId) return
|
||||
if (this.operateStateEnum === 3) {
|
||||
if (!annotation.data.label) {
|
||||
this.$alert('该标记不能与问题绑定!')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('是否确认更改?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
}
|
||||
console.log('bindAnnotationToQuestion', annotation)
|
||||
|
||||
let i = this.questionMarkInfoList.findIndex(i=>i.QuestionId === this.operateQuestionId)
|
||||
if (i === -1) {
|
||||
let markInfo = {
|
||||
|
@ -429,6 +448,9 @@ export default {
|
|||
}
|
||||
this.setAnswerToQuestion(annotation, this.operateQuestionId)
|
||||
this.$set(this.questionsMarkStatus, this.operateQuestionId, 1)
|
||||
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
updateAnnotationToQuestion(annotation) {
|
||||
|
|
Loading…
Reference in New Issue