diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index b48dc850..9eba66c0 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -596,6 +596,8 @@ const { // RectangleROITool, PlanarFreehandROITool, CircleROITool, + AngleTool, + CobbAngleTool, EraserTool, MIPJumpToClickTool, VolumeRotateTool, @@ -1136,6 +1138,8 @@ export default { cornerstoneTools.addTool(BidirectionalTool) cornerstoneTools.addTool(ScaleOverlayTool) cornerstoneTools.addTool(CircleROITool) + cornerstoneTools.addTool(AngleTool) + cornerstoneTools.addTool(CobbAngleTool) cornerstoneTools.addTool(MIPJumpToClickTool) cornerstoneTools.addTool(VolumeRotateTool) @@ -1183,6 +1187,12 @@ export default { toolGroup.addTool(CircleROITool.toolName, { getTextLines: this.getCircleROIToolTextLines }) + toolGroup.addTool(AngleTool.toolName, { + getTextLines: this.getAngleToolTextLines + }) + toolGroup.addTool(CobbAngleTool.toolName, { + getTextLines: this.getCobbAngleToolTextLines + }) if (toolGroupId === 'viewport-fusion-3') { toolGroup.addTool(VolumeRotateTool.toolName) toolGroup.setToolActive(VolumeRotateTool.toolName, { @@ -1229,6 +1239,8 @@ export default { toolGroup.setToolPassive(LengthTool.toolName) toolGroup.setToolPassive(BidirectionalTool.toolName) toolGroup.setToolPassive(CircleROITool.toolName) + toolGroup.setToolPassive(AngleTool.toolName) + toolGroup.setToolPassive(CobbAngleTool.toolName) } else { toolGroup.setToolEnabled(ArrowAnnotateTool.toolName) toolGroup.setToolEnabled(RectangleROITool.toolName) @@ -1236,6 +1248,8 @@ export default { toolGroup.setToolEnabled(LengthTool.toolName) toolGroup.setToolEnabled(BidirectionalTool.toolName) toolGroup.setToolEnabled(CircleROITool.toolName) + toolGroup.setToolEnabled(AngleTool.toolName) + toolGroup.setToolEnabled(CobbAngleTool.toolName) } toolGroup.setToolPassive(EraserTool.toolName) }) @@ -1666,7 +1680,6 @@ export default { } const textLines = [] if (data.label) { - // textLines.push(data.label) textLines.push(data.status ? `${data.label}(${data.status})` : data.label) } textLines.push(`${parseFloat(length).toFixed(this.digitPlaces)} ${unit}`) @@ -1688,7 +1701,9 @@ export default { } = cachedVolumeStats || {} const textLines = [] - + if (data.label) { + textLines.push(data.label) + } if (area) { const areaLine = isEmptyArea ? `Area: Oblique not supported` @@ -1743,6 +1758,9 @@ export default { } const textLines = [] + if (data.label) { + textLines.push(data.label) + } textLines.push(`Area: ${this.reRound(area, this.digitPlaces)} ${areaUnit}`) textLines.push(`Mean: ${this.reRound(mean, this.digitPlaces)} ${modalityUnit}`) @@ -1756,11 +1774,8 @@ export default { const { length, width, unit } = cachedStats[targetId] const textLines = [] - // if (label) { - // textLines.push(label); - // } + if (label) { - // textLines.push(label) textLines.push(data.status ? `${label}(${data.status})` : label) } if (length === undefined) { @@ -1790,7 +1805,7 @@ export default { const textLines = [] if (data.label) { // textLines.push(data.label) - textLines.push(data.status ? `${data.label}(${data.status})` : data.label) + textLines.push(data.label) } if (radius) { @@ -1821,8 +1836,40 @@ export default { return textLines }, + getAngleToolTextLines(data, targetId) { + const cachedVolumeStats = data.cachedStats[targetId] + const { angle } = cachedVolumeStats + if (angle === undefined) { + return + } + + if (isNaN(angle)) { + return [`${angle}`] + } + const textLines = [] + if (label) { + textLines.push(label) + } + textLines.push(`${angle.toFixed(this.digitPlaces)} ${String.fromCharCode(176)}`) + return textLines + }, + getCobbAngleToolTextLines(data, targetId) { + const cachedVolumeStats = data.cachedStats[targetId] + const { angle } = cachedVolumeStats + + if (angle === undefined) { + return + } + const textLines = [] + if (label) { + textLines.push(label) + } + textLines.push(`${angle.toFixed(this.digitPlaces)} ${String.fromCharCode(176)}`) + + return textLines + }, reRound(result, finalPrecision) { - if (result.includes(', ')) { + if (typeof result === 'string' && result.includes(', ')) { const numStrs = result.split(', ') const processed = numStrs.map(str => this.processSingle(str, finalPrecision)) return processed.join(', ') diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue index 586c878e..fb4cf890 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue @@ -232,9 +232,9 @@ { formItemNumberChange(val, question) }" - @blur="!questionsMarkStatus[question.Id] ? handleBlur(questionForm[question.Id], questionForm, question.Id) : ()=>{}" + @blur="questionsMarkStatus[question.Id] && questionsMarkStatus[question.Id].isMarked ? ()=>{} : handleMarkedQsBlur(questionForm[question.Id], questionForm, question.Id, question) " v-model="questionForm[question.Id]" - :disabled="(questionsMarkStatus[question.Id] && question.ImageMarkEnum === 2) || question.ImageMarkEnum === 1" + :disabled="(questionsMarkStatus[question.Id].isMarked && question.ImageMarkEnum === 2) || question.ImageMarkEnum === 1" style="width: 150px;" > @@ -243,7 +243,7 @@ - + 保存 @@ -601,6 +601,10 @@ export default { handleBlur(value, a, b) { this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces)) }, + handleMarkedQsBlur(value, a, b, question) { + this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces)) + this.$emit('operateImageMarker', {operateStateEnum: 6, question}) + }, deleteTableCol(row, index) { this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => { const loading = this.$loading({ fullscreen: true }) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue index 26270015..88466a65 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue @@ -123,7 +123,7 @@ export default { operateRowId: '', imageTool: '', imageToolAttribute: '', - questionsMarkStatus: {}, // 1:未保存;2:已保存 + questionsMarkStatus: {}, digitPlaces: 2 } }, @@ -169,8 +169,8 @@ export default { this.questions = res.Result.SinglePage this.questionsMarkStatus = {} this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList.map(i => { - if (i.QuestionId && i.MeasureData) { - this.$set(this.questionsMarkStatus, i.QuestionId, 2) + if (i.QuestionId) { + this.$set(this.questionsMarkStatus, i.QuestionId, {isMarked: i.MeasureData !== '', isSaved: true}) } if (typeof i.MeasureData === 'string' && i.MeasureData) { i.MeasureData = JSON.parse(i.MeasureData) @@ -381,9 +381,12 @@ export default { this.$set(this.questionForm, obj.question.Id, '') const i = this.questionMarkInfoList.findIndex(i => i.QuestionId === obj.question.Id) if (i > -1) { - this.questionMarkInfoList.splice(i, 1) + this.questionMarkInfoList[i].MeasureData = '' + this.questionMarkInfoList[i].StudyId = '' + this.questionMarkInfoList[i].SeriesId = '' + this.questionMarkInfoList[i].InstanceId = '' } - this.$set(this.questionsMarkStatus, obj.question.Id, 0) + this.$set(this.questionsMarkStatus, obj.question.Id, {isMarked: false, isSaved: false}) } else if (obj.operateStateEnum === 5) { // 保存标记 this.loading = true @@ -404,12 +407,15 @@ export default { } await saveTaskQuestion(-10, params) - this.$set(this.questionsMarkStatus, obj.question.Id, 2) + this.$set(this.questionsMarkStatus, obj.question.Id, {isMarked: this.questionMarkInfoList[i].MeasureData ? true : false, isSaved: true}) this.loading = false } catch (e) { console.log(e) this.loading = false } + } else if (obj.operateStateEnum === 6) { + // 更改答案 + this.$set(this.questionsMarkStatus, obj.question.Id, {isMarked: false, isSaved: false}) } }, async bindAnnotationToQuestion(annotation) { @@ -458,7 +464,7 @@ export default { this.questionMarkInfoList[i].MeasureData = annotation } this.setAnswerToQuestion(annotation, this.operateQuestionId) - this.$set(this.questionsMarkStatus, this.operateQuestionId, 1) + this.$set(this.questionsMarkStatus, this.operateQuestionId, {isMarked: true, isSaved: false}) } catch (e) { console.log(e) } @@ -468,7 +474,7 @@ export default { if (i === -1) return this.questionMarkInfoList[i].measureData = annotation this.setAnswerToQuestion(annotation, this.questionMarkInfoList[i].QuestionId) - this.$set(this.questionsMarkStatus, this.questionMarkInfoList[i].QuestionId, 1) + this.$set(this.questionsMarkStatus, this.questionMarkInfoList[i].QuestionId, {isMarked: true, isSaved: false}) }, setAnswerToQuestion(annotation, questionId) { if (!questionId || !annotation) return diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue index 114c3d39..0a34a34c 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue @@ -1,233 +1,233 @@ + + + + + + {formItemChange(val, question)})" > - - - - - - {formItemChange(val, question)})" - > - - - - - - - - - - - - - - - - {formItemChange(val, question)})" - > - - {{ val }} - - - - - - {{ val }} - - - - - { formItemChange(val, question) }" - > + + + + + + + + + + - - { formItemChange(val, question) }" - > - - {{ item.trim() }} - - - - - - - - - - {formItemNumberChange(val, question)})" - @blur="handleBlur(questionForm[question.Id], questionForm, question.Id)" - v-model="questionForm[question.Id]" - > - {{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}} - - - {{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}} - - - - - - - - - - - + - - - - - - - - + + {formItemChange(val, question)})" + > + - - - {{$t('trials:readingUnit:qsList:message:loading')}}... - - - - + {{ val }} + + + + + + {{ val }} + + + + + { formItemChange(val, question) }" + > + + + { formItemChange(val, question) }" + > + + {{ item.trim() }} + + + + + + + + + + {formItemNumberChange(val, question)})" + @blur="handleBlur(questionForm[question.Id], questionForm, question.Id)" + v-model="questionForm[question.Id]" + > + {{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}} + + + {{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}} + + + + + + + + + + + + + + + + + + + + + + + {{$t('trials:readingUnit:qsList:message:loading')}}... + + + +