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