From 2ed3dd137602d987d443a5c017dbb2a16d0a290c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Fri, 8 Mar 2024 14:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reviewers/components/Agreements.vue | 2 +- src/views/system/notice/components/from.vue | 2 +- src/views/system/user/components/UserInfo.vue | 18 ++++++++++++++++++ src/views/system/user/list/index.vue | 6 +++--- .../attachments/SPMEnrollment/index.vue | 4 ++-- .../attachments/enrollment/index.vue | 4 ++-- 6 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/views/reviewers/components/Agreements.vue b/src/views/reviewers/components/Agreements.vue index c8a72918..70ddc037 100644 --- a/src/views/reviewers/components/Agreements.vue +++ b/src/views/reviewers/components/Agreements.vue @@ -64,7 +64,7 @@ {{$t('trials:enrolledReviews:message:EQC')}} - Upload + {{$t('common:button:upload')}} diff --git a/src/views/system/notice/components/from.vue b/src/views/system/notice/components/from.vue index 65ede6ed..cc08001e 100644 --- a/src/views/system/notice/components/from.vue +++ b/src/views/system/notice/components/from.vue @@ -5,7 +5,7 @@ ref="NoticeForm" :model="form" :rules="rules" - label-width="120px" + label-width="180px" size="small" > diff --git a/src/views/system/user/components/UserInfo.vue b/src/views/system/user/components/UserInfo.vue index e126cfd6..af0286b4 100644 --- a/src/views/system/user/components/UserInfo.vue +++ b/src/views/system/user/components/UserInfo.vue @@ -105,11 +105,29 @@ export default { } }, methods: { + updateQueryParam(param, newValue,wurl) { + // 获取当前URL + let url = wurl || window.location.href; + + // 正则表达式匹配参数 + let regex = new RegExp('([?&])' + param + '=.*?(&|$)'); + let separator = url.indexOf('?') !== -1 ? '&' : '?'; + + // 如果参数存在,替换它,如果不存在,添加它 + if (regex.test(url)) { + return url.replace(regex, '$1' + param + '=' + newValue + '$2'); + } else { + return url + separator + param + '=' + newValue; + } + }, handleSave() { this.$refs.userForm.validate(valid => { if (valid) { this.isDisabled = true const selectedUserType = this.userTypeOptions.filter(item => item.Id === this.user.UserTypeId) + let newUrl = this.updateQueryParam('userName', this.user.UserName) + newUrl = this.updateQueryParam('email', this.user.EMail, newUrl) + window.history.pushState({ path: newUrl }, '', newUrl) if (selectedUserType.length > 0) { this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum } diff --git a/src/views/system/user/list/index.vue b/src/views/system/user/list/index.vue index 8ce40a31..f347279f 100644 --- a/src/views/system/user/list/index.vue +++ b/src/views/system/user/list/index.vue @@ -37,13 +37,13 @@ {{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }} diff --git a/src/views/trials/trials-panel/attachments/SPMEnrollment/index.vue b/src/views/trials/trials-panel/attachments/SPMEnrollment/index.vue index cdf56543..bdf3da96 100644 --- a/src/views/trials/trials-panel/attachments/SPMEnrollment/index.vue +++ b/src/views/trials/trials-panel/attachments/SPMEnrollment/index.vue @@ -8,7 +8,7 @@
- + {{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}
@@ -38,7 +38,7 @@ {{ trialInfo.TotalReviewers }}
- + {{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}
diff --git a/src/views/trials/trials-panel/attachments/enrollment/index.vue b/src/views/trials/trials-panel/attachments/enrollment/index.vue index 4dbcad15..534ad4f7 100644 --- a/src/views/trials/trials-panel/attachments/enrollment/index.vue +++ b/src/views/trials/trials-panel/attachments/enrollment/index.vue @@ -8,7 +8,7 @@
- + {{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication ? '-' + trialInfo.Indication : '' }}
@@ -38,7 +38,7 @@ {{ trialInfo.TotalReviewers }}
- + {{ trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).toString() }}