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