wangxiaoshuang 2024-07-18 15:14:14 +08:00
commit 31d3a17b80
20 changed files with 1419 additions and 1295 deletions

View File

@ -203,7 +203,7 @@
> >
<i slot="default" class="el-icon-plus" /> <i slot="default" class="el-icon-plus" />
<div slot="file" slot-scope="{file}"> <div slot="file" slot-scope="{file}">
<viewer :images="images" :ref="file.url"> <viewer :ref="file.url" :images="images">
<img <img
class="el-upload-list__item-thumbnail" class="el-upload-list__item-thumbnail"
:src="OSSclientConfig.basePath + file.url" :src="OSSclientConfig.basePath + file.url"

View File

@ -1021,6 +1021,10 @@ export default {
if (!this.petctWindow) return if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'readingPageUpdate', data: data }, window.location) this.petctWindow.postMessage({ type: 'readingPageUpdate', data: data }, window.location)
}) })
DicomEvent.$on('resetPage', () => {
if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'resetPage' }, window.location)
})
DicomEvent.$on('setReadingState', (data) => { DicomEvent.$on('setReadingState', (data) => {
if (!this.petctWindow) return if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'setReadingState', data: data }, window.location) this.petctWindow.postMessage({ type: 'setReadingState', data: data }, window.location)

View File

@ -798,17 +798,17 @@ export default {
var imageIds = [] var imageIds = []
var instanceList = [] var instanceList = []
series.InstanceInfoList.forEach(instance => { series.InstanceInfoList.forEach(instance => {
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) { if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) { for (let i = 0; i < instance.NumberOfFrames; i++) {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}` const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}`
imageIds.push(imageId)
}
} else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}`
imageIds.push(imageId) imageIds.push(imageId)
} }
instanceList.push(instance.Id) } else {
}) const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}`
imageIds.push(imageId)
}
instanceList.push(instance.Id)
})
resolve({ resolve({
imageIds: imageIds, imageIds: imageIds,
instanceList: instanceList, instanceList: instanceList,
@ -2149,7 +2149,49 @@ export default {
this.screenshotWindow.close() this.screenshotWindow.close()
} }
}, },
async clearAnnotations() {
const viewportIds = ['PT_AXIAL', 'CT_AXIAL', 'FUSION_AXIAL']
viewportIds.map(v => {
const viewport = renderingEngine.getViewport(v)
if (viewport) {
var annotations = annotation.state.getAnnotations('CircleROI', viewport.element)
if (annotations && annotations.length > 0) {
annotations.map(i => {
if (i.metadata.toolName === 'CircleROI') {
annotation.state.removeAnnotation(i.annotationUID)
}
})
}
}
viewport.render()
})
try {
const visitTaskId = this.$route.query.visitTaskId
const res = await getTableAnswerRowInfoList(visitTaskId)
if (res.IsSuccess) {
var arr = []
res.Result.forEach(el => {
if (el.OtherMeasureData) {
el.OtherMeasureData = JSON.parse(el.OtherMeasureData)
el.OtherMeasureData.invalidated = false
if (this.readingTaskState === 2) {
el.OtherMeasureData.isLocked = true
}
el.OtherMeasureData.data.remark = el.OrderMarkName
const viewport = renderingEngine.getViewport('PT_AXIAL')
annotation.state.addAnnotation(el.OtherMeasureData, viewport.element)
}
arr.push(el)
})
this.measureDatas = arr
}
} catch (e) {
}
},
async receiveMsg(event) { async receiveMsg(event) {
console.log(event.data.type)
if (event.data.type === 'readingPageUpdate') { if (event.data.type === 'readingPageUpdate') {
// this.$refs['questions'].initList() // this.$refs['questions'].initList()
this.$refs['tableQuestions'].initList(true) this.$refs['tableQuestions'].initList(true)
@ -2171,6 +2213,14 @@ export default {
FusionEvent.$emit('closeHistoryScreenshot') FusionEvent.$emit('closeHistoryScreenshot')
window.close() window.close()
} }
} else if (event.data.type === 'resetPage') {
if (this.screenshotWindow) {
this.screenshotWindow.close()
}
this.$refs['tableQuestions'].initList(true)
this.$refs['questions'].initList(true)
this.isLocate = true
this.clearAnnotations()
} }
}, },
startTimer() { startTimer() {

View File

@ -66,6 +66,27 @@
</template> </template>
</el-input> </el-input>
</template> </template>
<template v-else-if="question.QuestionType === 55">
<el-select
v-model="questionForm[question.Id]"
:disabled="readingTaskState >= 2 "
clearable
@change="((val)=>{formItemChange(val, question)})"
>
<el-option-group
:label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
>
<template>
<el-option
v-for="item of $d[question.DictionaryCode]"
:key="item.id"
:value="String(item.value)"
:label="item.label"
/>
</template>
</el-option-group>
</el-select>
</template>
<template v-else-if="question.QuestionType === 56"> <template v-else-if="question.QuestionType === 56">
<el-select <el-select
v-model="questionForm[question.Id]" v-model="questionForm[question.Id]"
@ -73,23 +94,27 @@
clearable clearable
@change="((val)=>{formItemChange(val, question)})" @change="((val)=>{formItemChange(val, question)})"
> >
<template v-if="pet5PS*1=== -1"> <el-option-group
<el-option :label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${parseFloat(question.LastTaskAnswer) === 5 ? 'NA' : $fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
v-for="item of $d[question.DictionaryCode]" >
v-show="item.value !== 4" <template v-if="pet5PS*1=== -1">
:key="item.id" <el-option
:value="String(item.value)" v-for="item of $d[question.DictionaryCode]"
:label="item.label" v-show="item.value !== 4"
/> :key="item.id"
</template> :value="String(item.value)"
<template v-else> :label="item.label"
<el-option />
v-for="item of $d[question.DictionaryCode]" </template>
:key="item.id" <template v-else>
:value="String(item.value)" <el-option
:label="item.label" v-for="item of $d[question.DictionaryCode]"
/> :key="item.id"
</template> :value="String(item.value)"
:label="item.label"
/>
</template>
</el-option-group>
</el-select> </el-select>
</template> </template>
<template v-else-if="question.QuestionType === 57"> <template v-else-if="question.QuestionType === 57">
@ -99,23 +124,27 @@
clearable clearable
@change="((val)=>{formItemChange(val, question)})" @change="((val)=>{formItemChange(val, question)})"
> >
<template v-if="pet5PS*1=== -1"> <el-option-group
<el-option :label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
v-for="item of $d[question.DictionaryCode]" >
v-show="item.value !== 1" <template v-if="pet5PS*1=== -1">
:key="item.id" <el-option
:value="String(item.value)" v-for="item of $d[question.DictionaryCode]"
:label="item.label" v-show="item.value !== 1"
/> :key="item.id"
</template> :value="String(item.value)"
<template v-else> :label="item.label"
<el-option />
v-for="item of $d[question.DictionaryCode]" </template>
:key="item.id" <template v-else>
:value="String(item.value)" <el-option
:label="item.label" v-for="item of $d[question.DictionaryCode]"
/> :key="item.id"
</template> :value="String(item.value)"
:label="item.label"
/>
</template>
</el-option-group>
</el-select> </el-select>
</template> </template>
<!-- 输入框 --> <!-- 输入框 -->

View File

@ -14,7 +14,7 @@
:question-form="questionForm" :question-form="questionForm"
:reading-task-state="readingTaskState" :reading-task-state="readingTaskState"
:visit-task-id="visitTaskId" :visit-task-id="visitTaskId"
:pet5PS="questionForm[pet5PSId]" :pet5p-s="questionForm[pet5PSId]"
:lung-is-inside-volume="lungIsInsideVolume" :lung-is-inside-volume="lungIsInsideVolume"
:liver-is-inside-volume="liverIsInsideVolume" :liver-is-inside-volume="liverIsInsideVolume"
@setFormItemData="setFormItemData" @setFormItemData="setFormItemData"
@ -163,42 +163,48 @@ export default {
} }
this.initList(true) this.initList(true)
}, },
initList(isInit) { async initList(isInit) {
this.loading = true this.loading = true
var params = { try {
trialId: this.trialId, const params = {
visitTaskId: this.visitTaskId, trialId: this.trialId,
questionClassify: 0 visitTaskId: this.visitTaskId,
} questionClassify: 0
getDicomReadingQuestionAnswer(params).then(res => { }
var questions = res.Result const res = await getDicomReadingQuestionAnswer(params)
if (res.IsSuccess) {
const questions = res.Result
questions.map((v) => { questions.map((v) => {
v.IsBaseLineTask = this.isBaseLineTask v.IsBaseLineTask = this.isBaseLineTask
if (v.Type === 'group' && v.Childrens.length === 0) return if (v.Type === 'group' && v.Childrens.length === 0) return
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') { if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null) this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
}
if (v.Childrens.length > 0) {
this.setChild(v.Childrens)
}
})
this.questions = questions
this.setPet5PSCommentDisplay()
this.measurements = []
res.OtherInfo.QuestionMarkInfoList.forEach(i => {
if (i.OtherMeasureData) {
i.OtherMeasureData = JSON.parse(i.OtherMeasureData)
if (i.QuestionType === 51 && isInit) {
this.liverRender = false
} else if (i.QuestionType === 52 && isInit) {
this.lungRender = false
} }
} if (v.Childrens.length > 0) {
this.measurements.push(i) this.setChild(v.Childrens)
}) }
})
this.questions = questions
this.setPet5PSCommentDisplay()
this.measurements = []
res.OtherInfo.QuestionMarkInfoList.forEach(i => {
if (i.OtherMeasureData) {
i.OtherMeasureData = JSON.parse(i.OtherMeasureData)
if (i.QuestionType === 51 && isInit) {
this.liverRender = false
} else if (i.QuestionType === 52 && isInit) {
this.lungRender = false
}
}
this.measurements.push(i)
})
}
this.loading = false this.loading = false
}).catch(() => { this.loading = false }) } catch (e) {
console.log(e)
this.loading = false
}
}, },
setChild(obj) { setChild(obj) {
obj.forEach(i => { obj.forEach(i => {
@ -263,37 +269,28 @@ export default {
// } // }
}) })
}, },
saveQuestionsForm() { async saveQuestionsForm() {
this.loading = true this.loading = true
var answers = [] try {
for (const k in this.questionForm) { var answers = []
answers.push({ id: k, answer: this.questionForm[k] }) for (const k in this.questionForm) {
} answers.push({ id: k, answer: this.questionForm[k] })
// var questionMarkInfoList = [] }
// this.measurements.forEach(item => { var params = {
// var i = Object.assign({}, item) visitTaskId: this.visitTaskId,
// if (i.OtherMeasureData) { answers: answers
// for (const k in i.OtherMeasureData.data.cachedStats) { }
// i.OtherMeasureData.data.cachedStats[k].pointsInShape = [] const res = await saveTaskQuestion(1, params)
// } if (res.IsSuccess) {
// i.OtherMeasureData = JSON.stringify(i.OtherMeasureData) window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
// } this.loading = false
this.questionFormChangeState = false
// questionMarkInfoList.push(i) this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
// }) }
var params = { } catch (e) {
visitTaskId: this.visitTaskId, console.log(e)
answers: answers
// questionMarkInfoList
}
saveTaskQuestion(1, params).then(async res => {
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
this.loading = false this.loading = false
this.questionFormChangeState = false }
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
}).catch(() => {
this.loading = false
})
}, },
checkAnnotationStatus(obj) { checkAnnotationStatus(obj) {
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {
@ -422,21 +419,27 @@ export default {
break break
} }
} }
var params = { try {
visitTaskId: this.visitTaskId, var params = {
answers, visitTaskId: this.visitTaskId,
questionMarkInfoList answers,
questionMarkInfoList
}
const qsType = question.QuestionType === 51 ? 2 : question.QuestionType === 52 ? 3 : null
const res = await saveTaskQuestion(qsType, params)
if (res.IsSuccess) {
this.$set(question, 'SaveEnum', 0)
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
loading.close()
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
this.resetSuvQuestions(1)
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
} }
const qsType = question.QuestionType === 51 ? 2 : question.QuestionType === 52 ? 3 : null
saveTaskQuestion(qsType, params).then(async res => {
this.$set(question, 'SaveEnum', 0)
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
loading.close()
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
this.resetSuvQuestions(1)
}).catch(() => {
loading.close()
})
}) })
}, },
viewAnnotations(question) { viewAnnotations(question) {
@ -654,40 +657,38 @@ export default {
return '' return ''
} }
}, },
resetSuvQuestions(type = 0) { async resetSuvQuestions(type = 0) {
this.loading = true this.loading = true
var params = { try {
trialId: this.trialId, const params = {
visitTaskId: this.visitTaskId, trialId: this.trialId,
questionClassify: 0 visitTaskId: this.visitTaskId,
} questionClassify: 0
getDicomReadingQuestionAnswer(params).then(res => { }
var questions = res.Result const res = await getDicomReadingQuestionAnswer(params)
questions.map((v) => { if (res.IsSuccess) {
if (v.Type === 'group' && v.Childrens.length === 0) return const questions = res.Result
// if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') { questions.map((v) => {
// this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null) if (v.Type === 'group' && v.Childrens.length === 0) return
// } if (v.Childrens.length > 0) {
if (v.Childrens.length > 0) { this.setSuvChild(v.Childrens, type)
this.setSuvChild(v.Childrens, type) }
} })
// var pet5PS = this.setpet5PS() for (let i = 0; i < this.questions[0].Childrens[0].Childrens.length; i++) {
// this.questionForm[this.pet5PSId] = pet5PS if (this.questions[0].Childrens[0].Childrens[i].QuestionType === 59) {
// this.calculatePet5PS = pet5PS this.questions[0].Childrens[0].Childrens[i].ShowQuestion = 2
// this.setPet5PSCommentDisplay() this.questions[0].Childrens[0].Childrens[i].IsRequired = 3
// this.setUptakeFormBaseline() this.questionForm[this.pet5PSCommentsId] = ''
}) break
for (let i = 0; i < this.questions[0].Childrens[0].Childrens.length; i++) { }
if (this.questions[0].Childrens[0].Childrens[i].QuestionType === 59) { }
this.questions[0].Childrens[0].Childrens[i].ShowQuestion = 2 this.questionFormChangeState = true
this.questions[0].Childrens[0].Childrens[i].IsRequired = 3
this.questionForm[this.pet5PSCommentsId] = ''
break
}
} }
this.questionFormChangeState = true
this.loading = false this.loading = false
}).catch(() => { this.loading = false }) } catch (e) {
console.log(e)
this.loading = false
}
}, },
setSuvChild(obj, type) { setSuvChild(obj, type) {
obj.forEach(i => { obj.forEach(i => {

View File

@ -316,7 +316,7 @@ export default {
this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '') this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '')
// saveTypeEnum 01访/2 // saveTypeEnum 01访/2
var lesionState = this.getQuestionVal(7) // var lesionState = this.getQuestionVal(7)
if (!isRerender) { if (!isRerender) {
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 2) this.$set(this.questionForm, 'saveTypeEnum', 2)
@ -625,7 +625,7 @@ export default {
} }
} }
} }
var lesionState = this.getQuestionVal(7) // var lesionState = this.getQuestionVal(7)
if (this.firstRenderAnnotation) { if (this.firstRenderAnnotation) {
this.$set(this.questionForm, 'saveTypeEnum', 2) this.$set(this.questionForm, 'saveTypeEnum', 2)
} else { } else {
@ -871,75 +871,79 @@ export default {
this.deleteInfo = null this.deleteInfo = null
params.rowId = '' params.rowId = ''
} }
submitTableQuestion(params).then(async res => { try {
this.currentMarkTool = otherMeasureData ? otherMeasureData.type : '' const res = await submitTableQuestion(params)
// saveTypeEnum 01访/2 if (res.IsSuccess) {
this.currentMarkTool = otherMeasureData ? otherMeasureData.type : ''
this.$set(this.questionForm, 'saveTypeEnum', 2)
this.originalQuestionForm = { ...this.questionForm }
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const suvMax = this.getQuestionVal(20)
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
this.$set(this.questionForm, 'saveTypeEnum', 2) FusionEvent.$emit('resetSuvQuestions')
this.originalQuestionForm = { ...this.questionForm } window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
loading.close() this.$emit('close')
var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
var lesionOrgan = this.getQuestionVal(6)
this.$set(this.questionForm, 'RowId', res.Result.RowId)
const lesionPart = this.getQuestionVal(8)
const suvMax = this.getQuestionVal(20)
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
// FusionEvent.$emit('getAnnotations') this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
FusionEvent.$emit('resetSuvQuestions') }
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
this.$emit('close')
loading.close() loading.close()
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) } catch (e) {
}).catch(() => { loading.close() }) console.log(e)
loading.close()
}
}) })
}) })
}, },
handleDeleteMeasureData() { async handleDeleteMeasureData() {
// //
this.$confirm(this.$t('trials:reading:warnning:msg47'), { const confirm = await this.$confirm(
type: 'warning', this.$t('trials:reading:warnning:msg47'),
distinguishCancelAndClose: true {
}) type: 'warning',
.then(async() => { distinguishCancelAndClose: true
this.organList = [] }
await this.getOrganInfoList() )
// SUV if (confirm !== 'confirm') return
var suvId = this.getQuestionId(20) this.organList = []
this.$set(this.questionForm, suvId, '') await this.getOrganInfoList()
// saveTypeEnum 01访/ // SUV
if (this.questionForm.RowId) { var suvId = this.getQuestionId(20)
this.$set(this.questionForm, 'saveTypeEnum', 1) this.$set(this.questionForm, suvId, '')
} else { // saveTypeEnum 01访/
this.$set(this.questionForm, 'saveTypeEnum', 0) if (this.questionForm.RowId) {
} this.$set(this.questionForm, 'saveTypeEnum', 1)
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'clear' }) } else {
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex }) this.$set(this.questionForm, 'saveTypeEnum', 0)
}
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'clear' })
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
// Store.$emit('updateImage', this.questionForm.MeasureData.instanceId) // Store.$emit('updateImage', this.questionForm.MeasureData.instanceId)
var isLymphLesion = this.getQuestionVal(2) var isLymphLesion = this.getQuestionVal(2)
isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null
const lesionPart = this.getQuestionVal(8) const lesionPart = this.getQuestionVal(8)
const lesionOrgan = this.getQuestionVal(6) const lesionOrgan = this.getQuestionVal(6)
if (!this.questionForm.IsDicomReading) { if (!this.questionForm.IsDicomReading) {
} }
this.$set(this.questionForm, 'IsDicomReading', true) this.$set(this.questionForm, 'IsDicomReading', true)
this.$set(this.questionForm, 'OtherMeasureData', '') this.$set(this.questionForm, 'OtherMeasureData', '')
let anwsers = null let anwsers = null
if (this.answers.measureObj) { if (this.answers.measureObj) {
anwsers = Object.assign({ measureObj: '' }, this.questionForm) anwsers = Object.assign({ measureObj: '' }, this.questionForm)
} else { } else {
anwsers = Object.assign({}, this.questionForm) anwsers = Object.assign({}, this.questionForm)
} }
var suvMax = this.getQuestionVal(20) var suvMax = this.getQuestionVal(20)
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers }) this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
this.isInsideVolume = true this.isInsideVolume = true
})
.catch(() => {})
}, },
async clearMeasurement() { async clearMeasurement() {
this.organList = [] this.organList = []
@ -975,65 +979,63 @@ export default {
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers }) this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: anwsers })
this.isInsideVolume = true this.isInsideVolume = true
}, },
handleDelete() { async handleDelete() {
// const confirm = await this.$confirm(
this.$confirm(this.$t('trials:reading:warnning:msg48'), { this.$t('trials:reading:warnning:msg48'),
type: 'warning', {
distinguishCancelAndClose: true
})
.then(async() => {
if (this.questionForm.RowId) {
const loading = this.$loading({ fullscreen: true })
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
deleteReadingRowAnswer(param)
.then(async res => {
loading.close()
if (res.IsSuccess) {
// this.$emit('getReadingQuestionAndAnswer')
if (this.questionForm.IsDicomReading && this.questionForm.OtherMeasureData) {
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'delete' })
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
// ''
this.$message.success(this.$t('common:message:deletedSuccessfully'))
loading.close()
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
}
}).catch(() => { loading.close() })
} else {
// const loading = this.$loading({ fullscreen: true })
//
if (this.questionForm.OtherMeasureData && this.questionForm.IsDicomReading) {
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex })
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
// loading.close()
}
})
},
handleClose() {
if (!this.questionForm.RowId) {
// ''
this.$confirm(this.$t('trials:reading:warnning:msg49'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true distinguishCancelAndClose: true
}) }
.then(async() => { )
// if (confirm !== 'confirm') return
if (this.questionForm.OtherMeasureData) { if (this.questionForm.RowId) {
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData }) const loading = this.$loading({ fullscreen: true })
// await store.dispatch('reading/removeMeasuredData', { visitTaskId: this.visitTaskId, measureData: this.questionForm.MeasureData, questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex }) try {
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
const res = await deleteReadingRowAnswer(param)
if (res.IsSuccess) {
if (this.questionForm.IsDicomReading && this.questionForm.OtherMeasureData) {
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData, type: 'delete' })
} }
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId }) this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
}) // ''
.catch(() => {}) this.$message.success(this.$t('common:message:deletedSuccessfully'))
loading.close()
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
}
loading.close()
} catch (e) {
console.log(e)
loading.close()
}
} else {
//
if (this.questionForm.OtherMeasureData && this.questionForm.IsDicomReading) {
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
}
},
async handleClose() {
if (!this.questionForm.RowId) {
// ''
const confirm = await this.$confirm(
this.$t('trials:reading:warnning:msg49'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
//
if (this.questionForm.OtherMeasureData) {
FusionEvent.$emit('removeAnnotation', { otherMeasureData: this.questionForm.OtherMeasureData })
}
this.$emit('close', { lesionType: this.lesionType, rowIndex: this.rowIndex, visitTaskId: this.visitTaskId })
} else { } else {
if (this.questionForm.saveTypeEnum === 1) { if (this.questionForm.saveTypeEnum === 1) {
this.$emit('close') this.$emit('close')

View File

@ -1080,17 +1080,17 @@ export default {
this.$refs['ecrf'].getQuestions(obj.visitTaskId) this.$refs['ecrf'].getQuestions(obj.visitTaskId)
}, },
async resetMeasuredData() { async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try { try {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
const res = await resetReadingTask({ visitTaskId: this.visitTaskId }) const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
@ -1099,13 +1099,16 @@ export default {
this.activeItem.activeRowIndex = null this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null this.activeItem.activeCollapseId = null
await this.getReadingQuestionAndAnswer(this.visitTaskId) await this.getReadingQuestionAndAnswer(this.visitTaskId)
this.$refs['ecrf'].resetQSForm() const triald = this.$router.currentRoute.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
DicomEvent.$emit('getMeasureData') DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData') DicomEvent.$emit('refreshStudyListMeasureData')
} }
loading.close()
} catch (e) { } catch (e) {
this.loading = false loading.close()
console.log(e) console.log(e)
} }
}, },

View File

@ -2,10 +2,20 @@
<div class="measurement-wrapper" :style="{'height':height+10+'px'}"> <div class="measurement-wrapper" :style="{'height':height+10+'px'}">
<div class="container" :style="{'height':height+'px'}"> <div class="container" :style="{'height':height+'px'}">
<h3 v-if="isReadingShowSubjectInfo" style="color: #ddd;padding: 5px 0px;margin: 0;"> <div class="basic-info">
<span v-if="subjectCode">{{ subjectCode }} </span> <h3 v-if="isReadingShowSubjectInfo">
<span style="margin-left:5px;">{{ taskBlindName }}</span> <span v-if="subjectCode">{{ subjectCode }} </span>
</h3> <span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<div v-if="readingTaskState < 2">
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
<i
class="el-icon-refresh-left"
@click="resetMeasuredData"
/>
</el-tooltip>
</div>
</div>
<!-- 非测量问题 --> <!-- 非测量问题 -->
<div class="lesions"> <div class="lesions">
<!-- 影像质量问题 --> <!-- 影像质量问题 -->
@ -216,6 +226,7 @@
</template> </template>
<script> <script>
import { splitLesion, getSplitPPdSum, getCanMergeLesion, mergeLesion } from '@/api/trials' import { splitLesion, getSplitPPdSum, getCanMergeLesion, mergeLesion } from '@/api/trials'
import { resetReadingTask } from '@/api/reading'
import DicomEvent from './../DicomEvent' import DicomEvent from './../DicomEvent'
import store from '@/store' import store from '@/store'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -333,7 +344,8 @@ export default {
}) })
}) })
DicomEvent.$on('refreshSplitTargetLesionPDD', async(callback) => { DicomEvent.$on('refreshSplitTargetLesionPDD', async(callback) => {
this.splitTargetLesions = await this.getSplitTargetLesionPDD() const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
this.splitTargetLesions = res.Result
if (this.splitTargetLesions && this.splitTargetLesions.length > 0) { if (this.splitTargetLesions && this.splitTargetLesions.length > 0) {
this.splitTargetLesions.map(i => { this.splitTargetLesions.map(i => {
var refName = `${this.lesionTypeQuestionId}_${i.RowIndex}` var refName = `${this.lesionTypeQuestionId}_${i.RowIndex}`
@ -388,7 +400,8 @@ export default {
loading.close() loading.close()
} }
if (!this.isBaseLineTask) { if (!this.isBaseLineTask) {
this.splitTargetLesions = await this.getSplitTargetLesionPDD() const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
this.splitTargetLesions = res.Result
} }
this.questions = this.visitTaskList[i].ReadingQuestions this.questions = this.visitTaskList[i].ReadingQuestions
this.$nextTick(() => { this.$nextTick(() => {
@ -530,7 +543,8 @@ export default {
this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask this.isCurrentTask = this.visitTaskList[idx].IsCurrentTask
} }
if (!this.isBaseLineTask) { if (!this.isBaseLineTask) {
this.splitTargetLesions = await this.getSplitTargetLesionPDD() const res = await getSplitPPdSum({ visitTaskId: this.visitTaskId })
this.splitTargetLesions = res.Result
} }
this.getTableQuestions() this.getTableQuestions()
this.$nextTick(() => { this.$nextTick(() => {
@ -559,13 +573,6 @@ export default {
} catch (e) { console.log(e) } } catch (e) { console.log(e) }
}) })
}, },
getSplitTargetLesionPDD() {
return new Promise(resolve => {
getSplitPPdSum({ visitTaskId: this.visitTaskId }).then(res => {
resolve(res.Result)
}).catch(() => { resolve() })
})
},
setHeight() { setHeight() {
this.height = window.innerHeight - 140 this.height = window.innerHeight - 140
}, },
@ -688,7 +695,7 @@ export default {
}) })
}, },
// //
handleMerge(answers, questionId, orderMark) { async handleMerge(answers, questionId, orderMark) {
this.lesionData = [] this.lesionData = []
this.mergeList = [] this.mergeList = []
this.merge.visible = true this.merge.visible = true
@ -697,10 +704,16 @@ export default {
this.mergeInfo.lesionName = this.getLesionName(orderMark, answers.RowIndex) this.mergeInfo.lesionName = this.getLesionName(orderMark, answers.RowIndex)
this.mergeInfo.lesionPart = answers.lesionPart this.mergeInfo.lesionPart = answers.lesionPart
this.merge.loading = true this.merge.loading = true
getCanMergeLesion({ rowId: answers.RowId }).then(res => { try {
this.lesionData = res.Result const res = await getCanMergeLesion({ rowId: answers.RowId })
if (res.IsSuccess) {
this.lesionData = res.Result
}
this.merge.loading = false this.merge.loading = false
}).catch(() => { this.merge.loading = false }) } catch (e) {
console.log(e)
this.merge.loading = false
}
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.mergeList = [] this.mergeList = []
@ -718,23 +731,28 @@ export default {
}) })
}, },
lesionMerge() { async lesionMerge() {
this.merge.loading = true this.merge.loading = true
var params = { try {
visitTaskId: this.visitTaskId, var params = {
questionId: this.mergeInfo.questionId, visitTaskId: this.visitTaskId,
mergeMainRowId: this.mergeInfo.mergeRowId, questionId: this.mergeInfo.questionId,
mergeRowIdList: this.mergeList mergeMainRowId: this.mergeInfo.mergeRowId,
} mergeRowIdList: this.mergeList
mergeLesion(params).then(res => { }
const res = await mergeLesion(params)
if (res.IsSuccess) {
this.merge.visible = false
DicomEvent.$emit('readingPageUpdate', {})
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive')
this.getReadingQuestionAndAnswer()
}
this.merge.loading = false this.merge.loading = false
this.merge.visible = false } catch (e) {
DicomEvent.$emit('readingPageUpdate', {}) this.merge.loading = false
DicomEvent.$emit('getReportInfo', true) console.log(e)
DicomEvent.$emit('setMeasuredToolsPassive') }
this.getReadingQuestionAndAnswer()
//
}).catch(() => { this.merge.loading = false })
}, },
isCanActiveTool(toolName) { isCanActiveTool(toolName) {
this.isNonTargetMeasurement = false this.isNonTargetMeasurement = false
@ -1284,6 +1302,41 @@ export default {
}) })
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
loading.close() loading.close()
},
async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try {
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
if (res.IsSuccess) {
//
this.activeName = ''
this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null
await this.getReadingQuestionAndAnswer(this.visitTaskId)
const triald = this.$router.currentRoute.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData')
DicomEvent.$emit('resetPage', {})
}
loading.close()
} catch (e) {
loading.close()
console.log(e)
}
} }
} }
@ -1296,6 +1349,22 @@ export default {
.container{ .container{
padding: 10px; padding: 10px;
.basic-info{
display: flex;
justify-content: space-between;
align-items: center;
h3{
color: #ddd;
padding: 5px 0px;
margin: 0;
}
i{
color: #fff;
font-size: 22px;
font-weight: bold;
cursor: pointer;
}
}
} }
.title{ .title{
padding: 5px; padding: 5px;

View File

@ -704,17 +704,17 @@ export default {
this.$refs['ecrf'].getQuestions(obj.visitTaskId) this.$refs['ecrf'].getQuestions(obj.visitTaskId)
}, },
async resetMeasuredData() { async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try { try {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
const res = await resetReadingTask({ visitTaskId: this.visitTaskId }) const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
@ -723,13 +723,16 @@ export default {
this.activeItem.activeRowIndex = null this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null this.activeItem.activeCollapseId = null
await this.getReadingQuestionAndAnswer(this.visitTaskId) await this.getReadingQuestionAndAnswer(this.visitTaskId)
this.$refs['ecrf'].resetQSForm() const triald = this.$router.currentRoute.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
DicomEvent.$emit('getMeasureData') DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData') DicomEvent.$emit('refreshStudyListMeasureData')
} }
loading.close()
} catch (e) { } catch (e) {
this.loading = false loading.close()
console.log(e) console.log(e)
} }
}, },

