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) {