非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
|
data: param
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 非dicom按比例修改答案
|
||||||
|
export function changePlottingScaleChangeAnswer(param) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingImageTask/changePlottingScaleChangeAnswer`,
|
||||||
|
method: 'post',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,16 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, verifyVisitTaskQuestions, getQuestionCalculateRelation, saveTaskQuestion } from '@/api/trials'
|
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 const_ from '@/const/sign-code'
|
||||||
import QuestionFormItem from './QuestionFormItem'
|
import QuestionFormItem from './QuestionFormItem'
|
||||||
import SignForm from '@/views/trials/components/newSignForm'
|
import SignForm from '@/views/trials/components/newSignForm'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
||||||
|
import {
|
||||||
|
utilities as csUtils
|
||||||
|
// getEnabledElementByIds
|
||||||
|
} from '@cornerstonejs/core'
|
||||||
export default {
|
export default {
|
||||||
name: 'EcrfList',
|
name: 'EcrfList',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -597,7 +601,8 @@ export default {
|
||||||
OrderMarkName: annotation.data.label,
|
OrderMarkName: annotation.data.label,
|
||||||
NoneDicomFileId: annotation.noneDicomFileId,
|
NoneDicomFileId: annotation.noneDicomFileId,
|
||||||
} : {}),
|
} : {}),
|
||||||
Path: picturePath ? picturePath : '',
|
Path: annotation.path,
|
||||||
|
PicturePath: picturePath ? picturePath : '',
|
||||||
QuestionType: 0,
|
QuestionType: 0,
|
||||||
RowId: this.operateRowId,
|
RowId: this.operateRowId,
|
||||||
TableQuestionId: this.operateQuestionId,
|
TableQuestionId: this.operateQuestionId,
|
||||||
|
|
@ -714,7 +719,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAnnotationByRow(rowId, isTable = true) {
|
getAnnotationByRow(rowId, isTable = true) {
|
||||||
console.log(this.questionMarkInfoList, 'this.questionMarkInfoList')
|
|
||||||
let index = -1;
|
let index = -1;
|
||||||
if (isTable) {
|
if (isTable) {
|
||||||
index = this.questionMarkInfoList.findIndex(
|
index = this.questionMarkInfoList.findIndex(
|
||||||
|
|
@ -938,8 +942,8 @@ export default {
|
||||||
let value = cachedStats[prop]
|
let value = cachedStats[prop]
|
||||||
if (this.isNoneDicom && annotation.ps) {
|
if (this.isNoneDicom && annotation.ps) {
|
||||||
let ps = annotation.ps
|
let ps = annotation.ps
|
||||||
if (prop === 'area') value = this.reRound(value * ps * ps, this.digitPlaces)
|
if (prop === 'area') value = this.reRound(csUtils.roundNumber(value * ps * ps), this.digitPlaces)
|
||||||
if (prop === 'length' || prop === 'perimeter') value = this.reRound(value * ps, this.digitPlaces)
|
if (prop === 'length' || prop === 'perimeter') value = this.reRound(csUtils.roundNumber(value * ps), this.digitPlaces)
|
||||||
}
|
}
|
||||||
return value !== null
|
return value !== null
|
||||||
? parseFloat(value).toFixed(this.digitPlaces)
|
? parseFloat(value).toFixed(this.digitPlaces)
|
||||||
|
|
@ -1123,7 +1127,59 @@ export default {
|
||||||
} else if (event.data.type === 'setMeasurement') {
|
} else if (event.data.type === 'setMeasurement') {
|
||||||
// this.setMeasuredData(event.data.data)
|
// 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: {
|
watch: {
|
||||||
questionsMarkStatus: {
|
questionsMarkStatus: {
|
||||||
|
|
|
||||||
|
|
@ -1066,10 +1066,8 @@ export default {
|
||||||
if (psIndex > -1) {
|
if (psIndex > -1) {
|
||||||
OldPS = this.psArr[i].OldPS
|
OldPS = this.psArr[i].OldPS
|
||||||
}
|
}
|
||||||
console.log(OldPS, ps)
|
|
||||||
let Proportion = ps / OldPS
|
let Proportion = ps / OldPS
|
||||||
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
||||||
console.log(this.ecrf.IsHaveBindingQuestion, 'this.ecrf.IsHaveBindingQuestion')
|
|
||||||
if (OldPS === ps || !this.ecrf.IsHaveBindingQuestion) {
|
if (OldPS === ps || !this.ecrf.IsHaveBindingQuestion) {
|
||||||
this.saveCustomAnnotation(annotation)
|
this.saveCustomAnnotation(annotation)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1090,7 +1088,6 @@ export default {
|
||||||
const operateStateEnum = this.ecrf.operateStateEnum
|
const operateStateEnum = this.ecrf.operateStateEnum
|
||||||
const isBound = this.ecrf.isBound
|
const isBound = this.ecrf.isBound
|
||||||
if (isBound || this.isNumber(operateStateEnum)) {
|
if (isBound || this.isNumber(operateStateEnum)) {
|
||||||
console.log(isBound, this.isNumber(operateStateEnum))
|
|
||||||
this.$emit('getEcrf', { type: "updateAnnotationToQuestion", VisitTaskId: this.taskInfo.VisitTaskId, annotation })
|
this.$emit('getEcrf', { type: "updateAnnotationToQuestion", VisitTaskId: this.taskInfo.VisitTaskId, annotation })
|
||||||
} else {
|
} else {
|
||||||
if (this.saveCustomAnnotationTimer) {
|
if (this.saveCustomAnnotationTimer) {
|
||||||
|
|
@ -1215,7 +1212,7 @@ export default {
|
||||||
const res = await addNoneDicomMark(params)
|
const res = await addNoneDicomMark(params)
|
||||||
annotation.markId = params.MarkId
|
annotation.markId = params.MarkId
|
||||||
annotation.id = res.Result
|
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) {
|
} catch (e) {
|
||||||
|
|
@ -1225,7 +1222,6 @@ export default {
|
||||||
},
|
},
|
||||||
async getScreenshots(measureData, callback) {
|
async getScreenshots(measureData, callback) {
|
||||||
if (measureData) {
|
if (measureData) {
|
||||||
console.log(measureData, 'measureData')
|
|
||||||
// await this.imageLocation(measureData)
|
// await this.imageLocation(measureData)
|
||||||
this.viewCustomAnnotation(measureData)
|
this.viewCustomAnnotation(measureData)
|
||||||
const divForDownloadViewport = document.querySelector(
|
const divForDownloadViewport = document.querySelector(
|
||||||
|
|
@ -1253,7 +1249,7 @@ export default {
|
||||||
const trialId = this.$route.query.trialId
|
const trialId = this.$route.query.trialId
|
||||||
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||||
const subjectId = taskInfo.SubjectId
|
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 }
|
return { isSuccess: true, result: result }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
|
|
@ -1311,7 +1307,6 @@ export default {
|
||||||
if (psIndex > -1) {
|
if (psIndex > -1) {
|
||||||
OldPS = this.psArr[psIndex].OldPS
|
OldPS = this.psArr[psIndex].OldPS
|
||||||
}
|
}
|
||||||
console.log(OldPS, 'OldPS')
|
|
||||||
let Proportion = ps / OldPS
|
let Proportion = ps / OldPS
|
||||||
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
return this.saveCustomAnnotationTimer = setTimeout(async () => {
|
||||||
if (!this.ecrf.IsHaveBindingQuestion) {
|
if (!this.ecrf.IsHaveBindingQuestion) {
|
||||||
|
|
|
||||||
|
|
@ -174,8 +174,11 @@ export default {
|
||||||
if (type === 'verifyAnnotationIsBound') {
|
if (type === 'verifyAnnotationIsBound') {
|
||||||
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].verifyAnnotationIsBound(data.annotation)
|
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].verifyAnnotationIsBound(data.annotation)
|
||||||
}
|
}
|
||||||
if (type === 'getQuestions') {
|
// if (type === 'getQuestions') {
|
||||||
this.ecrf.isBound = this.$refs[`ecrf_${data.VisitTaskId}`][0].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) {
|
setSaved(saved) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue