上传下载问题修复
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({
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}&visitTaskId=${visitTaskId}`,
method: 'get'
})
}

View File

@ -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>

View File

@ -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>

View File

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

View File

@ -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')
},

View File

@ -13,7 +13,10 @@
<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">
@ -22,7 +25,7 @@
: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)"
@ -39,21 +42,25 @@
</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 => {
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 => {
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 })
})
.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,9 +200,8 @@ export default {
},
preview() {
this.previewVisible = true
}
}
},
},
}
</script>
@ -246,7 +274,6 @@ export default {
cursor: pointer;
// margin-bottom: 5px;
padding-left: 5px;
}
.img-text {
display: inline-block;
@ -277,5 +304,4 @@ export default {
width: 100%;
}
}
</style>

View File

@ -539,10 +539,11 @@
icon="el-icon-view"
circle
:disabled="
scope.row.uploadState.stateCode !== '' &&
(scope.row.uploadState.stateCode !== '' &&
scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount &&
!scope.row.uploadState.record
!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.uploadState.stateCode !== '' &&
scope.row.dicomInfo.failedFileCount <
scope.row.dicomInfo.fileCount &&
!scope.row.uploadState.record
!scope.row.uploadState.record) ||
btnLoading
"
@click="handleDelete(scope.$index, scope.row)"
/>