From 19c2c4eecba0aab949740d907101a5fcea25baac Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 1 Jul 2024 11:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E4=B8=8A=E4=BC=A0=E4=B8=8D?= =?UTF-8?q?=E8=AE=B0=E5=85=A5=E7=94=A8=E6=88=B7=E9=94=81=E5=AE=9A=E5=92=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/uploadImage/components/upload-list.vue | 3 +++ src/main.js | 6 +++--- src/store/modules/trials.js | 9 ++++++++- .../visit/crc-upload/components/uploadDicomFiles2.vue | 9 ++++++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/uploadImage/components/upload-list.vue b/src/components/uploadImage/components/upload-list.vue index b79aa1eb..2968add8 100644 --- a/src/components/uploadImage/components/upload-list.vue +++ b/src/components/uploadImage/components/upload-list.vue @@ -224,6 +224,7 @@ import { addOrUpdateArchiveTaskStudy, } from "@/api/load.js"; import { parseDicom, getThumbnail, dicomToOSS } from "@/utils/parseDicom.js"; +import store from "@/store"; export default { name: "uploadList", props: { @@ -262,6 +263,7 @@ export default { }, watch: { isLoad() { + store.dispatch("trials/setUnLock", this.isLoad); if (!this.isLoad) { this.$refs.file.value = null; if (this.dicomList.some((item) => item.isUpload === 3)) { @@ -747,6 +749,7 @@ export default { }, beforeDestroy() { this.isClose = true; + store.dispatch("trials/setUnLock", false); }, }; diff --git a/src/main.js b/src/main.js index 4a99cc45..ae280b4c 100644 --- a/src/main.js +++ b/src/main.js @@ -368,7 +368,7 @@ async function VueInit() { window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME; waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' - if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { + if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { count = 0; localStorage.setItem('count', '0') return @@ -387,9 +387,9 @@ async function VueInit() { }) } : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME, - eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => { + eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => { var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' - if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { + if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') { count = 0; localStorage.setItem('count', '0') if (_vm.$route.path === '/login') { diff --git a/src/store/modules/trials.js b/src/store/modules/trials.js index 55cf5563..ed8ba8e1 100644 --- a/src/store/modules/trials.js +++ b/src/store/modules/trials.js @@ -6,7 +6,8 @@ const getDefaultState = () => { subjectQuery: null, visitPlanQuery: null, visitPointQuery: null, - studyListQuery: null + studyListQuery: null, + unlock: false, } } @@ -16,6 +17,9 @@ const mutations = { RESET_TRIALS: (state) => { Object.assign(state, getDefaultState()) }, + SET_UNLOCK: (state, unlock) => { + state.unlock = unlock + }, SET_ACTIVENAME: (state, activeName) => { state.trialDetailActiveName = activeName }, @@ -37,6 +41,9 @@ const mutations = { } const actions = { + setUnLock({ commit }, unlock) { + commit('SET_UNLOCK', unlock) + }, setActiveName({ commit }, activeName) { commit('SET_ACTIVENAME', activeName) }, diff --git a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue index b3fb0e59..823b7ba5 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue @@ -757,6 +757,7 @@ import { getToken } from "@/utils/auth"; import { dcmUpload } from "@/utils/dcmUpload/dcmUpload"; import { convertBytes } from "@/utils/dicom-character-set"; import moment from "moment"; +import store from "@/store"; export default { name: "UploadDicomFiles", components: { DicomPreview, uploadPetClinicalData }, @@ -827,6 +828,11 @@ export default { BodyPart: {}, }; }, + watch: { + btnLoading() { + store.dispatch("trials/setUnLock", this.btnLoading); + }, + }, async mounted() { this.trialId = this.$route.query.trialId; this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId); @@ -841,6 +847,7 @@ export default { clearInterval(v); }); this.myInterval = []; + store.dispatch("trials/setUnLock", false); }, methods: { handleHistorical(row) { @@ -1968,7 +1975,7 @@ export default { } var arr = bodyPart.split(separator); var newArr = arr.map((i) => { - return this.$fd("Bodypart", i.trim(), "Code", this.BodyPart,'Name'); + return this.$fd("Bodypart", i.trim(), "Code", this.BodyPart, "Name"); }); return newArr.join(" | "); },