View File

@ -111,13 +111,17 @@
/> />
</template> </template>
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && !question.IsBaseLineTask"> <template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 47 && !question.IsBaseLineTask">
<el-option <el-option-group
v-for="item of $d[question.DictionaryCode]" :label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
v-show="item.value === 1 ||item.value === 3|| item.value === 4 || item.value === 5" >
:key="item.id" <el-option
:value="String(item.value)" v-for="item of $d[question.DictionaryCode]"
:label="item.label" v-show="item.value === 1 ||item.value === 3|| item.value === 4 || item.value === 5"
/> :key="item.id"
:value="String(item.value)"
:label="item.label"
/>
</el-option-group>
</template> </template>
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && question.IsBaseLineTask"> <template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && question.IsBaseLineTask">
<el-option <el-option
@ -129,13 +133,17 @@
/> />
</template> </template>
<template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && !question.IsBaseLineTask"> <template v-else-if="question.QuestionGenre === 3 && question.QuestionType === 49 && !question.IsBaseLineTask">
<el-option <el-option-group
v-for="item of $d[question.DictionaryCode]" :label="!isNaN(parseFloat(question.LastTaskAnswer)) ? `${$t('trials:dicomReading:tip:lastVisitStatus')} ${$fd(question.DictionaryCode,parseFloat(question.LastTaskAnswer))}` : ''"
v-show="item.value === 1 ||item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5" >
:key="item.id" <el-option
:value="String(item.value)" v-for="item of $d[question.DictionaryCode]"
:label="item.label" v-show="item.value === 1 ||item.value === 2 || item.value === 3 || item.value === 4 || item.value === 5"
/> :key="item.id"
:value="String(item.value)"
:label="item.label"
/>
</el-option-group>
</template> </template>
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3"> <template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
<el-option <el-option

