当前访视增加关键序列
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6b1fffb800
commit
05e9bbb050
|
|
@ -456,4 +456,11 @@ export function getMarkList(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
export function getNoneDicomMarkList(data) {
|
||||
return request({
|
||||
url: `/ReadingImageTask/getNoneDicomMarkList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,8 +171,8 @@
|
|||
v-if="((criterionType === 0 && readingTool === 0) || this.readingTool === 3) && isMPR">
|
||||
<svg-icon icon-class="exit_mpr" class="svg-icon" style="transform: rotate(180deg);" />
|
||||
</div>
|
||||
<!-- 查看关键序列 -->
|
||||
<!-- <el-popover
|
||||
<!-- 关键序列 -->
|
||||
<el-popover
|
||||
v-model="keySeriesPopoverVisible"
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
|
|
@ -182,10 +182,11 @@
|
|||
>
|
||||
<ul class="key-series-list">
|
||||
<li v-if="keySeriesLoading" class="key-series-empty">
|
||||
<i class="el-icon-loading"></i> 加载中...
|
||||
<i class="el-icon-loading"></i>
|
||||
</li>
|
||||
<li v-else-if="keySeries.length === 0" class="key-series-empty">
|
||||
暂无关键序列
|
||||
<!-- 暂无关键序列 -->
|
||||
{{ $t('trials:reading:keySeries:noData') }}
|
||||
</li>
|
||||
<li
|
||||
v-for="(kf, idx) in keySeries"
|
||||
|
|
@ -198,9 +199,19 @@
|
|||
<svg-icon v-else icon-class="image" class="svg-icon default-icon" />
|
||||
</div>
|
||||
<div class="key-series-info">
|
||||
<div class="key-series-label">图像号:</div>
|
||||
<div class="key-series-uid" :title="kf.SopInstanceUid">
|
||||
{{ kf.SopInstanceUid }}
|
||||
<div class="key-series-meta" v-if="kf.MarkName">
|
||||
<!-- 标注名称 -->
|
||||
<div class="key-series-label">{{ $t('trials:reading:keySeries:annotationName') }}</div>
|
||||
<div class="key-series-uid" :title="kf.MarkName">
|
||||
{{ kf.MarkName}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="key-series-meta">
|
||||
<!-- 图像号 -->
|
||||
<div class="key-series-label">{{ $t('trials:reading:keySeries:sopUid') }}</div>
|
||||
<div class="key-series-uid" :title="kf.SopInstanceUid">
|
||||
{{ kf.SopInstanceUid }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="key-series-star">
|
||||
|
|
@ -209,11 +220,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div slot="reference" class="tool-item">
|
||||
<div class="icon" :title="'查看关键序列'">
|
||||
<div class="icon" :title="$t('trials:reading:button:keySeries')">
|
||||
<svg-icon icon-class="star" class="svg-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</el-popover> -->
|
||||
</el-popover>
|
||||
<!-- 直方图 -->
|
||||
<div class="tool-item" :title="`${$t('trials:reading:button:histogram')}`" @click.prevent="openHistogram"
|
||||
v-if="this.readingTool === 3">
|
||||
|
|
@ -1962,6 +1973,17 @@ export default {
|
|||
const annotation = i.MeasureData
|
||||
if ((this.readingTool === 3 && annotation.seriesId === series.Id) || this.readingTool < 3) {
|
||||
annotation.highlighted = false
|
||||
const textBox = annotation?.data?.handles?.textBox
|
||||
const worldPosition = textBox?.worldPosition
|
||||
const hasValidTextBoxWorldPosition = Array.isArray(worldPosition) &&
|
||||
worldPosition.length === 3 &&
|
||||
worldPosition.every(v => Number.isFinite(v)) &&
|
||||
worldPosition.some(v => Math.abs(v) > 0)
|
||||
|
||||
// 如果保存的标注里已带 textbox 世界坐标,则优先按该坐标回显,避免重新计算位置。
|
||||
if (textBox && hasValidTextBoxWorldPosition) {
|
||||
textBox.hasMoved = true
|
||||
}
|
||||
cornerstoneTools.annotation.state.addAnnotation(annotation)
|
||||
if (this.visitTaskList[taskIdx].ReadingTaskState === 2) {
|
||||
cornerstoneTools.annotation.locking.setAnnotationLocked(annotation.annotationUID)
|
||||
|
|
@ -4275,13 +4297,11 @@ export default {
|
|||
async showKeySeriesPanel() {
|
||||
this.keySeries = []
|
||||
this.keySeriesLoading = true
|
||||
|
||||
|
||||
try {
|
||||
let res = await getMarkList({ visitTaskId: this.taskInfo.VisitTaskId })
|
||||
if (res && res.Result) {
|
||||
this.keySeries = res.Result
|
||||
} else if (Array.isArray(res)) {
|
||||
this.keySeries = res
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
|
|
@ -4295,8 +4315,9 @@ export default {
|
|||
const task = this.visitTaskList[tIdx]
|
||||
const studyList = task.StudyList
|
||||
const annotation = kf.MeasureData ? JSON.parse(kf.MeasureData) : {}
|
||||
let targetSeries = this.getMarkedSeries(studyList, annotation)
|
||||
let targetSeries = this.getMarkedSeries(studyList, annotation, true)
|
||||
if (Object.keys(targetSeries).length === 0) return
|
||||
this.activeTaskId = this.taskInfo.VisitTaskId
|
||||
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(targetSeries, true)
|
||||
this.$refs[this.taskInfo.VisitTaskId][0].setSeriesActive(targetSeries.StudyIndex, targetSeries.SeriesIndex)
|
||||
},
|
||||
|
|
@ -5401,11 +5422,24 @@ export default {
|
|||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
padding-right: 5px;
|
||||
|
||||
.key-series-meta {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 4px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.key-series-label {
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,56 @@
|
|||
:title="$t('trials:reading:button:rotate')" @click.prevent="setToolActive('PlanarRotate')">
|
||||
<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"
|
||||
>
|
||||
<ul class="key-series-list">
|
||||
<li v-if="keySeriesLoading" class="key-series-empty">
|
||||
<i class="el-icon-loading"></i>
|
||||
</li>
|
||||
<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)"
|
||||
>
|
||||
<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" />
|
||||
</div>
|
||||
<div class="key-series-info">
|
||||
<div class="key-series-meta" v-if="kf.MarkName">
|
||||
<div class="key-series-label">{{ $t('trials:reading:keySeries:annotationName') }}</div>
|
||||
<div class="key-series-value" :title="kf.MarkName">
|
||||
{{ kf.MarkName }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="key-series-meta">
|
||||
<div class="key-series-label">{{ $t('trials:reading:keySeries:fileName') }}</div>
|
||||
<div class="key-series-value" :title="kf.FileName">
|
||||
{{ kf.FileName || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="key-series-star">
|
||||
<svg-icon icon-class="star" class="svg-icon" />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div slot="reference" class="tool-item">
|
||||
<div class="icon" :title="$t('trials:reading:button:keyImage')">
|
||||
<svg-icon icon-class="star" class="svg-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
<div v-for="tool in tools" :key="tool.toolName"
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === tool.toolName ? 'tool-item-active' : '']"
|
||||
:style="{ cursor: tool.isDisabled ? 'not-allowed' : 'pointer' }"
|
||||
|
|
@ -56,6 +106,7 @@
|
|||
:title="$t('trials:nondicom-show:scale')" @click.prevent="setAnnotateToolActive('Lengthscale')">
|
||||
<svg-icon icon-class="lengthscale" class="svg-icon" />
|
||||
</div>
|
||||
|
||||
<!-- 截图 -->
|
||||
<div
|
||||
class="tool-item"
|
||||
|
|
@ -324,6 +375,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import { addNoneDicomMark, deleteTrialFileType, getCriterionReadingInfo, setReadKeyFile } from '@/api/trials'
|
||||
import { getNoneDicomMarkList } from '@/api/reading'
|
||||
import { getDoctorShortcutKey } from '@/api/user'
|
||||
import html2canvas from 'html2canvas'
|
||||
import {
|
||||
|
|
@ -458,7 +510,10 @@ export default {
|
|||
ManualsClose: false,
|
||||
activeName: '1',
|
||||
hotKeyList: [],
|
||||
isShowAnnotations: true
|
||||
isShowAnnotations: true,
|
||||
keySeries: [],
|
||||
keySeriesLoading: false,
|
||||
keySeriesPopoverVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -606,6 +661,28 @@ export default {
|
|||
toolMouseout(e) {
|
||||
e.currentTarget.firstChild.lastChild.style.display = 'none'
|
||||
},
|
||||
async showKeySeriesPanel() {
|
||||
this.keySeries = []
|
||||
this.keySeriesLoading = true
|
||||
|
||||
try {
|
||||
const res = await getNoneDicomMarkList({ visitTaskId: this.taskInfo.VisitTaskId })
|
||||
if (res && res.Result) {
|
||||
this.keySeries = res.Result
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
} finally {
|
||||
this.keySeriesLoading = false
|
||||
}
|
||||
},
|
||||
jumpToKeySeries(kf) {
|
||||
this.$emit('selectFile', {
|
||||
path: kf.Path,
|
||||
studyId: kf.StudyId,
|
||||
visitTaskId: this.taskInfo.VisitTaskId
|
||||
})
|
||||
},
|
||||
// 初始化加载器
|
||||
async initLoader() {
|
||||
registerWebImageLoader(imageLoader)
|
||||
|
|
@ -2469,3 +2546,135 @@ export default {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.key-series-popper {
|
||||
padding: 8px !important;
|
||||
background-color: #1e1e1e !important;
|
||||
border: 1px solid #4a4a4a !important;
|
||||
|
||||
.key-series-list {
|
||||
width: 340px;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #4a4a4a;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.key-series-empty {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.key-series-item {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
background-color: #2b2b2b;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
border: 1px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #363636;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.key-series-img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
flex-shrink: 0;
|
||||
background-color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.default-icon {
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.key-series-info {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
padding-right: 5px;
|
||||
|
||||
.key-series-meta {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 4px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.key-series-label {
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
margin-right: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.key-series-value {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
color: #ccc;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
|
||||
.key-series-star {
|
||||
margin-left: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.svg-icon {
|
||||
color: #f39c12;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -36,8 +36,10 @@
|
|||
@toggleImage="toggleImage"
|
||||
/> -->
|
||||
<file-viewer ref="fileViewer" :related-study-info="relatedStudyInfo" :ps-arr="psArr" :ecrf="ecrf"
|
||||
@toggleTaskByViewer="toggleTaskByViewer" @toggleTask="toggleTask" @toggleImage="toggleImage"
|
||||
@previewCD="previewCD" @setPS="setPS" @getEcrf="getEcrf" @getMarkedFileIds="getMarkedFileIds" />
|
||||
@toggleTaskByViewer="toggleTaskByViewer" @toggleTask="toggleTask"
|
||||
@toggleImage="toggleImage"
|
||||
@previewCD="previewCD" @setPS="setPS" @getEcrf="getEcrf" @getMarkedFileIds="getMarkedFileIds"
|
||||
@selectFile="selectFile" />
|
||||
</div>
|
||||
<!-- 表单 -->
|
||||
<div class="right-panel">
|
||||
|
|
@ -412,8 +414,29 @@ export default {
|
|||
this.clinicalDataVisible = true
|
||||
},
|
||||
selectFile(obj) {
|
||||
// this.$refs['imageViewer'].setActiveCanvasImages(obj)
|
||||
this.$refs['fileViewer'].setActiveCanvasImages(obj)
|
||||
if (obj.fileInfo && obj.fileList && obj.visitTaskInfo && obj.studyId) {
|
||||
this.$refs['fileViewer'].setActiveCanvasImages(obj)
|
||||
return
|
||||
}
|
||||
|
||||
const taskIndex = this.visitTaskList.findIndex(item => item.VisitTaskId === obj.visitTaskId)
|
||||
if (taskIndex === -1) return
|
||||
|
||||
const visitTaskInfo = this.visitTaskList[taskIndex]
|
||||
const studyList = visitTaskInfo.StudyList || []
|
||||
const studyIndex = studyList.findIndex(study => study.Id === obj.studyId)
|
||||
if (studyIndex === -1) return
|
||||
|
||||
const fileList = studyList[studyIndex].NoneDicomStudyFileList || []
|
||||
const fileIndex = fileList.findIndex(file => file.Path === obj.path)
|
||||
if (fileIndex === -1) return
|
||||
this.setActiveTaskVisitId(obj.visitTaskId)
|
||||
this.$refs['fileViewer'].setActiveCanvasImages({
|
||||
fileInfo: fileList[fileIndex],
|
||||
fileList,
|
||||
visitTaskInfo,
|
||||
studyId: obj.studyId
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue