自定义阅片更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
92d41dff28
commit
ca579f8731
|
@ -2,7 +2,7 @@
|
|||
<div ref="container" style="width:100%;height:100%" class="dicom-container">
|
||||
<!-- 访视阅片 -->
|
||||
<div v-if="readingCategory=== 1 && (CriterionType === 7 || ((CriterionType === 1 || CriterionType === 0) && readingVersionEnum === 1)) " class="reading-wrapper">
|
||||
<VisitReview :readingTool="readingTool" />
|
||||
<VisitReview :reading-tool="readingTool" />
|
||||
</div>
|
||||
<div v-else-if="(isReadingTaskViewInOrder === 1 || ((isReadingTaskViewInOrder !== 1) && isShow)) && readingCategory=== 1 && CriterionType !== 0" class="reading-wrapper">
|
||||
<el-tabs v-model="activeName" v-loading="loading" :before-leave="beforeLeave">
|
||||
|
|
|
@ -270,6 +270,33 @@
|
|||
>
|
||||
<svg-icon icon-class="refresh" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 更多 -->
|
||||
<div
|
||||
v-if="criterionType === 0"
|
||||
class="tool-item"
|
||||
:title="$t('trials:reading:button:more')"
|
||||
@click.stop="showPanel($event)"
|
||||
@mouseleave="toolMouseout"
|
||||
>
|
||||
<div class="dropdown">
|
||||
<div
|
||||
class="icon"
|
||||
data-tool="more"
|
||||
>
|
||||
<svg-icon icon-class="more" class="svg-icon" />
|
||||
<i class="el-icon-arrow-down" style="color:#fff;" />
|
||||
</div>
|
||||
<div class="dropdown-content">
|
||||
<ul style="width:100px;">
|
||||
<li v-for="i in customizeStandards" :key="i.toolName" style="text-align:left;">
|
||||
<a href="#" @click.prevent="setMoreToolActive(i.toolName)">
|
||||
{{ $t(i.i18nKey) }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -481,7 +508,7 @@ import {
|
|||
import * as cornerstoneTools from '@cornerstonejs/tools'
|
||||
import initLibraries from '@/views/trials/trials-panel/reading/dicoms/components/Fusion/js/initLibraries'
|
||||
import html2canvas from 'html2canvas'
|
||||
import { getTools, getCustomizeStandardsTools } from './toolConfig'
|
||||
import { getTools, getCustomizeStandardsTools, config } from './toolConfig'
|
||||
import StudyList from './StudyList'
|
||||
import Viewport from './Viewport'
|
||||
import mRecisit from './mRecist/QuestionList'
|
||||
|
@ -511,6 +538,7 @@ const {
|
|||
ArrowAnnotateTool,
|
||||
RectangleROITool,
|
||||
PlanarFreehandROITool,
|
||||
CircleROITool,
|
||||
EraserTool
|
||||
// cursors
|
||||
} = cornerstoneTools
|
||||
|
@ -616,7 +644,8 @@ export default {
|
|||
digitPlaces: 2,
|
||||
instanceInfo: {},
|
||||
lastViewportTaskIds: [],
|
||||
markedSeriesIds: []
|
||||
markedSeriesIds: [],
|
||||
customizeStandards: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -696,6 +725,7 @@ export default {
|
|||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||
if (this.criterionType === 0) {
|
||||
this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList)
|
||||
this.customizeStandards = [...config.customizeStandards]
|
||||
} else {
|
||||
this.tools = getTools(this.criterionType)
|
||||
}
|
||||
|
@ -781,7 +811,7 @@ export default {
|
|||
},
|
||||
// 加载检查及标注信息
|
||||
async loadTaskDetails(taskInfo, taskIndex) {
|
||||
return new Promise(async (resolve, reject)=>{
|
||||
return new Promise(async(resolve, reject) => {
|
||||
try {
|
||||
const sujectVisitId = taskInfo.VisitId
|
||||
const taskId = taskInfo.VisitTaskId
|
||||
|
@ -872,7 +902,6 @@ export default {
|
|||
reject(e)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 设置初始化序列信息
|
||||
setInitSeries() {
|
||||
|
@ -979,6 +1008,7 @@ export default {
|
|||
cornerstoneTools.addTool(LengthTool)
|
||||
cornerstoneTools.addTool(BidirectionalTool)
|
||||
cornerstoneTools.addTool(ScaleOverlayTool)
|
||||
cornerstoneTools.addTool(CircleROITool)
|
||||
|
||||
viewportIds.forEach((viewportId, i) => {
|
||||
const toolGroupId = `viewport-${i}`
|
||||
|
@ -1020,6 +1050,9 @@ export default {
|
|||
// cachedStats: true
|
||||
getTextLines: this.getBidirectionalToolTextLines
|
||||
})
|
||||
toolGroup.addTool(CircleROITool.toolName, {
|
||||
getTextLines: this.getCircleROIToolTextLines
|
||||
})
|
||||
|
||||
toolGroup.setToolActive(StackScrollTool.toolName, {
|
||||
bindings: [{ mouseButton: MouseBindings.Wheel }]
|
||||
|
@ -1037,12 +1070,14 @@ export default {
|
|||
toolGroup.setToolPassive(PlanarFreehandROITool.toolName)
|
||||
toolGroup.setToolPassive(LengthTool.toolName)
|
||||
toolGroup.setToolPassive(BidirectionalTool.toolName)
|
||||
toolGroup.setToolPassive(CircleROITool.toolName)
|
||||
} else {
|
||||
toolGroup.setToolEnabled(ArrowAnnotateTool.toolName)
|
||||
toolGroup.setToolEnabled(RectangleROITool.toolName)
|
||||
toolGroup.setToolEnabled(PlanarFreehandROITool.toolName)
|
||||
toolGroup.setToolEnabled(LengthTool.toolName)
|
||||
toolGroup.setToolEnabled(BidirectionalTool.toolName)
|
||||
toolGroup.setToolEnabled(CircleROITool.toolName)
|
||||
}
|
||||
toolGroup.setToolPassive(EraserTool.toolName)
|
||||
})
|
||||
|
@ -1216,6 +1251,11 @@ export default {
|
|||
if (this.readingTaskState === 2) return
|
||||
const { annotation } = e.detail
|
||||
if (!annotation) return
|
||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||
if (i === -1) {
|
||||
this.setToolsPassive()
|
||||
return
|
||||
}
|
||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||
const series = this.$refs[`viewport-${this.activeViewportIndex}`][0].series
|
||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||
|
@ -1271,6 +1311,11 @@ export default {
|
|||
const { annotation } = e.detail
|
||||
if (!annotation.highlighted) return
|
||||
if (!annotation) return
|
||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||
if (i === -1) {
|
||||
this.setToolsPassive()
|
||||
return
|
||||
}
|
||||
if (!annotation.data.label) return
|
||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||
const series = this.$refs[`viewport-${this.activeViewportIndex}`][0].series
|
||||
|
@ -1515,6 +1560,52 @@ export default {
|
|||
|
||||
return textLines
|
||||
},
|
||||
getCircleROIToolTextLines(data, targetId) {
|
||||
const cachedVolumeStats = data.cachedStats[targetId]
|
||||
const {
|
||||
radius,
|
||||
radiusUnit,
|
||||
area,
|
||||
mean,
|
||||
stdDev,
|
||||
max,
|
||||
isEmptyArea,
|
||||
areaUnit,
|
||||
modalityUnit
|
||||
} = cachedVolumeStats
|
||||
const textLines = []
|
||||
if (data.label) {
|
||||
textLines.push(data.label)
|
||||
}
|
||||
|
||||
if (radius) {
|
||||
const radiusLine = isEmptyArea
|
||||
? `Radius: Oblique not supported`
|
||||
: `Radius: ${csUtils.roundNumber(radius)} ${radiusUnit}`
|
||||
textLines.push(radiusLine)
|
||||
}
|
||||
|
||||
if (area) {
|
||||
const areaLine = isEmptyArea
|
||||
? `Area: Oblique not supported`
|
||||
: `Area: ${csUtils.roundNumber(area)} ${areaUnit}`
|
||||
textLines.push(areaLine)
|
||||
}
|
||||
|
||||
if (mean) {
|
||||
textLines.push(`Mean: ${csUtils.roundNumber(mean)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
if (max) {
|
||||
textLines.push(`Max: ${csUtils.roundNumber(max)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
if (stdDev) {
|
||||
textLines.push(`Std Dev: ${csUtils.roundNumber(stdDev)} ${modalityUnit}`)
|
||||
}
|
||||
|
||||
return textLines
|
||||
},
|
||||
// 激活工具
|
||||
setToolActive(toolName) {
|
||||
const toolGroupId = `viewport-${this.activeViewportIndex}`
|
||||
|
@ -1555,7 +1646,18 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
setMoreToolActive(toolName) {
|
||||
if (this.readingTaskState === 2) return
|
||||
const series = this.$refs[`viewport-${this.activeViewportIndex}`][0].series
|
||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||
const toolGroupId = `viewport-${this.activeViewportIndex}`
|
||||
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
|
||||
toolGroup.setToolActive(toolName, {
|
||||
bindings: [{ mouseButton: MouseBindings.Primary }]
|
||||
})
|
||||
this.activeTool = toolName
|
||||
}
|
||||
},
|
||||
setToolsPassive() {
|
||||
if (!this.activeTool) return
|
||||
const toolGroupIds = ['viewport-0', 'viewport-1', 'viewport-2', 'viewport-3']
|
||||
|
@ -1994,7 +2096,6 @@ export default {
|
|||
if (obj.TaskInfo.VisitTaskId !== this.taskInfo.VisitTaskId) {
|
||||
this.setToolsPassive()
|
||||
}
|
||||
|
||||
},
|
||||
async showMultiFrame(obj) {
|
||||
this.$refs[`viewport-${this.activeViewportIndex}`][0].setSeriesInfo(obj, true)
|
||||
|
|
|
@ -3,16 +3,23 @@
|
|||
<el-tabs v-model="activeName">
|
||||
<!-- 阅片 -->
|
||||
<el-tab-pane v-if="taskInfo" :label="$t('trials:reading:tabTitle:review')" name="read">
|
||||
<read-page ref="readPage" v-if="!readingTool" />
|
||||
<read-page v-if="!readingTool" ref="readPage" />
|
||||
<PetCtReadPage v-else-if="readingTool === 2" />
|
||||
</el-tab-pane>
|
||||
<!-- 报告 -->
|
||||
<el-tab-pane v-if="taskInfo && !taskInfo.IseCRFShowInDicomReading" :label="$t('trials:reading:tabTitle:report')"
|
||||
name="report">
|
||||
<report-page v-if="activeName === 'report' && taskInfo.CriterionType !== 0"
|
||||
@setReadingTaskState="setReadingTaskState" />
|
||||
<customize-report-page v-if="activeName === 'report' && taskInfo.CriterionType === 0"
|
||||
@setReadingTaskState="setReadingTaskState" />
|
||||
<el-tab-pane
|
||||
v-if="taskInfo && !taskInfo.IseCRFShowInDicomReading"
|
||||
:label="$t('trials:reading:tabTitle:report')"
|
||||
name="report"
|
||||
>
|
||||
<report-page
|
||||
v-if="activeName === 'report' && taskInfo.CriterionType !== 0"
|
||||
@setReadingTaskState="setReadingTaskState"
|
||||
/>
|
||||
<customize-report-page
|
||||
v-if="activeName === 'report' && taskInfo.CriterionType === 0"
|
||||
@setReadingTaskState="setReadingTaskState"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
@ -43,6 +50,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.readingTool)
|
||||
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -269,7 +269,7 @@ const config = {
|
|||
'i18nKey': 'trials:reading:button:Circle',
|
||||
'isDisabled': false,
|
||||
'disabledReason': ''
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
const getTools = (criterionType) => {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
</el-form-item>
|
||||
<!-- 测量工具 -->
|
||||
<el-form-item
|
||||
v-if="CriterionType === 0 && form.ReadingTool === 0 && form.ReadingTaskViewEnum === 1"
|
||||
v-if="CriterionType === 0 && form.ReadingTool === 0 && form.ReadingVersionEnum === 1"
|
||||
:label="$t('trials:readingUnit:readingRules:title:measureTool')"
|
||||
>
|
||||
<el-checkbox-group
|
||||
|
|
Loading…
Reference in New Issue