From d3afa7b676d108959c0738bceb9564772d0bc991 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 23 Jan 2025 18:18:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=88=97=E8=A1=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BF=AB=E6=8D=B7=E8=B7=B3=E8=BD=AC=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/trials/trials-panel/site/index.vue | 53 +++++++++++++++++-- .../subject/subject-list/index.vue | 7 ++- .../trials-panel/visit/crc-upload/index.vue | 7 ++- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/src/views/trials/trials-panel/site/index.vue b/src/views/trials/trials-panel/site/index.vue index f5dda6db..bf9e1e62 100644 --- a/src/views/trials/trials-panel/site/index.vue +++ b/src/views/trials/trials-panel/site/index.vue @@ -83,7 +83,18 @@ :label="$t('trials:site:table:subjects')" show-overflow-tooltip sortable="custom" - /> + > + + + > + + { return r.name === 'Trials' }) + const trialsPanelRouter = trialsRouter.children.find(r => { return r.name === 'TrialsPanel' }).children + this.hasSubjectRoute = this.hasRoute('subject-list', trialsPanelRouter) + this.hasVisitRoute = this.hasRoute('crc-upload', trialsPanelRouter) this.getList() }, methods: { @@ -273,6 +300,26 @@ export default { this.searchData.PageIndex = 1 this.getList() }, + jumpToSubjectList(trialSiteId) { + this.$router.push({ path: `/trials/trials-panel/subject/subject-list?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&trialSiteId=${trialSiteId}` }) + }, + jumpToVisitList(trialSiteId) { + this.$router.push({ path: `/trials/trials-panel/visit/crc-upload?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&trialSiteId=${trialSiteId}` }) + }, + hasRoute(name, routeList) { + for (let i = 0; i < routeList.length; i++) { + if (routeList[i].name === name) { + return true + } + if (routeList[i].children) { + const flag = this.hasRoute(name, routeList[i].children) + if (flag) { + return flag + } + } + } + return false + } }, } diff --git a/src/views/trials/trials-panel/subject/subject-list/index.vue b/src/views/trials/trials-panel/subject/subject-list/index.vue index 8da20979..dce76874 100644 --- a/src/views/trials/trials-panel/subject/subject-list/index.vue +++ b/src/views/trials/trials-panel/subject/subject-list/index.vue @@ -291,6 +291,7 @@ import SubjectsForm from './components/SubjectsForm' import SubjectStatusForm from './components/SubjectStatusForm' import MessageTable from './components/MessageTable' import moment from 'moment' +import { changeURLStatic } from '@/utils/history.js' const searchDataDefault = () => { return { Code: '', @@ -339,6 +340,10 @@ export default { this.hasCrcRoute = this.hasRoute('crc-upload', trialsPanelRouter) this.hasQCRoute = this.hasRoute('qc-check', trialsPanelRouter) this.trialId = this.$route.query.trialId + if (this.$route.query.trialSiteId) { + this.searchData.TrialSiteId = this.$route.query.trialSiteId + changeURLStatic('trialSiteId', '') + } this.getSite() this.getList() }, @@ -441,7 +446,7 @@ export default { // 关闭状态编辑框 closeStatusDialog() { this.statusVisible = false - }, + }, handleTotalVisitCount(subjectCode) { if (this.hasCrcRoute) { this.$router.push({ path: `/trials/trials-panel/visit/crc-upload?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&subjectCode=${subjectCode}` }) diff --git a/src/views/trials/trials-panel/visit/crc-upload/index.vue b/src/views/trials/trials-panel/visit/crc-upload/index.vue index bf178718..725cefbb 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/index.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/index.vue @@ -1680,8 +1680,13 @@ export default { this.getSite() if (this.$route.query.subjectCode) { this.searchData.SubjectInfo = this.$route.query.subjectCode + changeURLStatic('subjectCode', '') + } + + if (this.$route.query.trialSiteId) { + this.searchData.TrialSiteId = this.$route.query.trialSiteId + changeURLStatic('trialSiteId', '') } - changeURLStatic('subjectCode', '') this.TrialCode = this.$route.query.trialCode this.getList() this.getVisitPlanOptions()