From 7363b0049dbd279cbd60e26b925cb537db98c27b Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 11:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=81=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.js | 5 +- src/components/toggleRole/index.vue | 34 +- src/layout/components/Navbar.vue | 2 +- src/views/admin/user/components/UserInfo.vue | 152 ++++-- src/views/login/index.vue | 2 + src/views/system/user/components/UserInfo.vue | 306 ++++++++--- src/views/system/user/components/roleList.vue | 196 +++++++ src/views/system/user/list/index.vue | 13 +- .../trials-layout/components/trialsNavbar.vue | 5 +- src/views/trials/trials-myinfo/index.vue | 4 +- src/views/trials/trials-workbench/index.vue | 2 +- src/views/user/myInfo.vue | 498 ++++++++++++++---- 12 files changed, 954 insertions(+), 265 deletions(-) create mode 100644 src/views/system/user/components/roleList.vue diff --git a/src/api/admin.js b/src/api/admin.js index 423898a7..bee0c20f 100644 --- a/src/api/admin.js +++ b/src/api/admin.js @@ -45,10 +45,11 @@ export function updateUser(param) { }) } -export function getUser(userId) { +export function getUser(params) { return request({ url: `/user/getUser`, - method: 'get' + method: 'get', + params }) } diff --git a/src/components/toggleRole/index.vue b/src/components/toggleRole/index.vue index 1cfb6a4a..bef953fa 100644 --- a/src/components/toggleRole/index.vue +++ b/src/components/toggleRole/index.vue @@ -13,17 +13,20 @@ :show-close="false" :before-close="cancel" > - - - {{ item.UserTypeShortName }} - - + +
{{ $t('toggleRole:tip:noRole') }}
@@ -101,4 +104,13 @@ export default { justify-content: center; flex-wrap: wrap; } + +/deep/ .el-radio__original { + display: none !important; /* 隐藏原生 radio 输入,但仍然允许交互 */ +} + +/deep/.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) + .el-radio__inner { + box-shadow: none !important; +} \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index d8a1ad17..49442e19 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -69,7 +69,7 @@ export default { ...mapGetters(['sidebar', 'name', 'device']) }, created() { - this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer')) + // this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer')) }, methods: { ...mapMutations({ setLanguage: 'lang/setLanguage' }), diff --git a/src/views/admin/user/components/UserInfo.vue b/src/views/admin/user/components/UserInfo.vue index c77558a7..5b2057d5 100644 --- a/src/views/admin/user/components/UserInfo.vue +++ b/src/views/admin/user/components/UserInfo.vue @@ -5,7 +5,7 @@ :model="user" :rules="userFormRules" label-width="150px" - style="width:800px;" + style="width: 800px" >
@@ -25,7 +25,7 @@ - + Male Female @@ -37,13 +37,24 @@ - - + + - + - +
Affiliation
- + Internal External - + @@ -78,19 +100,24 @@ type="primary" size="small" :disabled="isDisabled" - style="margin:10px 15px" + style="margin: 10px 15px" @click="handleSave" - >Save + >Save - diff --git a/src/views/login/index.vue b/src/views/login/index.vue index e14181dc..f37debd8 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -244,6 +244,7 @@
{{ $t('system:userlist:title:Information') }}
- + - + - + - + + + {{ $t('common:button:confirm') }} + +
+ + + + + + + + +
+ + + {{ $t('common:button:confirm') }} + + + + {{ $t('common:button:cancel') }} + +
+
+ + + \ No newline at end of file diff --git a/src/views/system/user/list/index.vue b/src/views/system/user/list/index.vue index f00d9a15..36a149a9 100644 --- a/src/views/system/user/list/index.vue +++ b/src/views/system/user/list/index.vue @@ -35,6 +35,16 @@ + @@ -115,7 +125,7 @@ export default { showOverflowTooltip: true, }, { - prop: 'RealName', + prop: 'FullName', label: this.$t('system:userlist:table:RealName'), minWidth: 120, sortable: 'custom', @@ -154,6 +164,7 @@ export default { prop: 'UserType', label: this.$t('system:userlist:table:UserType'), minWidth: 100, + slot: 'UserTypeSlot', sortable: 'custom', showOverflowTooltip: true, }, diff --git a/src/views/trials/trials-layout/components/trialsNavbar.vue b/src/views/trials/trials-layout/components/trialsNavbar.vue index c98a697c..48b0f80d 100644 --- a/src/views/trials/trials-layout/components/trialsNavbar.vue +++ b/src/views/trials/trials-layout/components/trialsNavbar.vue @@ -104,6 +104,7 @@ /> { + .then(async (res) => { if (res && res.length > 0) { - this.$store.dispatch('global/getNoticeList') + await this.$store.dispatch('global/getNoticeList') this.$router.addRoutes(res) this.toggleRoleLoading = false if (this.loginType === 'DevOps') { diff --git a/src/views/trials/trials-myinfo/index.vue b/src/views/trials/trials-myinfo/index.vue index 488c1954..3f5b19f7 100644 --- a/src/views/trials/trials-myinfo/index.vue +++ b/src/views/trials/trials-myinfo/index.vue @@ -107,11 +107,11 @@ export default { spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.07)', }) - getUser(this.userId) + getUser() .then(async (res) => { this.user = res.Result /* eslint-disable */ - zzSessionStorage.setItem('realName', this.user.RealName) + zzSessionStorage.setItem('Name', this.user.FullName) await store.dispatch('user/updateInfo') loading.close() }) diff --git a/src/views/trials/trials-workbench/index.vue b/src/views/trials/trials-workbench/index.vue index ae323a63..b96ef01c 100644 --- a/src/views/trials/trials-workbench/index.vue +++ b/src/views/trials/trials-workbench/index.vue @@ -490,7 +490,7 @@ export default { }, methods: { getUserInfo() { - getUser(this.userId).then(async res => { + getUser().then(async res => { this.user = res.Result }).catch(() => { loading.close() }) }, diff --git a/src/views/user/myInfo.vue b/src/views/user/myInfo.vue index 2dfecd78..94561ea4 100644 --- a/src/views/user/myInfo.vue +++ b/src/views/user/myInfo.vue @@ -17,36 +17,78 @@ {{ $t('trials:trials-myinfo:title:basicInfo') }} - + - - + + - - + + - + Male Female - - + + - - + + - - + + @@ -68,39 +110,97 @@ - + {{ user.UserName }} - + - + {{ $t('trials:trials-myinfo:button:update') }} - + {{ user.Phone }} - + - + {{ $t('trials:trials-myinfo:button:update') }} - + {{ user.EMail }} - - - {{ sendTitle }} + + + {{ sendTitle }} - - + + - + {{ $t('trials:trials-myinfo:button:update') }} @@ -111,18 +211,52 @@ {{ $t('trials:trials-myinfo:title:updatePaasord') }} - + - - + + - - + + - - + +