RecistBM标准更改

This commit is contained in:
2024-07-17 17:31:27 +08:00
parent 75efdcf0f7
commit da0dabecca
3 changed files with 342 additions and 337 deletions
@@ -833,8 +833,8 @@ export default {
const isLymphLesion = this.getQuestionVal(2)
const lesionLength = this.getQuestionVal(0)
const lesionShort = this.getQuestionVal(1)
const bLesionL = !isNaN(parseFloat(this.answers.LastTaskMajorAxis)) ? parseFloat(this.answers.BaseLineMajorAxis) : 0
const bLesionS = !isNaN(parseFloat(this.answers.LastTaskShortAxis)) ? parseFloat(this.answers.BaseLineShortAxis) : 0
const bLesionL = !isNaN(parseFloat(this.answers.BaseLineMajorAxis)) ? parseFloat(this.answers.BaseLineMajorAxis) : 0
const bLesionS = !isNaN(parseFloat(this.answers.BaseLineShortAxis)) ? parseFloat(this.answers.BaseLineShortAxis) : 0
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort < bLesionS) {
const v = this.isConvertedTask ? 4 : 1
arr = arr.filter(i => i.value !== v)
@@ -1985,14 +1985,12 @@ export default {
}
const res = await submitTableQuestion(params)
if (res.IsSuccess) {
// 保存成功!
// 保存成功!
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var isLymphLesion = this.getQuestionVal(2)
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
@@ -2006,6 +2004,7 @@ export default {
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
@@ -765,8 +765,8 @@ export default {
const isLymphLesion = this.getQuestionVal(2)
const lesionLength = this.getQuestionVal(0)
const lesionShort = this.getQuestionVal(1)
const bLesionL = !isNaN(parseFloat(this.answers.LastTaskMajorAxis)) ? parseFloat(this.answers.BaseLineMajorAxis) : 0
const bLesionS = !isNaN(parseFloat(this.answers.LastTaskShortAxis)) ? parseFloat(this.answers.BaseLineShortAxis) : 0
const bLesionL = !isNaN(parseFloat(this.answers.BaseLineMajorAxis)) ? parseFloat(this.answers.BaseLineMajorAxis) : 0
const bLesionS = !isNaN(parseFloat(this.answers.BaseLineShortAxis)) ? parseFloat(this.answers.BaseLineShortAxis) : 0
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort < bLesionS) {
arr = arr.filter(i => i.value !== 1)
} else if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort >= 10 && lesionShort > bLesionS) {
@@ -1348,8 +1348,8 @@ export default {
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
loading.close()
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
@@ -344,16 +344,15 @@ export default {
await this.getOrganInfoList()
// 首次分裂的病灶默认状态为空时,设置默认值为存在
if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && isNaN(parseInt(this.getQuestionVal(7)))) {
if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && lesionState === '') {
const stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, 0)
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
const lesionLength = this.getQuestionVal(0)
const lesionShort = this.getQuestionVal(1)
const lesionState = this.getQuestionVal(7)
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
}
this.isRender = true
@@ -519,8 +518,8 @@ export default {
}
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
const lesionLength = this.getQuestionVal(0)
const lesionState = this.getQuestionVal(7)
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
if (question.QuestionMark === 7) {
@@ -579,9 +578,8 @@ export default {
}
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
var lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
var lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
var lesionLength = this.getQuestionVal(0)
var lesionShort = this.getQuestionVal(1)
// 当前添加的新病灶不做处理
if (!(this.isCurrentTaskAdd === 'True')) {
@@ -601,7 +599,7 @@ export default {
}
}
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
const lesionState = this.getQuestionVal(7)
var status = ''
if (lesionState) {
if (this.lesionType === 0 && lesionState === 1) {
@@ -650,8 +648,8 @@ export default {
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionL = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
var lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
const lesionL = this.getQuestionVal(0)
var lesionState = this.getQuestionVal(7)
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionLength: lesionL, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.toolType = measureData.type
DicomEvent.$emit('refreshStudyListMeasureData')
@@ -684,17 +682,16 @@ export default {
},
filterState(arr) {
if (!this.isBaseLineTask) {
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : 0
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : 0
const lastLesionL = !isNaN(parseInt(this.answers.LastTaskMajorAxis)) ? parseInt(this.answers.LastTaskMajorAxis) : 0
const lastLesionS = !isNaN(parseInt(this.answers.LastTaskShortAxis)) ? parseInt(this.answers.LastTaskShortAxis) : 0
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionShort < lastLesionS) {
const isLymphLesion = this.getQuestionVal(2)
const lesionLength = this.getQuestionVal(0)
const lesionShort = this.getQuestionVal(1)
const bLesionL = !isNaN(parseInt(this.answers.LastTaskMajorAxis)) ? parseInt(this.answers.LastTaskMajorAxis) : 0
const bLesionS = !isNaN(parseInt(this.answers.LastTaskShortAxis)) ? parseInt(this.answers.LastTaskShortAxis) : 0
if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort < bLesionS) {
arr = arr.filter(i => i.value !== 1)
} else if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionShort >= 10 && lesionShort > lastLesionS) {
} else if (this.lesionType === 1 && isLymphLesion === 1 && this.questionForm.MeasureData && this.questionForm.MeasureData.type === 'Bidirectional' && lesionShort >= 10 && lesionShort > bLesionS) {
arr = arr.filter(i => i.value === 0 || i.value === 1)
} else if (this.lesionType === 1 && isLymphLesion === 0 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionLength < lastLesionL) {
} else if (this.lesionType === 1 && isLymphLesion === 0 && this.questionForm.MeasureData && (this.questionForm.MeasureData.type === 'Length' || this.questionForm.MeasureData.type === 'Bidirectional') && lesionLength < bLesionL) {
arr = arr.filter(i => i.value !== 1)
}
return arr
@@ -758,223 +755,224 @@ export default {
// 生成Blob对象(文件对象)
return new Blob([bytesCode], { type: imgtype })
},
handleSave() {
this.$refs.measurementForm.validate(async valid => {
if (!valid) return
const loading = this.$loading({ fullscreen: true })
var measureData = this.questionForm.MeasureData
var lesionState = this.getQuestionVal(7)
var lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
async handleSave() {
const valid = await this.$refs.measurementForm.validate()
if (!valid) return
const loading = this.$loading({ fullscreen: true })
var measureData = this.questionForm.MeasureData
var lesionState = this.getQuestionVal(7)
var lesionLength = this.getQuestionVal(0)
if (this.isBaseLineTask) {
// 基线
// 靶病灶且状态为存在(0
if (this.lesionType === 0 && lesionState === 0) {
// 靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
if (!(measureData && measureData.type === 'Length' && lesionLength >= 10 && (measureData.thick && lesionLength >= 2 * measureData.thick || !measureData.thick))) {
// 病灶状态为“存在”的靶病灶,长径应大于10mm且不小于2倍层厚。请使用直径测量工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg06'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为存在(0
if (this.lesionType === 1 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg07'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
} else {
// 非基线
// 靶病灶且状态为存在(0
if (this.lesionType === 0 && lesionState === 0) {
if (!(measureData && measureData.type === 'Length')) {
// `病灶状态为“存在”的靶病灶,请使用直径测量工具添加标记。`
this.$confirm(this.$t('trials:readingBM:warnning:msg08'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 靶病灶且状态为太小(1
if (this.lesionType === 0 && lesionState === 1) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“太小”的靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg09'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
} else if (measureData && measureData.type === 'ArrowAnnotate') {
const lengthId = this.getQuestionId(0)
this.$set(this.questionForm, lengthId, 5)
lesionLength = 5
}
}
// 靶病灶且状态为无法评估(2
if (this.lesionType === 0 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的靶病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg10'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 靶病灶且状态为消失(3
if (this.lesionType === 0 && lesionState === 3) {
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
// 病灶状态为“消失”的靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg11'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
} else if (measureData && measureData.type === 'ArrowAnnotate') {
const lId = this.getQuestionId(0)
this.$set(this.questionForm, lId, 0)
lesionLength = 0
}
}
// 非靶病灶且状态为存在(0
if (this.lesionType === 1 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg12'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为显著增大(1
if (this.lesionType === 1 && lesionState === 1) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“显著增大”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg13'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为无法评估(2
if (this.lesionType === 1 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的非靶病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg14'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为消失(3
if (this.lesionType === 1 && lesionState === 3) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“消失”的非靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg15'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为明确(0
if (this.lesionType === 2 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“明确”的新病灶,请使用直径测量工具或箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg16'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为疑似(1
if (this.lesionType === 2 && lesionState === 1) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“疑似”的新病灶,请使用直径测量工具或箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg17'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为无法评估(2
if (this.lesionType === 2 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的新病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg18'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为消失(3
if (this.lesionType === 2 && lesionState === 3) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“消失”的新病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg19'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
if (this.isBaseLineTask) {
// 基线
// 靶病灶且状态为存在(0
if (this.lesionType === 0 && lesionState === 0) {
// 靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
if (!(measureData && measureData.type === 'Length' && lesionLength >= 10 && (measureData.thick && lesionLength >= 2 * measureData.thick || !measureData.thick))) {
// 病灶状态为“存在”的靶病灶,长径应大于10mm且不小于2倍层厚。请使用直径测量工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg06'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
// 非靶病灶且状态为存在(0
if (this.lesionType === 1 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg07'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
} else {
// 非基线
// 靶病灶且状态为存在(0
if (this.lesionType === 0 && lesionState === 0) {
if (!(measureData && measureData.type === 'Length')) {
// `病灶状态为“存在”的靶病灶,请使用直径测量工具添加标记。`
this.$confirm(this.$t('trials:readingBM:warnning:msg08'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 靶病灶且状态为太小(1
if (this.lesionType === 0 && lesionState === 1) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“太小”的靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg09'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
} else if (measureData && measureData.type === 'ArrowAnnotate') {
const lengthId = this.getQuestionId(0)
this.$set(this.questionForm, lengthId, 5)
lesionLength = 5
}
}
// 靶病灶且状态为无法评估(2
if (this.lesionType === 0 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的靶病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg10'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 靶病灶且状态为消失(3
if (this.lesionType === 0 && lesionState === 3) {
if (!(measureData && measureData.type === 'ArrowAnnotate')) {
// 病灶状态为“消失”的靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg11'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
} else if (measureData && measureData.type === 'ArrowAnnotate') {
const lId = this.getQuestionId(0)
this.$set(this.questionForm, lId, 0)
lesionLength = 0
}
}
// 非靶病灶且状态为存在(0
if (this.lesionType === 1 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“存在”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg12'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为显著增大(1
if (this.lesionType === 1 && lesionState === 1) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'RectangleRoi'))) {
// 病灶状态为“显著增大”的非靶病灶,请使用直径测量工具或矩形工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg13'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为无法评估(2
if (this.lesionType === 1 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的非靶病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg14'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 非靶病灶且状态为消失(3
if (this.lesionType === 1 && lesionState === 3) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“消失”的非靶病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg15'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为明确(0
if (this.lesionType === 2 && lesionState === 0) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“明确”的新病灶,请使用直径测量工具或箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg16'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为疑似(1
if (this.lesionType === 2 && lesionState === 1) {
if (!(measureData && (measureData.type === 'Length' || measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“疑似”的新病灶,请使用直径测量工具或箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg17'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为无法评估(2
if (this.lesionType === 2 && lesionState === 2) {
if (measureData) {
// 病灶状态为“无法评估”的新病灶,不需要添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg18'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
// 新病灶且状态为消失(3
if (this.lesionType === 2 && lesionState === 3) {
if (!(measureData && (measureData.type === 'ArrowAnnotate'))) {
// 病灶状态为“消失”的新病灶,请使用箭头工具添加标记。
this.$confirm(this.$t('trials:readingBM:warnning:msg19'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
}
}
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
try {
var picturePath = ''
if (val && measureData && this.questionForm.IsDicomReading) {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
@@ -1014,7 +1012,8 @@ export default {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
}
submitTableQuestion(params).then(async res => {
const res = await submitTableQuestion(params)
if (res.IsSuccess) {
// 保存成功!
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.currentMarkTool = measureData ? measureData.type : ''
@@ -1022,94 +1021,87 @@ export default {
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
loading.close()
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const lesionState = Number(this.getQuestionVal(7))
const lesionState = this.getQuestionVal(7)
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, lesionState, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$emit('close')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
}).catch(() => { loading.close() })
})
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
}
})
},
handleDeleteMeasureData() {
async handleDeleteMeasureData() {
// 是否确认清除标记?
this.$confirm(this.$t('trials:reading:warnning:msg47'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(async() => {
// 重置长短径 和 状态
var lengId = this.getQuestionId(0)
this.$set(this.questionForm, lengId, '')
const confirm = await this.$confirm(
this.$t('trials:reading:warnning:msg47'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
// 重置长短径 和 状态
var lengId = this.getQuestionId(0)
this.$set(this.questionForm, lengId, '')
var stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, '')
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 1)
} else {
this.$set(this.questionForm, 'saveTypeEnum', 0)
}
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
DicomEvent.$emit('getMeasureData')
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionLength = ''
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
var stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, '')
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 1)
} else {
this.$set(this.questionForm, 'saveTypeEnum', 0)
}
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
DicomEvent.$emit('getMeasureData')
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionLength = ''
const lesionState = this.getQuestionVal(7)
if (!this.questionForm.IsDicomReading) {
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
}
this.$set(this.questionForm, 'IsDicomReading', true)
if (!this.questionForm.IsDicomReading) {
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
}
this.$set(this.questionForm, 'IsDicomReading', true)
this.$set(this.questionForm, 'MeasureData', '')
let anwsers = null
if (this.answers.measureObj) {
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
} else {
anwsers = Object.assign({}, this.questionForm)
}
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
DicomEvent.$emit('refreshStudyListMeasureData')
})
.catch(() => {})
this.$set(this.questionForm, 'MeasureData', '')
let anwsers = null
if (this.answers.measureObj) {
anwsers = Object.assign({ measureObj: '' }, this.questionForm)
} else {
anwsers = Object.assign({}, this.questionForm)
}
this.$emit('resetQuestions', { isLymphLesion: 0, lesionPart, lesionOrgan, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
DicomEvent.$emit('refreshStudyListMeasureData')
},
handleDelete() {
async handleDelete() {
// 是否确认删除?
this.$confirm(this.$t('trials:reading:warnning:msg48'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(async() => {
if (this.questionForm.RowId) {
const loading = this.$loading({ fullscreen: true })
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
deleteReadingRowAnswer(param)
.then(async res => {
loading.close()
if (res.IsSuccess) {
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
}
if (!this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
DicomEvent.$emit('getReportInfo', true)
this.$message.success(this.$t('common:message:deletedSuccessfully'))
loading.close()
}
}).catch(() => { loading.close() })
} else {
const loading = this.$loading({ fullscreen: true })
try {
const confirm = await this.$confirm(
this.$t('trials:reading:warnning:msg48'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
if (this.questionForm.RowId) {
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
const res = deleteReadingRowAnswer(param)
if (res.IsSuccess) {
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
}
@@ -1117,26 +1109,41 @@ export default {
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
DicomEvent.$emit('getReportInfo', true)
this.$message.success(this.$t('common:message:deletedSuccessfully'))
}
DicomEvent.$emit('refreshStudyListMeasureData')
})
} else {
if (this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
}
if (!this.questionForm.IsDicomReading && this.questionForm.MeasureData) {
DicomEvent.$emit('removeNoneDicomMeasureData', this.questionForm.MeasureData)
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
}
DicomEvent.$emit('refreshStudyListMeasureData')
loading.close()
} catch (e) {
console.log(e)
loading.close()
}
},
handleClose() {
async handleClose() {
if (!this.questionForm.RowId) {
// '当前病灶为新建病灶,未保存。如果关闭窗口,将会删除病灶信息,是否继续?'
this.$confirm(this.$t('trials:reading:warnning:msg49'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(async() => {
// 移除新建病灶并关闭窗口
if (this.questionForm.MeasureData) {
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
}
DicomEvent.$emit('getMeasureData')
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
})
.catch(() => {})
const confirm = await this.$confirm(
this.$t('trials:reading:warnning:msg49'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
if (this.questionForm.MeasureData) {
await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
}
DicomEvent.$emit('getMeasureData')
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
} else {
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断)
@@ -1154,13 +1161,12 @@ export default {
if (isNaN(parseInt(lesionState)) && this.answers.IsFristAdd === 'False') {
const stateId = this.getQuestionId(7)
this.$set(this.questionForm, stateId, 2)
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
const isLymphLesion = this.getQuestionVal(2)
const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6)
const lesionLength = !isNaN(parseInt(this.getQuestionVal(0))) ? this.getQuestionVal(0) : ''
const lesionShort = !isNaN(parseInt(this.getQuestionVal(1))) ? this.getQuestionVal(1) : ''
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
const lesionLength = this.getQuestionVal(0)
const lesionShort = this.getQuestionVal(1)
const lesionState = this.getQuestionVal(7)
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
}
}