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

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() { toRight() {
if (this.translateX < this.pageSize * this.itemWidth) { if (this.translateX < this.pageSize * this.itemWidth) {
this.translateX = 0 this.translateX = 0

View File

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

View File

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

View File

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