lugano阅片标准页面十字线工具更改
parent
c767004a2d
commit
015eb78b70
|
|
@ -103,7 +103,7 @@
|
|||
<div class="tool-wrapper">
|
||||
<div class="icon" :class="[activeTool === 'FusionJumpToPointTool' ? 'tool_active' : '']"
|
||||
@click.prevent="setFusionJumpToolActive">
|
||||
<svg-icon icon-class="jumpto" class="svg-icon" />
|
||||
<svg-icon icon-class="position" class="svg-icon" />
|
||||
</div>
|
||||
<div class="text">{{ $t('trials:reading:button:crosshairsPosition') }}</div>
|
||||
</div>
|
||||
|
|
@ -468,9 +468,6 @@ export default {
|
|||
mounted() {
|
||||
document.documentElement.style.userSelect = 'none'
|
||||
window.addEventListener('message', this.receiveMsg)
|
||||
|
||||
console.log(cornerstoneTools)
|
||||
console.log(cornerstone3D)
|
||||
this.$i18n.locale = this.$route.query.lang
|
||||
this.setLanguage(this.$route.query.lang)
|
||||
this.readingTaskState = parseInt(this.$route.query.readingTaskState)
|
||||
|
|
@ -851,6 +848,9 @@ export default {
|
|||
const { detail } = e
|
||||
const { annotation } = detail
|
||||
const { metadata } = annotation
|
||||
if (!metadata || metadata.toolName === FusionJumpToPointTool.toolName) {
|
||||
return
|
||||
}
|
||||
const measureData = {}
|
||||
measureData.frame = 0
|
||||
measureData.data = annotation
|
||||
|
|
@ -868,6 +868,9 @@ export default {
|
|||
const { detail } = e
|
||||
const { annotation } = detail
|
||||
const { metadata, data } = annotation
|
||||
if (!metadata || metadata.toolName === FusionJumpToPointTool.toolName) {
|
||||
return
|
||||
}
|
||||
// var i = this.initAnnotations.findIndex(i => i.orderMark === data.remark && !i.isInit)
|
||||
// if (i > -1) {
|
||||
// console.log(data.remark)
|
||||
|
|
|
|||
|
|
@ -172,6 +172,13 @@ export default {
|
|||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
getQuestionFormRef(refName) {
|
||||
const ref = this.$refs[refName]
|
||||
if (!ref) {
|
||||
return null
|
||||
}
|
||||
return Array.isArray(ref) ? ref[0] : ref
|
||||
},
|
||||
handleReadingChart(e) {
|
||||
this.$emit('handleReadingChart', e)
|
||||
},
|
||||
|
|
@ -191,7 +198,8 @@ export default {
|
|||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
this.$refs[refName] && this.$refs[refName][0].initForm(isRerender)
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
questionFormRef && questionFormRef.initForm(isRerender)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -271,7 +279,8 @@ export default {
|
|||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
questionFormRef && questionFormRef.initForm()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -379,7 +388,8 @@ export default {
|
|||
this.tableQuestions.forEach(item => {
|
||||
item.TableQuestions.Answers.forEach(i => {
|
||||
var refName = `${item.Id}_${i.RowIndex}`
|
||||
this.$refs[refName] && this.$refs[refName][0].initForm()
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
questionFormRef && questionFormRef.initForm()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
@ -391,7 +401,8 @@ export default {
|
|||
var rowIndex = String(this.unSaveTargets[0].rowIndex)
|
||||
var questionId = this.unSaveTargets[0].questionId
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && !this.$refs[refName][0].questionForm.OtherMeasureData) {
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && questionFormRef && !questionFormRef.questionForm.OtherMeasureData) {
|
||||
if (toolName === 'CircleROI') {
|
||||
return { isCanActiveTool: true, reason: '' }
|
||||
} else {
|
||||
|
|
@ -522,7 +533,8 @@ export default {
|
|||
if (item.TableQuestions && item.TableQuestions.Answers) {
|
||||
item.TableQuestions.Answers.map(t => {
|
||||
const refName = `${item.Id}_${t.RowIndex}`
|
||||
if (this.$refs[refName] && this.$refs[refName][0] && this.$refs[refName][0].questionForm.saveTypeEnum !== 2) {
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (questionFormRef && questionFormRef.questionForm.saveTypeEnum !== 2) {
|
||||
var lessionName = this.getLesionName(item.OrderMark, t.RowIndex)
|
||||
arr.push({ lessionName: lessionName, rowIndex: t.RowIndex, questionId: item.Id })
|
||||
}
|
||||
|
|
@ -552,11 +564,15 @@ export default {
|
|||
this.activeItem.activeCollapseId = arr[0]
|
||||
this.$nextTick(() => {
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
if (this.$refs[refName][0].questionForm.IsDicomReading !== false) {
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (!questionFormRef) {
|
||||
return
|
||||
}
|
||||
if (questionFormRef.questionForm.IsDicomReading !== false) {
|
||||
var markTool = 'CircleROI'
|
||||
var isMarked = !!this.$refs[refName][0].questionForm.OtherMeasureData
|
||||
var isMarked = !!questionFormRef.questionForm.OtherMeasureData
|
||||
}
|
||||
FusionEvent.$emit('imageLocation', { otherMeasureData: this.$refs[refName][0].questionForm.OtherMeasureData, markTool, isMarked })
|
||||
FusionEvent.$emit('imageLocation', { otherMeasureData: questionFormRef.questionForm.OtherMeasureData, markTool, isMarked })
|
||||
})
|
||||
} else {
|
||||
this.activeItem.activeRowIndex = null
|
||||
|
|
@ -576,7 +592,10 @@ export default {
|
|||
},
|
||||
collapseRightClick(e, obj, activeCollapseId, activeRowIndex) {
|
||||
const refName = `${activeCollapseId}_${activeRowIndex}`
|
||||
FusionEvent.$emit('imageLocation', { otherMeasureData: this.$refs[refName][0].questionForm.OtherMeasureData })
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (questionFormRef) {
|
||||
FusionEvent.$emit('imageLocation', { otherMeasureData: questionFormRef.questionForm.OtherMeasureData })
|
||||
}
|
||||
|
||||
e.stopImmediatePropagation()
|
||||
e.stopPropagation()
|
||||
|
|
@ -621,8 +640,12 @@ export default {
|
|||
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
this.$nextTick(() => {
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (!questionFormRef) {
|
||||
return
|
||||
}
|
||||
if (deleteInfo) {
|
||||
this.$refs[refName][0].setDeleteInfo(deleteInfo)
|
||||
questionFormRef.setDeleteInfo(deleteInfo)
|
||||
}
|
||||
if (questionsObj.otherMeasureData) {
|
||||
const measureData = {}
|
||||
|
|
@ -631,7 +654,7 @@ export default {
|
|||
measureData.type = questionsObj.otherMeasureData.metadata.toolName
|
||||
measureData.suvMax = questionsObj.suvMax
|
||||
|
||||
this.$refs[refName][0].setMeasureData(measureData)
|
||||
questionFormRef.setMeasureData(measureData)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -719,21 +742,28 @@ export default {
|
|||
this.activeItem.activeRowIndex = String(measureObj.questionInfo.RowIndex)
|
||||
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
if (this.$refs[refName]) {
|
||||
this.$refs[refName][0].setMeasureData(measureObj.measureData)
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (questionFormRef) {
|
||||
questionFormRef.setMeasureData(measureObj.measureData)
|
||||
}
|
||||
}
|
||||
},
|
||||
clearMeasuredData() {
|
||||
if (this.activeItem.activeCollapseId && this.activeItem.activeRowIndex && this.activeName) {
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
this.$refs[refName][0].clearMeasurement()
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (questionFormRef) {
|
||||
questionFormRef.clearMeasurement()
|
||||
}
|
||||
}
|
||||
},
|
||||
setOutsideMeasuredData(annotation) {
|
||||
if (this.activeItem.activeCollapseId && this.activeItem.activeRowIndex && this.activeName) {
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
this.$refs[refName][0].setOutsideMeasuredData(annotation)
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (questionFormRef) {
|
||||
questionFormRef.setOutsideMeasuredData(annotation)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设置测量数据
|
||||
|
|
@ -779,8 +809,22 @@ export default {
|
|||
// 判断是否存在测量数据
|
||||
this.$nextTick(() => {
|
||||
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
||||
if (!this.$refs[refName][0].questionForm.OtherMeasureData) {
|
||||
this.$refs[refName][0].setMeasureData(measureData)
|
||||
const questionFormRef = this.getQuestionFormRef(refName)
|
||||
if (!questionFormRef) {
|
||||
if (this.isBaseLineTask) {
|
||||
var idx = this.tableQuestions.findIndex(item => item.LesionType === 0)
|
||||
if (this.tableQuestions[idx].TableQuestions.Answers.length < this.tableQuestions[idx].MaxQuestionCount && (measureData.type === 'CircleROI')) {
|
||||
this.createTTarget(measureData)
|
||||
} else {
|
||||
this.createNTTarget(measureData)
|
||||
}
|
||||
} else {
|
||||
this.createNLTarget(measureData)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (!questionFormRef.questionForm.OtherMeasureData) {
|
||||
questionFormRef.setMeasureData(measureData)
|
||||
} else {
|
||||
if (this.isBaseLineTask) {
|
||||
var idx = this.tableQuestions.findIndex(item => item.LesionType === 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue