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
|
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 { getToken } from '@/utils/auth'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { OSSclient } from './utils/oss'
|
import { OSSclient } from './utils/oss'
|
||||||
|
import { getTrialExtralConfig } from "@/api/trials"
|
||||||
// import getPageTitle from '@/utils/get-page-title'
|
// import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
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']
|
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()
|
NProgress.start()
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
// document.title = getPageTitle(to.meta.title)
|
// document.title = getPageTitle(to.meta.title)
|
||||||
|
@ -56,7 +63,7 @@ router.beforeEach(async(to, from, next) => {
|
||||||
/* has no token*/
|
/* has no token*/
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录whiteList中,直接进入
|
// 在免登录whiteList中,直接进入
|
||||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading'){
|
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||||
OSSclient()
|
OSSclient()
|
||||||
}
|
}
|
||||||
next()
|
next()
|
||||||
|
@ -68,7 +75,7 @@ router.beforeEach(async(to, from, next) => {
|
||||||
next(`/ReviewersResearch?`)
|
next(`/ReviewersResearch?`)
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
// 其他无权访问的页面将重定向到登录页面。
|
// 其他无权访问的页面将重定向到登录页面。
|
||||||
next(`/login?`)
|
next(`/login?`)
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ const getDefaultState = () => {
|
||||||
visitPointQuery: null,
|
visitPointQuery: null,
|
||||||
studyListQuery: null,
|
studyListQuery: null,
|
||||||
unlock: false,
|
unlock: false,
|
||||||
|
config: {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +21,9 @@ const mutations = {
|
||||||
SET_UNLOCK: (state, unlock) => {
|
SET_UNLOCK: (state, unlock) => {
|
||||||
state.unlock = unlock
|
state.unlock = unlock
|
||||||
},
|
},
|
||||||
|
SET_CONFIG: (state, config) => {
|
||||||
|
state.config = config
|
||||||
|
},
|
||||||
SET_ACTIVENAME: (state, activeName) => {
|
SET_ACTIVENAME: (state, activeName) => {
|
||||||
state.trialDetailActiveName = activeName
|
state.trialDetailActiveName = activeName
|
||||||
},
|
},
|
||||||
|
@ -44,6 +48,9 @@ const actions = {
|
||||||
setUnLock({ commit }, unlock) {
|
setUnLock({ commit }, unlock) {
|
||||||
commit('SET_UNLOCK', unlock)
|
commit('SET_UNLOCK', unlock)
|
||||||
},
|
},
|
||||||
|
setConfig({ commit }, config) {
|
||||||
|
commit('SET_CONFIG', config)
|
||||||
|
},
|
||||||
setActiveName({ commit }, activeName) {
|
setActiveName({ commit }, activeName) {
|
||||||
commit('SET_ACTIVENAME', activeName)
|
commit('SET_ACTIVENAME', activeName)
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,16 +6,17 @@ import {
|
||||||
requestPackageAndAnonymizImage,
|
requestPackageAndAnonymizImage,
|
||||||
} from "@/api/load.js";
|
} from "@/api/load.js";
|
||||||
let flag = {};
|
let flag = {};
|
||||||
export const downloadImage = async (id, id2) => {
|
export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||||
if (flag[id2]) return
|
if (flag[`${id2}_${IsDicom}`]) return
|
||||||
flag[id2] = true
|
flag[`${id2}_${IsDicom}`] = true
|
||||||
try {
|
try {
|
||||||
let params = {
|
let params = {
|
||||||
TrialId: id,
|
TrialId: id,
|
||||||
SubjectVisitId: id2
|
SubjectVisitId: id2,
|
||||||
|
IsDicom: IsDicom
|
||||||
}
|
}
|
||||||
let res = await requestPackageAndAnonymizImage(params);
|
let res = await requestPackageAndAnonymizImage(params);
|
||||||
flag[id2] = false;
|
flag[`${id2}_${IsDicom}`] = false;
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
if (!res.Result) {
|
if (!res.Result) {
|
||||||
Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
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 a = document.createElement("a");
|
||||||
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||||
let fileName =
|
// let fileName =
|
||||||
res.Result.split("/")[res.Result.split("/").length - 1];
|
// res.Result.split("/")[res.Result.split("/").length - 1];
|
||||||
a.download = fileName;
|
a.download = res.OtherInfo.fileName;
|
||||||
a.href = href;
|
a.href = href;
|
||||||
a.click();
|
a.click();
|
||||||
URL.revokeObjectURL(href);
|
URL.revokeObjectURL(href);
|
||||||
|
@ -39,7 +40,7 @@ export const downloadImage = async (id, id2) => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
flag[id2] = false;
|
flag[`${id2}_${IsDicom}`] = false;
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -101,11 +102,11 @@ const setfolder = async (item) => {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义
|
saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义
|
||||||
flag[id2] = false;
|
flag[`${id2}_${IsDicom}`] = false;
|
||||||
zipObj = null;
|
zipObj = null;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((reason) => { flag[id2] = false; });
|
.catch((reason) => { flag[`${id2}_${IsDicom}`] = false; });
|
||||||
};
|
};
|
||||||
const handleBatchDown = async (item, zip) => {
|
const handleBatchDown = async (item, zip) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|
|
@ -43,6 +43,16 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="text-align: right">
|
<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
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -285,6 +295,16 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="text-align: right">
|
<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
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -1198,6 +1218,7 @@ import SignForm from "@/views/trials/components/newSignForm";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import const_ from "@/const/sign-code";
|
import const_ from "@/const/sign-code";
|
||||||
import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
|
import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
|
||||||
|
import { downloadImage } from "@/utils/uploadZip.js";
|
||||||
export default {
|
export default {
|
||||||
name: "QualityAssurance",
|
name: "QualityAssurance",
|
||||||
components: {
|
components: {
|
||||||
|
@ -1332,6 +1353,18 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 打包下载
|
||||||
|
async downloadImage(IsDicom) {
|
||||||
|
try {
|
||||||
|
await downloadImage(
|
||||||
|
this.$route.query.trialId,
|
||||||
|
this.data.Id,
|
||||||
|
IsDicom
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取QC界面基本信息
|
// 获取QC界面基本信息
|
||||||
getQCInfo() {
|
getQCInfo() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
Loading…
Reference in New Issue