熊飞 2024-03-12 16:14:00 +08:00
commit a4070374c6
4 changed files with 69 additions and 27 deletions

View File

@ -789,6 +789,7 @@ export default {
measureData.data = toolState.data[i] measureData.data = toolState.data[i]
measureData.type = toolType measureData.type = toolType
measureData.thick = this.dicomInfo.thick measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
var uuid = toolState.data[i].uuid var uuid = toolState.data[i].uuid
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid) var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
if (idx > -1) { if (idx > -1) {
@ -1036,6 +1037,7 @@ export default {
measureData.data = toolState.data[i] measureData.data = toolState.data[i]
measureData.type = toolType measureData.type = toolType
measureData.thick = this.dicomInfo.thick measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth) measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter) measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false measureData.data.active = false
@ -1357,6 +1359,7 @@ export default {
measureData.data = e.detail.measurementData measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth) measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter) measureData.wc = Math.round(viewport.voi.windowCenter)
@ -1373,6 +1376,7 @@ export default {
measureData.data = e.detail.measurementData measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth) measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter) measureData.wc = Math.round(viewport.voi.windowCenter)
const canvas = this.canvas.querySelector('canvas') const canvas = this.canvas.querySelector('canvas')
@ -1487,6 +1491,7 @@ export default {
measureData.data = measurementData measureData.data = measurementData
measureData.type = toolType measureData.type = toolType
measureData.thick = this.dicomInfo.thick measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth) measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter) measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false measureData.data.active = false

View File

