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