iqc下载文件
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fd0679dbd8
commit
c94abac896
|
@ -3675,3 +3675,11 @@ export function getTrialSiteSelectList(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
// 获取项目配置
|
||||
export function getTrialExtralConfig(params) {
|
||||
return request({
|
||||
url: `/TrialConfig/getTrialExtralConfig`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6,13 +6,20 @@ import 'nprogress/nprogress.css'
|
|||
import { getToken } from '@/utils/auth'
|
||||
import Vue from 'vue'
|
||||
import { OSSclient } from './utils/oss'
|
||||
import { getTrialExtralConfig } from "@/api/trials"
|
||||
// import getPageTitle from '@/utils/get-page-title'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||
|
||||
router.beforeEach(async(to, from, next) => {
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
if (to.query.trialId && to.query.trialId !== store.state.trials.config.trialId) {
|
||||
let res = await getTrialExtralConfig({ TrialId: to.query.trialId });
|
||||
if (res.IsSuccess) {
|
||||
store.dispatch('trials/setConfig', { trialId: to.query.trialId, ...res.Result });
|
||||
}
|
||||
}
|
||||
NProgress.start()
|
||||
// 设置页面标题
|
||||
// document.title = getPageTitle(to.meta.title)
|
||||
|
@ -56,7 +63,7 @@ router.beforeEach(async(to, from, next) => {
|
|||
/* has no token*/
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading'){
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
OSSclient()
|
||||
}
|
||||
next()
|
||||
|
|
|
@ -8,6 +8,7 @@ const getDefaultState = () => {
|
|||
visitPointQuery: null,
|
||||
studyListQuery: null,
|
||||
unlock: false,
|
||||
config: {},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +21,9 @@ const mutations = {
|
|||
SET_UNLOCK: (state, unlock) => {
|
||||
state.unlock = unlock
|
||||
},
|
||||
SET_CONFIG: (state, config) => {
|
||||
state.config = config
|
||||
},
|
||||
SET_ACTIVENAME: (state, activeName) => {
|
||||
state.trialDetailActiveName = activeName
|
||||
},
|
||||
|
@ -44,6 +48,9 @@ const actions = {
|
|||
setUnLock({ commit }, unlock) {
|
||||
commit('SET_UNLOCK', unlock)
|
||||
},
|
||||
setConfig({ commit }, config) {
|
||||
commit('SET_CONFIG', config)
|
||||
},
|
||||
setActiveName({ commit }, activeName) {
|
||||
commit('SET_ACTIVENAME', activeName)
|
||||
},
|
||||
|
|
|
@ -6,16 +6,17 @@ import {
|
|||
requestPackageAndAnonymizImage,
|
||||
} from "@/api/load.js";
|
||||
let flag = {};
|
||||
export const downloadImage = async (id, id2) => {
|
||||
if (flag[id2]) return
|
||||
flag[id2] = true
|
||||
export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||
if (flag[`${id2}_${IsDicom}`]) return
|
||||
flag[`${id2}_${IsDicom}`] = true
|
||||
try {
|
||||
let params = {
|
||||
TrialId: id,
|
||||
SubjectVisitId: id2
|
||||
SubjectVisitId: id2,
|
||||
IsDicom: IsDicom
|
||||
}
|
||||
let res = await requestPackageAndAnonymizImage(params);
|
||||
flag[id2] = false;
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
if (res.IsSuccess) {
|
||||
if (!res.Result) {
|
||||
Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
||||
|
@ -23,9 +24,9 @@ export const downloadImage = async (id, id2) => {
|
|||
}
|
||||
let a = document.createElement("a");
|
||||
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||
let fileName =
|
||||
res.Result.split("/")[res.Result.split("/").length - 1];
|
||||
a.download = fileName;
|
||||
// let fileName =
|
||||
// res.Result.split("/")[res.Result.split("/").length - 1];
|
||||
a.download = res.OtherInfo.fileName;
|
||||
a.href = href;
|
||||
a.click();
|
||||
URL.revokeObjectURL(href);
|
||||
|
@ -39,7 +40,7 @@ export const downloadImage = async (id, id2) => {
|
|||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
flag[id2] = false;
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
|
@ -101,11 +102,11 @@ const setfolder = async (item) => {
|
|||
})
|
||||
.then((res) => {
|
||||
saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义
|
||||
flag[id2] = false;
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
zipObj = null;
|
||||
});
|
||||
})
|
||||
.catch((reason) => { flag[id2] = false; });
|
||||
.catch((reason) => { flag[`${id2}_${IsDicom}`] = false; });
|
||||
};
|
||||
const handleBatchDown = async (item, zip) => {
|
||||
return new Promise((resolve) => {
|
||||
|
|
|
@ -43,6 +43,16 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<div style="text-align: right">
|
||||
<!-- 下载所有影像 -->
|
||||
<el-button
|
||||
v-if="$store.state.trials.config.IsSupportQCDownloadImage"
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left: 10px"
|
||||
@click="downloadImage(true)"
|
||||
>
|
||||
{{ $t("trials:audit:button:downLoadAllDiocms") }}
|
||||
</el-button>
|
||||
<!-- 预览所有影像 -->
|
||||
<el-button
|
||||
size="small"
|
||||
|
@ -285,6 +295,16 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<div style="text-align: right">
|
||||
<!-- 下载所有影像 -->
|
||||
<el-button
|
||||
v-if="$store.state.trials.config.IsSupportQCDownloadImage"
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left: 10px"
|
||||
@click="downloadImage(false)"
|
||||
>
|
||||
{{ $t("trials:audit:button:downLoadAllNonDiocms") }}
|
||||
</el-button>
|
||||
<!-- 预览 -->
|
||||
<el-button
|
||||
size="small"
|
||||
|
@ -1198,6 +1218,7 @@ import SignForm from "@/views/trials/components/newSignForm";
|
|||
import { getToken } from "@/utils/auth";
|
||||
import const_ from "@/const/sign-code";
|
||||
import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
|
||||
import { downloadImage } from "@/utils/uploadZip.js";
|
||||
export default {
|
||||
name: "QualityAssurance",
|
||||
components: {
|
||||
|
@ -1332,6 +1353,18 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 打包下载
|
||||
async downloadImage(IsDicom) {
|
||||
try {
|
||||
await downloadImage(
|
||||
this.$route.query.trialId,
|
||||
this.data.Id,
|
||||
IsDicom
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 获取QC界面基本信息
|
||||
getQCInfo() {
|
||||
this.loading = true;
|
||||
|
|
Loading…
Reference in New Issue