上传监控修复、非dicom上传和指控下载排除自动登出
continuous-integration/drone/push Build was killed

This commit is contained in:
DESKTOP-6C3NK6N\WXS
2024-07-19 10:14:20 +08:00
parent 04bd72e90f
commit 16b6f5f8b1
5 changed files with 34 additions and 16 deletions
+5 -1
View File
@@ -2,12 +2,14 @@ import JSZip from "jszip";
import axios from "axios";
import { saveAs } from "file-saver";
import Vue from 'vue';
import store from "@/store";
import {
requestPackageAndAnonymizImage,
} from "@/api/load.js";
let flag = {};
export const resetFlag = () => {
flag = {}
flag = {};
store.dispatch("trials/setUnLock", false);
}
export const downloadImage = async (id, id2, IsDicom = true) => {
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,
IsDicom: IsDicom
}
store.dispatch("trials/setUnLock", true);
let res = await requestPackageAndAnonymizImage(params);
if (res.IsSuccess) {
if (!res.Result) {
@@ -153,6 +156,7 @@ export const fileDownload = (content, filename) => {
let download = async (downloadUrl, downloadFileName, res) => {
const blob = await getBlob(downloadUrl);
flag[`${res.id2}_${res.IsDicom}`] = false;
store.dispatch("trials/setUnLock", false);
saveAsB(blob, downloadFileName);
}