非DICOM工具的测量工具,能否也是和DICOM的测量工具一样,选择了哪些才展示那些
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0a752ed92f
commit
1d009c8e18
|
@ -31,48 +31,12 @@
|
|||
:title="$t('trials:reading:button:rotate')" @click.prevent="setToolActive('PlanarRotate')">
|
||||
<svg-icon icon-class="rotate" class="svg-icon" />
|
||||
</div>
|
||||
<!--直线工具-->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'Length' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:nondicom-show:length')" @click.prevent="setAnnotateToolActive('Length')">
|
||||
<svg-icon icon-class="length" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 箭头工具 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'ArrowAnnotate' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:reading:button:arrowAnnotate')" @click.prevent="setAnnotateToolActive('ArrowAnnotate')">
|
||||
<svg-icon icon-class="arrow" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 角度工具 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'Angle' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:dicom-show:Angle')" @click.prevent="setAnnotateToolActive('Angle')">
|
||||
<svg-icon icon-class="cobb" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 矩形工具 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'RectangleROI' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:dicom-show:RectangleRoi')" @click.prevent="setAnnotateToolActive('RectangleROI')">
|
||||
<svg-icon icon-class="rectangle" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 圆形工具 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'CircleROI' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:dicom-show:CircleROI')" @click.prevent="setAnnotateToolActive('CircleROI')">
|
||||
<svg-icon icon-class="oval" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 椭圆工具 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'EllipticalROI' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:dicom-show:EllipticalROI')" @click.prevent="setAnnotateToolActive('EllipticalROI')">
|
||||
<svg-icon icon-class="elliptical" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 自由曲线 -->
|
||||
<div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'PlanarFreehandROI' ? 'tool-item-active' : '']"
|
||||
:title="$t('trials:reading:button:planarFreehandROI')"
|
||||
@click.prevent="setAnnotateToolActive('PlanarFreehandROI')">
|
||||
<svg-icon icon-class="polygon" class="svg-icon" />
|
||||
<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' }"
|
||||
:title="tool.disabledReason ? tool.disabledReason : $t(`${tool.i18nKey}`)"
|
||||
@click.prevent="setAnnotateToolActive(tool.toolName)">
|
||||
<svg-icon :icon-class="tool.icon" class="svg-icon" />
|
||||
</div>
|
||||
<!-- <div
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '', activeTool === 'SplineROITool' ? 'tool-item-active' : '']"
|
||||
|
@ -105,6 +69,27 @@
|
|||
<div class="tool-item" :title="$t('trials:reading:button:reset')" @click.prevent="resetViewport">
|
||||
<svg-icon icon-class="refresh" class="svg-icon" />
|
||||
</div>
|
||||
<!-- 更多 -->
|
||||
<div v-if="criterionType === 0" :title="$t('trials:reading:button:more')"
|
||||
:class="['tool-item', readingTaskState === 2 ? 'tool-disabled' : '']" @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 v-if="readingTaskState < 2" style="width:100px;">
|
||||
<li v-for="i in customizeStandardsNoneDicom" :key="i.toolName" style="text-align:left;">
|
||||
<a href="#" @click.prevent="setAnnotateToolActive(i.toolName)">
|
||||
<svg-icon :icon-class="i.icon" class="svg-icon" style="margin-right: 5px;" />
|
||||
{{ $t(i.i18nKey) }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -242,6 +227,7 @@ import Others from '@/views/trials/trials-panel/reading/dicoms/components/Others
|
|||
const { ViewportType } = Enums
|
||||
const renderingEngineId = 'myRenderingEngine'
|
||||
import LengthscaleTool from "../tools/LengthscaleTool"
|
||||
import { getCustomizeStandardsNoneDicomTools, config } from '@/views/trials/trials-panel/reading/dicoms3D/components/toolConfig'
|
||||
const {
|
||||
ToolGroupManager,
|
||||
Enums: csToolsEnums,
|
||||
|
@ -306,7 +292,11 @@ export default {
|
|||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||
{ pattern: /^\d+$/, message: this.$t('trials:noneDicom:message:msg3'), trigger: ['blur', 'change'] }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
customizeStandardsNoneDicom: [],
|
||||
tools: [],
|
||||
criterionType: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -357,7 +347,16 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
console.log(this.taskInfo, 'this.taskInfo')
|
||||
this.readingTaskState = this.taskInfo.ReadingTaskState
|
||||
this.criterionType = this.taskInfo.CriterionType
|
||||
if (this.criterionType === 0) {
|
||||
this.tools = getCustomizeStandardsNoneDicomTools(this.taskInfo.ReadingToolList)
|
||||
const toolNames = this.tools.map(i => i.toolName)
|
||||
this.customizeStandardsNoneDicom = config.customizeStandardsNoneDicom.filter(item => !toolNames.includes(item.toolName))
|
||||
} else {
|
||||
this.tools = config.customizeStandardsNoneDicom
|
||||
}
|
||||
if (!this.taskInfo.IsBaseLine && this.taskInfo.IsReadingTaskViewInOrder !== 0) {
|
||||
this.rows = 1
|
||||
this.cols = 2
|
||||
|
@ -387,6 +386,12 @@ export default {
|
|||
window.removeEventListener('message', this.handleIframeMessage)
|
||||
},
|
||||
methods: {
|
||||
showPanel(e) {
|
||||
e.currentTarget.firstChild.lastChild.style.display = 'block'
|
||||
},
|
||||
toolMouseout(e) {
|
||||
e.currentTarget.firstChild.lastChild.style.display = 'none'
|
||||
},
|
||||
// 初始化加载器
|
||||
async initLoader() {
|
||||
registerWebImageLoader(imageLoader)
|
||||
|
@ -1310,6 +1315,43 @@ export default {
|
|||
cursor: default !important;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #383838;
|
||||
color: #fff;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 9999;
|
||||
font-size: 12px;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
|
||||
li {
|
||||
a {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul li a:hover {
|
||||
background-color: #727272;
|
||||
}
|
||||
}
|
||||
|
||||
.none-dicom-viewer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -558,13 +558,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
if (this.CriterionType === 0) {
|
||||
// this.tools = [...config.customizeStandards]
|
||||
if (this.form.ReadingTool === 0 || this.form.ReadingTool === 2) {
|
||||
this.tools = [...config.customizeStandards]
|
||||
}
|
||||
if (this.form.ReadingTool === 1) {
|
||||
this.tools = [...config.customizeStandardsNoneDicom]
|
||||
}
|
||||
this.tools = [...config.customizeStandards]
|
||||
}
|
||||
|
||||
this.initPage()
|
||||
|
@ -631,6 +625,14 @@ export default {
|
|||
this.form[k] = res.Result[k]
|
||||
}
|
||||
}
|
||||
if (this.CriterionType === 0) {
|
||||
if (this.form.ReadingTool === 0 || this.form.ReadingTool === 2) {
|
||||
this.tools = [...config.customizeStandards]
|
||||
}
|
||||
if (this.form.ReadingTool === 1) {
|
||||
this.tools = [...config.customizeStandardsNoneDicom]
|
||||
}
|
||||
}
|
||||
this.CriterionModalitys = this.form.CriterionModalitys
|
||||
? this.form.CriterionModalitys.split('|')
|
||||
: []
|
||||
|
|
Loading…
Reference in New Issue