Compare commits

...

2 Commits

5 changed files with 146 additions and 52 deletions

View File

@ -696,27 +696,26 @@ export default {
if (isNotValidAnnotationNum === 0) {
this.onAnnotationModified(e)
} else {
// annotation.isInsideVolume = false
console.log('异常标记:', annotation)
const { remark } = annotation.data
if (remark === 'Liver' || remark === 'Mediastinum') {
this.$refs['questions'].setOutsideMeasuredData(annotation)
} else {
this.$refs['tableQuestions'].setOutsideMeasuredData(annotation)
}
// //
// this.removeAnnotation({ otherMeasureData: annotation })
// console.log('', annotation)
// const { remark } = annotation.data
// //
// if (remark === 'Liver' || remark === 'Mediastinum') {
// this.$refs['questions'].clearMeasuredData(remark)
// //
// this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' })
// this.$refs['questions'].setOutsideMeasuredData(annotation)
// } else {
// this.$refs['tableQuestions'].clearMeasuredData()
// //
// this.setBasicToolActive('CircleROI')
// this.$refs['tableQuestions'].setOutsideMeasuredData(annotation)
// }
//
this.removeAnnotation({ otherMeasureData: annotation })
const { remark } = annotation.data
//
if (remark === 'Liver' || remark === 'Mediastinum') {
this.$refs['questions'].clearMeasuredData(remark)
//
this.setNonTargetMeasurementStatus({ status: true, toolName: 'CircleROI' })
} else {
this.$refs['tableQuestions'].clearMeasuredData()
//
this.setBasicToolActive('CircleROI')
}
}
}, 120)
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => {

View File

@ -57,8 +57,8 @@ export default {
lungSuvmaxId: '',
suvmaxId: '',
questionFormChangeState: false,
questionFormChangeNum: 0
questionFormChangeNum: 0,
isInsideVolume: true
}
},
computed: {
@ -188,6 +188,17 @@ export default {
handleSave() {
this.$refs['questions'].validate((valid) => {
if (!valid) return
if (!this.isInsideVolume) {
this.$alert('当前标记在图像外,不允许保存!', '提示', {
callback: action => {
this.$message({
type: 'info',
message: `action: ${action}`
})
}
})
return
}
// SUVmax
const liverSUVmax = !isNaN(parseFloat(this.questionForm[this.liverSuvmaxId])) ? parseFloat(this.questionForm[this.liverSuvmaxId]) : 0
// SUVmax
@ -265,7 +276,9 @@ export default {
}
this.$emit('setNonTargetMeasurementStatus', { status: true, toolName: 'CircleROI' })
},
removeAnnotation(obj) {
console.log('question_removeAnnotation')
const { Id } = obj
var idx = this.measurements.findIndex(i => i.QuestionId === Id)
if (idx === -1) return
@ -273,6 +286,7 @@ export default {
this.setpet5PS()
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.measurements[idx].OtherMeasureData, type: 'clear' })
this.measurements.splice(idx, 1)
console.log( this.measurements)
this.questionFormChangeState = true
},
locateAnnotation(obj) {
@ -285,6 +299,7 @@ export default {
FusionEvent.$emit('imageLocation', { otherMeasureData: otherMeasureData })
},
setMeasuredData(measurement) {
this.isInsideVolume = true
var idx = -1
if (this.currentQsId) {
//
@ -316,6 +331,39 @@ export default {
FusionEvent.$emit('addOrUpdateAnnotations', { data })
this.questionFormChangeState = true
},
setOutsideMeasuredData(measurement) {
this.isInsideVolume = false
var idx = -1
if (this.currentQsId) {
//
idx = this.measurements.findIndex(i => i.QuestionId === this.currentQsId)
this.currentQsId = ''
} else {
//
idx = this.measurements.findIndex(i => i.OrderMarkName === measurement.data.remark)
}
if (idx === -1) return
var obj = this.measurements[idx]
var remark = obj.QuestionType === 51 ? 'Liver' : obj.QuestionType === 52 ? 'Mediastinum' : ''
measurement.data.remark = remark
this.measurements[idx].OtherMeasureData = measurement
this.measurements[idx].OtherMarkTool = measurement.metadata.toolName
//
var data = {
OtherMeasureData: measurement,
QuestionId: obj.QuestionId,
VisitTaskId: this.visitTaskId,
OrderMarkName: remark
}
if (measurement.metadata.toolName === 'CircleROI') {
// const suvMax = measurement.suvMax
this.$set(this.questionForm, obj.QuestionId, null)
this.setpet5PS()
}
FusionEvent.$emit('addOrUpdateAnnotations', { data })
this.questionFormChangeState = true
},
clearMeasuredData(remark) {
var idx = this.measurements.findIndex(i => i.OrderMarkName === remark)
if (idx === -1) return

View File

@ -192,7 +192,7 @@
label="SUV测量截图"
v-if="answers.OtherPicturePath"
>
<img v-viewer style="width: 50px; height: 50px; cursor: pointer;" crossorigin="anonymous" :src="answers.OtherPicturePath" alt="Image">
<img v-viewer style="width: 50px; height: 50px; cursor: pointer;" crossorigin="anonymous" :src="answers.OtherPicturePath" alt="Image" class="suv_viewer">
</el-form-item>
</div>
</div>
@ -1808,6 +1808,11 @@ export default {
.input-width2{
width: 100% !important;
}
.suv_viewer{
/deep/ .viewer-play {
display: none;
}
}
}
</style>

View File

@ -341,8 +341,12 @@ export default {
},
methods: {
formItemChange(v, question) {
if (question.QuestionType === 49 && parseInt(v) !== 5) {
return
// if (parseInt(v) !== 5) {
// return
// }
if(question.QuestionType === 49){
console.log(question,v)
this.$emit('setFormItemData', {key:question.Id,val:v})
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)

View File

@ -76,6 +76,7 @@ export default {
measurements: [],
spleenStatusId: '',
spleenLengthId: '',
spleenCommentsId:'',
isBaseLineTask: false,
criterionType: null,
spleenInfo:null,
@ -93,14 +94,6 @@ export default {
if(this.isQulityIssues){
DicomEvent.$emit('questionFormChange', true)
}
// if(this.criterionType === 2 && this.groupClassify === 3 && this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){
// for (let i = 0; i < this.questions[0].Childrens.length; i++) {
// if (this.questions[0].Childrens[i].QuestionType === 49) {
// this.questions[0].Childrens[i].ShowQuestion = 2
// break
// }
// }
// }
}
},
currentReadingTaskState: {
@ -126,6 +119,7 @@ export default {
},
methods: {
async getQuestions(visitTaskId) {
console.log('getQuestions')
this.visitTaskId = visitTaskId
// const loading = this.$loading({ fullscreen: true })
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
@ -152,7 +146,7 @@ export default {
var v = questions[i]
v.IsBaseLineTask = this.isBaseLineTask
if (v.Type === 'group' && v.GroupClassify !== this.groupClassify) continue
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && i.Id) {
this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
if (v.QuestionType === 44) {
//
@ -166,8 +160,10 @@ export default {
if (v.QuestionType === 48) {
//
this.spleenLengthId = v.Id
this.calculateSpleenStatus = ''
this.setSpleenStatus(this.questionForm[this.spleenLengthId])
}
if(v.QuestionType === 58){
//
this.spleenCommentsId = v.Id
}
}
if (v.Childrens.length > 0) {
@ -177,6 +173,10 @@ export default {
}
// this.questions = questions
}
if(this.spleenLengthId){
this.calculateSpleenStatus = this.setSpleenStatus(this.questionForm[this.spleenLengthId])
this.setSpleenCommentDisplay()
}
// loading.close()
},
setChild(obj) {
@ -196,6 +196,11 @@ export default {
if (i.QuestionType === 48) {
//
this.spleenLengthId = i.Id
}
if(i.QuestionType === 58){
//
this.spleenCommentsId = i.Id
}
}
if (i.Childrens && i.Childrens.length > 0) {
@ -268,7 +273,6 @@ export default {
var trialId = this.$route.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId)
this.loading = false
if(this.isQulityIssues){
DicomEvent.$emit('questionFormChange', false)
@ -292,6 +296,24 @@ export default {
this.loading = false
})
},
setSpleenCommentDisplay(){
console.log('setSpleenCommentDisplay')
if( this.spleenCommentsId && this.spleenStatusId ){
for (let i = 0; i < this.questions[0].Childrens.length; i++) {
if (this.questions[0].Childrens[i].QuestionType === 58) {
if(this.calculateSpleenStatus && this.calculateSpleenStatus !== this.questionForm[this.spleenStatusId]){
this.questions[0].Childrens[i].ShowQuestion = 0
this.questions[0].Childrens[i].IsRequired = 0
}else{
this.questions[0].Childrens[i].ShowQuestion = 2
this.questions[0].Childrens[i].IsRequired = 3
this.questionForm[this.spleenCommentsId] = ''
}
break
}
}
}
},
async getSplenicState() {
try {
var spleenLength = this.questionForm[this.spleenLengthId]
@ -376,6 +398,8 @@ export default {
await store.dispatch('reading/removeNonTargetMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.measurements[idx].MeasureData, questionId: Id })
this.measurements.splice(idx, 1)
DicomEvent.$emit('getMeasureData')
this.calculateSpleenStatus = ''
this.setSpleenCommentDisplay()
},
locateAnnotation(obj) {
const { Id } = obj
@ -424,8 +448,9 @@ export default {
const length = measurement.data.length ? measurement.data.length : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, length || null)
if (this.measurements[idx].QuestionType === 48){
this.calculateSpleenStatus = ''
this.setSpleenStatus(length)
var status = this.setSpleenStatus(length)
this.$set(this.questionForm, this.spleenStatusId, status)
this.calculateSpleenStatus = status
}
// if (this.measurements[idx].QuestionType === 48 && length <= 130 && this.isBaseLineTask) {
@ -443,17 +468,20 @@ export default {
}
},
setSpleenStatus(length){
var status = ''
if(length){
if(this.isBaseLineTask){
// 130mm
if(length <= 130){
this.$set(this.questionForm, this.spleenStatusId, '1')
this.calculateSpleenStatus = '1'
// this.$set(this.questionForm, this.spleenStatusId, '1')
// this.calculateSpleenStatus = '1'
status = '1'
}
// >130mm
if(length > 130){
this.$set(this.questionForm, this.spleenStatusId, '6')
this.calculateSpleenStatus = '6'
// this.$set(this.questionForm, this.spleenStatusId, '6')
// this.calculateSpleenStatus = '6'
status = '6'
}
}else{
// 线
@ -467,40 +495,47 @@ export default {
// 2线10 mm
// 3线>50
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if( this.spleenInfo.BaseLineSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
// 1线130mm
// 2线20 mm
// 3>130 mm
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if( this.spleenInfo.BaseLineSpleenLength > 130 && this.spleenInfo.LowSpleenLength <= 130 && diffFromBaseline >= 20 && length > 130){
// 1线 >130 mm
// 2访访 130mm
// 320 mm
// 4>130 mm
//
this.$set(this.questionForm, this.spleenStatusId, '4')
this.calculateSpleenStatus = '4'
// this.$set(this.questionForm, this.spleenStatusId, '4')
// this.calculateSpleenStatus = '4'
status = '4'
}else if(length < 130){
// 访130mm
//
this.$set(this.questionForm, this.spleenStatusId, '1')
this.calculateSpleenStatus = '1'
// this.$set(this.questionForm, this.spleenStatusId, '1')
// this.calculateSpleenStatus = '1'
status = '1'
}else if(this.spleenInfo.BaseLineState === '6' && percentFormBaseline < -50){
// 1线
// 2线-50
//
this.$set(this.questionForm, this.spleenStatusId, '2')
this.calculateSpleenStatus = '2'
// this.$set(this.questionForm, this.spleenStatusId, '2')
// this.calculateSpleenStatus = '2'
status = '2'
}else{
this.$set(this.questionForm, this.spleenStatusId, '3')
this.calculateSpleenStatus = '3'
// this.$set(this.questionForm, this.spleenStatusId, '3')
// this.calculateSpleenStatus = '3'
status = '3'
}
}
}
return status
},
resetFormItemData(v) {
this.questionForm[v] = null
@ -514,6 +549,9 @@ export default {
},
setFormItemData(obj) {
this.questionForm[obj.key] = obj.val
if(obj.key === this.spleenStatusId){
this.setSpleenCommentDisplay()
}
}
}
}