From 994598c216ce29cb6c2f1eef688ea240290df925 Mon Sep 17 00:00:00 2001
From: caiyiling <1321909229@qq.com>
Date: Fri, 22 Mar 2024 13:26:04 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BA=B5=E9=9A=94=E8=A1=80=E6=B1=A0=E3=80=81?=
=?UTF-8?q?=E8=82=9D=E8=84=8F=E8=A1=80=E6=B1=A0=E3=80=81=E8=84=BE=E5=B0=96?=
=?UTF-8?q?=E3=80=81=E8=84=BE=E5=BA=95=E6=A0=87=E8=AE=B0=E4=BF=9D=E5=AD=98?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reading/dicoms/components/DicomCanvas.vue | 128 +++++-----
.../reading/dicoms/components/DicomViewer.vue | 241 ++++++++++--------
.../components/Fusion/HistoryScreenshot.vue | 12 +-
.../dicoms/components/Fusion/PetCt.vue | 59 +++--
.../dicoms/components/Fusion/QuestionItem.vue | 21 +-
.../dicoms/components/Fusion/Questions.vue | 168 ++++++++++--
.../components/Fusion/TableQuestionItem.vue | 2 +-
.../dicoms/components/Fusion/Viewport.vue | 7 +
.../components/IRecist/QuestionForm.vue | 4 +-
.../dicoms/components/Lugano/QuestionForm.vue | 9 +-
.../dicoms/components/PCWG/QuestionForm.vue | 2 +-
.../dicoms/components/QuestionItem.vue | 17 +-
.../reading/dicoms/components/Questions.vue | 155 ++++++++---
.../dicoms/components/Recist/QuestionForm.vue | 4 +-
.../components/RecistBM/QuestionForm.vue | 4 +-
.../reading/dicoms/components/ReportPage.vue | 1 +
.../reading/dicoms/components/StudyList.vue | 4 +-
.../dicoms/customize/CustomizeStudyList.vue | 2 +-
18 files changed, 563 insertions(+), 277 deletions(-)
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
index 1d5af629..4d263a4a 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
@@ -1127,8 +1127,8 @@ export default {
// resolve()
// })
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
- .then(image => {
- scope.onFirstImageLoaded(image)
+ .then(async image => {
+ await scope.onFirstImageLoaded(image)
resolve()
})
.catch((error) => {
@@ -1141,84 +1141,86 @@ export default {
},
onFirstImageLoaded(image) {
console.log('onFirstImageLoaded')
+ return new Promise(async resolve => {
+ const element = this.$refs.canvas
+ var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
+ cornerstone.displayImage(this.canvas, image, viewport)
- const element = this.$refs.canvas
- var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
- cornerstone.displayImage(this.canvas, image, viewport)
+ if (!this.toolState.initialized) {
+ this.toolState.initialized = true
+ const toolButtons = document.querySelectorAll('[data-tool]')
- if (!this.toolState.initialized) {
- this.toolState.initialized = true
- const toolButtons = document.querySelectorAll('[data-tool]')
-
- // const scope = this
- Array.from(toolButtons).forEach((toolBtn) => {
+ // const scope = this
+ Array.from(toolButtons).forEach((toolBtn) => {
// Add the tool
- const toolName = toolBtn.getAttribute('data-tool')
- const apiTool = cornerstoneTools[`${toolName}Tool`]
- if (apiTool) {
- const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
+ const toolName = toolBtn.getAttribute('data-tool')
+ const apiTool = cornerstoneTools[`${toolName}Tool`]
+ if (apiTool) {
+ const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
- if (!toolAlreadyAddedToElement) {
- if (toolName === 'Length') {
- cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
- } else if (toolName === 'Bidirectional') {
+ if (!toolAlreadyAddedToElement) {
+ if (toolName === 'Length') {
+ cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
+ } else if (toolName === 'Bidirectional') {
// cornerstoneTools.addToolForElement(element, BidirectionalTool, { digits: this.digitPlaces })
// , handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true
- cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
- } else if (toolName === 'ArrowAnnotate') {
- cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
- } else if (toolName === 'RectangleRoi') {
- cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
- } else {
- cornerstoneTools.addToolForElement(element, apiTool)
+ cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
+ } else if (toolName === 'ArrowAnnotate') {
+ cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
+ } else if (toolName === 'RectangleRoi') {
+ cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
+ } else {
+ cornerstoneTools.addToolForElement(element, apiTool)
+ }
}
}
+ })
+ if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
+ cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
}
- })
- if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
- cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
- }
- if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
- cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
- }
- cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
+ if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
+ cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
+ }
+ cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
- if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
- cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
- }
- cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
- cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
- mouseButtonMask: 2
- })
- cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
- mouseButtonMask: 4
- })
+ if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
+ cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
+ }
+ cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
+ cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
+ mouseButtonMask: 2
+ })
+ cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
+ mouseButtonMask: 4
+ })
// if (!cornerstoneTools.getToolForElement(element, OrientationMarkersTool)) {
// cornerstoneTools.addToolForElement(element, OrientationMarkersTool)
// }
// cornerstoneTools.setToolActiveForElement(element, 'OrientationMarkers', { })
- }
+ }
- // cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
- cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
- cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
- // cornerstoneTools.stackPrefetch.enable(this.canvas)
- cornerstone.updateImage(element, true)
+ // cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
+ cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
+ cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
+ // cornerstoneTools.stackPrefetch.enable(this.canvas)
+ cornerstone.updateImage(element, true)
- this.stack.firstImageLoading = false
- this.toolState.dicomInfoVisible = true
- var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
- var frame = null
- if (instanceId.includes('?frame=')) {
- frame = instanceId.split('?frame=')[1]
- instanceId = instanceId.split('?frame=')[0]
- }
- this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
- instanceId = instanceId.split('.')[0]
- this.stack.instanceId = instanceId
- this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
- this.resetWwwc()
+ this.stack.firstImageLoading = false
+ this.toolState.dicomInfoVisible = true
+ var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
+ var frame = null
+ if (instanceId.includes('?frame=')) {
+ frame = instanceId.split('?frame=')[1]
+ instanceId = instanceId.split('?frame=')[0]
+ }
+ this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
+ instanceId = instanceId.split('.')[0]
+ this.stack.instanceId = instanceId
+ this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
+ this.resetWwwc()
+ resolve()
+ })
},
onNewImage(e) {
console.log('cornerstonenewimage')
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
index a758c5ab..da9f3f3e 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue
@@ -828,7 +828,7 @@ export default {
activeSeries: {
immediate: true,
handler(v) {
- if (v) {
+ if (v && v.isCurrentTask && this.studyList.length === 0) {
this.activeTaskInfo.taskName = v.taskBlindName
this.activeTaskInfo.visitTaskId = v.visitTaskId
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === v.visitTaskId)
@@ -838,8 +838,6 @@ export default {
studyList = studyList.filter(i => !i.IsCriticalSequence && i.Modalities.indexOf('CT') !== -1 && i.Modalities.indexOf('PT') !== -1)
if (studyList.length === 0) return
this.studyList = studyList
- } else {
- this.studyList = []
}
}
}
@@ -887,24 +885,48 @@ export default {
}
console.log('getMeasureData')
})
- DicomEvent.$on('getScreenshots', async(callback) => {
+ DicomEvent.$on('getScreenshots', async(measuredData, callback) => {
if (this.currentDicomCanvasIndex > -1) {
- // var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
- const divForDownloadViewport = document.querySelector(
- `div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
- )
- var canvas = await html2canvas(divForDownloadViewport)
- var base64Str = canvas.toDataURL('image/png', 1)
- callback(base64Str)
+ if (!measuredData) return
+ await this.imageLocation(measuredData)
+ setTimeout(async() => {
+ // var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
+ const divForDownloadViewport = document.querySelector(
+ `div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
+ )
+ var canvas = await html2canvas(divForDownloadViewport)
+ var base64Str = canvas.toDataURL('image/png', 1)
+ console.log('getScreenshots')
+ callback(base64Str)
+ }, 50)
}
- console.log('getScreenshots')
})
- DicomEvent.$on('imageLocation', measuredData => {
- if (!measuredData) return
- this.imageLocation(measuredData)
+ DicomEvent.$on('imageLocation', async(measuredData) => {
+ return new Promise(async resolve => {
+ if (!measuredData) return
+ await this.imageLocation(measuredData)
- console.log('imageLocation')
+ console.log('imageLocation')
+ resolve()
+ })
})
+ // DicomEvent.$on('imageLocation', async(measuredData, callback) => {
+ // if (measuredData) {
+ // await this.imageLocation(measuredData)
+ // }
+ // console.log('imageLocation')
+ // this.$nextTick(() => {
+ // if (callback) {
+ // callback()
+ // }
+ // })
+ // })
+ // DicomEvent.$on('imageLocation', measuredData => {
+ // if (!measuredData) return
+ // this.imageLocation(measuredData)
+
+ // console.log('imageLocation')
+ // })
DicomEvent.$on('setReadingState', readingTaskState => {
this.canvasObj[this.currentDicomCanvasIndex].readingTaskState = readingTaskState
if (this.activeTool) {
@@ -934,6 +956,11 @@ export default {
if (!this.petctWindow) return
this.petctWindow.postMessage({ type: 'setReadingState', data: data }, window.location)
})
+ DicomEvent.$on('reload', () => {
+ if (this.petctWindow) {
+ this.petctWindow.close()
+ }
+ })
},
beforeDestroy() {
DicomEvent.$off('updateImage')
@@ -945,6 +972,7 @@ export default {
DicomEvent.$off('setMeasuredToolsPassive')
DicomEvent.$off('readingPageUpdate')
DicomEvent.$off('setReadingState')
+ DicomEvent.$off('reload')
if (this.petctWindow) {
this.petctWindow.close()
}
@@ -1302,108 +1330,117 @@ export default {
// 最后一个窗口显示当前访视下病灶所在的影像序列
// 其他窗口显示该病灶第一次出现的序列信息
- async imageLocation(obj) {
- var loading = null
- var loadImagePromises = []
- var isScrollSync = this.isScrollSync
- if (this.isScrollSync) {
+ imageLocation(obj) {
+ return new Promise(async resolve => {
+ var loading = null
+ var loadImagePromises = []
+ var isScrollSync = this.isScrollSync
+ if (this.isScrollSync) {
// 取消滚动同步
- this.isScrollSync = false
- }
+ this.isScrollSync = false
+ }
- var activeCanvasTaskId = obj.visitTaskId
+ var activeCanvasTaskId = obj.visitTaskId
- var index = this.visitTaskList.findIndex(i => i.VisitTaskId === activeCanvasTaskId)
- if (index === -1) return
+ var index = this.visitTaskList.findIndex(i => i.VisitTaskId === activeCanvasTaskId)
+ if (index === -1) {
+ resolve()
+ return
+ }
- var firstAddSeries = null
- var currentAddSeries = null
- if (this.isReadingTaskViewInOrder) {
+ var firstAddSeries = null
+ var currentAddSeries = null
+ if (this.isReadingTaskViewInOrder) {
// 有序
// 获取病灶第一次出现的访视序列
- var firstAddVisitTaskId = null
+ var firstAddVisitTaskId = null
- var idx = this.visitTaskList[index].MeasureData.findIndex(item => {
- return item.OrderMarkName === obj.lesionName
- })
- if (idx > -1) {
- firstAddVisitTaskId = this.visitTaskList[index].MeasureData[idx].FristAddTaskId
- }
- if (firstAddVisitTaskId) {
- var taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === firstAddVisitTaskId)
- if (taskIdx > -1 && !this.visitTaskList[taskIdx].IsInit) {
- loading = this.$loading({ fullscreen: true })
- if (!this.visitTaskList[taskIdx].measureDataInit) {
- await store.dispatch('reading/getMeasuredData', this.visitTaskList[taskIdx].VisitTaskId)
- }
- if (!this.visitTaskList[taskIdx].studyListInit) {
- await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[taskIdx].VisitId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, taskBlindName: this.visitTaskList[taskIdx].TaskBlindName })
- }
- if (!this.visitTaskList[taskIdx].readingQuestionsInit) {
- await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
- }
- if (!this.visitTaskList[taskIdx].questionsInit) {
- await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
- }
-
- await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
+ var idx = this.visitTaskList[index].MeasureData.findIndex(item => {
+ return item.OrderMarkName === obj.lesionName
+ })
+ if (idx > -1) {
+ firstAddVisitTaskId = this.visitTaskList[index].MeasureData[idx].FristAddTaskId
}
- if (this.CriterionType === 3 && obj.lesionType === 7 && obj.fromMark) {
- const measureDataInfo = Object.assign({}, obj)
- measureDataInfo.lesionName = obj.fromMark
- firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, measureDataInfo)
- } else {
- firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj)
- }
- }
- // 获取当前访视病灶所在的序列
- currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
- if (!firstAddSeries && currentAddSeries) {
- // 存在首次出现的病灶及当前病灶
- firstAddSeries = currentAddSeries
- } else if (!firstAddSeries && !currentAddSeries) {
- // 当前新病灶,且未画标记则显示当前的序列信息,不做处理
- loading && loading.close()
- this.isScrollSync = isScrollSync
- this.setToolToTarget(obj)
- return
- } else if (firstAddSeries && !currentAddSeries) {
- // 当前访视序列与首次出现病灶的序列对齐
- currentAddSeries = this.getLinkedSeries(firstAddSeries, activeCanvasTaskId)
+ if (firstAddVisitTaskId) {
+ var taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === firstAddVisitTaskId)
+ if (taskIdx > -1 && !this.visitTaskList[taskIdx].IsInit) {
+ loading = this.$loading({ fullscreen: true })
+ if (!this.visitTaskList[taskIdx].measureDataInit) {
+ await store.dispatch('reading/getMeasuredData', this.visitTaskList[taskIdx].VisitTaskId)
+ }
+ if (!this.visitTaskList[taskIdx].studyListInit) {
+ await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[taskIdx].VisitId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, taskBlindName: this.visitTaskList[taskIdx].TaskBlindName })
+ }
+ if (!this.visitTaskList[taskIdx].readingQuestionsInit) {
+ await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
+ }
+ if (!this.visitTaskList[taskIdx].questionsInit) {
+ await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
+ }
+ await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[taskIdx].VisitTaskId })
+ }
+ if (this.CriterionType === 3 && obj.lesionType === 7 && obj.fromMark) {
+ const measureDataInfo = Object.assign({}, obj)
+ measureDataInfo.lesionName = obj.fromMark
+ firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, measureDataInfo)
+ } else {
+ firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj)
+ }
+ }
+ // 获取当前访视病灶所在的序列
+ currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
+ if (!firstAddSeries && currentAddSeries) {
+ // 存在首次出现的病灶及当前病灶
+ firstAddSeries = currentAddSeries
+ } else if (!firstAddSeries && !currentAddSeries) {
+ // 当前新病灶,且未画标记则显示当前的序列信息,不做处理
+ loading && loading.close()
+ this.isScrollSync = isScrollSync
+ this.setToolToTarget(obj)
+ resolve()
+ return
+ } else if (firstAddSeries && !currentAddSeries) {
+ // 当前访视序列与首次出现病灶的序列对齐
+ currentAddSeries = this.getLinkedSeries(firstAddSeries, activeCanvasTaskId)
+
+ if (!currentAddSeries) {
+ // 未找到对齐的,则就显示当前最后一个窗口现实的序列信息
+ currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
+ }
+ }
+ } else {
+ // 无序
+ currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
if (!currentAddSeries) {
// 未找到对齐的,则就显示当前最后一个窗口现实的序列信息
currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
}
+ firstAddSeries = currentAddSeries
}
- } else {
- // 无序
- currentAddSeries = this.getSeriesInfoByMark(activeCanvasTaskId, obj)
- if (!currentAddSeries) {
- // 未找到对齐的,则就显示当前最后一个窗口现实的序列信息
- currentAddSeries = this.$refs[`dicomCanvas${this.maxCanvas - 1}`][0].series
- }
- firstAddSeries = currentAddSeries
- }
- for (let i = 0; i < this.maxCanvas; i++) {
- if (i === this.maxCanvas - 1) {
- loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(currentAddSeries))
- this.currentDicomCanvasIndex = i
- this.activeSeries = currentAddSeries
- store.dispatch('reading/setActiveSeries', currentAddSeries)
- } else {
- loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(firstAddSeries))
+ for (let i = 0; i < this.maxCanvas; i++) {
+ if (i === this.maxCanvas - 1) {
+ loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(currentAddSeries))
+ this.currentDicomCanvasIndex = i
+ this.activeSeries = currentAddSeries
+ store.dispatch('reading/setActiveSeries', currentAddSeries)
+ } else {
+ loadImagePromises.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(firstAddSeries))
+ }
}
- }
- Promise.all(loadImagePromises)
- .then(() => {
- this.isScrollSync = isScrollSync
- this.setToolToTarget(obj)
- })
- if (loading) {
- loading.close()
- }
+ Promise.all(loadImagePromises)
+ .then(() => {
+ this.isScrollSync = isScrollSync
+ this.setToolToTarget(obj)
+ resolve()
+ }).catch(() => {
+ resolve()
+ })
+ if (loading) {
+ loading.close()
+ }
+ })
},
setToolToTarget(obj) {
if (obj.readingTaskState < 2 && obj.markTool && !obj.isMarked) {
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue
index 1329d054..42553e66 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue
@@ -75,7 +75,10 @@ export default {
translateX: 0,
pageSize: 0, // 一页展示的图片数
previewImages: [],
- imgSize: { width: '120px', height: '120px' }
+ imgSize: { width: '120px', height: '120px' },
+ lesionId: '',
+ visitTaskId: '',
+ questionType: null
}
},
computed: {
@@ -112,7 +115,10 @@ export default {
store.dispatch('user/setToken', this.$route.query.TokenKey)
changeURLStatic('TokenKey', '')
}
- this.lesionId = this.$route.query.rowId
+ this.lesionId = this.$route.query.rowId ? this.$route.query.rowId : ''
+ this.visitTaskId = this.$route.query.visitTaskId ? this.$route.query.visitTaskId : ''
+ var questionType = this.$route.query.questionType
+ this.questionType = questionType ? Number(questionType) : null
this.initPage()
},
methods: {
@@ -128,7 +134,7 @@ export default {
getScreenshot() {
return new Promise(resolve => {
const loading = this.$loading({ fullscreen: true })
- getPreviousOtherPicturePath({ rowId: this.lesionId }).then(res => {
+ getPreviousOtherPicturePath({ rowId: this.lesionId, visitTaskId: this.visitTaskId, questionType: this.questionType }).then(res => {
this.previewImages = res.Result
if (this.previewImages.length === 0) {
this.$alert(this.$t('trials:lugano:message:noScreenshot'), this.$t('trials:lugano:message:warnTip'), {
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
index 5139808a..dbc65232 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
@@ -483,6 +483,7 @@ export default {
{ label: this.$t('trials:reading:button:rotateTurnRight'), val: 5 }// 右转90度
],
isCurrentTask: false,
+ isBaseLineTask: false,
ctSeries: {},
petSeries: {},
renderingEngineId: renderingEngineId,
@@ -562,6 +563,7 @@ export default {
this.subjectCode = this.$route.query.subjectCode
this.taskBlindName = this.$route.query.taskBlindName
this.isCurrentTask = this.$route.query.isCurrentTask === 'true'
+ this.isBaseLineTask = this.$route.query.isCurrentTask === 'true'
this.customWwc = { visible: false, title: this.$t('trials:reading:dagTitle:wwwcCustom') }
const digitPlaces = parseInt(this.$route.query.digitPlaces)
this.digitPlaces = digitPlaces === -1 ? 2 : digitPlaces
@@ -606,9 +608,10 @@ export default {
console.log('imageLocation')
this.imageLocation(obj)
})
- FusionEvent.$on('getScreenshots', async(callback) => {
+ FusionEvent.$on('getScreenshots', async(measuredData, callback) => {
// var base64Str = await this.$refs['FUSION_AXIAL'].getScreenshots()
const loading = this.$loading({ fullscreen: true })
+ await this.imageLocation(measuredData)
const divForDownloadViewport = document.querySelector(
'.dicom-container'
)
@@ -712,8 +715,9 @@ export default {
const debouncedCallback = this.debounce((e) => {
const { annotation } = e.detail
const { remark } = annotation.data
- if (this.initAnnotations.length > 0 && this.initAnnotations[0].orderMark === remark && !this.initAnnotations[0].isInit) {
- this.initAnnotations[0].isInit = true
+ var idx = this.initAnnotations.findIndex(i => i.orderMark === remark)
+ if (this.initAnnotations.length > 0 && idx > -1 && this.initAnnotations[idx].orderMark === remark && !this.initAnnotations[idx].isInit) {
+ this.initAnnotations[idx].isInit = true
} else {
this.onAnnotationModified(e)
}
@@ -1972,28 +1976,33 @@ export default {
})
},
imageLocation(obj) {
- this.setToolToTarget(obj)
- if (!obj.otherMeasureData) return
- this.isLocate = true
- const { metadata } = obj.otherMeasureData
- var imageArr = metadata.referencedImageId.split('/')
- var instanceId = imageArr[imageArr.length - 1]
- var viewportId = null
- // var seriesId = data.seriesId
- // var instanceId = data.instanceId
- var index = -1
- index = this.petSeries.instanceList.findIndex(i => i === instanceId)
- if (index > -1) {
- viewportId = 'PT_AXIAL'
- this.$refs[viewportId].scroll(index)
- return
- }
- index = this.ctSeries.instanceList.findIndex(i => i === instanceId)
- if (index > -1) {
- viewportId = 'CT_AXIAL'
- this.$refs[viewportId].scroll(index)
- return
- }
+ return new Promise(resolve => {
+ console.log('imageLocation')
+ this.setToolToTarget(obj)
+ if (!obj.otherMeasureData) {
+ resolve()
+ return
+ }
+ this.isLocate = true
+ const { metadata } = obj.otherMeasureData
+ var imageArr = metadata.referencedImageId.split('/')
+ var instanceId = imageArr[imageArr.length - 1]
+ var viewportId = null
+ // var seriesId = data.seriesId
+ // var instanceId = data.instanceId
+ var index = -1
+ index = this.petSeries.instanceList.findIndex(i => i === instanceId)
+ if (index > -1) {
+ viewportId = 'PT_AXIAL'
+ this.$refs[viewportId].scroll(index)
+ }
+ index = this.ctSeries.instanceList.findIndex(i => i === instanceId)
+ if (index > -1) {
+ viewportId = 'CT_AXIAL'
+ this.$refs[viewportId].scroll(index)
+ }
+ resolve()
+ })
},
setToolToTarget(obj) {
var toolGroupIds = [ctToolGroupId, ptToolGroupId, fusionToolGroupId]
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/QuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/QuestionItem.vue
index 2d55e452..9db13b4a 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/QuestionItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/QuestionItem.vue
@@ -35,16 +35,24 @@
{{ $t('trials:lugano:button:addAnnotation') }}
- {{ $t('trials:lugano:button:clearAnnotation') }}
+ {{ $t('trials:lugano:button:clearAnnotation') }}
{{ $t('trials:lugano:button:locateAnnotation') }}
+
+
+
+
+
+
+ {{ $t('common:button:save') }}
+
+ {{ $t('trials:lugano:button:suvscreenshot') }}
@@ -339,11 +347,16 @@ export default {
FusionEvent.$emit('removeAnnotation', question)
})
.catch(() => {})
-
},
locateAnnotation(question) {
FusionEvent.$emit('locateAnnotation', question)
},
+ saveAnnotation(question) {
+ FusionEvent.$emit('saveAnnotation', question)
+ },
+ viewAnnotations(question) {
+ FusionEvent.$emit('viewAnnotations', question)
+ },
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue
index 25828b31..fe8a227a 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue
@@ -33,9 +33,11 @@