diff --git a/src/permission.js b/src/permission.js index e0f2cc8f..736eb8e1 100644 --- a/src/permission.js +++ b/src/permission.js @@ -15,7 +15,7 @@ NProgress.configure({ showSpinner: false }) const whiteList = WHITELIST store.state.trials.whiteList = whiteList -router.beforeEach(async(to, from, next) => { +router.beforeEach(async (to, from, next) => { NProgress.start() // 设置页面标题 // document.title = getPageTitle(to.meta.title) store.state.trials.whiteList.indexOf(to.path) === -1 @@ -60,7 +60,7 @@ router.beforeEach(async(to, from, next) => { Vue.prototype.toPath = to.path Vue.prototype.$path = [] if (hasToken) { - if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') { + if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/link_expired' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') { if (to.path === '/ReviewersResearch') { await OSSclient() await store.dispatch('user/logout') diff --git a/src/router/index.js b/src/router/index.js index 368b8e35..7a043ddb 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -278,6 +278,11 @@ export const constantRoutes = [ component: () => import('@/views/error'), hidden: true }, + { + path: '/link_expired', + component: () => import('@/views/linkExpired'), + hidden: true + }, { path: '/404', component: () => import('@/views/404'), diff --git a/src/utils/whiteList.js b/src/utils/whiteList.js index fc95b171..aa9efec0 100644 --- a/src/utils/whiteList.js +++ b/src/utils/whiteList.js @@ -1,2 +1,2 @@ -const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] +const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/link_expired', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] export default WHITELIST diff --git a/src/views/linkExpired.vue b/src/views/linkExpired.vue new file mode 100644 index 00000000..8bf46f28 --- /dev/null +++ b/src/views/linkExpired.vue @@ -0,0 +1,273 @@ + + + + + + + + + + + + {{ $t('trials:researchForm:title:IsExpired') }}! + + + + + + + + + + diff --git a/src/views/research/login.vue b/src/views/research/login.vue index 4f5a81f0..d2131e8d 100644 --- a/src/views/research/login.vue +++ b/src/views/research/login.vue @@ -229,9 +229,13 @@ export default { } let res = await getLinkLinkExpirationTime(data) if (res.IsSuccess) { - if (res.Result.IsExpired) return this.$confirm(this.$t("trials:researchForm:confirm:linkIsExpired"), '', { - type: 'warning' - }) + if (res.Result.IsExpired) { + return this.$router.replace('/link_expired') + // return this.$confirm(this.$t("trials:researchForm:confirm:linkIsExpired"), '', { + // type: 'warning' + // }) + // return this.IsExpired = true + } this.customPrompt() } } catch (err) { diff --git a/src/views/trials/trials-panel/attachments/site-research/index.vue b/src/views/trials/trials-panel/attachments/site-research/index.vue index b9b90924..d0592e96 100644 --- a/src/views/trials/trials-panel/attachments/site-research/index.vue +++ b/src/views/trials/trials-panel/attachments/site-research/index.vue @@ -491,7 +491,7 @@ export default { // 中心调研表链接 this.$copyText( `${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink - }\n${this.$t('trials:researchRecord:label:linkVerificationCode')}:${this.LinkVerificationCode}\n${this.$t('trials:researchRecord:label:ValidityPeriod')}:${this.validityPeriod}` + }\n${this.$t('trials:researchRecord:label:linkVerificationCode')}${this.LinkVerificationCode}\n${this.$t('trials:researchRecord:label:ValidityPeriod')}${this.validityPeriod}` ) .then((res) => { // 复制成功