上传监控修复、非dicom上传和指控下载排除自动登出
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
parent
04bd72e90f
commit
16b6f5f8b1
|
@ -367,7 +367,9 @@ async function VueInit() {
|
||||||
}
|
}
|
||||||
_vm.$store.dispatch('user/logout').then(res => {
|
_vm.$store.dispatch('user/logout').then(res => {
|
||||||
// window.location.href = `/login`
|
// window.location.href = `/login`
|
||||||
_vm.$msgbox.close();
|
if(_vm.$msgbox){
|
||||||
|
_vm.$msgbox.close();
|
||||||
|
}
|
||||||
isOpen = false
|
isOpen = false
|
||||||
isLock = null
|
isLock = null
|
||||||
zzSessionStorage.removeItem('isLock')
|
zzSessionStorage.removeItem('isLock')
|
||||||
|
|
|
@ -2,12 +2,14 @@ import JSZip from "jszip";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { saveAs } from "file-saver";
|
import { saveAs } from "file-saver";
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import store from "@/store";
|
||||||
import {
|
import {
|
||||||
requestPackageAndAnonymizImage,
|
requestPackageAndAnonymizImage,
|
||||||
} from "@/api/load.js";
|
} from "@/api/load.js";
|
||||||
let flag = {};
|
let flag = {};
|
||||||
export const resetFlag = () => {
|
export const resetFlag = () => {
|
||||||
flag = {}
|
flag = {};
|
||||||
|
store.dispatch("trials/setUnLock", false);
|
||||||
}
|
}
|
||||||
export const downloadImage = async (id, id2, IsDicom = true) => {
|
export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||||
if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
|
if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
|
||||||
|
@ -18,6 +20,7 @@ export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||||
SubjectVisitId: id2,
|
SubjectVisitId: id2,
|
||||||
IsDicom: IsDicom
|
IsDicom: IsDicom
|
||||||
}
|
}
|
||||||
|
store.dispatch("trials/setUnLock", true);
|
||||||
let res = await requestPackageAndAnonymizImage(params);
|
let res = await requestPackageAndAnonymizImage(params);
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
if (!res.Result) {
|
if (!res.Result) {
|
||||||
|
@ -153,6 +156,7 @@ export const fileDownload = (content, filename) => {
|
||||||
let download = async (downloadUrl, downloadFileName, res) => {
|
let download = async (downloadUrl, downloadFileName, res) => {
|
||||||
const blob = await getBlob(downloadUrl);
|
const blob = await getBlob(downloadUrl);
|
||||||
flag[`${res.id2}_${res.IsDicom}`] = false;
|
flag[`${res.id2}_${res.IsDicom}`] = false;
|
||||||
|
store.dispatch("trials/setUnLock", false);
|
||||||
saveAsB(blob, downloadFileName);
|
saveAsB(blob, downloadFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
// 获取非Dicom检查信息
|
// 获取非Dicom检查信息
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => {
|
getNoneDicomStudyList(this.subjectVisitId, this.studyId).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 => {
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
// 获取非Dicom检查信息
|
// 获取非Dicom检查信息
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => {
|
getNoneDicomStudyList(this.subjectVisitId, '').then(res => {
|
||||||
this.noneDicomStudyList = res.Result
|
this.noneDicomStudyList = res.Result
|
||||||
this.loading = false
|
this.loading = false
|
||||||
const study = this.noneDicomStudyList.find((item, index) => {
|
const study = this.noneDicomStudyList.find((item, index) => {
|
||||||
|
|
|
@ -412,6 +412,7 @@ import { getToken } from '@/utils/auth'
|
||||||
// import PreviewFiles from './previewFiles'
|
// import PreviewFiles from './previewFiles'
|
||||||
import uploadVideos from '@/components/videos'
|
import uploadVideos from '@/components/videos'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import store from "@/store";
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadNonDicomFiles',
|
name: 'UploadNonDicomFiles',
|
||||||
components: { uploadVideos },
|
components: { uploadVideos },
|
||||||
|
@ -470,7 +471,8 @@ export default {
|
||||||
uploadVideoVisible: false,
|
uploadVideoVisible: false,
|
||||||
trialId: this.$route.query.trialId,
|
trialId: this.$route.query.trialId,
|
||||||
moment,
|
moment,
|
||||||
BodyPart:{}
|
BodyPart:{},
|
||||||
|
studyMonitorId: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
@ -497,6 +499,12 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
btnLoading(){
|
||||||
|
store.dispatch("trials/setUnLock", this.btnLoading);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy(){
|
||||||
|
store.dispatch("trials/setUnLock", false);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化非Dicom列表数据
|
// 初始化非Dicom列表数据
|
||||||
|
@ -752,11 +760,20 @@ export default {
|
||||||
this.selectArr.forEach(item=>item.status = 0);
|
this.selectArr.forEach(item=>item.status = 0);
|
||||||
let num = this.selectArr.length > 6 ? 6 : this.selectArr.length;
|
let num = this.selectArr.length > 6 ? 6 : this.selectArr.length;
|
||||||
let funArr = [];
|
let funArr = [];
|
||||||
for (let i = 0; i < num; i++) {
|
let res = await preArchiveStudy({
|
||||||
funArr.push(this.handleUploadTask(this.selectArr, i));
|
subjectVisitId: this.subjectVisitId,
|
||||||
}
|
isDicom: false
|
||||||
if (funArr.length > 0) {
|
});
|
||||||
let res = await Promise.all(funArr);
|
if(res.IsSuccess){
|
||||||
|
this.studyMonitorId = res.Result;
|
||||||
|
for (let i = 0; i < num; i++) {
|
||||||
|
funArr.push(this.handleUploadTask(this.selectArr, i));
|
||||||
|
}
|
||||||
|
if (funArr.length > 0) {
|
||||||
|
let res = await Promise.all(funArr);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.isFail = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -814,16 +831,12 @@ export default {
|
||||||
// 非Dicom文件上传归档
|
// 非Dicom文件上传归档
|
||||||
submitFile(uploadedFileList){
|
submitFile(uploadedFileList){
|
||||||
if(!this.uploadVisible) return;
|
if(!this.uploadVisible) return;
|
||||||
preArchiveStudy({
|
|
||||||
subjectVisitId: this.subjectVisitId,
|
|
||||||
isDicom: false
|
|
||||||
}).then(res => {
|
|
||||||
this.btnLoading = true
|
this.btnLoading = true
|
||||||
var params = {
|
var params = {
|
||||||
trialId: this.trialId,
|
trialId: this.trialId,
|
||||||
subjectVisitId: this.subjectVisitId,
|
subjectVisitId: this.subjectVisitId,
|
||||||
noneDicomStudyId:this.currentRow.Id,
|
noneDicomStudyId:this.currentRow.Id,
|
||||||
studyMonitorId: res.Result,
|
studyMonitorId: this.studyMonitorId,
|
||||||
uploadedFileList: uploadedFileList
|
uploadedFileList: uploadedFileList
|
||||||
}
|
}
|
||||||
uploadNoneDicomFile(params).then(res => {
|
uploadNoneDicomFile(params).then(res => {
|
||||||
|
@ -833,7 +846,6 @@ export default {
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
this.$message.success(this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully'))
|
this.$message.success(this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully'))
|
||||||
}).catch(() => { this.btnLoading = false })
|
}).catch(() => { this.btnLoading = false })
|
||||||
})
|
|
||||||
},
|
},
|
||||||
resetFileDiaolg(){
|
resetFileDiaolg(){
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
|
|
Loading…
Reference in New Issue