From fb7891a2afa9126b109169c829048a7b9d272d76 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 6 Mar 2025 13:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=87=E6=A1=A3=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/trials/trials-list/index.vue | 111 ++++++++++++------ .../components/fileRecord/index.vue | 15 +-- .../trial-document/components/menu.vue | 45 ++++++- .../components/report_doc/index.vue | 15 +-- .../components/template/index.vue | 73 +++++++----- .../components/trainRecord/index.vue | 16 +-- .../trial-summary/trial-document/index.vue | 17 ++- 7 files changed, 185 insertions(+), 107 deletions(-) diff --git a/src/views/trials/trials-list/index.vue b/src/views/trials/trials-list/index.vue index 578850d7..c207b7a4 100644 --- a/src/views/trials/trials-list/index.vue +++ b/src/views/trials/trials-list/index.vue @@ -72,7 +72,7 @@ - {{ $t("common:button:search") }} + {{ $t('common:button:search') }} - {{ $t("common:button:reset") }} + {{ $t('common:button:reset') }} - {{ $t("common:button:export") }} + {{ $t('common:button:export') }} @@ -102,7 +102,7 @@ type="primary" @click="handleNew" > - {{ $t("common:button:new") }} + {{ $t('common:button:new') }} @@ -293,10 +293,9 @@ - Search + Search Reset Back @@ -358,19 +357,23 @@ {{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }} + >{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }} {{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }} + >{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }} {{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }} + >{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }} {{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }} + >{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }} + @@ -690,7 +711,7 @@ import { abandonTrial, ifTrialCanOngoing, - getTrialToBeDoneList + getTrialToBeDoneList, } from '@/api/trials' import { getTrialList_Export } from '@/api/export' import store from '@/store' @@ -721,7 +742,7 @@ const searchDataDefault = () => { Asc: false, SortField: '', CriterionType: null, - PM_EMail: null + PM_EMail: null, } } export default { @@ -731,7 +752,7 @@ export default { BaseContainer, TrialForm, TrialStatusForm, - DoneList + DoneList, }, dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'], data() { @@ -756,7 +777,7 @@ export default { { value: 'I' }, { value: 'II' }, { value: 'III' }, - { value: 'IV' } + { value: 'IV' }, ], expeditedOption: this.$d.TrialExpeditedState, beginPickerOption: { @@ -766,7 +787,7 @@ export default { } else { return time.getTime() > Date.now() } - } + }, }, endpickerOption: { disabledDate: (time) => { @@ -778,20 +799,20 @@ export default { } else { return time.getTime() > Date.now() } - } - } + }, + }, } }, computed: { - ...mapGetters(['sponsorList', 'croList']) + ...mapGetters(['sponsorList', 'croList']), }, created() { this.initPage() }, - mounted(){ - this.$EventBus.$on("reload", (data) => { + mounted() { + this.$EventBus.$on('reload', (data) => { window.location.reload() - }); + }) }, methods: { initPage() { @@ -864,7 +885,7 @@ export default { this.$confirm(res.ErrorMessage, { type: 'warning', showCancelButton: false, - callback: (action) => {} + callback: (action) => {}, }) } }) @@ -883,7 +904,7 @@ export default { handleAbandon(row) { this.$confirm(this.$t('trials:trials-list:message:abolition'), { type: 'warning', - distinguishCancelAndClose: true + distinguishCancelAndClose: true, }) .then(() => { this.currentRow = { ...row } @@ -909,19 +930,37 @@ export default { }) }, rowClick(row, col) { - if ((row.TrialStatusStr === 'Initializing' && !this.hasPermi(['role:pm'])) || row.IsDeleted) { + if ( + (row.TrialStatusStr === 'Initializing' && + !this.hasPermi(['role:pm'])) || + row.IsDeleted + ) { return - } else if ((row.TrialStatusStr === 'Completed' || row.TrialStatusStr === 'Stopped') && !(this.hasPermi(['role:qa']) || this.hasPermi(['role:ea']) || this.hasPermi(['role:pm']))) { + } else if ( + (row.TrialStatusStr === 'Completed' || + row.TrialStatusStr === 'Stopped') && + !( + this.hasPermi(['role:qa']) || + this.hasPermi(['role:ea']) || + this.hasPermi(['role:pm']) + ) + ) { return } this.$router.push({ - path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` + path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`, }) }, // panel handleDetail(row) { this.$router.push({ - path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` + path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`, + }) + }, + // 跳转至项目文档 + toTrialDocument(row) { + this.$router.push({ + path: `/trials/trials-panel/trial-summary/trial-document?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`, }) }, // 获取已勾选行数据 @@ -951,7 +990,7 @@ export default { handleExportTrial() { this.exportLoading = true const data = { - ...this.searchData + ...this.searchData, } data.TrialIdList = this.selectArr.map((item) => item.Id) return getTrialList_Export(data) @@ -961,7 +1000,7 @@ export default { .catch(() => { this.exportLoading = false }) - } - } + }, + }, } diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/fileRecord/index.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/fileRecord/index.vue index 06d18c9a..2da2a846 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/fileRecord/index.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/fileRecord/index.vue @@ -3,7 +3,7 @@
{{ TITLE }}
- + @@ -47,7 +46,6 @@ +
{ + this.defaultSelect() + }) } } catch (err) { this.loading = false console.log(err) } }, + defaultSelect() { + if (!this.menu || this.menu.length <= 0) return false + if (this.menuId) { + let Id = this.menuId + let f = this.menu.some((item) => { + let flag = false + if (item.TrialFileTypeList && item.TrialFileTypeList.length > 0) { + flag = item.TrialFileTypeList.some((data) => { + if (data.Id === Id) { + this.$emit('update:menuId', null) + this.$nextTick(() => { + this.handleSelect(data, item.ArchiveTypeEnum) + }) + } + return data.Id === Id + }) + } + return flag + }) + if (!f) { + this.$emit('update:menuId', null) + this.$nextTick(() => { + this.defaultSelect() + }) + } + } else { + this.menu.some((item) => { + if (item.TrialFileTypeList && item.TrialFileTypeList.length > 0) { + this.handleSelect(item.TrialFileTypeList[0], item.ArchiveTypeEnum) + } + return item.TrialFileTypeList && item.TrialFileTypeList.length > 0 + }) + } + }, // 修改菜单启用 async changeIsEnble(val, item) { try { @@ -242,7 +279,7 @@ export default { }, // 选中 handleSelect(data, ArchiveTypeEnum) { - this.$emit('update:Id', data.Id) + this.$emit('update:menuId', data.Id) this.$emit('update:SubIdentificationEnum', data.SubIdentificationEnum) this.$emit('update:ArchiveTypeEnum', ArchiveTypeEnum) this.$emit('update:rowData', data) diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/index.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/index.vue index 8a428c52..1456f37c 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/index.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/index.vue @@ -3,7 +3,7 @@
{{ TITLE }}
- + @@ -52,7 +52,6 @@ @@ -60,7 +59,6 @@ +