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 e8115b57..8695a985 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 @@ -472,6 +472,12 @@ export default { } } }) + DicomEvent.$on('operateImageMarker', (data) => { + let { operateStateEnum, QuestionId, picturePath } = data + if (this.question.Id === QuestionId) { + this.operateImageMarker({ operateStateEnum, question: this.question, picturePath }) + } + }) }, methods: { numberInput(id) { 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 2527679b..5e8a314f 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 @@ -577,7 +577,6 @@ export default { try { const answers = [{ id: obj.question.Id, answer: this.questionForm[obj.question.Id] }] const markInfo = [] - console.log(this.questionMarkInfoList, 'this.questionMarkInfoList') const index = this.questionMarkInfoList.findIndex( item => item.QuestionId === this.operateQuestionId ) @@ -594,14 +593,16 @@ export default { } annotation = this.getAnnotationByRow(obj.question.Id, false) // 截图上传 - let picturePath = '' + let picturePath = obj.picturePath if (annotation) { const base64Str = await this.getScreenshots({ visitTaskId: this.visitTaskId, annotation }) - const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str) - picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : '' + if (!picturePath) { + const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str) + picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : '' + } markInfo[0].PicturePath = picturePath } markInfo[0].MarkId = annotation ? annotation.annotationUID : null @@ -615,6 +616,17 @@ export default { isSaved: true, OrderMarkName: this.questionMarkInfoList[index].OrderMarkName }) + if (annotation) { + for (let i = 0; i < this.questionMarkInfoList.length; i++) { + const item = this.questionMarkInfoList[i] + if (!item.MeasureData || item.MeasureData.annotationUID !== annotation.annotationUID) continue + const isTableMode = item.TableQuestionId + if (!isTableMode && this.questionsMarkStatus[item.QuestionId] && !this.questionsMarkStatus[item.QuestionId].isSaved && this.questionsMarkStatus[item.QuestionId].isMarked) { + DicomEvent.$emit('operateImageMarker', { QuestionId: item.QuestionId, operateStateEnum: 5, picturePath }) + break + } + } + } } catch (e) { console.error('保存失败:', e) } finally { @@ -721,7 +733,6 @@ export default { return index > -1 ? this.questionMarkInfoList[index].MeasureData : null }, async bindAnnotationToQuestion(annotation) { - console.log(this.operateStateEnum, 'bindAnnotationToQuestion') try { const VALID_STATES = [null, 0, 1, 3] const currentState = this.operateStateEnum