1
continuous-integration/drone/push Build is passing Details

temp
caiyiling 2026-07-28 09:17:40 +08:00
parent 7dd02e84aa
commit 4e1911223d
2 changed files with 30 additions and 7 deletions

View File

@ -289,7 +289,7 @@ export default {
sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false,
openWindow: null
childWindows: []
}
},
computed: {
@ -329,11 +329,13 @@ export default {
DicomEvent.$on('refreshQuestions', _ => {
this.refreshQuestions()
})
window.addEventListener('beforeunload', this.closeAllChildWindows)
},
beforeDestroy() {
DicomEvent.$off('setCollapseActive')
DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions')
window.removeEventListener('beforeunload', this.closeAllChildWindows)
},
methods: {
handleReadingChart(e) {
@ -745,14 +747,22 @@ export default {
this.addOrEdit.lesionType = row.LesionType
},
handleView(item) {
if (this.openWindow) {
this.openWindow.close()
}
localStorage.setItem('taskBlindName', this.taskBlindName)
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
let token = getToken()
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
this.openWindow = window.open(routeData.href, "_blank")
const win = window.open(routeData.href, '_blank')
if (win) {
this.childWindows.push(win)
}
},
closeAllChildWindows() {
this.childWindows.forEach(win => {
if (win && !win.closed) {
win.close()
}
})
this.childWindows = []
},
async saveFormData() {
if (this.dialogSaveLoading) return

View File

@ -290,7 +290,7 @@ export default {
sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false,
openWindow: null
childWindows: []
}
},
computed: {
@ -330,11 +330,13 @@ export default {
DicomEvent.$on('refreshQuestions', _ => {
this.refreshQuestions()
})
window.addEventListener('beforeunload', this.closeAllChildWindows)
},
beforeDestroy() {
DicomEvent.$off('setCollapseActive')
DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions')
window.removeEventListener('beforeunload', this.closeAllChildWindows)
},
methods: {
handleReadingChart(e) {
@ -768,7 +770,18 @@ export default {
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
let token = getToken()
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
this.openWindow = window.open(routeData.href, "_blank")
const win = window.open(routeData.href, '_blank')
if (win) {
this.childWindows.push(win)
}
},
closeAllChildWindows() {
this.childWindows.forEach(win => {
if (win && !win.closed) {
win.close()
}
})
this.childWindows = []
},
async saveFormData() {
if (this.dialogSaveLoading) return