@ -1118,7 +1118,7 @@ export default {
} }
}, },
modifyMeasuredData(measureObj) { modifyMeasuredData(measureObj) {
if (measureObj.measureData.data.remark === 'Spleen') { if (measureObj.measureData.data.remark === 'Spleen Tip' || measureObj.measureData.data.remark === 'Spleen Floor') {
this.$refs['ecrf3'].setMeasuredData(measureObj.measureData) this.$refs['ecrf3'].setMeasuredData(measureObj.measureData)
this.isNonTargetMeasurement = false this.isNonTargetMeasurement = false
} else { } else {
@ -1133,7 +1133,7 @@ export default {
}, },
// //
setMeasuredData(measureData) { setMeasuredData(measureData) {
if (this.isNonTargetMeasurement || measureData.data.remark === 'Spleen') { if (this.isNonTargetMeasurement || measureData.data.remark === 'Spleen Tip' || measureData.data.remark === 'Spleen Floor') {
this.$refs['ecrf3'].setMeasuredData(measureData) this.$refs['ecrf3'].setMeasuredData(measureData)
this.isNonTargetMeasurement = false this.isNonTargetMeasurement = false
return return
@ -1397,6 +1397,7 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
span{ span{
font-size: 15px; font-size: 15px;
color: red;
} }
} }
} }

View File

@ -25,14 +25,7 @@
]" ]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']" :class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
> >
<template v-if="question.QuestionType === 48"> <template v-if="question.QuestionType === 60 || question.QuestionType === 61">
<!-- question.QuestionType === 51 || question.QuestionType === 52 -->
<!-- <el-input
v-if="question.Type==='calculation'"
v-model="questionForm[question.Id]"
disabled
style="width: 100px;"
/> -->
<div style="display: flex;flex-direction: row;justify-content: flex-start;"> <div style="display: flex;flex-direction: row;justify-content: flex-start;">
<el-input <el-input
v-if="question.Type==='calculation'" v-if="question.Type==='calculation'"
@ -53,7 +46,7 @@
</div> </div>
</template> </template>
<template v-else-if="question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53"> <template v-else-if="question.QuestionType === 48 || question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53">
<el-input <el-input
v-if="question.Type==='calculation'" v-if="question.Type==='calculation'"
v-model="questionForm[question.Id]" v-model="questionForm[question.Id]"
@ -344,11 +337,11 @@ export default {
// if (parseInt(v) !== 5) { // if (parseInt(v) !== 5) {
// return // return
// } // }
if (question.QuestionType === 49) {
this.$emit('setFormItemData', { key: question.Id, val: v })
}
if (question.Childrens.length > 0) { if (question.Childrens.length > 0) {
this.resetChild(question.Childrens) this.resetChild(question.Childrens)
}else{
this.$emit('setFormItemData', { key: question.Id, val: v })
} }
}, },
resetChild(obj) { resetChild(obj) {

View File

@ -20,7 +20,7 @@
<el-form-item v-if="readingTaskState < 2 && !isFirstChangeTask"> <el-form-item v-if="readingTaskState < 2 && !isFirstChangeTask">
<div style="text-align:right"> <div style="text-align:right">
<el-button size="mini" :disabled="!questionFormChangeState" :type="questionFormChangeState ? 'primary' : null" @click="handleSave">{{ $t('common:button:save') }}</el-button> <el-button size="mini" :disabled="!questionFormChangeState || (!formChanged && groupClassify > 0)" :type="questionFormChangeState || (!formChanged && groupClassify > 0) ? 'primary' : null" @click="handleSave">{{ $t('common:button:save') }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -74,10 +74,13 @@ export default {
spleenStatusId: '', spleenStatusId: '',
spleenLengthId: '', spleenLengthId: '',
spleenCommentsId: '', spleenCommentsId: '',
spleenTipId: '',
spleenFloorId: '',
isBaseLineTask: false, isBaseLineTask: false,
criterionType: null, criterionType: null,
spleenInfo: null, spleenInfo: null,
calculateSpleenStatus: '' calculateSpleenStatus: '',
formChanged:false
} }
}, },
computed: { computed: {
@ -167,13 +170,21 @@ export default {
this.spleenStatusId = v.Id this.spleenStatusId = v.Id
} }
if (v.QuestionType === 48) { if (v.QuestionType === 48) {
// //
this.spleenLengthId = v.Id this.spleenLengthId = v.Id
} }
if (v.QuestionType === 58) { if (v.QuestionType === 58) {
// //
this.spleenCommentsId = v.Id this.spleenCommentsId = v.Id
} }
if (v.QuestionType === 60) {
//
this.spleenTipId = v.Id
}
if (v.QuestionType === 61) {
//
this.spleenFloorId = v.Id
}
} }
if (v.Childrens.length > 0) { if (v.Childrens.length > 0) {
this.setChild(v.Childrens) this.setChild(v.Childrens)
@ -210,6 +221,14 @@ export default {
// //
this.spleenCommentsId = i.Id this.spleenCommentsId = i.Id
} }
if (i.QuestionType === 60) {
//
this.spleenTipId = i.Id
}
if (i.QuestionType === 61) {
//
this.spleenFloorId = i.Id
}
} }
if (i.Childrens && i.Childrens.length > 0) { if (i.Childrens && i.Childrens.length > 0) {
this.setChild(i.Childrens) this.setChild(i.Childrens)
@ -225,17 +244,22 @@ export default {
var currentSpleenStatus = this.questionForm[this.spleenStatusId] var currentSpleenStatus = this.questionForm[this.spleenStatusId]
var currentSpleenLength = this.questionForm[this.spleenLengthId] var currentSpleenLength = this.questionForm[this.spleenLengthId]
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus) currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
var idx = this.measurements.findIndex(i => i.QuestionType === 48) var stIdx = this.measurements.findIndex(i => i.QuestionType === 60)
var slIdx = this.measurements.findIndex(i => i.QuestionType === 60)
if (currentSpleenLength && currentSpleenStatus === 5) { if (currentSpleenLength && currentSpleenStatus === 5) {
// '!' // '!'
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), { this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {} callback: _ => {}
}) })
} else if (currentSpleenLength === 5 && idx > -1 && this.measurements[idx].MeasureData) { } else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) {
// //
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), { this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {} callback: _ => {}
}) })
} else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) {
this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
} else { } else {
this.saveQuestionsList() this.saveQuestionsList()
} }
@ -300,6 +324,7 @@ export default {
}) })
} }
} }
this.formChanged = false
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
@ -384,15 +409,14 @@ export default {
const { Id, QuestionType } = obj const { Id, QuestionType } = obj
this.currentQsId = Id this.currentQsId = Id
var idx = this.measurements.findIndex(i => i.QuestionId === Id) var idx = this.measurements.findIndex(i => i.QuestionId === Id)
var orderMarkName = QuestionType === 48 ? 'Spleen' : '' var orderMarkName = QuestionType === 60 ? 'Spleen Tip' : QuestionType === 61 ? 'Spleen Floor' : ''
if (idx === -1) { if (idx === -1) {
// (48); SUVmax(51); SUVmax(52)
this.measurements.push({ QuestionId: Id, QuestionType: QuestionType, StudyId: '', SeriesId: '', InstanceId: '', MarkTool: '', PicturePath: '', NumberOfFrames: '', MeasureData: '', OrderMarkName: orderMarkName }) this.measurements.push({ QuestionId: Id, QuestionType: QuestionType, StudyId: '', SeriesId: '', InstanceId: '', MarkTool: '', PicturePath: '', NumberOfFrames: '', MeasureData: '', OrderMarkName: orderMarkName })
} }
// //
this.$emit('setNonTargetMeasurementStatus', { status: true }) this.$emit('setNonTargetMeasurementStatus', { status: true })
DicomEvent.$emit('imageLocation', { questionId: Id, visitTaskId: this.visitTaskId, lesionName: orderMarkName, markTool: 'Length', readingTaskState: this.readingTaskState, isMarked: false }) DicomEvent.$emit('imageLocation', { questionId: Id, visitTaskId: this.visitTaskId, lesionName: orderMarkName, markTool: 'ArrowAnnotate', readingTaskState: this.readingTaskState, isMarked: false })
}, },
async removeAnnotation(obj) { async removeAnnotation(obj) {
const { Id } = obj const { Id } = obj
@ -407,6 +431,7 @@ export default {
DicomEvent.$emit('getMeasureData') DicomEvent.$emit('getMeasureData')
this.calculateSpleenStatus = '' this.calculateSpleenStatus = ''
this.setSpleenCommentDisplay() this.setSpleenCommentDisplay()
this.formChanged = true
}, },
locateAnnotation(obj) { locateAnnotation(obj) {
const { Id } = obj const { Id } = obj
@ -426,7 +451,7 @@ export default {
idx = this.measurements.findIndex(i => i.OrderMarkName === measurement.data.remark) idx = this.measurements.findIndex(i => i.OrderMarkName === measurement.data.remark)
} }
if (idx === -1) return if (idx === -1) return
var remark = this.measurements[idx].QuestionType === 48 ? 'Spleen' : '' var remark = this.measurements[idx].QuestionType === 60 ? 'Spleen Tip' : this.measurements[idx].QuestionType === 61 ? 'Spleen Floor' : ''
measurement.data.remark = remark measurement.data.remark = remark
this.measurements[idx].StudyId = measurement.studyId this.measurements[idx].StudyId = measurement.studyId
this.measurements[idx].SeriesId = measurement.seriesId this.measurements[idx].SeriesId = measurement.seriesId
@ -451,10 +476,12 @@ export default {
OrderMarkName: measurement.data.remark, OrderMarkName: measurement.data.remark,
frame: isNaN(parseInt(measurement.frame)) ? 0 : measurement.frame frame: isNaN(parseInt(measurement.frame)) ? 0 : measurement.frame
} }
if (measurement.type === 'Length') { if (measurement.type === 'ArrowAnnotate') {
const length = measurement.data.length ? measurement.data.length : null const location = measurement.location ? measurement.location : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, length || null) this.$set(this.questionForm, this.measurements[idx].QuestionId, location || null)
if (this.measurements[idx].QuestionType === 48) { if (this.measurements[idx].QuestionType === 60 || this.measurements[idx].QuestionType === 61) {
var length = this.getSpleenL()
this.$set(this.questionForm, this.spleenLengthId, length)
var status = this.setSpleenStatus(length) var status = this.setSpleenStatus(length)
this.$set(this.questionForm, this.spleenStatusId, status) this.$set(this.questionForm, this.spleenStatusId, status)
this.calculateSpleenStatus = status this.calculateSpleenStatus = status
@ -473,6 +500,20 @@ export default {
if (this.isQulityIssues) { if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', true) DicomEvent.$emit('questionFormChange', true)
} }
this.formChanged = true
},
getSpleenL() {
var length = null
//
var st = this.questionForm[this.spleenTipId]
st = isNaN(parseFloat(st)) ? null : parseFloat(st)
//
var sf = this.questionForm[this.spleenFloorId]
sf = isNaN(parseFloat(sf)) ? null : parseFloat(sf)
if (st && sf) {
length = Math.abs(st - sf)
}
return length
}, },
setSpleenStatus(length) { setSpleenStatus(length) {
console.log('setSpleenStatus') console.log('setSpleenStatus')
@ -554,12 +595,14 @@ export default {
this.removeAnnotation({ Id: this.spleenLengthId }) this.removeAnnotation({ Id: this.spleenLengthId })
} }
} }
this.formChanged = true
}, },
setFormItemData(obj) { setFormItemData(obj) {
this.questionForm[obj.key] = obj.val this.questionForm[obj.key] = obj.val
if (obj.key === this.spleenStatusId) { if (obj.key === this.spleenStatusId) {
this.setSpleenCommentDisplay() this.setSpleenCommentDisplay()
} }
this.formChanged = true
}, },
isJSONString(str) { isJSONString(str) {
try { try {