质控下载工具
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-08-12 14:44:52 +08:00
parent bf985bcbc8
commit d1448d4cc6
3 changed files with 46 additions and 2 deletions

View File

@ -281,7 +281,13 @@ export function getCommonDocumentList(param) {
data: param
})
}
export function getCommonDocument(param) {
return request({
url: `/CommonDocument/getCommonDocument`,
method: 'get',
params: param
})
}
export function addOrUpdateCommonDocument(param) {
return request({
url: `/CommonDocument/addOrUpdateCommonDocument`,

View File

@ -184,7 +184,7 @@ export default {
async handleDownload(row) {
try {
this.loading = true
let fileName = this.isEN ? row.PathName : row.NameCN;
let fileName = this.isEN ? row.Name : row.NameCN;
let type = fileName
.substring(fileName.lastIndexOf('.'))
.toLocaleLowerCase()

View File

@ -53,6 +53,14 @@
style="margin-left: 10px" @click="getCRCUploadedStudyInfo('dicom')">
{{ $t('trials:audit:button:downLoadAllDiocms') }}
</el-button>
<!-- 下载工具 -->
<el-button v-if="
$store.state.trials.config.IsSupportQCDownloadImage &&
!hasPermi(['role:spm'])
" :loading="downloading" size="small" type="primary" style="margin-left: 10px"
@click="getCRCUploadedStudyInfo('tools')">
{{ $t('trials:audit:button:downLoadTools') }}
</el-button>
<!-- 预览所有影像 -->
<el-button size="small" type="primary" style="margin-left: 10px" @click="handleViewImages">
{{ $t('trials:audit:button:previewAllDiocms') }}
@ -933,6 +941,9 @@ import const_ from '@/const/sign-code'
import uploadPetClinicalData from '@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue'
import { downLoadFile } from '@/utils/stream.js'
import { getCRCUploadedStudyInfo, downloadImageSuccess } from '@/api/load.js'
import {
getCommonDocument,
} from '@/api/dictionary'
import store from '@/store'
export default {
name: 'QualityAssurance',
@ -1126,6 +1137,9 @@ export default {
NoneDicomStudyIdList: [],
DicomStudyIdList: [],
}
if (type === 'tools') {
return this.handleDownload()
}
if (type === 'dicom') {
data.DicomStudyIdList = this.selectTableDicom.map(
(item) => item.StudyId
@ -1149,6 +1163,30 @@ export default {
console.log(err)
}
},
//
async handleDownload() {
try {
this.downloading = true
let res = await getCommonDocument({ Code: 'TrialImageConvert_Soft' })
if (res.IsSuccess) {
let row = res.Result
let fileName = this.isEN ? row.Name : row.NameCN;
let type = fileName
.substring(fileName.lastIndexOf('.'))
.toLocaleLowerCase()
if (!type) {
let extendName = row.Path
.substring(row.Path.lastIndexOf('.'))
.toLocaleLowerCase()
fileName += extendName
}
res = await downLoadFile(this.OSSclientConfig.basePath + row.Path, fileName)
}
this.downloading = false
} catch (err) {
this.downloading = false
}
},
//
async downloadImage(data, type) {
try {