From 3578882ec074572e4a824ff7469f633599220471 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Tue, 31 Dec 2024 10:11:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=AD=E6=89=80=E6=9C=89pm?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=A6=81=E6=AD=A2=E7=A6=81=E7=94=A8=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=8C=85=E5=90=ABpm=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E7=A6=81=E6=AD=A2=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attachment-management/index.vue | 148 ++++++++++-------- .../personnel-manage/components/staff.vue | 12 +- 2 files changed, 87 insertions(+), 73 deletions(-) diff --git a/src/views/trials/trials-panel/attachments/attachment-management/index.vue b/src/views/trials/trials-panel/attachments/attachment-management/index.vue index a29f1082..45e9080a 100644 --- a/src/views/trials/trials-panel/attachments/attachment-management/index.vue +++ b/src/views/trials/trials-panel/attachments/attachment-management/index.vue @@ -5,7 +5,11 @@ - + - {{ $t("common:button:search") }} + {{ $t('common:button:search') }} - {{ $t("common:button:reset") }} + {{ $t('common:button:reset') }} - {{ $t("common:button:export") }} + {{ $t('common:button:export') }} @@ -156,10 +160,10 @@ > @@ -172,10 +176,10 @@ > @@ -196,10 +200,10 @@ > @@ -219,11 +223,19 @@ /> + > + + { return { - FileTypeId: "", - Name: "", - UserId: "", - UserTypeId: "", + FileTypeId: '', + Name: '', + UserId: '', + UserTypeId: '', PageIndex: 1, PageSize: 20, IsConfirmed: null, IsDeleted: null, - }; -}; + } +} export default { - name: "AttachmentsManagement", + name: 'AttachmentsManagement', components: { BaseContainer, Pagination, PreviewFile }, data() { return { @@ -310,99 +322,99 @@ export default { list: [], total: 0, currentRow: {}, - currentPath: "", - currentType: "", + currentPath: '', + currentType: '', previewVisible: false, userOptions: [], userTypeOptions: [], - currentUser: zzSessionStorage.getItem("userName"), + currentUser: zzSessionStorage.getItem('userName'), typeOptions: [], trialId: this.$route.query.trialId, exportLoading: false, - }; + } }, mounted() { - this.getTypeOptions(); - this.getUserSelect(); - this.getUserType(); - this.getList(); + this.getTypeOptions() + this.getUserSelect() + this.getUserType() + this.getList() }, methods: { handleExport() { - this.exportLoading = true; + this.exportLoading = true pMTrainingRecordList_Export(this.searchData) .then(() => { - this.exportLoading = false; + this.exportLoading = false }) .catch((err) => { - this.exportLoading = false; - }); + this.exportLoading = false + }) }, // 获取系统文件数据 getList() { - this.loading = true; - this.searchData.TrialId = this.trialId; + this.loading = true + this.searchData.TrialId = this.trialId getDocumentConfirmList(this.searchData) .then(async (res) => { - this.loading = false; - this.list = res.Result.CurrentPageData; - this.total = res.Result.TotalCount; - console.log(this.total); + this.loading = false + this.list = res.Result.CurrentPageData + this.total = res.Result.TotalCount + console.log(this.total) }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 获取文件类型下拉数据 getTypeOptions() { getTrialDocAndSystemDocType(this.trialId).then((res) => { - this.typeOptions = res.Result; - }); + this.typeOptions = res.Result + }) }, // 获取当前项目下参与者信息 getUserSelect() { getTrialUserSelect(this.trialId).then((res) => { - this.userOptions = res.Result; - }); + this.userOptions = res.Result + }) }, // 获取用户类型下拉数据 getUserType() { getTrialUserTypeList().then((res) => { - this.userTypeOptions = res.Result; - }); + this.userTypeOptions = res.Result + }) }, // 预览 handlePreview(row) { - this.currentRow = { ...row }; - const { Name, FullFilePath } = row; - this.currentPath = FullFilePath; + this.currentRow = { ...row } + const { Name, FullFilePath } = row + this.currentPath = FullFilePath this.currentType = row.Name - ? Name.substring(Name.lastIndexOf(".") + 1).toLocaleLowerCase() - : ""; - this.previewVisible = true; + ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() + : '' + this.previewVisible = true }, // 重置 handleReset() { - this.searchData = searchDataDefault(); - this.getList(); + this.searchData = searchDataDefault() + this.getList() this.$nextTick(() => { - this.$refs.AttachmentsManagement.clearSort(); - }); + this.$refs.AttachmentsManagement.clearSort() + }) }, // 查询 handleSearch() { - this.getList(); + this.getList() }, // 排序 handleSortByColumn(column) { - if (column.order === "ascending") { - this.searchData.Asc = true; + if (column.order === 'ascending') { + this.searchData.Asc = true } else { - this.searchData.Asc = false; + this.searchData.Asc = false } - this.searchData.SortField = column.prop; - this.getList(); + this.searchData.SortField = column.prop + this.getList() }, }, -}; +} diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue index e2e2d063..04421b7b 100644 --- a/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue +++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue @@ -247,7 +247,9 @@ :title="$t('trials:staff:action:status')" icon="el-icon-edit-outline" :disabled=" - hasPermi(['role:pm']) && scope.row.UserTypeEnum * 1 === 1 + scope.row.TrialUserRoleList.find( + (item) => item.UserTypeEnum === 1 + ) " @click="handleStatus(scope.row)" /> @@ -388,8 +390,8 @@ min-width="120px" > @@ -413,7 +415,7 @@ {{ $fd('IsEnable', false) }} @@ -421,7 +423,7 @@ {{ $fd('IsEnable', true) }}