非dicom阅片标记绑定问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7426be2e50
commit
aee12347dc
|
|
@ -303,3 +303,11 @@ export function saveAnswerAndBindingNoneDicomMark(param) {
|
|||
data: param
|
||||
})
|
||||
}
|
||||
// 非dicom按比例修改答案
|
||||
export function changePlottingScaleChangeAnswer(param) {
|
||||
return request({
|
||||
url: `/ReadingImageTask/changePlottingScaleChangeAnswer`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,12 +56,16 @@
|
|||
<script>
|
||||
|
||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, verifyVisitTaskQuestions, getQuestionCalculateRelation, saveTaskQuestion } from '@/api/trials'
|
||||
import { setSkipReadingCache, resetReadingTask, saveTableQuestionMark, saveAnswerAndBindingNoneDicomMark } from '@/api/reading'
|
||||
import { setSkipReadingCache, resetReadingTask, saveTableQuestionMark, saveAnswerAndBindingNoneDicomMark, changePlottingScaleChangeAnswer } from '@/api/reading'
|
||||
import const_ from '@/const/sign-code'
|
||||
import QuestionFormItem from './QuestionFormItem'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
import store from '@/store'
|
||||
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
||||
import {
|
||||
utilities as csUtils
|
||||
// getEnabledElementByIds
|
||||
} from '@cornerstonejs/core'
|
||||
export default {
|
||||
name: 'EcrfList',
|
||||
components: {
|
||||
|
|
@ -597,7 +601,8 @@ export default {
|
|||
OrderMarkName: annotation.data.label,
|
||||
NoneDicomFileId: annotation.noneDicomFileId,
|
||||
} : {}),
|
||||
Path: picturePath ? picturePath : '',
|
||||
Path: annotation.path,
|
||||
PicturePath: picturePath ? picturePath : '',
|
||||
QuestionType: 0,
|
||||
RowId: this.operateRowId,
|
||||
TableQuestionId: this.operateQuestionId,
|
||||
|
|
@ -714,7 +719,6 @@ export default {
|
|||
})
|
||||
},
|
||||
getAnnotationByRow(rowId, isTable = true) {
|
||||
console.log(this.questionMarkInfoList, 'this.questionMarkInfoList')
|
||||
let index = -1;
|
||||
if (isTable) {
|
||||
index = this.questionMarkInfoList.findIndex(
|
||||
|
|
@ -938,8 +942,8 @@ export default {
|
|||
let value = cachedStats[prop]
|
||||
if (this.isNoneDicom && annotation.ps) {
|
||||
let ps = annotation.ps
|
||||
if (prop === 'area') value = this.reRound(value * ps * ps, this.digitPlaces)
|
||||
if (prop === 'length' || prop === 'perimeter') value = this.reRound(value * ps, this.digitPlaces)
|
||||
if (prop === 'area') value = this.reRound(csUtils.roundNumber(value * ps * ps), this.digitPlaces)
|
||||
if (prop === 'length' || prop === 'perimeter') value = this.reRound(csUtils.roundNumber(value * ps), this.digitPlaces)
|
||||
}
|
||||
return value !== null
|
||||
? parseFloat(value).toFixed(this.digitPlaces)
|
||||
|
|
@ -1123,7 +1127,59 @@ export default {
|
|||
} else if (event.data.type === 'setMeasurement') {
|
||||
// this.setMeasuredData(event.data.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
async changePlottingScaleChangeAnswer(data) {
|
||||
try {
|
||||
let { noneDicomFileId, path, picturePath, isRemovePlottingScale, psArr } = data
|
||||
let param = {
|
||||
VisitTaskId: this.visitTaskId,
|
||||
NoneDicomFileId: noneDicomFileId,
|
||||
Path: path,
|
||||
PicturePath: picturePath,
|
||||
IsRemovePlottingScale: isRemovePlottingScale,
|
||||
AnswerList: []
|
||||
}
|
||||
if (!isRemovePlottingScale) {
|
||||
this.questionMarkInfoList.forEach(item => {
|
||||
if (item.Path === path && ['Length', 'Perimeter', 'Area'].includes(item.MarkTool)) {
|
||||
const referencedImageId = item?.MeasureData?.metadata?.referencedImageId
|
||||
if (!referencedImageId) return null
|
||||
const cacheKey = `imageId:${referencedImageId}`
|
||||
const cachedStats = item?.MeasureData.data?.cachedStats?.[cacheKey]
|
||||
let prop = item.MarkTool.toLowerCase();
|
||||
const hasProp = cachedStats
|
||||
&& Object.prototype.hasOwnProperty.call(cachedStats, prop)
|
||||
if (!hasProp) return null
|
||||
let value = cachedStats[prop]
|
||||
let ps = null
|
||||
const i = psArr.findIndex(i => i.Path === path)
|
||||
if (i > -1 && psArr[i].PS) {
|
||||
ps = parseFloat(psArr[i].PS).toFixed(3)
|
||||
}
|
||||
if (ps) {
|
||||
if (prop === 'area') value = this.reRound(csUtils.roundNumber(value * ps * ps), this.digitPlaces)
|
||||
if (prop === 'length' || prop === 'perimeter') value = this.reRound(csUtils.roundNumber(value * ps), this.digitPlaces)
|
||||
}
|
||||
let obj = {
|
||||
QuestionId: item.QuestionId,
|
||||
RowId: item.RowId,
|
||||
TableQuestionId: item.TableQuestionId,
|
||||
Answer: value
|
||||
}
|
||||
param.AnswerList.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.loading = true
|
||||
let res = await changePlottingScaleChangeAnswer(param)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getQuestions()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
questionsMarkStatus: {
|
||||
|
|
|
|||
|
|
@ -1066,10 +1066,8 @@ export default {
|
|||
if (psIndex > -1) {
|
||||
OldPS = this.psArr[i].OldPS
|
||||
}
|
||||
console.log(OldPS, ps)
|
||||
let Proportion = ps / OldPS
|
||||
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
||||
console.log(this.ecrf.IsHaveBindingQuestion, 'this.ecrf.IsHaveBindingQuestion')
|
||||
if (OldPS === ps || !this.ecrf.IsHaveBindingQuestion) {
|
||||
this.saveCustomAnnotation(annotation)
|
||||
} else {
|
||||
|
|
@ -1090,7 +1088,6 @@ export default {
|
|||
const operateStateEnum = this.ecrf.operateStateEnum
|
||||
const isBound = this.ecrf.isBound
|
||||
if (isBound || this.isNumber(operateStateEnum)) {
|
||||
console.log(isBound, this.isNumber(operateStateEnum))
|
||||
this.$emit('getEcrf', { type: "updateAnnotationToQuestion", VisitTaskId: this.taskInfo.VisitTaskId, annotation })
|
||||
} else {
|
||||
if (this.saveCustomAnnotationTimer) {
|
||||
|
|
@ -1215,7 +1212,7 @@ export default {
|
|||
const res = await addNoneDicomMark(params)
|
||||
annotation.markId = params.MarkId
|
||||
annotation.id = res.Result
|
||||
if (!isNaN(parseFloat(ps))) this.$emit('getEcrf', { type: "getQuestions", VisitTaskId: this.taskInfo.VisitTaskId })
|
||||
if (!isNaN(parseFloat(ps))) this.$emit('getEcrf', { type: "changePlottingScaleChangeAnswer", VisitTaskId: this.taskInfo.VisitTaskId, noneDicomFileId: annotation.noneDicomFileId, path: annotation.path || '', picturePath, psArr: this.psArr, isRemovePlottingScale: ps < 0 ? true : false })
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
|
|
@ -1225,7 +1222,6 @@ export default {
|
|||
},
|
||||
async getScreenshots(measureData, callback) {
|
||||
if (measureData) {
|
||||
console.log(measureData, 'measureData')
|
||||
// await this.imageLocation(measureData)
|
||||
this.viewCustomAnnotation(measureData)
|
||||
const divForDownloadViewport = document.querySelector(
|
||||
|
|
@ -1253,7 +1249,7 @@ export default {
|
|||
const trialId = this.$route.query.trialId
|
||||
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
const subjectId = taskInfo.SubjectId
|
||||
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/${this.visitTaskId}/${fileName}.png`, file)
|
||||
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/${this.taskInfo.VisitTaskId}/${fileName}.png`, file)
|
||||
return { isSuccess: true, result: result }
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
|
@ -1311,7 +1307,6 @@ export default {
|
|||
if (psIndex > -1) {
|
||||
OldPS = this.psArr[psIndex].OldPS
|
||||
}
|
||||
console.log(OldPS, 'OldPS')
|
||||
let Proportion = ps / OldPS
|
||||
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
||||
if (!this.ecrf.IsHaveBindingQuestion) {
|
||||
|
|
|
|||
|
|
@ -174,8 +174,11 @@ export default {
|
|||
if (type === 'verifyAnnotationIsBound') {
|
||||
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].verifyAnnotationIsBound(data.annotation)
|
||||
}
|
||||
if (type === 'getQuestions') {
|
||||
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].getQuestions()
|
||||
// if (type === 'getQuestions') {
|
||||
// this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].getQuestions()
|
||||
// }
|
||||
if (type === 'changePlottingScaleChangeAnswer') {
|
||||
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].changePlottingScaleChangeAnswer(data)
|
||||
}
|
||||
},
|
||||
setSaved(saved) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue