From 6b10d07e2a79ecd111d69ab7123d685f7e2a0b69 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 21 Mar 2025 14:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=98=85=E7=89=87?= =?UTF-8?q?=E9=A2=84=E8=A7=88paf=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customize/CustomizeQuestionFormItem.vue | 3 + .../reading/dicoms/tools/Probe/ProbeTool.js | 42 +++++++------- .../visit-review/components/EcrfList.vue | 56 ------------------- .../visit-review/components/ReportPage.vue | 2 +- 4 files changed, 26 insertions(+), 77 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue index 991b0df0..88aac319 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue @@ -1016,6 +1016,9 @@ export default { if (file && file.status === "success") { this.imageUrl = '' this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1) + this.fileList.forEach((i,index)=>{ + i.name = `${this.$t('trials:emailManageCfg:title:fileName')}${index+ 1}` + }) this.urls.splice(this.fileList.findIndex(f => f === file.url), 1) this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question }) this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '') diff --git a/src/views/trials/trials-panel/reading/dicoms/tools/Probe/ProbeTool.js b/src/views/trials/trials-panel/reading/dicoms/tools/Probe/ProbeTool.js index d2d0ec12..1c5bc0f1 100644 --- a/src/views/trials/trials-panel/reading/dicoms/tools/Probe/ProbeTool.js +++ b/src/views/trials/trials-panel/reading/dicoms/tools/Probe/ProbeTool.js @@ -15,6 +15,7 @@ const drawLinkedTextBox = cornerstoneTools.import('drawing/drawLinkedTextBox') // Utilities const getRGBPixels = cornerstoneTools.import('util/getRGBPixels') const calculateSUV = cornerstoneTools.import('util/calculateSUV') +const getROITextBoxCoords = cornerstoneTools.import('util/getROITextBoxCoords') // import { probeCursor } from '../cursors/index.js'; // import { getLogger } from '../../util/logger.js'; const throttle = cornerstoneTools.import('util/throttle') @@ -100,6 +101,14 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool { active: true, radius: 0 }, + // textBox: { + // active: false, + // hasMoved: false, + // movesIndependently: false, + // drawnIndependently: true, + // allowedOutsideImage: true, + // hasBoundingBox: true, + // } textBox: getHandle(x, y - 30, null, { highlight: false, hasMoved: true, @@ -300,15 +309,6 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool { // Coords for text if (!data.handles.hasOwnProperty('textBox')) { - // data.handles.textBox = getHandle(data.handles.end.x, data.handles.end.y - 10, null, { - // highlight: false, - // hasMoved: true, - // active: false, - // movesIndependently: false, - // drawnIndependently: true, - // allowedOutsideImage: false, - // hasBoundingBox: true - // }) const coords = { // Translate the x/y away from the cursor x: data.handles.end.x + r, @@ -327,11 +327,22 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool { ); return } + console.log(data.handles.textBox) + const handles = { + start: { + x: data.handles.end.x, + y: data.handles.end.y + }, + end: { + x: data.handles.end.x + r, + y: data.handles.end.y + } + } let xOffset = 0 if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) { let i = parseInt(data.remark.slice(-1)) if (i === 1) { - xOffset = -40 + xOffset = -60 } else if (i === 2) { xOffset = 0 } else if (i=== 3) { @@ -344,16 +355,7 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool { handles.start, handles.end ] - const handles = { - start: { - x: data.handles.end.x, - y: data.handles.end.y - }, - end: { - x: data.handles.end.x + r, - y: data.handles.end.y - } - } + drawLinkedTextBox( context, element, diff --git a/src/views/trials/trials-panel/reading/visit-review/components/EcrfList.vue b/src/views/trials/trials-panel/reading/visit-review/components/EcrfList.vue index 9c61c232..f6193867 100644 --- a/src/views/trials/trials-panel/reading/visit-review/components/EcrfList.vue +++ b/src/views/trials/trials-panel/reading/visit-review/components/EcrfList.vue @@ -174,38 +174,6 @@ export default { }, - // async getQuestions() { - // this.loading = true - // try { - // const param = { - // readingQuestionCriterionTrialId: this.criterionId, - // visitTaskId: this.visitTaskId - // } - // const res = await getTrialReadingQuestion(param) - // if (res.IsSuccess) { - // this.readingTaskState = res.OtherInfo.readingTaskState - // res.Result.SinglePage.map((v) => { - // if (v.Type === 'group' && v.Childrens.length === 0 && v.Type !== 'table' && v.Type !== 'basicTable') return - // if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') { - // this.$set(this.questionForm, v.Id, v.Answer) - // } - // if (v.Type === 'table' || v.Type === 'basicTable') { - // this.$set(this.questionForm, v.Id, v.TableQuestions.Answers) - // } - // if (v.Type === 'number') { - // this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces)) - // } - // if (v.Childrens.length > 0) { - // this.setChild(v.Childrens) - // } - // }) - // this.questions = res.Result.SinglePage - // } - // this.loading = false - // } catch (e) { - // this.loading = false - // } - // }, setChild(obj) { obj.forEach(i => { if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') { @@ -266,30 +234,6 @@ export default { this.loading = false } }, - async handleSave1() { - const valid = await this.$refs['questions'].validate() - if (!valid) return - this.loading = true - const answers = [] - for (const k in this.questionForm) { - answers.push({ readingQuestionTrialId: k, answer: this.questionForm[k] }) - } - const params = { - trialId: this.trialId, - visitTaskId: this.visitTaskId, - readingQuestionCriterionTrialId: this.criterionId, - answerList: answers - } - try { - const res = await saveVisitTaskQuestions(params) - if (res.IsSuccess) { - this.$message.success(this.$t('common:message:savedSuccessfully')) - } - this.loading = false - } catch (e) { - this.loading = false - } - }, async handleSubmit() { const valid = await this.$refs['questions'].validate() if (!valid) return diff --git a/src/views/trials/trials-panel/reading/visit-review/components/ReportPage.vue b/src/views/trials/trials-panel/reading/visit-review/components/ReportPage.vue index 7bf24721..e3cf5c70 100644 --- a/src/views/trials/trials-panel/reading/visit-review/components/ReportPage.vue +++ b/src/views/trials/trials-panel/reading/visit-review/components/ReportPage.vue @@ -173,7 +173,7 @@