非DICOM阅片页面样式问题
parent
022a2005f1
commit
30fdd91764
|
|
@ -32,13 +32,8 @@
|
||||||
<svg-icon icon-class="rotate" class="svg-icon" />
|
<svg-icon icon-class="rotate" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 查看关键序列 -->
|
<!-- 查看关键序列 -->
|
||||||
<el-popover
|
<el-popover v-model="keySeriesPopoverVisible" placement="bottom" trigger="click"
|
||||||
v-model="keySeriesPopoverVisible"
|
popper-class="key-series-popper" @show="showKeySeriesPanel">
|
||||||
placement="bottom"
|
|
||||||
trigger="click"
|
|
||||||
popper-class="key-series-popper"
|
|
||||||
@show="showKeySeriesPanel"
|
|
||||||
>
|
|
||||||
<ul class="key-series-list">
|
<ul class="key-series-list">
|
||||||
<li v-if="keyTaskInfo && keyTaskInfo.TaskBlindName" class="key-series-header">
|
<li v-if="keyTaskInfo && keyTaskInfo.TaskBlindName" class="key-series-header">
|
||||||
<div class="key-series-header-top">
|
<div class="key-series-header-top">
|
||||||
|
|
@ -56,12 +51,8 @@
|
||||||
<li v-else-if="keySeries.length === 0" class="key-series-empty">
|
<li v-else-if="keySeries.length === 0" class="key-series-empty">
|
||||||
{{ $t('trials:reading:keyImage:noData') }}
|
{{ $t('trials:reading:keyImage:noData') }}
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li v-for="(kf, idx) in keySeries" :key="idx" class="key-series-item"
|
||||||
v-for="(kf, idx) in keySeries"
|
@click.stop.prevent="jumpToKeySeries(kf)">
|
||||||
:key="idx"
|
|
||||||
class="key-series-item"
|
|
||||||
@click.stop.prevent="jumpToKeySeries(kf)"
|
|
||||||
>
|
|
||||||
<div class="key-series-img">
|
<div class="key-series-img">
|
||||||
<img v-if="kf.PicturePath" :src="`${OSSclientConfig.basePath}${kf.PicturePath}`" />
|
<img v-if="kf.PicturePath" :src="`${OSSclientConfig.basePath}${kf.PicturePath}`" />
|
||||||
<svg-icon v-else icon-class="image" class="svg-icon default-icon" />
|
<svg-icon v-else icon-class="image" class="svg-icon default-icon" />
|
||||||
|
|
@ -117,13 +108,9 @@
|
||||||
:title="$t('trials:nondicom-show:scale')" @click.prevent="setAnnotateToolActive('Lengthscale')">
|
:title="$t('trials:nondicom-show:scale')" @click.prevent="setAnnotateToolActive('Lengthscale')">
|
||||||
<svg-icon icon-class="lengthscale" class="svg-icon" />
|
<svg-icon icon-class="lengthscale" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 截图 -->
|
<!-- 截图 -->
|
||||||
<div
|
<div class="tool-item" :title="$t('trials:reading:button:screenShot')" @click.prevent="saveImage">
|
||||||
class="tool-item"
|
|
||||||
:title="$t('trials:reading:button:screenShot')"
|
|
||||||
@click.prevent="saveImage"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="image" class="svg-icon" />
|
<svg-icon icon-class="image" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
|
|
@ -131,8 +118,8 @@
|
||||||
<svg-icon icon-class="refresh" class="svg-icon" />
|
<svg-icon icon-class="refresh" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 更多:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" -->
|
<!-- 更多:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" -->
|
||||||
<div v-if="criterionType === 0" :title="$t('trials:reading:button:more')" :class="['tool-item']"
|
<div v-if="criterionType === 0 && customizeStandardsNoneDicom.length > 0" :title="$t('trials:reading:button:more')"
|
||||||
@click.stop="showPanel($event)" @mouseleave="toolMouseout">
|
:class="['tool-item']" @click.stop="showPanel($event)" @mouseleave="toolMouseout">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<div class="icon" data-tool="more">
|
<div class="icon" data-tool="more">
|
||||||
<svg-icon icon-class="more" class="svg-icon" />
|
<svg-icon icon-class="more" class="svg-icon" />
|
||||||
|
|
@ -310,8 +297,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="content-main" :ref="`video-content-main-${index}`" style="flex: 1;">
|
<div class="content-main" :ref="`video-content-main-${index}`" style="flex: 1;">
|
||||||
<video v-if="v.currentFilePath" :ref="`videovideo-${index}`"
|
<video v-if="v.currentFilePath" :ref="`videovideo-${index}`"
|
||||||
:src="`${OSSclientConfig.basePath}${v.currentFilePath}`" crossorigin="anonymous"
|
:src="`${OSSclientConfig.basePath}${v.currentFilePath}`" crossorigin="anonymous" width="100%"
|
||||||
width="100%" height="100%" autoplay controls controlsList="nodownload"></video>
|
height="100%" autoplay controls controlsList="nodownload"></video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -349,7 +336,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 其他 -->
|
<!-- 其他 -->
|
||||||
<el-tab-pane :label="$t('trials:reading:tab:others')" name="2">
|
<el-tab-pane :label="$t('trials:reading:tab:others')" name="2">
|
||||||
<Others v-if="activeName === '2'" :imageToolType="2"/>
|
<Others v-if="activeName === '2'" :imageToolType="2" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -1448,7 +1435,7 @@ export default {
|
||||||
this.saveCustomAnnotationTimer = null
|
this.saveCustomAnnotationTimer = null
|
||||||
}
|
}
|
||||||
this.saveCustomAnnotation(annotation)
|
this.saveCustomAnnotation(annotation)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if (this.isNumber(operateStateEnum)) {
|
// if (this.isNumber(operateStateEnum)) {
|
||||||
// this.removeAnnotation(annotation)
|
// this.removeAnnotation(annotation)
|
||||||
|
|
@ -1943,7 +1930,7 @@ export default {
|
||||||
if (currentViewport.fileType && currentViewport.fileType.includes('mp4')) {
|
if (currentViewport.fileType && currentViewport.fileType.includes('mp4')) {
|
||||||
divForDownloadViewport = this.$refs[`grid-cell-${this.activeCanvasIndex}`][0]
|
divForDownloadViewport = this.$refs[`grid-cell-${this.activeCanvasIndex}`][0]
|
||||||
const videoEl = this.$refs[`videovideo-${this.activeCanvasIndex}`][0]
|
const videoEl = this.$refs[`videovideo-${this.activeCanvasIndex}`][0]
|
||||||
|
|
||||||
if (videoEl) {
|
if (videoEl) {
|
||||||
// 将视频帧画到 canvas 上生成图片
|
// 将视频帧画到 canvas 上生成图片
|
||||||
const tempCanvas = document.createElement('canvas')
|
const tempCanvas = document.createElement('canvas')
|
||||||
|
|
@ -1952,7 +1939,7 @@ export default {
|
||||||
const containerHeight = videoEl.clientHeight
|
const containerHeight = videoEl.clientHeight
|
||||||
tempCanvas.width = containerWidth
|
tempCanvas.width = containerWidth
|
||||||
tempCanvas.height = containerHeight
|
tempCanvas.height = containerHeight
|
||||||
|
|
||||||
const ctx = tempCanvas.getContext('2d')
|
const ctx = tempCanvas.getContext('2d')
|
||||||
// 填充黑色背景
|
// 填充黑色背景
|
||||||
ctx.fillStyle = '#000'
|
ctx.fillStyle = '#000'
|
||||||
|
|
@ -1961,7 +1948,7 @@ export default {
|
||||||
// 计算视频保持比例的缩放尺寸和位置 (等同于 object-fit: contain)
|
// 计算视频保持比例的缩放尺寸和位置 (等同于 object-fit: contain)
|
||||||
const videoWidth = videoEl.videoWidth || containerWidth
|
const videoWidth = videoEl.videoWidth || containerWidth
|
||||||
const videoHeight = videoEl.videoHeight || containerHeight
|
const videoHeight = videoEl.videoHeight || containerHeight
|
||||||
|
|
||||||
const scale = Math.min(containerWidth / videoWidth, containerHeight / videoHeight)
|
const scale = Math.min(containerWidth / videoWidth, containerHeight / videoHeight)
|
||||||
const drawWidth = videoWidth * scale
|
const drawWidth = videoWidth * scale
|
||||||
const drawHeight = videoHeight * scale
|
const drawHeight = videoHeight * scale
|
||||||
|
|
@ -1970,9 +1957,9 @@ export default {
|
||||||
|
|
||||||
// 将视频帧居中绘制
|
// 将视频帧居中绘制
|
||||||
ctx.drawImage(videoEl, offsetX, offsetY, drawWidth, drawHeight)
|
ctx.drawImage(videoEl, offsetX, offsetY, drawWidth, drawHeight)
|
||||||
|
|
||||||
const frameBase64 = tempCanvas.toDataURL('image/png')
|
const frameBase64 = tempCanvas.toDataURL('image/png')
|
||||||
|
|
||||||
// 创建一个 img 标签遮盖在 video 上
|
// 创建一个 img 标签遮盖在 video 上
|
||||||
tempImg = document.createElement('img')
|
tempImg = document.createElement('img')
|
||||||
tempImg.src = frameBase64
|
tempImg.src = frameBase64
|
||||||
|
|
@ -1982,7 +1969,7 @@ export default {
|
||||||
tempImg.style.width = '100%'
|
tempImg.style.width = '100%'
|
||||||
tempImg.style.height = '100%'
|
tempImg.style.height = '100%'
|
||||||
tempImg.style.zIndex = '99'
|
tempImg.style.zIndex = '99'
|
||||||
|
|
||||||
const videoContainer = this.$refs[`video-content-main-${this.activeCanvasIndex}`][0]
|
const videoContainer = this.$refs[`video-content-main-${this.activeCanvasIndex}`][0]
|
||||||
videoContainer.style.position = 'relative'
|
videoContainer.style.position = 'relative'
|
||||||
videoContainer.appendChild(tempImg)
|
videoContainer.appendChild(tempImg)
|
||||||
|
|
@ -1998,11 +1985,11 @@ export default {
|
||||||
// 等待 DOM 更新
|
// 等待 DOM 更新
|
||||||
await this.$nextTick()
|
await this.$nextTick()
|
||||||
|
|
||||||
const canvas = await html2canvas(divForDownloadViewport, {
|
const canvas = await html2canvas(divForDownloadViewport, {
|
||||||
useCORS: true,
|
useCORS: true,
|
||||||
backgroundColor: '#000000' // 指定截图背景为黑色
|
backgroundColor: '#000000' // 指定截图背景为黑色
|
||||||
})
|
})
|
||||||
|
|
||||||
// 截图后恢复
|
// 截图后恢复
|
||||||
if (tempImg) {
|
if (tempImg) {
|
||||||
tempImg.remove()
|
tempImg.remove()
|
||||||
|
|
@ -2010,7 +1997,7 @@ export default {
|
||||||
|
|
||||||
const base64Str = canvas.toDataURL('image/png', 1)
|
const base64Str = canvas.toDataURL('image/png', 1)
|
||||||
const downloadName = `${Date.now()}.png`
|
const downloadName = `${Date.now()}.png`
|
||||||
|
|
||||||
const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
a.href = base64Str
|
a.href = base64Str
|
||||||
a.download = downloadName
|
a.download = downloadName
|
||||||
|
|
@ -2588,11 +2575,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.personal_config {
|
.personal_config {
|
||||||
::v-deep .el-tabs__content {
|
::v-deep .el-tabs__content {
|
||||||
height: 450px;
|
height: 450px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .hot-keys-label {
|
::v-deep .hot-keys-label {
|
||||||
color: #dfdfdf !important;
|
color: #dfdfdf !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue