上传下载问题修复
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-06 13:22:42 +08:00
parent 1274af3e48
commit c618738725
7 changed files with 148 additions and 65 deletions

View File

@ -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({ return request({
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`, url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}&visitTaskId=${visitTaskId}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -148,6 +148,7 @@ import {
import studyView from '@/components/uploadDicomAndNonedicom/study-view.vue' import studyView from '@/components/uploadDicomAndNonedicom/study-view.vue'
import store from '@/store' import store from '@/store'
import { downLoadFile } from '@/utils/stream.js' import { downLoadFile } from '@/utils/stream.js'
import { getToken } from '@/utils/auth'
let defaultSearchData = () => { let defaultSearchData = () => {
return { return {
SubjectId: null, SubjectId: null,
@ -202,6 +203,7 @@ export default {
}, },
modelList: [], modelList: [],
IsDicom: true, IsDicom: true,
open: null,
} }
}, },
mounted() { mounted() {
@ -379,6 +381,37 @@ export default {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1
this.getList() 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> </script>

View File

@ -115,6 +115,11 @@
<el-button <el-button
circle circle
icon="el-icon-view" icon="el-icon-view"
:disabled="
!scope.row.UploadStudyList ||
scope.row.UploadStudyList.length <= 0
"
@click.stop="handleViewReadingImages(scope.row)"
:title="$t('upload:dicom:button:preview')" :title="$t('upload:dicom:button:preview')"
/> />
<!--删除---> <!--删除--->
@ -453,6 +458,7 @@ import { convertBytes } from '@/utils/dicom-character-set'
import { parseDicom } from '@/utils/parseDicom.js' import { parseDicom } from '@/utils/parseDicom.js'
import { dcmUpload } from '@/utils/dcmUpload/dcmUpload' import { dcmUpload } from '@/utils/dcmUpload/dcmUpload'
import store from '@/store' import store from '@/store'
import { getToken } from '@/utils/auth'
export default { export default {
name: 'dicomFile', name: 'dicomFile',
props: { props: {
@ -505,6 +511,7 @@ export default {
trialId: null, trialId: null,
subjectVisitId: null, subjectVisitId: null,
errStudyUidList: [], errStudyUidList: [],
open: null,
} }
}, },
created() { created() {
@ -1444,6 +1451,18 @@ export default {
let blob = new Blob(['\ufeff', text], { type: 'text/plain' }) let blob = new Blob(['\ufeff', text], { type: 'text/plain' })
return blob 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> </script>

View File

@ -62,10 +62,13 @@ export default {
}, },
data() { data() {
return { return {
title: 'Upload Images01 > 01001 >Timepoint', title: '',
activeName: 'dicom', activeName: 'dicom',
} }
}, },
mounted() {
this.title = `Upload Images${this.SubjectCode}${this.Criterion.TrialReadingCriterionName}`
},
methods: { methods: {
beforeClose() { beforeClose() {
this.$emit('update:visible', false) this.$emit('update:visible', false)

View File

@ -550,7 +550,7 @@ export default {
let trialId = this.$route.query.trialId let trialId = this.$route.query.trialId
var token = getToken() var token = getToken()
const routeData = this.$router.resolve({ 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') this.open = window.open(routeData.href, '_blank')
}, },

View File

@ -13,7 +13,10 @@
<span>{{ getBodyPart(study.BodyPart) }}</span> <span>{{ getBodyPart(study.BodyPart) }}</span>
</div> </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> <slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
</div> </div>
<div v-else id="imgList" style="height: 100%; overflow: hidden"> <div v-else id="imgList" style="height: 100%; overflow: hidden">
@ -22,7 +25,7 @@
:id="`img${item.Id}`" :id="`img${item.Id}`"
:key="item.Id" :key="item.Id"
:class="{ :class="{
'is-boxActive': item.Id === currentFileId 'is-boxActive': item.Id === currentFileId,
}" }"
class="img-box" class="img-box"
@click="selected(item, i, j, true)" @click="selected(item, i, j, true)"
@ -39,21 +42,25 @@
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
<!-- 预览图像 --> <!-- 预览图像 -->
<el-card class="box-card right"> <el-card class="box-card right">
<div style="width:100%;height: 100%;"> <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" /> <Preview
v-if="previewImage.imgList.length > 0"
ref="previewImage"
style="width: 100%"
:preview-image="previewImage"
:value="currentStudyFileIndex"
@selectedImg="selectedImg"
/>
</div> </div>
</el-card> </el-card>
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;"> <!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
<CheckForm /> <CheckForm />
</el-card> --> </el-card> -->
</div> </div>
</template> </template>
<script> <script>
@ -65,7 +72,7 @@ import Preview from './components/preview'
export default { export default {
name: 'Notice', name: 'Notice',
components: { components: {
Preview Preview,
// CheckForm // CheckForm
}, },
data() { data() {
@ -82,14 +89,14 @@ export default {
popup: true, // popup: true, //
studyCode: '', studyCode: '',
modality: '', modality: '',
bodyPart: '' bodyPart: '',
}, },
previewVisible: false, previewVisible: false,
studyList: [], studyList: [],
subjectVisitId: '', subjectVisitId: '',
sudyId: '', sudyId: '',
loading: false, loading: false,
bp: [] bp: [],
} }
}, },
async created() { async created() {
@ -118,8 +125,14 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
var newArr = arr.map(i => { var newArr = arr.map((i) => {
return this.$fd('Bodypart', i.trim(), 'Code', { Bodypart: this.bp }, 'Name') return this.$fd(
'Bodypart',
i.trim(),
'Code',
{ Bodypart: this.bp },
'Name'
)
}) })
console.log(newArr, this.bp) console.log(newArr, this.bp)
return newArr.join(' | ') return newArr.join(' | ')
@ -127,22 +140,32 @@ export default {
// Dicom // Dicom
getNoneDicomList() { getNoneDicomList() {
this.loading = true this.loading = true
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => { getNoneDicomStudyList(
this.subjectVisitId,
this.studyId,
false,
this.$route.query.visitTaskId
)
.then((res) => {
this.studyList = res.Result this.studyList = res.Result
this.loading = false this.loading = false
const studyIndex = this.studyList.findIndex(item => { const studyIndex = this.studyList.findIndex((item) => {
return item.NoneDicomStudyFileList.length > 0 return item.NoneDicomStudyFileList.length > 0
}) })
if (studyIndex > -1) { if (studyIndex > -1) {
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList'] var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
this.selected(fileObj[0], studyIndex, 0, true) this.selected(fileObj[0], studyIndex, 0, true)
} }
}).catch(() => { this.loading = false }) })
.catch(() => {
this.loading = false
})
}, },
selected(file, studyIndex, fileIndex, isChangeSub = false) { selected(file, studyIndex, fileIndex, isChangeSub = false) {
this.currentFileId = file.Id this.currentFileId = file.Id
this.currentStudyIndex = studyIndex this.currentStudyIndex = studyIndex
this.previewImage.imgList = this.studyList[studyIndex].NoneDicomStudyFileList this.previewImage.imgList =
this.studyList[studyIndex].NoneDicomStudyFileList
this.currentStudyFileIndex = fileIndex this.currentStudyFileIndex = fileIndex
this.previewImage.index = fileIndex this.previewImage.index = fileIndex
this.previewImage.studyCode = this.studyList[studyIndex].CodeView this.previewImage.studyCode = this.studyList[studyIndex].CodeView
@ -157,11 +180,17 @@ export default {
selectedImg(fileIndex) { selectedImg(fileIndex) {
if (this.studyList.length > 0) { if (this.studyList.length > 0) {
this.currentStudyFileIndex = fileIndex 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.index = fileIndex
this.previewImage.studyCode = this.studyList[this.currentStudyIndex].CodeView this.previewImage.studyCode =
this.previewImage.bodyPart = this.studyList[this.currentStudyIndex].BodyPart this.studyList[this.currentStudyIndex].CodeView
this.previewImage.modality = this.studyList[this.currentStudyIndex].Modality this.previewImage.bodyPart =
this.studyList[this.currentStudyIndex].BodyPart
this.previewImage.modality =
this.studyList[this.currentStudyIndex].Modality
this.$nextTick(() => { this.$nextTick(() => {
const target = document.getElementById(`img${this.currentFileId}`) const target = document.getElementById(`img${this.currentFileId}`)
const parent = document.getElementsByClassName('left-content')[0] const parent = document.getElementsByClassName('left-content')[0]
@ -171,9 +200,8 @@ export default {
}, },
preview() { preview() {
this.previewVisible = true this.previewVisible = true
} },
},
}
} }
</script> </script>
@ -246,7 +274,6 @@ export default {
cursor: pointer; cursor: pointer;
// margin-bottom: 5px; // margin-bottom: 5px;
padding-left: 5px; padding-left: 5px;
} }
.img-text { .img-text {
display: inline-block; display: inline-block;
@ -277,5 +304,4 @@ export default {
width: 100%; width: 100%;
} }
} }
</style> </style>

View File

@ -539,10 +539,11 @@
icon="el-icon-view" icon="el-icon-view"
circle circle
:disabled=" :disabled="
scope.row.uploadState.stateCode !== '' && (scope.row.uploadState.stateCode !== '' &&
scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount && scope.row.dicomInfo.fileCount &&
!scope.row.uploadState.record !scope.row.uploadState.record) ||
btnLoading
" "
:title="$t('trials:uploadedDicoms:action:preview')" :title="$t('trials:uploadedDicoms:action:preview')"
size="small" size="small"
@ -555,10 +556,11 @@
:title="$t('trials:uploadedDicoms:action:delete')" :title="$t('trials:uploadedDicoms:action:delete')"
size="small" size="small"
:disabled=" :disabled="
scope.row.uploadState.stateCode !== '' && (scope.row.uploadState.stateCode !== '' &&
scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount && scope.row.dicomInfo.fileCount &&
!scope.row.uploadState.record !scope.row.uploadState.record) ||
btnLoading
" "
@click="handleDelete(scope.$index, scope.row)" @click="handleDelete(scope.$index, scope.row)"
/> />