Compare commits

..

No commits in common. "a7c0ae6d7ab2e8531f6ad28fb45197453937ad0e" and "a14f1440661714d8a796a696115d41211ba289b8" have entirely different histories.

4 changed files with 122 additions and 579 deletions

View File

@ -1,393 +0,0 @@
<template>
<div>
<div class="top">
<span>{{ $t('upload:dicom:title') }}</span>
<div class="btnBox">
<el-button type="primary" size="mini">
{{ $t('upload:dicom:button:upload') }}
</el-button>
<el-button size="mini">
{{ $t('upload:dicom:button:preview') }}
</el-button>
<el-button size="mini">
{{ $t('upload:dicom:button:delete') }}
</el-button>
</div>
</div>
<!--检查列表-->
<el-table
:data="list"
style="width: 100%"
max-height="250"
:loading="loading"
>
<!--检查类型-->
<el-table-column
prop="SubjectCode"
:label="$t('upload:dicom:table:modality')"
/>
<!--检查部位-->
<el-table-column
prop="TaskBlindName"
:label="$t('upload:dicom:table:bodyPart')"
/>
<!--序列数量-->
<el-table-column
prop="OrginalStudyList"
:label="$t('upload:dicom:table:seriesCount')"
>
<template slot-scope="scope">
<el-button
v-if="
scope.row.OrginalStudyList &&
scope.row.OrginalStudyList.length >= 1
"
type="text"
@click="handleOpenDialog(scope.row, 'OrginalStudyList')"
>
<span>{{ scope.row.OrginalStudyList.length }}</span>
</el-button>
<span v-else>0</span>
</template>
</el-table-column>
<!--图象数-->
<el-table-column
prop="TaskBlindName"
:label="$t('upload:dicom:table:instanceCount')"
/>
<!--后处理序列数-->
<el-table-column
prop="TaskBlindName"
:label="$t('upload:dicom:table:uploadSeriesCount')"
/>
<!--后处理图像数-->
<el-table-column
prop="TaskBlindName"
:label="$t('upload:dicom:table:uploadInstanceCount')"
/>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="140"
>
<template slot-scope="scope">
<!--预览--->
<el-button
v-if="isUpload"
circle
icon="el-icon-delete"
:title="$t('upload:dicom:button:preview')"
/>
<!--删除--->
<el-button
v-if="isUpload"
circle
icon="el-icon-delete"
:title="$t('upload:dicom:button:delete')"
/>
</template>
</el-table-column>
</el-table>
<div class="top"></div>
<!--上传列表-->
<el-table
ref="dicomFilesTable"
v-adaptive="{ bottomOffset: 85 }"
height="100"
:data="uploadQueues"
:row-key="(row) => row.studyIndex"
class="dicomFiles-table"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
:selectable="handleSelectable"
/>
<el-table-column type="index" width="40" />
<el-table-column min-width="200" show-overflow-tooltip>
<template slot="header">
<el-tooltip placement="top">
<div slot="content">
{{ $t('trials:uploadDicomList:table:studyDetail1') }}<br />
{{ $t('trials:uploadDicomList:table:studyDetail2') }}<br />
{{ $t('trials:uploadedDicoms:table:studyDate') }}
</div>
<span>{{ $t('trials:uploadDicomList:table:studyInfo') }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div style="line-height: 15px">
<div>
<div>
<span v-if="scope.row.dicomInfo.accNumber"
><span style="font-weight: 500">Acc:</span>
{{ scope.row.dicomInfo.accNumber }}</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.dicomInfo.modality.length > 0">
{{ scope.row.dicomInfo.modality.join('、') }},</span
>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.seriesList.length"
>{{ scope.row.seriesList.length }} Series,</span
>
<span v-else style="color: #f44336">N/A,</span>
</div>
<div style="display: inline-block">
<span v-if="scope.row.fileList.length"
>{{ scope.row.fileList.length }} Instances</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
<div>
<div style="display: inline-block; margin-right: 2px">
<span v-if="scope.row.dicomInfo.bodyPart">
{{ scope.row.dicomInfo.bodyPart }},
</span>
<span v-else style="color: #f44336">N/A, </span>
</div>
<div style="display: inline-block">
<span v-if="scope.row.dicomInfo.description">
{{ scope.row.dicomInfo.description }}</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
</div>
<div>
{{ scope.row.dicomInfo.studyTime }}
</div>
</div>
</template>
</el-table-column>
<el-table-column min-width="130" show-overflow-tooltip>
<template slot="header">
<el-tooltip placement="top">
<div slot="content">
{{ $t('trials:uploadDicomList:table:pId') }}<br />
{{ $t('trials:uploadDicomList:table:patientName') }}<br />
{{ $t('trials:uploadDicomList:table:pInfo') }}
</div>
<span>{{ $t('trials:uploadDicomList:table:patientInfo') }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div style="line-height: 15px">
<div>
<span v-if="scope.row.dicomInfo.patientId"
><span style="font-weight: 500">PID: </span
>{{ scope.row.dicomInfo.patientId }}</span
>
<span v-else style="color: #f44336">N/A</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.patientName ? '' : 'colorOfRed']"
>
{{
scope.row.dicomInfo.patientName
? scope.row.dicomInfo.patientName
: 'N/A'
}}
</span>
</div>
<div>
<span
:class="[scope.row.dicomInfo.patientSex ? '' : 'colorOfRed']"
>
{{
scope.row.dicomInfo.patientSex
? scope.row.dicomInfo.patientSex
: 'N/A'
}},
</span>
<span
:class="[scope.row.dicomInfo.patientAge ? '' : 'colorOfRed']"
>
{{
scope.row.dicomInfo.patientAge
? scope.row.dicomInfo.patientAge
: 'N/A'
}},
</span>
<span
:class="[
scope.row.dicomInfo.patientBirthDate ? '' : 'colorOfRed',
]"
>
{{
scope.row.dicomInfo.patientBirthDate
? scope.row.dicomInfo.patientBirthDate
: 'N/A'
}}
</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:failedFileCount')"
min-width="150"
show-overflow-tooltip
>
<!--:percentage="
(scope.row.dicomInfo.failedFileCount * 100) /
scope.row.dicomInfo.fileCount
"
:show-text="false"--->
<template slot-scope="scope">
<el-progress
color="#409eff"
:percentage="
(
(scope.row.dicomInfo.uploadFileSize * 100) /
scope.row.dicomInfo.fileSize
).toFixed(2) * 1
"
/>
<span>
{{ $t('trials:uploadDicomList:table:uploadNow')
}}{{ scope.row.dicomInfo.failedFileCount }} /
{{ scope.row.dicomInfo.fileCount }}:[{{
(scope.row.dicomInfo.uploadFileSize / 1024 / 1024).toFixed(2)
}}MB/{{
(scope.row.dicomInfo.fileSize / 1024 / 1024).toFixed(2)
}}MB]
</span>
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:status')"
min-width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<span
v-if="
!scope.row.dicomInfo.failedFileCount &&
!scope.row.dicomInfo.isInit
"
>
{{ $t('trials:uploadDicomList:table:status1') }}</span
>
<span
style="color: #409eff"
v-else-if="
!scope.row.dicomInfo.failedFileCount &&
scope.row.dicomInfo.isInit &&
btnLoading
"
>{{ $t('trials:uploadDicomList:table:status2') }}</span
>
<span
style="color: #409eff"
v-else-if="
scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount && !scope.row.uploadState.record
"
>{{ $t('trials:uploadDicomList:table:status2') }}</span
>
<span
style="color: #2cc368"
v-else-if="
scope.row.dicomInfo.failedFileCount ===
scope.row.dicomInfo.fileCount
"
>{{ $t('trials:uploadDicomList:table:status3') }}</span
>
<span
style="color: #f66"
v-else-if="
scope.row.uploadState.record &&
scope.row.uploadState.record.fileCount === 0
"
>{{ $t('trials:uploadDicomList:table:status5') }}</span
>
<span style="color: #f66" v-else>{{
$t('trials:uploadDicomList:table:Failed')
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('trials:uploadDicomList:table:record')"
min-width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tooltip placement="top" v-if="scope.row.uploadState.record">
<div slot="content">
<div style="max-height: 500px; overflow-y: auto">
{{ $t('trials:uploadDicomList:table:Existed') }}:
<div v-if="scope.row.uploadState.record.Existed.length">
<div
v-for="item of scope.row.uploadState.record.Existed"
:key="item"
style="font-size: 12px; color: #baa72a"
>
{{ item }}
</div>
</div>
<div v-else>&nbsp;</div>
{{ $t('trials:uploadDicomList:table:Uploaded') }}:
<div v-if="scope.row.uploadState.record.Uploaded.length">
<div
v-for="item of scope.row.uploadState.record.Uploaded"
:key="item"
style="font-size: 12px; color: #24b837"
>
{{ item }}
</div>
</div>
<div v-else>&nbsp;</div>
<br />
{{ $t('trials:uploadDicomList:table:Failed') }}:
<div v-if="scope.row.uploadState.record.Failed.length">
<div
v-for="item of scope.row.uploadState.record.Failed"
:key="item"
style="font-size: 12px; color: #f66"
>
{{ item }}
</div>
</div>
<div v-else>&nbsp;</div>
</div>
</div>
<el-button size="mini" style="cursor: pointer">
<span style="font-size: 12px; color: #baa72a">{{
scope.row.uploadState.record.Existed.length
}}</span>
/
<span style="font-size: 12px; color: #24b837">{{
scope.row.uploadState.record.Uploaded.length
}}</span>
/
<span style="font-size: 12px; color: #f66">{{
scope.row.uploadState.record.Failed.length
}}</span>
</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.top {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -1,53 +0,0 @@
<template>
<el-dialog
:visible.sync="visible"
:fullscreen="true"
:close-on-click-modal="false"
:before-close="beforeClose"
class="uploadDicomAndNonedicom"
>
<span slot="title">{{ title }}</span>
<el-tabs type="border-card">
<el-tab-pane label="DICOM 影像">
<dicomFile />
</el-tab-pane>
<el-tab-pane label="非DICOM 影像">
<nonedicomFile />
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script>
import dicomFile from './dicomFile.vue'
import nonedicomFile from './nonedicomFile.vue'
export default {
name: 'uploadDicomAndNonedicom',
components: { dicomFile, nonedicomFile },
props: {
visible: {
required: true,
type: Boolean,
default: false,
},
visitId: {
type: String,
default: '',
},
},
data() {
return {
title: 'Upload Images01 > 01001 >Timepoint',
}
},
methods: {
beforeClose() {
this.$emit('update:visible', false)
},
},
}
</script>
<style lang="scss" scoped>
::v-deep.el-tabs--left .el-tabs__header.is-left {
margin-right: 0;
}
</style>

View File

@ -106,8 +106,7 @@
v-if="item.val === 1" v-if="item.val === 1"
class="divider" class="divider"
content-position="center" content-position="center"
>{{ ` ${$t('trials:reading:title:preset')}` }}</el-divider >{{ ` ${$t("trials:reading:title:preset")}` }}</el-divider>
>
</li> </li>
</ul> </ul>
</div> </div>
@ -164,7 +163,7 @@
<svg-icon icon-class="magnifier" class="svg-icon" /> <svg-icon icon-class="magnifier" class="svg-icon" />
</div> </div>
<!-- 缩放 --> <!-- 缩放 -->
<div class="text">{{ $t('trials:reading:button:zoom') }}</div> <div class="text">{{ $t("trials:reading:button:zoom") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
@ -184,7 +183,7 @@
<svg-icon icon-class="move" class="svg-icon" /> <svg-icon icon-class="move" class="svg-icon" />
</div> </div>
<!-- 移动 --> <!-- 移动 -->
<div class="text">{{ $t('trials:reading:button:move') }}</div> <div class="text">{{ $t("trials:reading:button:move") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
@ -211,7 +210,7 @@
</div> </div>
<!-- 旋转 --> <!-- 旋转 -->
<div class="text"> <div class="text">
{{ $t('trials:reading:button:rotate') {{ $t("trials:reading:button:rotate")
}}<i class="el-icon-caret-bottom" /> }}<i class="el-icon-caret-bottom" />
</div> </div>
<div class="dropdown-content"> <div class="dropdown-content">
@ -224,8 +223,7 @@
<a <a
href="#" href="#"
@click.prevent="setDicomCanvasRotate(rotate.val)" @click.prevent="setDicomCanvasRotate(rotate.val)"
>{{ rotate.label }}</a >{{ rotate.label }}</a>
>
</li> </li>
</ul> </ul>
</div> </div>
@ -260,8 +258,8 @@
<div class="text"> <div class="text">
{{ {{
fitType === 1 fitType === 1
? $t('trials:reading:button:fitWindow') ? $t("trials:reading:button:fitWindow")
: $t('trials:reading:button:fitImage') : $t("trials:reading:button:fitImage")
}} }}
</div> </div>
</div> </div>
@ -284,7 +282,7 @@
</div> </div>
<!-- 同步 --> <!-- 同步 -->
<div class="text"> <div class="text">
{{ $t('trials:reading:button:imageIndexSync') }} {{ $t("trials:reading:button:imageIndexSync") }}
</div> </div>
</div> </div>
</el-tooltip> </el-tooltip>
@ -309,7 +307,7 @@
<svg-icon icon-class="image" class="svg-icon" /> <svg-icon icon-class="image" class="svg-icon" />
</div> </div>
<!-- 截屏 --> <!-- 截屏 -->
<div class="text">{{ $t('trials:reading:button:screenShot') }}</div> <div class="text">{{ $t("trials:reading:button:screenShot") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
@ -318,7 +316,7 @@
<div slot="content"> <div slot="content">
<div v-if="tool.disabledReason"> <div v-if="tool.disabledReason">
<h4 style="margin: 0; padding-bottom: 2px">{{ tool.text }}</h4> <h4 style="margin: 0; padding-bottom: 2px">{{ tool.text }}</h4>
<br />{{ tool.disabledReason }} <br>{{ tool.disabledReason }}
</div> </div>
<div v-else>{{ tool.text }}</div> <div v-else>{{ tool.text }}</div>
</div> </div>
@ -367,7 +365,7 @@
<svg-icon icon-class="clear" class="svg-icon" /> <svg-icon icon-class="clear" class="svg-icon" />
</div> </div>
<!-- 缩放 --> <!-- 缩放 -->
<div class="text">{{ $t('trials:dicom-show:Eraser') }}</div> <div class="text">{{ $t("trials:dicom-show:Eraser") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
<div class="tool-frame"> <div class="tool-frame">
@ -469,7 +467,7 @@
<div class="icon" @click.prevent="resetViewport"> <div class="icon" @click.prevent="resetViewport">
<svg-icon icon-class="refresh" class="svg-icon" /> <svg-icon icon-class="refresh" class="svg-icon" />
</div> </div>
<div class="text">{{ $t('trials:reading:button:reset') }}</div> <div class="text">{{ $t("trials:reading:button:reset") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip
@ -484,7 +482,7 @@
<div class="icon" @click.prevent="openUploadImage('upload')"> <div class="icon" @click.prevent="openUploadImage('upload')">
<i class="el-icon-upload2 svg-icon" /> <i class="el-icon-upload2 svg-icon" />
</div> </div>
<div class="text">{{ $t('trials:reading:button:upload') }}</div> <div class="text">{{ $t("trials:reading:button:upload") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip
@ -507,7 +505,7 @@
<div class="icon" @click.prevent="openUploadImage('download')"> <div class="icon" @click.prevent="openUploadImage('download')">
<i class="el-icon-download svg-icon" /> <i class="el-icon-download svg-icon" />
</div> </div>
<div class="text">{{ $t('trials:reading:button:download') }}</div> <div class="text">{{ $t("trials:reading:button:download") }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
@ -517,19 +515,17 @@
v-if="isExistsManual" v-if="isExistsManual"
type="text" type="text"
@click="previewManuals" @click="previewManuals"
>{{ $t('trials:reading:button:handbooks') }}</el-button >{{ $t("trials:reading:button:handbooks") }}</el-button>
>
<!-- 临床数据 --> <!-- 临床数据 -->
<el-button <el-button
v-if="isExistsClinicalData" v-if="isExistsClinicalData"
type="text" type="text"
@click="previewCD" @click="previewCD"
>{{ $t('trials:reading:button:clinicalData') }}</el-button >{{ $t("trials:reading:button:clinicalData") }}</el-button>
>
<!-- <el-button v-if="isExistsNoDicomFile" type="text" @click="previewNoneDicoms">Dicom</el-button> --> <!-- <el-button v-if="isExistsNoDicomFile" type="text" @click="previewNoneDicoms">Dicom</el-button> -->
<el-button type="text" @click="previewConfig">{{ <el-button type="text" @click="previewConfig">{{
$t('trials:reading:button:customCfg') $t("trials:reading:button:customCfg")
}}</el-button> }}</el-button>
</div> </div>
</div> </div>
@ -629,7 +625,7 @@
:fullscreen="isFullscreen" :fullscreen="isFullscreen"
> >
<span slot="title" class="dialog-footer"> <span slot="title" class="dialog-footer">
<span>{{ $t('trials:reading:button:handbooks') }}</span> <span>{{ $t("trials:reading:button:handbooks") }}</span>
<span style="position: absolute; right: 20px; font-size: 20px"> <span style="position: absolute; right: 20px; font-size: 20px">
<svg-icon <svg-icon
:icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'" :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
@ -650,19 +646,12 @@
<!-- <button :title="$t('trials:dicom-show:Eraser')" class="btn-link" data-tool="Eraser" @click="setToolActive($event,'Eraser')">--> <!-- <button :title="$t('trials:dicom-show:Eraser')" class="btn-link" data-tool="Eraser" @click="setToolActive($event,'Eraser')">-->
<!-- <svg-icon icon-class="clear" style="font-size:20px;" />--> <!-- <svg-icon icon-class="clear" style="font-size:20px;" />-->
<!-- </button>--> <!-- </button>-->
<!-- <upload-image <upload-image
v-if="uploadImageVisible" v-if="uploadImageVisible"
:visible.sync="uploadImageVisible" :visible.sync="uploadImageVisible"
:subject-id="subjectId" :subject-id="subjectId"
:criterion="trialCriterion" :criterion="trialCriterion"
:status="uploadStatus" :status="uploadStatus"
/> -->
<download-dicom-and-nonedicom
v-if="downloadImageVisible"
:SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode"
:Criterion="uploadTrialCriterion"
:visible.sync="downloadImageVisible"
/> />
</div> </div>
</template> </template>
@ -688,7 +677,6 @@ import { mapGetters } from 'vuex'
import store from '@/store' import store from '@/store'
import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user' import { getDoctorShortcutKey, getUserWLTemplateList } from '@/api/user'
import uploadImage from '@/components/uploadImage' import uploadImage from '@/components/uploadImage'
import downloadDicomAndNonedicom from '@/components/downloadDicomAndNonedicom'
import { getCriterionReadingInfo } from '@/api/trials' import { getCriterionReadingInfo } from '@/api/trials'
export default { export default {
name: 'DicomViewer', name: 'DicomViewer',
@ -700,49 +688,48 @@ export default {
Others, Others,
Manuals, Manuals,
MeasurementList, MeasurementList,
'upload-image': uploadImage, 'upload-image': uploadImage
'download-dicom-and-nonedicom': downloadDicomAndNonedicom,
}, },
props: { props: {
isExistsClinicalData: { isExistsClinicalData: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
isExistsNoDicomFile: { isExistsNoDicomFile: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
isExistsManual: { isExistsManual: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
isReadingShowSubjectInfo: { isReadingShowSubjectInfo: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
isReadingTaskViewInOrder: { isReadingTaskViewInOrder: {
type: Number, type: Number,
required: true, required: true
}, },
IseCRFShowInDicomReading: { IseCRFShowInDicomReading: {
type: Boolean, type: Boolean,
required: true, required: true
}, },
subjectId: { subjectId: {
type: String, type: String,
required: true, required: true,
default: '', default: ''
}, },
trialReadingCriterionId: { trialReadingCriterionId: {
type: String, type: String,
required: true, required: true,
default: '', default: ''
}, },
trialId: { trialId: {
type: String, type: String,
required: true, required: true,
default: '', default: ''
}, }
}, },
data() { data() {
return { return {
@ -751,7 +738,7 @@ export default {
{ index: 0, row: 1, col: 1, name: 'A' }, { index: 0, row: 1, col: 1, name: 'A' },
{ index: 1, row: 1, col: 2, name: 'A|A' }, { index: 1, row: 1, col: 2, name: 'A|A' },
{ index: 2, row: 1, col: 2, name: 'A|B' }, { index: 2, row: 1, col: 2, name: 'A|B' },
{ index: 3, row: 2, col: 2, name: 'A|A|A|A' }, { index: 3, row: 2, col: 2, name: 'A|A|A|A' }
// { index: 2, row: 2, col: 1 }, // { index: 2, row: 2, col: 1 },
// { index: 3, row: 2, col: 2 } // { index: 3, row: 2, col: 2 }
], ],
@ -760,7 +747,7 @@ export default {
{ label: this.$t('trials:reading:button:rotateVertical'), val: 2 }, // { label: this.$t('trials:reading:button:rotateVertical'), val: 2 }, //
{ label: this.$t('trials:reading:button:rotateHorizontal'), val: 3 }, // { label: this.$t('trials:reading:button:rotateHorizontal'), val: 3 }, //
{ label: this.$t('trials:reading:button:rotateTurnLeft'), val: 4 }, // 90 { label: this.$t('trials:reading:button:rotateTurnLeft'), val: 4 }, // 90
{ label: this.$t('trials:reading:button:rotateTurnRight'), val: 5 }, // 90 { label: this.$t('trials:reading:button:rotateTurnRight'), val: 5 } // 90
], ],
maxCanvas: 1, maxCanvas: 1,
layoutRow: 1, layoutRow: 1,
@ -768,8 +755,8 @@ export default {
currentDicomCanvasIndex: 0, currentDicomCanvasIndex: 0,
currentDicomCanvas: { currentDicomCanvas: {
toolState: { toolState: {
clipPlaying: false, clipPlaying: false
}, }
}, },
colormapsList: [], colormapsList: [],
rotateList: [], rotateList: [],
@ -786,7 +773,7 @@ export default {
text: this.$t('trials:reading:button:length'), text: this.$t('trials:reading:button:length'),
icon: 'length', icon: 'length',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
// //
{ {
@ -794,7 +781,7 @@ export default {
text: this.$t('trials:reading:button:bidirectional'), text: this.$t('trials:reading:button:bidirectional'),
icon: 'bidirection', icon: 'bidirection',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
// //
{ {
@ -802,7 +789,7 @@ export default {
text: this.$t('trials:reading:button:rectangle'), text: this.$t('trials:reading:button:rectangle'),
icon: 'rectangle', icon: 'rectangle',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
// //
{ {
@ -810,7 +797,7 @@ export default {
text: this.$t('trials:reading:button:elliptical'), text: this.$t('trials:reading:button:elliptical'),
icon: 'oval', icon: 'oval',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
// //
{ {
@ -818,8 +805,8 @@ export default {
text: this.$t('trials:reading:button:arrowAnnotate'), text: this.$t('trials:reading:button:arrowAnnotate'),
icon: 'arrow', icon: 'arrow',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, }
], ],
fitType: 0, fitType: 0,
@ -831,25 +818,25 @@ export default {
label: this.$t('trials:reading:button:wwwcDefault'), label: this.$t('trials:reading:button:wwwcDefault'),
val: -1, val: -1,
ww: null, ww: null,
wc: null, wc: null
}, // }, //
{ {
label: this.$t('trials:reading:button:wwwcCustom'), label: this.$t('trials:reading:button:wwwcCustom'),
val: 0, val: 0,
ww: null, ww: null,
wc: null, wc: null
}, // }, //
{ {
label: this.$t('trials:reading:button:wwwcRegion'), label: this.$t('trials:reading:button:wwwcRegion'),
val: 1, val: 1,
ww: null, ww: null,
wc: null, wc: null
}, // }, //
{ label: 'CT Brain', wc: 40, ww: 80 }, { label: 'CT Brain', wc: 40, ww: 80 },
{ label: 'CT Lungs', wc: -400, ww: 1500 }, { label: 'CT Lungs', wc: -400, ww: 1500 },
{ label: 'CT Abdomen', wc: 60, ww: 400 }, { label: 'CT Abdomen', wc: 60, ww: 400 },
{ label: 'CT Liver', wc: 40, ww: 400 }, { label: 'CT Liver', wc: 40, ww: 400 },
{ label: 'CT Bone', wc: 300, ww: 1500 }, { label: 'CT Bone', wc: 300, ww: 1500 }
], ],
activeSeries: {}, activeSeries: {},
seriesStack: [], seriesStack: [],
@ -857,13 +844,13 @@ export default {
isScrollSync: false, isScrollSync: false,
imageIndexSync: { imageIndexSync: {
sourceCanvas: '', sourceCanvas: '',
targetCanvas: [], targetCanvas: []
}, },
isFirstRender: false, isFirstRender: false,
customWwc: { visible: false, title: null }, // customWwc: { visible: false, title: null }, //
personalConfigDialog: { personalConfigDialog: {
visible: false, visible: false,
title: this.$t('trials:reading:button:customCfg'), title: this.$t('trials:reading:button:customCfg')
}, // }, //
layout: '', layout: '',
isFirstNotLinked: false, isFirstNotLinked: false,
@ -875,17 +862,14 @@ export default {
clipPlaying: false, clipPlaying: false,
fps: 15, fps: 15,
// //
downloadImageVisible: false,
uploadImageVisible: false, uploadImageVisible: false,
uploadSubjectId: null, trialCriterion: {},
uploadSubjectCode: null, uploadStatus: 'upload'
uploadTrialCriterion: {},
uploadStatus: 'upload',
} }
}, },
computed: { computed: {
...mapGetters(['visitTaskList', 'currentReadingTaskState']), ...mapGetters(['visitTaskList', 'currentReadingTaskState'])
}, },
watch: { watch: {
currentReadingTaskState: { currentReadingTaskState: {
@ -904,7 +888,7 @@ export default {
this.activeTool = '' this.activeTool = ''
} }
} }
}, }
}, },
currentDicomCanvasIndex: { currentDicomCanvasIndex: {
immediate: true, immediate: true,
@ -921,8 +905,8 @@ export default {
this.clipPlaying = false this.clipPlaying = false
this.fps = 15 this.fps = 15
} }
}, }
}, }
}, },
mounted() { mounted() {
this.getTrialCriterion() this.getTrialCriterion()
@ -935,7 +919,7 @@ export default {
// cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes) // cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
this.customWwc = { this.customWwc = {
visible: false, visible: false,
title: this.$t('trials:reading:dagTitle:wwwcCustom'), title: this.$t('trials:reading:dagTitle:wwwcCustom')
} }
this.CriterionType = parseInt(localStorage.getItem('CriterionType')) this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
if (this.CriterionType === 10) { if (this.CriterionType === 10) {
@ -945,15 +929,15 @@ export default {
text: this.$t('trials:reading:button:arrowAnnotate'), text: this.$t('trials:reading:button:arrowAnnotate'),
icon: 'arrow', icon: 'arrow',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
{ {
toolName: 'RectangleRoi', toolName: 'RectangleRoi',
text: this.$t('trials:reading:button:rectangle'), text: this.$t('trials:reading:button:rectangle'),
icon: 'rectangle', icon: 'rectangle',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, }
] ]
} else if (this.CriterionType === 17) { } else if (this.CriterionType === 17) {
this.measuredTools = [ this.measuredTools = [
@ -962,22 +946,22 @@ export default {
text: this.$t('trials:reading:button:length'), text: this.$t('trials:reading:button:length'),
icon: 'length', icon: 'length',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
{ {
toolName: 'RectangleRoi', toolName: 'RectangleRoi',
text: this.$t('trials:reading:button:rectangle'), text: this.$t('trials:reading:button:rectangle'),
icon: 'rectangle', icon: 'rectangle',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, },
{ {
toolName: 'ArrowAnnotate', toolName: 'ArrowAnnotate',
text: this.$t('trials:reading:button:arrowAnnotate'), text: this.$t('trials:reading:button:arrowAnnotate'),
icon: 'arrow', icon: 'arrow',
isDisabled: false, isDisabled: false,
disabledReason: '', disabledReason: ''
}, }
] ]
} }
this.rotateList[0] = '1' this.rotateList[0] = '1'
@ -1057,7 +1041,7 @@ export default {
getTrialCriterion() { getTrialCriterion() {
getCriterionReadingInfo({ getCriterionReadingInfo({
TrialId: this.trialId, TrialId: this.trialId,
TrialReadingCriterionId: this.trialReadingCriterionId, TrialReadingCriterionId: this.trialReadingCriterionId
}) })
.then((res) => { .then((res) => {
this.trialCriterion = res.Result this.trialCriterion = res.Result
@ -1065,28 +1049,26 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
openUploadImage(status) { openUploadImage(status) {
this.uploadSubjectCode = this.$route.query.subjectCode
this.uploadSubjectId = this.$route.query.subjectId
this.uploadTrialCriterion = this.trialCriterion
this.uploadStatus = status this.uploadStatus = status
this[`${status}ImageVisible`] = true this.uploadImageVisible = true
}, },
async getWwcTpl() { async getWwcTpl() {
// const loading = this.$loading({ fullscreen: true }) // const loading = this.$loading({ fullscreen: true })
try { try {
let res = await getUserWLTemplateList() let res = await getUserWLTemplateList()
this.customWwcTpl = [] this.customWwcTpl = []
res.Result.map((i) => { res.Result.map((i) => {
this.customWwcTpl.push({ this.customWwcTpl.push({
label: i.TemplateName, label: i.TemplateName,
wc: i.WL, wc: i.WL,
ww: i.WW, ww: i.WW
})
}) })
}) this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl]
this.wwwcArr = [...this.defaultWwwc, ...this.customWwcTpl] } catch(e) {
} catch (e) {
console.log(e) console.log(e)
} }
}, },
async getHotKeys() { async getHotKeys() {
// const loading = this.$loading({ fullscreen: true }) // const loading = this.$loading({ fullscreen: true })
@ -1102,11 +1084,11 @@ export default {
key: item.Keyboardkey, key: item.Keyboardkey,
code: item.Code, code: item.Code,
text: item.Text, text: item.Text,
shortcutKeyEnum: item.ShortcutKeyEnum, shortcutKeyEnum: item.ShortcutKeyEnum
}) })
}) })
this.bindHotKey() this.bindHotKey()
} catch (e) { } catch(e) {
console.log(e) console.log(e)
} }
}, },
@ -1123,7 +1105,7 @@ export default {
key: item.keys.controlKey.key, key: item.keys.controlKey.key,
code: item.keys.controlKey.code, code: item.keys.controlKey.code,
text: item.keys.text, text: item.keys.text,
shortcutKeyEnum: item.label, shortcutKeyEnum: item.label
}) })
}) })
@ -1166,7 +1148,7 @@ export default {
DicomEvent.$emit('selectSeries', { DicomEvent.$emit('selectSeries', {
seriesId: series.seriesId, seriesId: series.seriesId,
studyId: series.studyId, studyId: series.studyId,
offset: -1, offset: -1
}) })
} else if (shortcutKeyEnum === 4) { } else if (shortcutKeyEnum === 4) {
// //
@ -1175,7 +1157,7 @@ export default {
DicomEvent.$emit('selectSeries', { DicomEvent.$emit('selectSeries', {
seriesId: series.seriesId, seriesId: series.seriesId,
studyId: series.studyId, studyId: series.studyId,
offset: 1, offset: 1
}) })
} else if (shortcutKeyEnum === 5) { } else if (shortcutKeyEnum === 5) {
// //
@ -1305,7 +1287,7 @@ export default {
top: '72px', top: '72px',
left: '205px', left: '205px',
right: '350px', right: '350px',
zIndex: 10, zIndex: 10
} }
this.canvasW = window.innerWidth - 570 + 'px' this.canvasW = window.innerWidth - 570 + 'px'
this.canvasH = window.innerHeight - 130 + 'px' this.canvasH = window.innerHeight - 130 + 'px'
@ -1405,7 +1387,10 @@ export default {
// this.$refs['measurementList'].initPage(dicomSeries) // this.$refs['measurementList'].initPage(dicomSeries)
store.dispatch('reading/setActiveSeries', dicomSeries) store.dispatch('reading/setActiveSeries', dicomSeries)
if (this.currentDicomCanvasIndex === this.maxCanvas - 1) { if (this.currentDicomCanvasIndex === this.maxCanvas - 1) {
store.dispatch('reading/setLastCanvasTaskId', dicomSeries.visitTaskId) store.dispatch(
'reading/setLastCanvasTaskId',
dicomSeries.visitTaskId
)
} }
}) })
}, },
@ -1436,7 +1421,10 @@ export default {
store.dispatch('reading/setActiveSeries', dicomSeries) store.dispatch('reading/setActiveSeries', dicomSeries)
if (this.currentDicomCanvasIndex === this.maxCanvas - 1) { if (this.currentDicomCanvasIndex === this.maxCanvas - 1) {
store.dispatch('reading/setLastCanvasTaskId', dicomSeries.visitTaskId) store.dispatch(
'reading/setLastCanvasTaskId',
dicomSeries.visitTaskId
)
} }
}) })
}, },
@ -1486,7 +1474,7 @@ export default {
visitTaskId = this.visitTaskList[i].VisitTaskId visitTaskId = this.visitTaskList[i].VisitTaskId
} }
this.getFirstSeries(activeSeries, visitTaskId).then( this.getFirstSeries(activeSeries, visitTaskId).then(
async (baseSerires) => { async(baseSerires) => {
this.seriesStack = [baseSerires, activeSeries] this.seriesStack = [baseSerires, activeSeries]
this.currentDicomCanvasIndex = 1 this.currentDicomCanvasIndex = 1
store.dispatch( store.dispatch(
@ -1514,7 +1502,7 @@ export default {
activeSeries, activeSeries,
activeSeries, activeSeries,
activeSeries, activeSeries,
activeSeries, activeSeries
] ]
this.currentDicomCanvasIndex = 3 this.currentDicomCanvasIndex = 3
store.dispatch( store.dispatch(
@ -1533,7 +1521,9 @@ export default {
for (let i = 0; i < this.maxCanvas && i < seriesStack.length; i++) { for (let i = 0; i < this.maxCanvas && i < seriesStack.length; i++) {
this.canvasObj[i] = seriesStack[i] this.canvasObj[i] = seriesStack[i]
let s = Object.assign({}, seriesStack[i]) let s = Object.assign({}, seriesStack[i])
promiseArr.push(this.$refs[`dicomCanvas${i}`][0].loadImageStack(s)) promiseArr.push(
this.$refs[`dicomCanvas${i}`][0].loadImageStack(s)
)
} }
Promise.all(promiseArr) Promise.all(promiseArr)
.then(() => { .then(() => {
@ -1595,24 +1585,24 @@ export default {
trialId: this.trialId, trialId: this.trialId,
subjectVisitId: this.visitTaskList[taskIdx].VisitId, subjectVisitId: this.visitTaskList[taskIdx].VisitId,
visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId,
taskBlindName: this.visitTaskList[taskIdx].TaskBlindName, taskBlindName: this.visitTaskList[taskIdx].TaskBlindName
}) })
} }
if (!this.visitTaskList[taskIdx].readingQuestionsInit) { if (!this.visitTaskList[taskIdx].readingQuestionsInit) {
await store.dispatch('reading/getReadingQuestionAndAnswer', { await store.dispatch('reading/getReadingQuestionAndAnswer', {
trialId: this.trialId, trialId: this.trialId,
visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId
}) })
} }
if (!this.visitTaskList[taskIdx].questionsInit) { if (!this.visitTaskList[taskIdx].questionsInit) {
await store.dispatch('reading/getDicomReadingQuestionAnswer', { await store.dispatch('reading/getDicomReadingQuestionAnswer', {
trialId: this.trialId, trialId: this.trialId,
visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId
}) })
} }
await store.dispatch('reading/setStatus', { await store.dispatch('reading/setStatus', {
visitTaskId: this.visitTaskList[taskIdx].VisitTaskId, visitTaskId: this.visitTaskList[taskIdx].VisitTaskId
}) })
} }
firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj) firstAddSeries = this.getSeriesInfoByMark(firstAddVisitTaskId, obj)
@ -1706,7 +1696,8 @@ export default {
var studyList = this.visitTaskList[index].StudyList var studyList = this.visitTaskList[index].StudyList
var studyId = this.visitTaskList[index].MeasureData[idx].StudyId var studyId = this.visitTaskList[index].MeasureData[idx].StudyId
var seriesId = this.visitTaskList[index].MeasureData[idx].SeriesId var seriesId = this.visitTaskList[index].MeasureData[idx].SeriesId
var instanceId = this.visitTaskList[index].MeasureData[idx].InstanceId var instanceId =
this.visitTaskList[index].MeasureData[idx].InstanceId
var studyIdx = studyList.findIndex( var studyIdx = studyList.findIndex(
(study) => study.StudyId === studyId (study) => study.StudyId === studyId
) )
@ -1715,15 +1706,10 @@ export default {
(s) => s.seriesId === seriesId (s) => s.seriesId === seriesId
) )
if (seriesIdx > -1) { if (seriesIdx > -1) {
var series = studyList[studyIdx].SeriesList[seriesIdx] var series = studyList[studyIdx].SeriesList[seriesIdx];
let frame = let frame = this.visitTaskList[index].MeasureData[idx].MeasureData.frame
this.visitTaskList[index].MeasureData[idx].MeasureData.frame let filterStr = series.isExistMutiFrames ? `frame=${frame}&instanceId=${instanceId}` : `instanceId=${instanceId}`
let filterStr = series.isExistMutiFrames var instanceIdx = series.imageIds.findIndex(imageId => imageId.includes(filterStr))
? `frame=${frame}&instanceId=${instanceId}`
: `instanceId=${instanceId}`
var instanceIdx = series.imageIds.findIndex((imageId) =>
imageId.includes(filterStr)
)
// var instanceIdx = series.instanceList.findIndex( // var instanceIdx = series.instanceList.findIndex(
// (imageId) => !!~imageId.indexOf(instanceId) // (imageId) => !!~imageId.indexOf(instanceId)
// ); // );
@ -1752,14 +1738,16 @@ export default {
i.description, i.description,
baseSeries.description baseSeries.description
), ),
index, index
} }
}) })
similarArr = similarArr.sort((a, b) => { similarArr = similarArr.sort((a, b) => {
return b.similar - a.similar return b.similar - a.similar
}) })
const i = const i =
similarArr[0] && similarArr[0].similar > 0.85 ? similarArr[0].index : -1 similarArr[0] && similarArr[0].similar > 0.85
? similarArr[0].index
: -1
if (i > -1) { if (i > -1) {
obj = seriesList[i] obj = seriesList[i]
} }
@ -1834,7 +1822,7 @@ export default {
trialId: this.trialId, trialId: this.trialId,
subjectVisitId: this.visitTaskList[index].VisitId, subjectVisitId: this.visitTaskList[index].VisitId,
visitTaskId: this.visitTaskList[index].VisitTaskId, visitTaskId: this.visitTaskList[index].VisitTaskId,
taskBlindName: this.visitTaskList[index].TaskBlindName, taskBlindName: this.visitTaskList[index].TaskBlindName
}) })
await store.dispatch( await store.dispatch(
@ -1853,14 +1841,16 @@ export default {
i.description, i.description,
baseSeries.description baseSeries.description
), ),
index, index
} }
}) })
similarArr = similarArr.sort((a, b) => { similarArr = similarArr.sort((a, b) => {
return b.similar - a.similar return b.similar - a.similar
}) })
const i = const i =
similarArr[0] && similarArr[0].similar > 0.85 ? similarArr[0].index : -1 similarArr[0] && similarArr[0].similar > 0.85
? similarArr[0].index
: -1
if (i > -1) { if (i > -1) {
obj = seriesList[i] obj = seriesList[i]
} }
@ -2035,7 +2025,9 @@ export default {
}, },
// //
enter(e, toolName) { enter(e, toolName) {
var i = this.measuredTools.findIndex((item) => item.toolName === toolName) var i = this.measuredTools.findIndex(
(item) => item.toolName === toolName
)
if (i === -1) return if (i === -1) return
var isCurrentTask = var isCurrentTask =
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0] this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0]
@ -2097,11 +2089,8 @@ export default {
`dicomCanvas${this.currentDicomCanvasIndex}` `dicomCanvas${this.currentDicomCanvasIndex}`
][0].setToolActive(toolName) ][0].setToolActive(toolName)
} }
} else if ( } else if (dicomSeries.isCurrentTask &&
dicomSeries.isCurrentTask && isMeasuredTool && dicomSeries.readingTaskState >= 2) {
isMeasuredTool &&
dicomSeries.readingTaskState >= 2
) {
if (this.activeTool === toolName) { if (this.activeTool === toolName) {
this.$refs[ this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}` `dicomCanvas${this.currentDicomCanvasIndex}`
@ -2173,7 +2162,9 @@ export default {
][0].fitToWindow() ][0].fitToWindow()
} else if (toolName === 'fitToImage') { } else if (toolName === 'fitToImage') {
this.fitType = 1 this.fitType = 1
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].fitToImage() this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}`
][0].fitToImage()
} }
this.activeTool = toolName this.activeTool = toolName
}, },
@ -2190,9 +2181,7 @@ export default {
const isLoaded = this.getSeriesLoadStatus() const isLoaded = this.getSeriesLoadStatus()
if (!isLoaded) return if (!isLoaded) return
this.clipPlaying = isPlay this.clipPlaying = isPlay
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps( this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(this.fps)
this.fps
)
this.$refs[ this.$refs[
`dicomCanvas${this.currentDicomCanvasIndex}` `dicomCanvas${this.currentDicomCanvasIndex}`
][0].toggleClipPlay(isPlay) ][0].toggleClipPlay(isPlay)
@ -2308,8 +2297,8 @@ export default {
previewManuals() { previewManuals() {
this.isFullscreen = false this.isFullscreen = false
this.manualsDialog.visible = true this.manualsDialog.visible = true
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>