1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7dd02e84aa
commit
4e1911223d
|
|
@ -289,7 +289,7 @@ export default {
|
||||||
sRoiDistanceId: '',
|
sRoiDistanceId: '',
|
||||||
rowSaveLoadingMap: {},
|
rowSaveLoadingMap: {},
|
||||||
dialogSaveLoading: false,
|
dialogSaveLoading: false,
|
||||||
openWindow: null
|
childWindows: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -329,11 +329,13 @@ export default {
|
||||||
DicomEvent.$on('refreshQuestions', _ => {
|
DicomEvent.$on('refreshQuestions', _ => {
|
||||||
this.refreshQuestions()
|
this.refreshQuestions()
|
||||||
})
|
})
|
||||||
|
window.addEventListener('beforeunload', this.closeAllChildWindows)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
DicomEvent.$off('setCollapseActive')
|
DicomEvent.$off('setCollapseActive')
|
||||||
DicomEvent.$off('getUnSaveTarget')
|
DicomEvent.$off('getUnSaveTarget')
|
||||||
DicomEvent.$off('refreshQuestions')
|
DicomEvent.$off('refreshQuestions')
|
||||||
|
window.removeEventListener('beforeunload', this.closeAllChildWindows)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleReadingChart(e) {
|
handleReadingChart(e) {
|
||||||
|
|
@ -745,14 +747,22 @@ export default {
|
||||||
this.addOrEdit.lesionType = row.LesionType
|
this.addOrEdit.lesionType = row.LesionType
|
||||||
},
|
},
|
||||||
handleView(item) {
|
handleView(item) {
|
||||||
if (this.openWindow) {
|
|
||||||
this.openWindow.close()
|
|
||||||
}
|
|
||||||
localStorage.setItem('taskBlindName', this.taskBlindName)
|
localStorage.setItem('taskBlindName', this.taskBlindName)
|
||||||
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
|
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
|
||||||
let token = getToken()
|
let token = getToken()
|
||||||
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
|
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() {
|
async saveFormData() {
|
||||||
if (this.dialogSaveLoading) return
|
if (this.dialogSaveLoading) return
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ export default {
|
||||||
sRoiDistanceId: '',
|
sRoiDistanceId: '',
|
||||||
rowSaveLoadingMap: {},
|
rowSaveLoadingMap: {},
|
||||||
dialogSaveLoading: false,
|
dialogSaveLoading: false,
|
||||||
openWindow: null
|
childWindows: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -330,11 +330,13 @@ export default {
|
||||||
DicomEvent.$on('refreshQuestions', _ => {
|
DicomEvent.$on('refreshQuestions', _ => {
|
||||||
this.refreshQuestions()
|
this.refreshQuestions()
|
||||||
})
|
})
|
||||||
|
window.addEventListener('beforeunload', this.closeAllChildWindows)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
DicomEvent.$off('setCollapseActive')
|
DicomEvent.$off('setCollapseActive')
|
||||||
DicomEvent.$off('getUnSaveTarget')
|
DicomEvent.$off('getUnSaveTarget')
|
||||||
DicomEvent.$off('refreshQuestions')
|
DicomEvent.$off('refreshQuestions')
|
||||||
|
window.removeEventListener('beforeunload', this.closeAllChildWindows)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleReadingChart(e) {
|
handleReadingChart(e) {
|
||||||
|
|
@ -768,7 +770,18 @@ export default {
|
||||||
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
|
localStorage.setItem('isReadingShowSubjectInfo', this.isReadingShowSubjectInfo)
|
||||||
let token = getToken()
|
let token = getToken()
|
||||||
let routeData = this.$router.resolve({ path: `/ecrfList?trialId=${this.$route.query.trialId}&visitTaskId=${this.visitTaskId}&questionId=${item.Id}&TokenKey=${token}` })
|
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() {
|
async saveFormData() {
|
||||||
if (this.dialogSaveLoading) return
|
if (this.dialogSaveLoading) return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue