病灶保存bug修复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a0c5c7d304
commit
38c06595aa
|
@ -639,6 +639,7 @@ export default {
|
|||
}
|
||||
const stateId = this.getQuestionId(7, tableInfo.TableQuestions.Questions)
|
||||
answer[stateId] = state
|
||||
answer.LesionState = state
|
||||
tableInfo.TableQuestions.Answers.push(answer)
|
||||
if (typeof annotation === 'object') {
|
||||
answer.MeasureData = annotation
|
||||
|
@ -782,518 +783,523 @@ export default {
|
|||
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate()
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`]
|
||||
const measureData = innerForm.MeasureData
|
||||
const lesionState = innerForm.LesionState
|
||||
let lesionLength = innerForm.LesionLength
|
||||
let lesionShort = innerForm.LesionShort
|
||||
const lymphNodes = innerForm.IsLymphNodes
|
||||
const lesionType = table.LesionType
|
||||
const lesionPart = innerForm.LesionPart
|
||||
if (this.isBaseLineTask) {
|
||||
// 基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (lesionType === 0 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具,短径大于等于15mm
|
||||
if (!(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 15)) {
|
||||
// 评估状态为存在的淋巴结靶病灶需使用长短径测量工具添加标记,且短径须大于15mm!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg19'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if ((lesionPart === '肝门淋巴结' || lesionPart === 'Lymph node-hilum of liver') && !(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 20)) {
|
||||
// 靶病灶部位为肝门淋巴结时,选择要求时短轴≥2cm
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg2'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
|
||||
if (!(measureData && measureData.markTool === 'Length' && lesionLength >= 10 && (measureData.sliceThickness && lesionLength >= 2 * measureData.sliceThickness || !measureData.sliceThickness))) {
|
||||
// 评估状态为存在的非淋巴结靶病灶需使用直径测量工具添加标记,长径须大于10mm且不小于2倍层厚!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg20'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
try {
|
||||
const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`]
|
||||
const measureData = innerForm.MeasureData
|
||||
const lesionState = innerForm.LesionState
|
||||
let lesionLength = innerForm.LesionLength
|
||||
let lesionShort = innerForm.LesionShort
|
||||
const lymphNodes = innerForm.IsLymphNodes
|
||||
const lesionType = table.LesionType
|
||||
const lesionPart = innerForm.LesionPart
|
||||
if (this.isBaseLineTask) {
|
||||
// 基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (lesionType === 0 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
console.log('靶病灶且状态为存在')
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具,短径大于等于15mm
|
||||
if (!(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 15)) {
|
||||
// 评估状态为存在的淋巴结靶病灶需使用长短径测量工具添加标记,且短径须大于15mm!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg19'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if ((lesionPart === '肝门淋巴结' || lesionPart === 'Lymph node-hilum of liver') && !(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 20)) {
|
||||
// 靶病灶部位为肝门淋巴结时,选择要求时短轴≥2cm
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg2'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 直径测量工具 长径须大于等于10mm且不小于2倍层厚
|
||||
if (!(measureData && measureData.markTool === 'Length' && lesionLength >= 10 && (measureData.sliceThickness && lesionLength >= 2 * measureData.sliceThickness || !measureData.sliceThickness))) {
|
||||
// 评估状态为存在的非淋巴结靶病灶需使用直径测量工具添加标记,长径须大于10mm且不小于2倍层厚!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg20'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (lesionType === 1 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结非靶病灶 必须使用长短径测量工具或箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的淋巴结非靶病灶需使用长短径测量工具或矩形工具添加标记
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg21'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具或箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的非淋巴结非靶病灶需使用直径测量工具或矩形工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg22'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (lesionType === 1 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结非靶病灶 必须使用长短径测量工具或箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的淋巴结非靶病灶需使用长短径测量工具或矩形工具添加标记
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg21'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具或箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的非淋巴结非靶病灶需使用直径测量工具或矩形工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg22'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 非基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (lesionType === 0 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具
|
||||
if (!(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 10)) {
|
||||
// 评估状态为存在的淋巴结靶病灶需使用长短径测量工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg23'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 直径测量工具
|
||||
if (!(measureData && measureData.markTool === 'Length')) {
|
||||
// `评估状态为存在的非淋巴结靶病灶需使用直径测量工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg24'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else {
|
||||
// 非基线
|
||||
// 靶病灶且状态为存在(0)
|
||||
if (lesionType === 0 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具
|
||||
if (!(measureData && measureData.markTool === 'Bidirectional' && lesionShort >= 10)) {
|
||||
// 评估状态为存在的淋巴结靶病灶需使用长短径测量工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg23'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 直径测量工具
|
||||
if (!(measureData && measureData.markTool === 'Length')) {
|
||||
// `评估状态为存在的非淋巴结靶病灶需使用直径测量工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg24'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 靶病灶且状态为太小(1)
|
||||
if (lesionType === 0 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用箭头工具,短径记录为5mm
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为太小的淋巴结靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg25'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const shortId = this.getQuestionId(1, table.TableQuestions.Questions)
|
||||
this.$set(innerForm, shortId, 5)
|
||||
lesionShort = 5
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 箭头工具,长径记录为5mm
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为太小的非淋巴结靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg26'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0, table.TableQuestions.Questions)
|
||||
this.$set(this.questionForm, lengthId, 5)
|
||||
lesionLength = 5
|
||||
// 靶病灶且状态为太小(1)
|
||||
if (lesionType === 0 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用箭头工具,短径记录为5mm
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为太小的淋巴结靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg25'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const shortId = this.getQuestionId(1, table.TableQuestions.Questions)
|
||||
this.$set(innerForm, shortId, 5)
|
||||
lesionShort = 5
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 箭头工具,长径记录为5mm
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为太小的非淋巴结靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg26'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0, table.TableQuestions.Questions)
|
||||
this.$set(this.questionForm, lengthId, 5)
|
||||
lesionLength = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为无法评估(2)
|
||||
if (lesionType === 0 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 不需要添加标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的淋巴结靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg27'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 不需要添加标记
|
||||
if (measureData) {
|
||||
// 状态为无法评估的非淋巴结靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg28'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 靶病灶且状态为无法评估(2)
|
||||
if (lesionType === 0 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 不需要添加标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的淋巴结靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg27'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 不需要添加标记
|
||||
if (measureData) {
|
||||
// 状态为无法评估的非淋巴结靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg28'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 靶病灶且状态为消失(3)
|
||||
if (lesionType === 0 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' && lesionShort < 10))) {
|
||||
// `评估状态为消失的淋巴结靶病灶需使用长短径工具添加标记,且短径需小于10mm!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg29'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 箭头工具
|
||||
if (!(measureData && measureData.markTool === 'ArrowAnnotate')) {
|
||||
// 评估状态为消失的非淋巴结靶病灶只能使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg30'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0, table.TableQuestions.Questions)
|
||||
this.$set(innerForm, lengthId, 0)
|
||||
lesionLength = 0
|
||||
// 靶病灶且状态为消失(3)
|
||||
if (lesionType === 0 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' && lesionShort < 10))) {
|
||||
// `评估状态为消失的淋巴结靶病灶需使用长短径工具添加标记,且短径需小于10mm!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg29'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结靶病灶 箭头工具
|
||||
if (!(measureData && measureData.markTool === 'ArrowAnnotate')) {
|
||||
// 评估状态为消失的非淋巴结靶病灶只能使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg30'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
} else if (measureData && measureData.markTool === 'ArrowAnnotate') {
|
||||
const lengthId = this.getQuestionId(0, table.TableQuestions.Questions)
|
||||
this.$set(innerForm, lengthId, 0)
|
||||
lesionLength = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (lesionType === 1 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结非靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的淋巴结非靶病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg31'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的非淋巴结非靶病灶需使用直径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg32'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 非靶病灶且状态为存在(0)
|
||||
if (lesionType === 1 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结非靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的淋巴结非靶病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg31'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为存在的非淋巴结非靶病灶需使用直径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg32'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为显著增大(1)
|
||||
if (lesionType === 1 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// `评估状态为显著增大的淋巴结非靶病灶需使用长短径测量工具或矩形工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg33'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为显著增大的非淋巴结非靶病灶需使用直径测量工具或矩形工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg34'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 非靶病灶且状态为显著增大(1)
|
||||
if (lesionType === 1 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// `评估状态为显著增大的淋巴结非靶病灶需使用长短径测量工具或矩形工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg33'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'RectangleRoi'))) {
|
||||
// 评估状态为显著增大的非淋巴结非靶病灶需使用直径测量工具或矩形工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg34'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为无法评估(2)
|
||||
if (lesionType === 1 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 无标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的淋巴结非靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg35'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 无标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的非淋巴结非靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg36'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 非靶病灶且状态为无法评估(2)
|
||||
if (lesionType === 1 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 无标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的淋巴结非靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg35'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 无标记
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的非淋巴结非靶病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg36'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非靶病灶且状态为消失(3)
|
||||
if (lesionType === 1 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的淋巴结非靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg37'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的非淋巴结非靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg38'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 非靶病灶且状态为消失(3)
|
||||
if (lesionType === 1 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的淋巴结非靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg37'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的非淋巴结非靶病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg38'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为存在(0)
|
||||
if (lesionType === 2 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为存在的淋巴结新病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg39'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为存在的非淋巴结新病灶需使用直径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg40'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if (measureData && measureData.markTool === 'Length' && innerForm.IntrahepaticLesion && lesionLength < 10) {
|
||||
// 病灶状态为“明确”的典型肝内病灶,长径应不小于10mm。
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg3'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 新病灶且状态为存在(0)
|
||||
if (lesionType === 2 && lesionState === 0) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为存在的淋巴结新病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg39'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为存在的非淋巴结新病灶需使用直径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg40'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if (measureData && measureData.markTool === 'Length' && innerForm.IntrahepaticLesion && lesionLength < 10) {
|
||||
// 病灶状态为“明确”的典型肝内病灶,长径应不小于10mm。
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg3'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为疑似(1)
|
||||
if (lesionType === 2 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为疑似的淋巴结新病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg41'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// `评估状态为疑似的非淋巴结新病灶需使用直径测量工具或箭头工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg42'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if (measureData && measureData.markTool === 'Length' && innerForm.IntrahepaticLesion && lesionLength >= 10) {
|
||||
// 病灶状态为“疑似”的典型肝内病灶,长径应小于10mm。
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg4'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 新病灶且状态为疑似(1)
|
||||
if (lesionType === 2 && lesionState === 1) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Bidirectional' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为疑似的淋巴结新病灶需使用长短径测量工具或箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg41'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// `评估状态为疑似的非淋巴结新病灶需使用直径测量工具或箭头工具添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg42'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
if (measureData && measureData.markTool === 'Length' && innerForm.IntrahepaticLesion && lesionLength >= 10) {
|
||||
// 病灶状态为“疑似”的典型肝内病灶,长径应小于10mm。
|
||||
this.$confirm(this.$t('trials:mRecist:warnning:msg4'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为无法评估(2)
|
||||
if (lesionType === 2 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (measureData) {
|
||||
// `评估状态为无法评估的淋巴结新病灶不需要添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg43'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的非淋巴结新病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg44'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 新病灶且状态为无法评估(2)
|
||||
if (lesionType === 2 && lesionState === 2) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (measureData) {
|
||||
// `评估状态为无法评估的淋巴结新病灶不需要添加标记!`
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg43'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 非淋巴结非靶病灶 直径测量工具、箭头工具
|
||||
if (measureData) {
|
||||
// 评估状态为无法评估的非淋巴结新病灶不需要添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg44'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 新病灶且状态为消失(3)
|
||||
if (lesionType === 2 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的淋巴结新病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg45'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的非淋巴结新病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg46'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
// 新病灶且状态为消失(3)
|
||||
if (lesionType === 2 && lesionState === 3) {
|
||||
if (lymphNodes === 1) {
|
||||
// 淋巴结靶病灶 必须使用长短径测量工具、箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的淋巴结新病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg45'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 箭头工具
|
||||
if (!(measureData && (measureData.markTool === 'ArrowAnnotate'))) {
|
||||
// 评估状态为消失的非淋巴结新病灶需使用箭头工具添加标记!
|
||||
this.$confirm(this.$t('trials:reading:warnning:msg46'), {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 获取截图
|
||||
const obj = Object.assign({}, measureData)
|
||||
obj.visitTaskId = this.visitTaskId
|
||||
obj.lesionName = innerForm.LesionName
|
||||
let picturePath = ''
|
||||
if (measureData) {
|
||||
const base64Str = await this.getScreenshots(obj)
|
||||
const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, base64Str)
|
||||
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
}
|
||||
const answers = []
|
||||
const reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
|
||||
for (const k in innerForm) {
|
||||
if (reg.test(k)) {
|
||||
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||
answers.push({ tableQuestionId: k, answer: innerForm[k] })
|
||||
// 获取截图
|
||||
const obj = Object.assign({}, measureData)
|
||||
obj.visitTaskId = this.visitTaskId
|
||||
obj.lesionName = innerForm.LesionName
|
||||
let picturePath = ''
|
||||
if (measureData) {
|
||||
const base64Str = await this.getScreenshots(obj)
|
||||
const pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, base64Str)
|
||||
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
}
|
||||
const answers = []
|
||||
const reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
|
||||
for (const k in innerForm) {
|
||||
if (reg.test(k)) {
|
||||
if (answers.findIndex(i => i.tableQuestionId === k) === -1) {
|
||||
answers.push({ tableQuestionId: k, answer: innerForm[k] })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const params = {
|
||||
questionId: table.Id,
|
||||
rowId: innerForm.RowId,
|
||||
rowIndex: innerForm.RowIndex,
|
||||
visitTaskId: this.visitTaskId,
|
||||
trialId: this.$route.query.trialId,
|
||||
measureData: measureData ? JSON.stringify(measureData) : '',
|
||||
answerList: answers,
|
||||
isCanEditPosition: innerForm.IsCanEditPosition,
|
||||
studyId: measureData ? measureData.studyId : '',
|
||||
seriesId: measureData ? measureData.seriesId : '',
|
||||
instanceId: measureData ? measureData.instanceId : '',
|
||||
numberOfFrames: measureData ? measureData.frame : null,
|
||||
picturePath: picturePath,
|
||||
organInfoId: innerForm.OrganInfoId,
|
||||
markTool: measureData ? measureData.markTool : '',
|
||||
isDicomReading: innerForm.IsDicomReading
|
||||
}
|
||||
if (this.deleteTargetInfo && this.deleteTargetInfo.newLesionName === innerForm.LesionName) {
|
||||
await deleteReadingRowAnswer({
|
||||
const params = {
|
||||
questionId: table.Id,
|
||||
rowId: innerForm.RowId,
|
||||
rowIndex: innerForm.RowIndex,
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.deleteTargetInfo.tableId,
|
||||
rowId: this.deleteTargetInfo.rowId
|
||||
})
|
||||
this.deleteTargetInfo = null
|
||||
params.rowId = ''
|
||||
trialId: this.$route.query.trialId,
|
||||
measureData: measureData ? JSON.stringify(measureData) : '',
|
||||
answerList: answers,
|
||||
isCanEditPosition: innerForm.IsCanEditPosition,
|
||||
studyId: measureData ? measureData.studyId : '',
|
||||
seriesId: measureData ? measureData.seriesId : '',
|
||||
instanceId: measureData ? measureData.instanceId : '',
|
||||
numberOfFrames: measureData ? measureData.frame : null,
|
||||
picturePath: picturePath,
|
||||
organInfoId: innerForm.OrganInfoId,
|
||||
markTool: measureData ? measureData.markTool : '',
|
||||
isDicomReading: innerForm.IsDicomReading
|
||||
}
|
||||
if (this.deleteTargetInfo && this.deleteTargetInfo.newLesionName === innerForm.LesionName) {
|
||||
await deleteReadingRowAnswer({
|
||||
visitTaskId: this.visitTaskId,
|
||||
questionId: this.deleteTargetInfo.tableId,
|
||||
rowId: this.deleteTargetInfo.rowId
|
||||
})
|
||||
this.deleteTargetInfo = null
|
||||
params.rowId = ''
|
||||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.getTableQuestions()
|
||||
this.$emit('getAnnotations', this.visitTaskId)
|
||||
this.activeName = ''
|
||||
}
|
||||
loading.close()
|
||||
} catch(e) {
|
||||
loading.close()
|
||||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.getTableQuestions()
|
||||
this.$emit('getAnnotations', this.visitTaskId)
|
||||
this.activeName = ''
|
||||
}
|
||||
loading.close()
|
||||
},
|
||||
// 上传截图
|
||||
async uploadScreenshots(fileName, file) {
|
||||
|
|
Loading…
Reference in New Issue