上传下载问题修复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1274af3e48
commit
c618738725
|
@ -1364,9 +1364,9 @@ export function getForwardList(param) {
|
|||
})
|
||||
}
|
||||
|
||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false) {
|
||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false, visitTaskId = '') {
|
||||
return request({
|
||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
|
||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}&visitTaskId=${visitTaskId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ import {
|
|||
import studyView from '@/components/uploadDicomAndNonedicom/study-view.vue'
|
||||
import store from '@/store'
|
||||
import { downLoadFile } from '@/utils/stream.js'
|
||||
import { getToken } from '@/utils/auth'
|
||||
let defaultSearchData = () => {
|
||||
return {
|
||||
SubjectId: null,
|
||||
|
@ -202,6 +203,7 @@ export default {
|
|||
},
|
||||
modelList: [],
|
||||
IsDicom: true,
|
||||
open: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -379,6 +381,37 @@ export default {
|
|||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
preview(row) {
|
||||
if (!row.IsDicom) {
|
||||
this.handlePreviewNoneDicomFiles(row)
|
||||
} else {
|
||||
this.handleViewReadingImages(row)
|
||||
}
|
||||
},
|
||||
// 预览单个检查下非Dicom文件
|
||||
handlePreviewNoneDicomFiles(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
let trialId = this.$route.query.trialId
|
||||
var token = getToken()
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&studyId=${row.Id}&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
// 预览阅片影像
|
||||
handleViewReadingImages(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
var token = getToken()
|
||||
let trialId = this.$route.query.trialId
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showvisitdicoms?trialId=${trialId}&visitInfo=${row.VisitName}(${row.VisitNum})&subjectVisitId=${row.SourceSubjectVisitId}&isReading=1&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -115,6 +115,11 @@
|
|||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:disabled="
|
||||
!scope.row.UploadStudyList ||
|
||||
scope.row.UploadStudyList.length <= 0
|
||||
"
|
||||
@click.stop="handleViewReadingImages(scope.row)"
|
||||
:title="$t('upload:dicom:button:preview')"
|
||||
/>
|
||||
<!--删除--->
|
||||
|
@ -453,6 +458,7 @@ import { convertBytes } from '@/utils/dicom-character-set'
|
|||
import { parseDicom } from '@/utils/parseDicom.js'
|
||||
import { dcmUpload } from '@/utils/dcmUpload/dcmUpload'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'dicomFile',
|
||||
props: {
|
||||
|
@ -505,6 +511,7 @@ export default {
|
|||
trialId: null,
|
||||
subjectVisitId: null,
|
||||
errStudyUidList: [],
|
||||
open: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -1444,6 +1451,18 @@ export default {
|
|||
let blob = new Blob(['\ufeff', text], { type: 'text/plain' })
|
||||
return blob
|
||||
},
|
||||
// 预览阅片影像
|
||||
handleViewReadingImages(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
var token = getToken()
|
||||
let trialId = this.$route.query.trialId
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showvisitdicoms?trialId=${trialId}&visitInfo=${row.VisitName}(${row.VisitNum})&subjectVisitId=${row.SourceSubjectVisitId}&isReading=1&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -62,10 +62,13 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'Upload Images:01 > 01001 >Timepoint',
|
||||
title: '',
|
||||
activeName: 'dicom',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.title = `Upload Images:${this.SubjectCode}(${this.Criterion.TrialReadingCriterionName})`
|
||||
},
|
||||
methods: {
|
||||
beforeClose() {
|
||||
this.$emit('update:visible', false)
|
||||
|
|
|
@ -550,7 +550,7 @@ export default {
|
|||
let trialId = this.$route.query.trialId
|
||||
var token = getToken()
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&studyId=${row.Id}&TokenKey=${token}`,
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&studyId=${row.Id}&visitTaskId=${row.VisitTaskId}&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
|
|
|
@ -6,54 +6,61 @@
|
|||
</div>
|
||||
<div class="left-content">
|
||||
<!-- 检查层级 -->
|
||||
<div v-for="(study,i) in studyList" :key="study.CodeView">
|
||||
<div v-for="(study, i) in studyList" :key="study.CodeView">
|
||||
<div class="study-desc">
|
||||
<span>{{ study.CodeView }}</span>
|
||||
<span style="margin:0 5px">{{ study.Modality }}</span>
|
||||
<span style="margin: 0 5px">{{ study.Modality }}</span>
|
||||
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
||||
</div>
|
||||
<!-- 文件层级 -->
|
||||
<div v-if="study.NoneDicomStudyFileList.length === 0" class="empty-text">
|
||||
<div
|
||||
v-if="study.NoneDicomStudyFileList.length === 0"
|
||||
class="empty-text"
|
||||
>
|
||||
<slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
|
||||
</div>
|
||||
<div v-else id="imgList" style="height:100%;overflow: hidden">
|
||||
<div v-else id="imgList" style="height: 100%; overflow: hidden">
|
||||
<div
|
||||
v-for="(item,j) in study.NoneDicomStudyFileList"
|
||||
v-for="(item, j) in study.NoneDicomStudyFileList"
|
||||
:id="`img${item.Id}`"
|
||||
:key="item.Id"
|
||||
:class="{
|
||||
'is-boxActive': item.Id === currentFileId
|
||||
'is-boxActive': item.Id === currentFileId,
|
||||
}"
|
||||
class="img-box"
|
||||
@click="selected(item,i,j,true)"
|
||||
@click="selected(item, i, j, true)"
|
||||
>
|
||||
<div v-if="item.FileName.length < 15" class="img-text">
|
||||
{{ `${j+1}. ${item.FileName}` }}
|
||||
{{ `${j + 1}. ${item.FileName}` }}
|
||||
</div>
|
||||
<el-tooltip v-else :content="item.FileName" placement="bottom">
|
||||
<div class="img-text">
|
||||
{{ `${j+1}. ${item.FileName}` }}
|
||||
{{ `${j + 1}. ${item.FileName}` }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<!-- 预览图像 -->
|
||||
<el-card class="box-card right">
|
||||
<div style="width:100%;height: 100%;">
|
||||
<Preview v-if="previewImage.imgList.length > 0" ref="previewImage" style="width:100%;" :preview-image="previewImage" :value="currentStudyFileIndex" @selectedImg="selectedImg" />
|
||||
<div style="width: 100%; height: 100%">
|
||||
<Preview
|
||||
v-if="previewImage.imgList.length > 0"
|
||||
ref="previewImage"
|
||||
style="width: 100%"
|
||||
:preview-image="previewImage"
|
||||
:value="currentStudyFileIndex"
|
||||
@selectedImg="selectedImg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
||||
<CheckForm />
|
||||
</el-card> -->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -65,7 +72,7 @@ import Preview from './components/preview'
|
|||
export default {
|
||||
name: 'Notice',
|
||||
components: {
|
||||
Preview
|
||||
Preview,
|
||||
// CheckForm
|
||||
},
|
||||
data() {
|
||||
|
@ -82,14 +89,14 @@ export default {
|
|||
popup: true, // 弹窗的显示隐藏
|
||||
studyCode: '',
|
||||
modality: '',
|
||||
bodyPart: ''
|
||||
bodyPart: '',
|
||||
},
|
||||
previewVisible: false,
|
||||
studyList: [],
|
||||
subjectVisitId: '',
|
||||
sudyId: '',
|
||||
loading: false,
|
||||
bp: []
|
||||
bp: [],
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
@ -118,8 +125,14 @@ export default {
|
|||
separator = ','
|
||||
}
|
||||
var arr = bodyPart.split(separator)
|
||||
var newArr = arr.map(i => {
|
||||
return this.$fd('Bodypart', i.trim(), 'Code', { Bodypart: this.bp }, 'Name')
|
||||
var newArr = arr.map((i) => {
|
||||
return this.$fd(
|
||||
'Bodypart',
|
||||
i.trim(),
|
||||
'Code',
|
||||
{ Bodypart: this.bp },
|
||||
'Name'
|
||||
)
|
||||
})
|
||||
console.log(newArr, this.bp)
|
||||
return newArr.join(' | ')
|
||||
|
@ -127,22 +140,32 @@ export default {
|
|||
// 获取非Dicom检查信息
|
||||
getNoneDicomList() {
|
||||
this.loading = true
|
||||
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => {
|
||||
this.studyList = res.Result
|
||||
this.loading = false
|
||||
const studyIndex = this.studyList.findIndex(item => {
|
||||
return item.NoneDicomStudyFileList.length > 0
|
||||
getNoneDicomStudyList(
|
||||
this.subjectVisitId,
|
||||
this.studyId,
|
||||
false,
|
||||
this.$route.query.visitTaskId
|
||||
)
|
||||
.then((res) => {
|
||||
this.studyList = res.Result
|
||||
this.loading = false
|
||||
const studyIndex = this.studyList.findIndex((item) => {
|
||||
return item.NoneDicomStudyFileList.length > 0
|
||||
})
|
||||
if (studyIndex > -1) {
|
||||
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
||||
this.selected(fileObj[0], studyIndex, 0, true)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
if (studyIndex > -1) {
|
||||
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
||||
this.selected(fileObj[0], studyIndex, 0, true)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
||||
this.currentFileId = file.Id
|
||||
this.currentStudyIndex = studyIndex
|
||||
this.previewImage.imgList = this.studyList[studyIndex].NoneDicomStudyFileList
|
||||
this.previewImage.imgList =
|
||||
this.studyList[studyIndex].NoneDicomStudyFileList
|
||||
this.currentStudyFileIndex = fileIndex
|
||||
this.previewImage.index = fileIndex
|
||||
this.previewImage.studyCode = this.studyList[studyIndex].CodeView
|
||||
|
@ -157,11 +180,17 @@ export default {
|
|||
selectedImg(fileIndex) {
|
||||
if (this.studyList.length > 0) {
|
||||
this.currentStudyFileIndex = fileIndex
|
||||
this.currentFileId = this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[fileIndex].Id
|
||||
this.currentFileId =
|
||||
this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[
|
||||
fileIndex
|
||||
].Id
|
||||
this.previewImage.index = fileIndex
|
||||
this.previewImage.studyCode = this.studyList[this.currentStudyIndex].CodeView
|
||||
this.previewImage.bodyPart = this.studyList[this.currentStudyIndex].BodyPart
|
||||
this.previewImage.modality = this.studyList[this.currentStudyIndex].Modality
|
||||
this.previewImage.studyCode =
|
||||
this.studyList[this.currentStudyIndex].CodeView
|
||||
this.previewImage.bodyPart =
|
||||
this.studyList[this.currentStudyIndex].BodyPart
|
||||
this.previewImage.modality =
|
||||
this.studyList[this.currentStudyIndex].Modality
|
||||
this.$nextTick(() => {
|
||||
const target = document.getElementById(`img${this.currentFileId}`)
|
||||
const parent = document.getElementsByClassName('left-content')[0]
|
||||
|
@ -171,14 +200,13 @@ export default {
|
|||
},
|
||||
preview() {
|
||||
this.previewVisible = true
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-container{
|
||||
.img-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -192,27 +220,27 @@ export default {
|
|||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
.study-desc{
|
||||
.study-desc {
|
||||
padding: 15px 5px;
|
||||
line-height: 20px;
|
||||
background-color: #d5d5d5;
|
||||
font-weight: 500;
|
||||
}
|
||||
.left{
|
||||
width:220px;
|
||||
.left {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.title{
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: 1ppx solid;
|
||||
|
@ -221,7 +249,7 @@ export default {
|
|||
background-color: #4e4e4e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.left-content{
|
||||
.left-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
@ -237,7 +265,7 @@ export default {
|
|||
// overflow-y: auto;
|
||||
// padding: 0;
|
||||
// }
|
||||
.img-box{
|
||||
.img-box {
|
||||
// position: relative;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
|
@ -246,9 +274,8 @@ export default {
|
|||
cursor: pointer;
|
||||
// margin-bottom: 5px;
|
||||
padding-left: 5px;
|
||||
|
||||
}
|
||||
.img-text{
|
||||
.img-text {
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
|
@ -257,7 +284,7 @@ export default {
|
|||
text-overflow: ellipsis; /* 用省略号表示溢出的文本 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
.img-box:nth-last-child(1){
|
||||
.img-box:nth-last-child(1) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.is-boxActive {
|
||||
|
@ -268,14 +295,13 @@ export default {
|
|||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
.right {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
margin-left: 10px;
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -539,10 +539,11 @@
|
|||
icon="el-icon-view"
|
||||
circle
|
||||
:disabled="
|
||||
scope.row.uploadState.stateCode !== '' &&
|
||||
scope.row.dicomInfo.failedFileCount <
|
||||
scope.row.dicomInfo.fileCount &&
|
||||
!scope.row.uploadState.record
|
||||
(scope.row.uploadState.stateCode !== '' &&
|
||||
scope.row.dicomInfo.failedFileCount <
|
||||
scope.row.dicomInfo.fileCount &&
|
||||
!scope.row.uploadState.record) ||
|
||||
btnLoading
|
||||
"
|
||||
:title="$t('trials:uploadedDicoms:action:preview')"
|
||||
size="small"
|
||||
|
@ -555,10 +556,11 @@
|
|||
:title="$t('trials:uploadedDicoms:action:delete')"
|
||||
size="small"
|
||||
:disabled="
|
||||
scope.row.uploadState.stateCode !== '' &&
|
||||
scope.row.dicomInfo.failedFileCount <
|
||||
scope.row.dicomInfo.fileCount &&
|
||||
!scope.row.uploadState.record
|
||||
(scope.row.uploadState.stateCode !== '' &&
|
||||
scope.row.dicomInfo.failedFileCount <
|
||||
scope.row.dicomInfo.fileCount &&
|
||||
!scope.row.uploadState.record) ||
|
||||
btnLoading
|
||||
"
|
||||
@click="handleDelete(scope.$index, scope.row)"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue