PetCt页面viewport图像以最大的图像张数滚动
parent
55085438aa
commit
63a4a56feb
|
@ -628,11 +628,7 @@ export default {
|
|||
const routeData = this.$router.resolve({ path })
|
||||
this.screenshotWindow = window.open(routeData.href, '_blank')
|
||||
})
|
||||
window.addEventListener('beforeunload', () => {
|
||||
if (this.screenshotWindow) {
|
||||
this.screenshotWindow.close()
|
||||
}
|
||||
})
|
||||
window.addEventListener('beforeunload', e => { this.beforeUnloadHandler(e) })
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.screenshotWindow) {
|
||||
|
@ -649,7 +645,7 @@ export default {
|
|||
FusionEvent.$off('removeAnnotation')
|
||||
FusionEvent.$off('imageLocation')
|
||||
FusionEvent.$off('getScreenshots')
|
||||
window.removeEventListener('beforeunload')
|
||||
window.removeEventListener('beforeunload', e => { this.beforeUnloadHandler(e) })
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
@ -699,6 +695,11 @@ export default {
|
|||
|
||||
var ptseriesId = this.$route.query.ptseriesId
|
||||
this.petSeries = await this.getSeriesInfo(ptseriesId)
|
||||
|
||||
const maxCount = Math.max(this.ctSeries.imageIds.length, this.petSeries.imageIds.length)
|
||||
this.$set(this.ctSeries, 'imageMaxLength', maxCount)
|
||||
this.$set(this.petSeries, 'imageMaxLength', maxCount)
|
||||
|
||||
await this.getImages()
|
||||
|
||||
// 设置viewport
|
||||
|
@ -2133,6 +2134,11 @@ export default {
|
|||
historyRecord() {
|
||||
this.fusion.visible = true
|
||||
},
|
||||
beforeUnloadHandler() {
|
||||
if (this.screenshotWindow) {
|
||||
this.screenshotWindow.close()
|
||||
}
|
||||
},
|
||||
async receiveMsg(event) {
|
||||
if (event.data.type === 'readingPageUpdate') {
|
||||
// this.$refs['questions'].initList()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div v-if="index === 1 || index === 2">
|
||||
Series: #{{ seriesInfo.seriesNumber }}
|
||||
</div>
|
||||
<div v-if="index !== 4">Image: #{{ `${seriesInfo.imageIdIndex + 1} / ${seriesInfo.imageIds.length}` }}</div>
|
||||
<div v-if="index !== 4">Image: #{{ `${seriesInfo.imageIdIndex + 1} / ${seriesInfo.imageMaxLength}` }}</div>
|
||||
<div v-if="index === 1 || index === 2">{{ seriesInfo.modality }}</div>
|
||||
</div>
|
||||
<!-- 描述信息 -->
|
||||
|
@ -247,7 +247,7 @@ export default {
|
|||
this.imageInfo.size = `${imagePlaneModule.columns}*${imagePlaneModule.rows}`
|
||||
this.imageInfo.location = imagePlaneModule.sliceLocation
|
||||
this.getOrientationMarker()
|
||||
this.sliderBoxHeight = imageIndex * 100 / (this.seriesInfo.imageIds.length - 1)
|
||||
this.sliderBoxHeight = imageIndex * 100 / (this.seriesInfo.imageMaxLength - 1)
|
||||
}
|
||||
|
||||
var properties = viewport.getProperties()
|
||||
|
@ -376,7 +376,7 @@ export default {
|
|||
goViewer(e) {
|
||||
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
|
||||
this.sliderBoxHeight = height
|
||||
var index = Math.trunc(this.seriesInfo.imageIds.length * this.sliderBoxHeight / 100)
|
||||
var index = Math.trunc(this.seriesInfo.imageMaxLength * this.sliderBoxHeight / 100)
|
||||
if (this.seriesInfo.imageIdIndex !== index) {
|
||||
this.scroll(index)
|
||||
}
|
||||
|
@ -399,8 +399,8 @@ export default {
|
|||
if (PX < 0) return
|
||||
if (PX > boxHeight) return
|
||||
const height = PX * 100 / boxHeight
|
||||
var index = Math.trunc(this.seriesInfo.imageIds.length * height / 100)
|
||||
index = index > this.seriesInfo.imageIds.length ? this.seriesInfo.imageIds.length : index < 0 ? 0 : index
|
||||
var index = Math.trunc(this.seriesInfo.imageMaxLength * height / 100)
|
||||
index = index > this.seriesInfo.imageMaxLength ? this.seriesInfo.imageMaxLength : index < 0 ? 0 : index
|
||||
this.sliderBoxHeight = height
|
||||
if (this.seriesInfo.imageIdIndex !== index) {
|
||||
this.scroll(index)
|
||||
|
|
Loading…
Reference in New Issue