View File

@ -390,18 +390,6 @@ export default {
this.loading = false this.loading = false
}) })
}, },
async resetQSForm() {
try {
this.loading = true
var trialId = this.$route.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId, true)
this.loading = false
} catch(e) {
this.loading = false
}
},
checkAnnotationStatus(obj) { checkAnnotationStatus(obj) {
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {
if (obj[i].SaveEnum === 1) { if (obj[i].SaveEnum === 1) {

View File

@ -956,17 +956,17 @@ export default {
this.$refs['ecrf'].getQuestions(obj.visitTaskId) this.$refs['ecrf'].getQuestions(obj.visitTaskId)
}, },
async resetMeasuredData() { async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try { try {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
const res = await resetReadingTask({ visitTaskId: this.visitTaskId }) const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
@ -975,13 +975,16 @@ export default {
this.activeItem.activeRowIndex = null this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null this.activeItem.activeCollapseId = null
await this.getReadingQuestionAndAnswer(this.visitTaskId) await this.getReadingQuestionAndAnswer(this.visitTaskId)
this.$refs['ecrf'].resetQSForm() const triald = this.$router.currentRoute.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
DicomEvent.$emit('getMeasureData') DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData') DicomEvent.$emit('refreshStudyListMeasureData')
} }
loading.close()
} catch (e) { } catch (e) {
this.loading = false loading.close()
console.log(e) console.log(e)
} }
}, },

View File

@ -509,25 +509,31 @@ export default {
} }
} }
}, },
split(rowId, questionId) { async split(rowId, questionId) {
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
var params = { try {
visitTaskId: this.visitTaskId, var params = {
questionId: questionId, visitTaskId: this.visitTaskId,
rowId: rowId questionId: questionId,
} rowId: rowId
splitLesion(params).then(async res => { }
loading.close() const res = await splitLesion(params)
await this.getReadingQuestionAndAnswer() if (res.IsSuccess) {
this.$nextTick(() => { await this.getReadingQuestionAndAnswer()
this.tableQuestions.forEach(item => { this.$nextTick(() => {
item.TableQuestions.Answers.forEach(i => { this.tableQuestions.forEach(item => {
var refName = `${item.Id}_${i.RowIndex}` item.TableQuestions.Answers.forEach(i => {
this.$refs[refName] && this.$refs[refName][0].initForm() var refName = `${item.Id}_${i.RowIndex}`
this.$refs[refName] && this.$refs[refName][0].initForm()
})
}) })
}) })
}) }
}) loading.close()
} catch (e) {
loading.close()
console.log(e)
}
}, },
isCanActiveTool(toolName) { isCanActiveTool(toolName) {
this.getUnSaveTarget() this.getUnSaveTarget()
@ -892,17 +898,17 @@ export default {
this.$refs['ecrf'].getQuestions(obj.visitTaskId) this.$refs['ecrf'].getQuestions(obj.visitTaskId)
}, },
async resetMeasuredData() { async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try { try {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
this.loading = true
const res = await resetReadingTask({ visitTaskId: this.visitTaskId }) const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
@ -911,13 +917,16 @@ export default {
this.activeItem.activeRowIndex = null this.activeItem.activeRowIndex = null
this.activeItem.activeCollapseId = null this.activeItem.activeCollapseId = null
await this.getReadingQuestionAndAnswer(this.visitTaskId) await this.getReadingQuestionAndAnswer(this.visitTaskId)
this.$refs['ecrf'].resetQSForm() const triald = this.$router.currentRoute.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
DicomEvent.$emit('getMeasureData') DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData') DicomEvent.$emit('refreshStudyListMeasureData')
} }
loading.close()
} catch (e) { } catch (e) {
this.loading = false loading.close()
console.log(e) console.log(e)
} }
}, },

View File

@ -411,32 +411,38 @@ export default {
getTableHeight() { getTableHeight() {
this.height = window.innerHeight - 170 this.height = window.innerHeight - 170
}, },
getReportInfo(IsCalculate) { async getReportInfo(IsCalculate) {
this.loading = true this.loading = true
var params = { try {
visitTaskId: this.visitTaskId, var params = {
trialId: this.$router.currentRoute.query.trialId, visitTaskId: this.visitTaskId,
IsCalculate: IsCalculate !== false trialId: this.$router.currentRoute.query.trialId,
} IsCalculate: IsCalculate !== false
getReadingReportEvaluation(params).then(res => { }
this.readingTaskState = res.Result.ReadingTaskState const res = await getReadingReportEvaluation(params)
this.tumorEvaluate = res.Result.CalculateResult.TumorEvaluate ? parseInt(res.Result.CalculateResult.TumorEvaluate) : null if (res.IsSuccess) {
this.isExistDisease = res.Result.CalculateResult.IsExistDisease ? parseInt(res.Result.CalculateResult.IsExistDisease) : null this.readingTaskState = res.Result.ReadingTaskState
this.answerArr = [] this.tumorEvaluate = res.Result.CalculateResult.TumorEvaluate ? parseInt(res.Result.CalculateResult.TumorEvaluate) : null
this.questions = res.Result.TaskQuestions.concat() this.isExistDisease = res.Result.CalculateResult.IsExistDisease ? parseInt(res.Result.CalculateResult.IsExistDisease) : null
this.visitTaskList = res.Result.VisitTaskList this.answerArr = []
var taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null, null) this.questions = res.Result.TaskQuestions.concat()
this.taskQuestions = [] this.visitTaskList = res.Result.VisitTaskList
taskQuestions.forEach(item => { var taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null, null)
this.$set(this.taskQuestions, this.taskQuestions.length, item) this.taskQuestions = []
}) taskQuestions.forEach(item => {
const tLesion = res.Result.LesionCountList.find(i => i.LesionType === 0) this.$set(this.taskQuestions, this.taskQuestions.length, item)
this.tLesionCount = tLesion ? tLesion.Count : 0 })
const ntLesion = res.Result.LesionCountList.find(i => i.LesionType === 1) const tLesion = res.Result.LesionCountList.find(i => i.LesionType === 0)
this.ntLesionCount = ntLesion ? ntLesion.Count : 0 this.tLesionCount = tLesion ? tLesion.Count : 0
this.setScrollTop() const ntLesion = res.Result.LesionCountList.find(i => i.LesionType === 1)
this.ntLesionCount = ntLesion ? ntLesion.Count : 0
this.setScrollTop()
}
this.loading = false this.loading = false
}).catch(() => { this.loading = false }) } catch (e) {
this.loading = false
console.log(e)
}
}, },
setScrollTop(a) { setScrollTop(a) {
setTimeout(() => { setTimeout(() => {
@ -444,7 +450,6 @@ export default {
if (this.$refs.reportList) { if (this.$refs.reportList) {
this.getTableHeight() this.getTableHeight()
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
} }
}) })
}, 50) }, 50)
@ -608,24 +613,31 @@ export default {
} }
}, },
async handleConfirm() { async handleConfirm() {
await this.handleSave(false) this.loading = true
await this.verifyVisitTaskQuestions() try {
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) await this.handleSave(false)
var isBaseline = this.visitTaskList[i].IsBaseLine await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
if (isBaseline) { var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
this.assessmentQuestions = await this.getAdditionalAssessments() var isBaseline = this.visitTaskList[i].IsBaseLine
if (this.assessmentQuestions.length > 0) { if (isBaseline) {
const res = await getTaskAdditionalQuestion({ visitTaskId: this.visitTaskId })
this.assessmentQuestions = res.Result
if (this.assessmentQuestions.length > 0) {
// //
this.additionalAssessmentsDig.visible = true this.additionalAssessmentsDig.visible = true
} else {
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
}
} else { } else {
const { ImageAssessmentReportConfirmation } = const_.processSignature const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true this.signVisible = true
} }
} else { this.loading = false
const { ImageAssessmentReportConfirmation } = const_.processSignature } catch (e) {
this.signCode = ImageAssessmentReportConfirmation this.loading = false
this.signVisible = true
} }
}, },
sign() { sign() {
@ -636,31 +648,6 @@ export default {
this.signVisible = true this.signVisible = true
}) })
}, },
//
getAdditionalAssessments() {
return new Promise((resolve) => {
this.loading = true
getTaskAdditionalQuestion({ visitTaskId: this.visitTaskId }).then(res => {
this.loading = false
resolve(res.Result)
}).catch(() => {
this.loading = false
resolve()
})
})
},
verifyVisitTaskQuestions() {
return new Promise((resolve, reject) => {
this.loading = true
verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId }).then(res => {
this.loading = false
resolve()
}).catch(() => {
this.loading = false
reject()
})
})
},
handleResize() { handleResize() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.reportList && this.$refs.reportList.doLayout() this.$refs.reportList && this.$refs.reportList.doLayout()
@ -675,15 +662,16 @@ export default {
} }
}, },
// //
signConfirm(signInfo) { async signConfirm(signInfo) {
this.loading = true this.loading = true
var params = { try {
data: { var params = {
visitTaskId: this.visitTaskId data: {
}, visitTaskId: this.visitTaskId
signInfo: signInfo },
} signInfo: signInfo
submitDicomVisitTask(params).then(async res => { }
const res = await submitDicomVisitTask(params)
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
if (this.$refs['signForm']) { if (this.$refs['signForm']) {
@ -699,7 +687,8 @@ export default {
await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 }) await store.dispatch('reading/setVisitTaskReadingTaskState', { visitTaskId: this.visitTaskId, readingTaskState: 2 })
// DicomEvent.$emit('setReadingState', 2) // DicomEvent.$emit('setReadingState', 2)
await store.dispatch('reading/setCurrentReadingTaskState', 2) await store.dispatch('reading/setCurrentReadingTaskState', 2)
var isAutoTask = await this.getAutoTaskVal() const res = await getAutoCutNextTask()
var isAutoTask = res.Result.AutoCutNextTask
if (isAutoTask) { if (isAutoTask) {
// DicomEvent.$emit('reload') // DicomEvent.$emit('reload')
// DicomEvent.$emit('getNextTask') // DicomEvent.$emit('getNextTask')
@ -723,19 +712,12 @@ export default {
// DicomEvent.$emit('readingPageStateUpdate', { readingTaskState: 2 }) // DicomEvent.$emit('readingPageStateUpdate', { readingTaskState: 2 })
} }
this.loading = false this.loading = false
}).catch(() => { } catch (e) {
this.loading = false this.loading = false
if (this.$refs['signForm'] && this.$refs['signForm'].btnLoading) { if (this.$refs['signForm'] && this.$refs['signForm'].btnLoading) {
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
} }
}) }
},
getAutoTaskVal() {
return new Promise((resolve, reject) => {
getAutoCutNextTask().then(res => {
resolve(res.Result.AutoCutNextTask)
}).catch(() => { reject() })
})
}, },
previewDicoms(task) { previewDicoms(task) {
if (this.openWindow) { if (this.openWindow) {
@ -755,7 +737,7 @@ export default {
this.openWindow = window.open(routeData.href, '_blank') this.openWindow = window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise((resolve, reject) => { return new Promise(async(resolve, reject) => {
var isBeill var isBeill
var evaluateResult = '' var evaluateResult = ''
var evaluateAjustReason = '' var evaluateAjustReason = ''
@ -805,20 +787,21 @@ export default {
return return
} }
this.loading = true this.loading = true
var params = { try {
visitTaskId: this.visitTaskId, var params = {
answers: this.answers visitTaskId: this.visitTaskId,
} answers: this.answers
changeDicomReadingQuestionAnswer(params).then(res => { }
if (isPrompt) { const res = await changeDicomReadingQuestionAnswer(params)
if (res.IsSuccess && isPrompt) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
this.loading = false this.loading = false
resolve() resolve()
}).catch(() => { } catch (e) {
this.loading = false this.loading = false
reject() reject()
}) }
}) })
}, },
getWarningText() { getWarningText() {

View File

@ -993,6 +993,7 @@ export default {
} }
console.log('getMeasureData') console.log('getMeasureData')
}) })
DicomEvent.$on('getScreenshots', (callback) => { DicomEvent.$on('getScreenshots', (callback) => {
var base64Str = var base64Str =
this.$refs[ this.$refs[

View File

@ -2,10 +2,20 @@
<div class="measurement-wrapper" :style="{'height':height+10+'px'}" style="position: relative"> <div class="measurement-wrapper" :style="{'height':height+10+'px'}" style="position: relative">
<div class="container" :style="{'height':height+'px'}" style="padding-bottom: 50px;overflow-y: auto;"> <div class="container" :style="{'height':height+'px'}" style="padding-bottom: 50px;overflow-y: auto;">
<h3 style="color: #ddd;padding: 5px 0px;margin: 0;" v-if="isReadingShowSubjectInfo"> <div class="basic-info">
<span v-if="subjectCode">{{ subjectCode }} </span> <h3 v-if="isReadingShowSubjectInfo">
<span style="margin-left:5px;">{{ taskBlindName }}</span> <span v-if="subjectCode">{{ subjectCode }} </span>
</h3> <span style="margin-left:5px;">{{ taskBlindName }}</span>
</h3>
<div v-if="readingTaskState < 2">
<el-tooltip class="item" effect="dark" :content="$t('trials:dicomReading:message:confirmReset')" placement="bottom">
<i
class="el-icon-refresh-left"
@click="resetMeasuredData"
/>
</el-tooltip>
</div>
</div>
<QuestionsPreview <QuestionsPreview
ref="QuestionsPreview" ref="QuestionsPreview"
v-if="ecrfShow" v-if="ecrfShow"
@ -77,7 +87,7 @@
</template> </template>
<script> <script>
import { submitDicomVisitTask } from '@/api/trials' import { submitDicomVisitTask } from '@/api/trials'
import { getCustomTag, submitCustomTag, deleteCustomTag } from '@/api/reading' import { getCustomTag, submitCustomTag, resetReadingTask } from '@/api/reading'
import DicomEvent from './../components/DicomEvent' import DicomEvent from './../components/DicomEvent'
import SignForm from '@/views/trials/components/newSignForm' import SignForm from '@/views/trials/components/newSignForm'
import QuestionsPreview from './CustomizeQuestionsPreview' import QuestionsPreview from './CustomizeQuestionsPreview'
@ -169,7 +179,6 @@ export default {
methods: { methods: {
async initList(){ async initList(){
if (this.visitTaskId !== this.lastCanvasTaskId) { if (this.visitTaskId !== this.lastCanvasTaskId) {
this.activeName = ''
this.ecrfShow = true this.ecrfShow = true
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.lastCanvasTaskId) var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.lastCanvasTaskId)
console.log(i) console.log(i)
@ -320,7 +329,7 @@ export default {
distinguishCancelAndClose: true distinguishCancelAndClose: true
}) })
.then(() => { .then(() => {
try {DicomEvent.$emit('getNextTask')} catch (e) {console.log(e)} window.location.reload()
}) })
.catch(action => { .catch(action => {
}) })
@ -354,10 +363,37 @@ export default {
if (this.visitTaskId !== obj.visitTaskId) { if (this.visitTaskId !== obj.visitTaskId) {
this.visitTaskId = obj.visitTaskId this.visitTaskId = obj.visitTaskId
this.taskBlindName = obj.taskBlindName this.taskBlindName = obj.taskBlindName
this.activeName = ''
this.ecrfShow = true this.ecrfShow = true
} }
} },
async resetMeasuredData() {
const confirm = await this.$confirm(
this.$t('trials:dicomReading:message:confirmReset1'),
this.$t('trials:dicomReading:message:confirmReset2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
const loading = this.$loading({ fullscreen: true })
try {
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
this.loading = false
if (res.IsSuccess) {
//
this.$refs['QuestionsPreview'].getCustomTableQuestionAnswer(this.visitTaskId )
await store.dispatch('reading/refreshCustomizeMeasuredData', this.visitTaskId)
DicomEvent.$emit('getMeasureData')
DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('refreshStudyListMeasureData')
}
loading.close()
} catch (e) {
loading.close()
console.log(e)
}
},
} }
} }
</script> </script>
@ -368,6 +404,22 @@ export default {
.container{ .container{
padding: 10px; padding: 10px;
.basic-info{
display: flex;
justify-content: space-between;
align-items: center;
h3{
color: #ddd;
padding: 5px 0px;
margin: 0;
}
i{
color: #fff;
font-size: 22px;
font-weight: bold;
cursor: pointer;
}
}
} }
.title{ .title{
padding: 5px; padding: 5px;

View File

@ -257,7 +257,10 @@ export default {
this.subjectCode = localStorage.getItem('subjectCode') this.subjectCode = localStorage.getItem('subjectCode')
var digitPlaces = Number(localStorage.getItem('digitPlaces')) var digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
DicomEvent.$on('refreshStudyListMeasureData', () => {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
this.measureData = this.visitTaskList[idx].MeasureData
})
// DicomEvent.$on('setReadingState', readingTaskState => { // DicomEvent.$on('setReadingState', readingTaskState => {
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) // var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
// if (idx > -1) { // if (idx > -1) {
@ -271,6 +274,7 @@ export default {
window.addEventListener('beforeunload', e => { window.addEventListener('beforeunload', e => {
cornerstone.imageCache.purgeCache() cornerstone.imageCache.purgeCache()
}) })
}, },
beforeDestroy() { beforeDestroy() {
cornerstone.imageCache.purgeCache() cornerstone.imageCache.purgeCache()

View File

@ -92,7 +92,7 @@
> >
<i slot="default" class="el-icon-plus" /> <i slot="default" class="el-icon-plus" />
<div slot="file" slot-scope="{file}"> <div slot="file" slot-scope="{file}">
<viewer :images="images" :ref="file.url"> <viewer :ref="file.url" :images="images">
<img <img
class="el-upload-list__item-thumbnail" class="el-upload-list__item-thumbnail"
:src="OSSclientConfig.basePath + file.url" :src="OSSclientConfig.basePath + file.url"
@ -225,7 +225,7 @@ export default {
isClosedDialog: false, isClosedDialog: false,
isSendMessage: false, isSendMessage: false,
closeQuestionVisible: false, closeQuestionVisible: false,
images:[] images: []
} }
}, },
mounted() { mounted() {
@ -397,7 +397,7 @@ export default {
}, },
initializeViewer() { initializeViewer() {
Viewer.setDefaults({ Viewer.setDefaults({
toolbar: { zoomIn: true, zoomOut: true, rotateLeft: true, rotateRight: true, flipHorizontal: true, flipVertical: true} toolbar: { zoomIn: true, zoomOut: true, rotateLeft: true, rotateRight: true, flipHorizontal: true, flipVertical: true }
}) })
} }
} }