From d7fcd79cb2cfbaa3b6349c2daf929cfc379dd5d7 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 17 Jul 2024 19:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/uploadZip.js | 4 ++++ .../visit/qc-check/components/qualityAssurance.vue | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils/uploadZip.js b/src/utils/uploadZip.js index 45e3063a..657e190f 100644 --- a/src/utils/uploadZip.js +++ b/src/utils/uploadZip.js @@ -6,6 +6,9 @@ import { requestPackageAndAnonymizImage, } from "@/api/load.js"; let flag = {}; +export const resetFlag = () => { + flag = {} +} export const downloadImage = async (id, id2, IsDicom = true) => { if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading')); flag[`${id2}_${IsDicom}`] = true @@ -18,6 +21,7 @@ export const downloadImage = async (id, id2, IsDicom = true) => { let res = await requestPackageAndAnonymizImage(params); if (res.IsSuccess) { if (!res.Result) { + flag[`${res.id2}_${res.IsDicom}`] = false; Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not")) return 1; } diff --git a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue index e08ec6e5..3b1dc947 100644 --- a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue +++ b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue @@ -1218,7 +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"; +import { downloadImage , resetFlag } from "@/utils/uploadZip.js"; export default { name: "QualityAssurance", components: { @@ -1331,6 +1331,9 @@ export default { BodyPart: {}, }; }, + beforeDestroy(){ + resetFlag(); + }, async mounted() { this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId); if (this.disabled) {