自定义阅片预览paf更改
continuous-integration/drone/push Build is passing Details

uat
caiyiling 2025-03-21 14:03:53 +08:00
parent 032e710890
commit 6b10d07e2a
4 changed files with 26 additions and 77 deletions

View File

@ -1016,6 +1016,9 @@ export default {
if (file && file.status === "success") { if (file && file.status === "success") {
this.imageUrl = '' this.imageUrl = ''
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1) 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.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.$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('|') : '') this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')

View File

@ -15,6 +15,7 @@ const drawLinkedTextBox = cornerstoneTools.import('drawing/drawLinkedTextBox')
// Utilities // Utilities
const getRGBPixels = cornerstoneTools.import('util/getRGBPixels') const getRGBPixels = cornerstoneTools.import('util/getRGBPixels')
const calculateSUV = cornerstoneTools.import('util/calculateSUV') const calculateSUV = cornerstoneTools.import('util/calculateSUV')
const getROITextBoxCoords = cornerstoneTools.import('util/getROITextBoxCoords')
// import { probeCursor } from '../cursors/index.js'; // import { probeCursor } from '../cursors/index.js';
// import { getLogger } from '../../util/logger.js'; // import { getLogger } from '../../util/logger.js';
const throttle = cornerstoneTools.import('util/throttle') const throttle = cornerstoneTools.import('util/throttle')
@ -100,6 +101,14 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
active: true, active: true,
radius: 0 radius: 0
}, },
// textBox: {
// active: false,
// hasMoved: false,
// movesIndependently: false,
// drawnIndependently: true,
// allowedOutsideImage: true,
// hasBoundingBox: true,
// }
textBox: getHandle(x, y - 30, null, { textBox: getHandle(x, y - 30, null, {
highlight: false, highlight: false,
hasMoved: true, hasMoved: true,
@ -300,15 +309,6 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
// Coords for text // Coords for text
if (!data.handles.hasOwnProperty('textBox')) { 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 = { const coords = {
// Translate the x/y away from the cursor // Translate the x/y away from the cursor
x: data.handles.end.x + r, x: data.handles.end.x + r,
@ -327,11 +327,22 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
); );
return 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 let xOffset = 0
if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) { if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) {
let i = parseInt(data.remark.slice(-1)) let i = parseInt(data.remark.slice(-1))
if (i === 1) { if (i === 1) {
xOffset = -40 xOffset = -60
} else if (i === 2) { } else if (i === 2) {
xOffset = 0 xOffset = 0
} else if (i=== 3) { } else if (i=== 3) {
@ -344,16 +355,7 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
handles.start, handles.start,
handles.end 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( drawLinkedTextBox(
context, context,
element, element,

View File

@ -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) { setChild(obj) {
obj.forEach(i => { obj.forEach(i => {
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') { if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
@ -266,30 +234,6 @@ export default {
this.loading = false 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() { async handleSubmit() {
const valid = await this.$refs['questions'].validate() const valid = await this.$refs['questions'].validate()
if (!valid) return if (!valid) return

View File

@ -173,7 +173,7 @@
<template v-else-if="scope.row.Type==='upload' && scope.row.Answers[task.VisitTaskId]"> <template v-else-if="scope.row.Type==='upload' && scope.row.Answers[task.VisitTaskId]">
<span v-for="(url,index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url" style="margin-left: 5px;"> <span v-for="(url,index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url" style="margin-left: 5px;">
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)"> <el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">
{{ `${$t('trials:noneDicom:title:attachment')}${index}` }} {{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}
</el-button> </el-button>
</span> </span>
</template> </template>