病灶历史记录同时只打开一个窗口

uat_us
caiyiling 2024-03-28 10:53:10 +08:00
parent db7498938f
commit 0e5d1fb718
4 changed files with 21 additions and 5 deletions

View File

@ -151,6 +151,11 @@ export default {
})
})
},
receiveMsg(event) {
if (event.data.type === 'setReadingState' || event.data.type === 'closeHistoryScreenshot') {
window.close()
}
},
toRight() {
if (this.translateX < this.pageSize * this.itemWidth) {
this.translateX = 0

View File

@ -527,7 +527,8 @@ export default {
initAnnotations: [],
activeCanvasWW: null,
activeCanvasWC: null,
fusion: { visible: false } //
fusion: { visible: false }, //
screenshotWindow: null
// initFirstAnnotation:false
}
},
@ -621,6 +622,13 @@ export default {
loading.close()
callback(pictureBaseStr)
})
FusionEvent.$on('viewHistoryScreenshot', (path) => {
if (this.screenshotWindow) {
this.screenshotWindow.close()
}
const routeData = this.$router.resolve({ path })
this.screenshotWindow = window.open(routeData.href, '_blank')
})
},
destroyed() {
cornerstoneTools.destroy()
@ -2127,11 +2135,16 @@ export default {
} else if (event.data.type === 'readingPageStateUpdate') {
this.readingTaskState = event.data.data.readingTaskState
if (this.readingTaskState === 2) {
FusionEvent.$emit('closeHistoryScreenshot')
if (this.screenshotWindow) {
this.screenshotWindow.close()
}
window.close()
}
} else if (event.data.type === 'setReadingState') {
this.readingTaskState = event.data.data.readingTaskState
if (this.readingTaskState === 2) {
FusionEvent.$emit('closeHistoryScreenshot')
window.close()
}
}

View File

@ -417,8 +417,7 @@ export default {
var token = getToken()
var subjectCode = this.$route.query.subjectCode
var path = `/historyScreenshot?&subjectCode=${subjectCode}&visitTaskId=${this.visitTaskId}&questionType=${question.QuestionType}&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
window.open(routeData.href, '_blank')
FusionEvent.$emit('viewHistoryScreenshot', path)
},
setMeasuredData(measurement) {
if (measurement.data.isHandleOutsideImage) {

View File

@ -1022,8 +1022,7 @@ export default {
var token = getToken()
var subjectCode = this.$route.query.subjectCode
var path = `/historyScreenshot?rowId=${rowId}&subjectCode=${subjectCode}&lesionName=${this.lesionName}&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
window.open(routeData.href, '_blank')
FusionEvent.$emit('viewHistoryScreenshot', path)
}
}
}