From d9091fbb79add9078332c4e97b7edad19a55ea98 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 23 Dec 2024 13:59:35 +0800 Subject: [PATCH 01/16] =?UTF-8?q?SPM/CPM=E5=A2=9E=E5=8A=A0=20=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=A1=E6=89=B9=E4=B8=8E=E5=90=A6=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 8 ++ .../components/staffExternalForm.vue | 101 +++++++++++++++++- 2 files changed, 105 insertions(+), 4 deletions(-) diff --git a/src/api/trials.js b/src/api/trials.js index 26fd4bb2..d3df4757 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3914,4 +3914,12 @@ export function getVisitClinicalDataName(data) { method: 'post', data }) +} +// 修改外部人员权限配置 +export function configTrialSPMInfo(data) { + return request({ + url: `/TrialConfig/configTrialSPMInfo`, + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue index d6071671..afe0f3f5 100644 --- a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue +++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue @@ -19,8 +19,12 @@ {{ $t('common:button:reset') }} + + + {{ $t('trials:staff:button:permissionConfiguration') }} + - + {{ $t('trials:staff:button:sendEmail') }} @@ -113,12 +117,52 @@ + + + + + \ No newline at end of file diff --git a/src/store/modules/user.js b/src/store/modules/user.js index a2cf9be9..5b57f3fc 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,5 +1,5 @@ import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth' -import { login, loginOut, getUserMenuTree, getUserPermissions } from '@/api/user' +import { login, loginOut, getUserMenuTree, getUserPermissions, getUserLoginRoleList, loginSelectUserRole } from '@/api/user' import { resetRouter } from '@/router' import md5 from 'js-md5' @@ -16,13 +16,17 @@ const getDefaultState = () => { TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TrialStatusStr: null, - isTestUser: false + isTestUser: false, + roles: [] } } const state = getDefaultState() const mutations = { + SET_ROLES: (state, roles) => { + state.roles = roles + }, RESET_STATE: (state) => { Object.assign(state, getDefaultState()) }, @@ -78,6 +82,9 @@ const mutations = { } const actions = { + setRoles({ commit }, roles) { + commit('SET_ROLES', roles) + }, changeUserName({ commit }, userName) { commit('SET_USERNAME', userName) }, @@ -91,7 +98,7 @@ const actions = { if (UserId) { data.UserId = UserId; } - login(data).then(async response => { + getUserLoginRoleList(data).then(async response => { if (response.IsSuccess) { zzSessionStorage.removeItem('lastWorkbench') zzSessionStorage.setItem('my_username', username.trim()) @@ -99,6 +106,7 @@ const actions = { zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail) localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo)) const data = response.Result + commit('SET_ROLES', data.BasicInfo.AccountList) if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) { try { zzSessionStorage.setItem('userId', data.BasicInfo.Id) @@ -127,12 +135,12 @@ const actions = { zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName) zzSessionStorage.setItem('userId', user.id) zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt) - var permissions = await getUserPermissions() - var menuTree = await getUserMenuTree() - commit('SET_TREE', menuTree.Result) - commit('SET_PERMISSIONS', permissions.Result) - zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result)) - zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result)) + // var permissions = await getUserPermissions() + // var menuTree = await getUserMenuTree() + // commit('SET_TREE', menuTree.Result) + // commit('SET_PERMISSIONS', permissions.Result) + // zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result)) + // zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result)) } catch (e) { console.log(e) } @@ -146,6 +154,39 @@ const actions = { }) }) }, + loginByRole({ commit }, userInfo) { + const { UserTypeId } = userInfo + let params = { + UserTypeId + } + return new Promise((resolve, reject) => { + + loginSelectUserRole(params).then(async response => { + if (response.IsSuccess) { + const data = response.Result + + try { + commit('SET_TOKEN', data) + setToken(data) + var permissions = await getUserPermissions() + var menuTree = await getUserMenuTree() + commit('SET_TREE', menuTree.Result) + commit('SET_PERMISSIONS', permissions.Result) + zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result)) + zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result)) + } catch (e) { + console.log(e) + } + resolve(response.Result) + + } else { + reject(response.ErrorMessage) + } + }).catch(() => { + reject() + }) + }) + }, setTree({ commit }, tree) { commit('SET_TREE', tree) }, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 2286bd3a..a069c363 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -243,6 +243,7 @@ + @@ -253,9 +254,10 @@ import TopLang from './topLang' import Vcode from 'vue-puzzle-vcode' import browserTip from '@/views/dictionary/template/browser/tip.vue' import Img1 from '@/assets/pic-2.png' +import toggleRole from '@/components/toggleRole' export default { name: 'Login', - components: { TopLang, Vcode, browserTip }, + components: { TopLang, Vcode, browserTip, toggleRole }, data() { return { NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV @@ -298,6 +300,7 @@ export default { isShow: false, showCode: false, Img1, + toggleRoleVisible: false, } }, computed: { @@ -416,31 +419,49 @@ export default { // this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning')) this.$message.warning(this.$t('login:message:login4')) } - this.$store.dispatch('permission/generateRoutes').then((res) => { - this.loading = false - if (res && res.length > 0) { - this.$store.dispatch('global/getNoticeList') - this.$router.addRoutes(res) - if (this.loginType === 'DevOps') { - this.$router.replace({ path: res[0].path }) - return - } - if (this.hasPermi(['role:radmin'])) { - this.$router.replace({ path: res[0].path }) - return - } - if ( - this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir']) - ) { - this.$router.replace({ path: '/trials/trials-list' }) + return (this.toggleRoleVisible = true) + }) + .catch(() => { + this.showCode = true + this.loading = false + }) + }, + loginByRole(UserTypeId) { + this.$store + .dispatch('user/loginByRole', { UserTypeId }) + .then((res) => { + if (res) { + this.$store.dispatch('permission/generateRoutes').then((res) => { + this.loading = false + if (res && res.length > 0) { + this.$store.dispatch('global/getNoticeList') + this.$router.addRoutes(res) + if (this.loginType === 'DevOps') { + this.$router.replace({ path: res[0].path }) + return + } + if (this.hasPermi(['role:radmin'])) { + this.$router.replace({ path: res[0].path }) + return + } + if ( + this.hasPermi([ + 'role:air', + 'role:rpm', + 'role:rcrc', + 'role:rir', + ]) + ) { + this.$router.replace({ path: '/trials/trials-list' }) + } else { + this.$router.replace({ path: '/trials' }) + } } else { - this.$router.replace({ path: '/trials' }) + // 此账户暂未配置菜单权限,请联系管理员处理后再登录。 + this.$message.warning(this.$t('login:message:login2')) } - } else { - // 此账户暂未配置菜单权限,请联系管理员处理后再登录。 - this.$message.warning(this.$t('login:message:login2')) - } - }) + }) + } }) .catch(() => { this.showCode = true diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue index afe0f3f5..29522388 100644 --- a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue +++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalForm.vue @@ -225,7 +225,7 @@ export default { // 保存权限配置 async savePermission(){ try{ - let validate = this.$refs.permissionForm.validate(); + let validate =await this.$refs.permissionForm.validate(); if(!validate) return false; this.assignLoadStatus = true; let data = Object.assign({ Id: this.trialId },this.permission) From 177510643da3f6b22d197c851b7b0ae39c879cfc Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 23 Dec 2024 18:05:21 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E5=88=86=E8=A7=92=E8=89=B2=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/toggleRole/index.vue | 12 ++++++++---- src/store/getters.js | 1 + src/store/modules/permission.js | 1 + src/store/modules/user.js | 20 ++++++++++++++------ src/views/login/index.vue | 14 +++++++++++--- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/components/toggleRole/index.vue b/src/components/toggleRole/index.vue index c928068a..b792865b 100644 --- a/src/components/toggleRole/index.vue +++ b/src/components/toggleRole/index.vue @@ -8,14 +8,15 @@ append-to-body :title="$t('toggleRole:tip:title')" center + top="30vh" :show-close="false" @close="cancel" > @@ -37,7 +38,11 @@ export default { props: { visible: { type: Boolean, - default: true, + default: false, + }, + loading: { + type: Boolean, + default: false, }, }, data() { @@ -45,7 +50,6 @@ export default { form: { UserTypeId: null, }, - loading: false, } }, computed: { diff --git a/src/store/getters.js b/src/store/getters.js index 9f5c1c33..30e43422 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -7,6 +7,7 @@ const getters = { tree: state => state.user.tree, userName: state => state.user.userName, userId: state => state.user.userId, + userRoleId: state => state.user.userRoleId, routes: state => state.permission.routes, asyncRoutes: state => state.permission.addRoutes, visitedViews: state => state.tagsView.visitedViews, diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index aef32a5b..5afee253 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -118,6 +118,7 @@ const actions = { return new Promise(resolve => { var newTree = JSON.parse(zzSessionStorage.getItem('newTree')) const sidebarRoutes = filterAsyncRouter(newTree || []) + console.log(sidebarRoutes, 'sidebarRoutes') commit('SET_ROUTES', sidebarRoutes) resolve(sidebarRoutes) }) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 5b57f3fc..196f0186 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -9,6 +9,7 @@ const getDefaultState = () => { name: '', userName: '', userId: '', + userRoleId: '', avatar: '', permissions: [], tree: [], @@ -53,6 +54,9 @@ const mutations = { SET_USERID: (state, id) => { state.userId = id }, + SET_USEROLEID: (state, id) => { + state.userRoleId = id + }, SET_ISTESTUSER: (state, isTestUser) => { state.isTestUser = eval(isTestUser) }, @@ -127,13 +131,13 @@ const actions = { zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser) commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser) commit('SET_USERNAME', data.BasicInfo.UserName) - commit('SET_USERID', data.BasicInfo.Id) + commit('SET_USERID', data.BasicInfo.IdentityUserId) setToken(data.JWTStr) setName(data.BasicInfo.RealName) const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/')))) const user = JSON.parse(userString) zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName) - zzSessionStorage.setItem('userId', user.id) + zzSessionStorage.setItem('userId', user.identityUserId) zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt) // var permissions = await getUserPermissions() // var menuTree = await getUserMenuTree() @@ -155,9 +159,9 @@ const actions = { }) }, loginByRole({ commit }, userInfo) { - const { UserTypeId } = userInfo + const { userRoleId } = userInfo let params = { - UserTypeId + userRoleId } return new Promise((resolve, reject) => { @@ -166,6 +170,8 @@ const actions = { const data = response.Result try { + commit('SET_USEROLEID', userRoleId) + zzSessionStorage.setItem('userRoleId', userRoleId) commit('SET_TOKEN', data) setToken(data) var permissions = await getUserPermissions() @@ -212,14 +218,16 @@ const actions = { commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser')) const user = JSON.parse(userString) commit('SET_NAME', zzSessionStorage.getItem('realName')) - commit('SET_USERID', user.id) + commit('SET_USEROLEID', user.userRoleId) + commit('SET_USERID', user.identityUserId) commit('SET_USERNAME', zzSessionStorage.getItem('userName')) commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))) commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))) console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')) console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')) zzSessionStorage.setItem('userName', user.name) - zzSessionStorage.setItem('userId', user.id) + zzSessionStorage.setItem('userId', user.identityUserId) + zzSessionStorage.setItem('userRoleId', user.userRoleId) zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName) zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt) return user diff --git a/src/views/login/index.vue b/src/views/login/index.vue index a069c363..cbc18c50 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -243,7 +243,11 @@ - + @@ -301,6 +305,7 @@ export default { showCode: false, Img1, toggleRoleVisible: false, + toggleRoleLoading: false, } }, computed: { @@ -426,10 +431,12 @@ export default { this.loading = false }) }, - loginByRole(UserTypeId) { + loginByRole(userRoleId) { + this.toggleRoleLoading = true this.$store - .dispatch('user/loginByRole', { UserTypeId }) + .dispatch('user/loginByRole', { userRoleId }) .then((res) => { + this.toggleRoleLoading = false if (res) { this.$store.dispatch('permission/generateRoutes').then((res) => { this.loading = false @@ -466,6 +473,7 @@ export default { .catch(() => { this.showCode = true this.loading = false + this.toggleRoleLoading = false }) }, onSuccess() { From a95a129dde9b2ebe33b605883826d6e7bb8844bd Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Tue, 24 Dec 2024 16:21:23 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=86=85=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-zh.md | 3 + public/index.html | 1 - src/api/admin.js | 2 +- src/components/toggleRole/index.vue | 31 ++- src/const/check/index.js | 1 - src/permission.js | 1 + src/store/getters.js | 2 +- src/store/modules/permission.js | 1 - src/store/modules/user.js | 51 ++-- src/views/login/index.vue | 80 ++++--- .../trials-layout/components/topLang.vue | 1 - .../trials-layout/components/trialsNavbar.vue | 226 ++++++++++++------ src/views/trials/trials-myinfo/account.vue | 59 +++++ src/views/trials/trials-workbench/index.vue | 2 - 14 files changed, 331 insertions(+), 130 deletions(-) diff --git a/README-zh.md b/README-zh.md index e472d1d6..9e111c1e 100644 --- a/README-zh.md +++ b/README-zh.md @@ -5,3 +5,6 @@ npm install # 启动服务 npm run dev +# v1.9.0修改 +1. 角色修改,全局userId实际意义修改为userRoleId(用户角色id),新增identityUserId(新的用户id) + diff --git a/public/index.html b/public/index.html index 0c22a84a..8703f504 100644 --- a/public/index.html +++ b/public/index.html @@ -30,7 +30,6 @@ <% } else { %> \ 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') }} - + - - + + - - + + - - + + From dec01d779d0aba8517c7ad0e9453ebfa92825aac Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 11:42:11 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=94=A8=E6=88=B7?= =?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/views/system/user/components/UserInfo.vue | 2 +- src/views/system/user/components/roleList.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/system/user/components/UserInfo.vue b/src/views/system/user/components/UserInfo.vue index 22c477ab..84c03f80 100644 --- a/src/views/system/user/components/UserInfo.vue +++ b/src/views/system/user/components/UserInfo.vue @@ -281,7 +281,7 @@ export default { this.user.Roles.push(item.UserTypeId) } this.user.UserRoleList.push({ - UserTypeEnum: item.UserTypeEnum, + UserTypeEnum: item.UserType, UserTypeId: item.UserTypeId, IsUserRoleDisabled: item.IsUserRoleDisabled, UserTypeShortName: item.UserTypeShortName, diff --git a/src/views/system/user/components/roleList.vue b/src/views/system/user/components/roleList.vue index 06d2e0e8..d4138223 100644 --- a/src/views/system/user/components/roleList.vue +++ b/src/views/system/user/components/roleList.vue @@ -181,7 +181,7 @@ export default { arr.forEach((item) => { this.list.push({ UserTypeEnum: item.UserTypeEnum, - UserTypeId: item.UserTypeId, + UserTypeId: item.Id, IsUserRoleDisabled: false, UserTypeShortName: item.UserTypeShortName, }) From f637f746cbdb2ec4df56351274e89b8c3f8fcf0b Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 13:27:31 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/forgetpassword/index.vue | 21 +++++++++++-------- src/views/system/user/components/roleList.vue | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/forgetpassword/index.vue b/src/views/forgetpassword/index.vue index 1f18d6f4..d66f6c34 100644 --- a/src/views/forgetpassword/index.vue +++ b/src/views/forgetpassword/index.vue @@ -76,7 +76,8 @@ > - + - - + --> { this.formLoading = false - this.users = res.Result - if (this.users.length === 1) { - this.form.UserId = this.users[0].UserId - this.form.UserType = this.users[0].UserType - } + this.form.UserId = res.Result.Id + this.form.UserName = res.Result.UserName + // this.users = res.Result + // if (this.users.length === 1) { + // this.form.UserId = this.users[0].UserId + // this.form.UserType = this.users[0].UserType + // } // 验证成功 this.$message.success( this.$t('passwordReset:message:verifiedSuccessfully') diff --git a/src/views/system/user/components/roleList.vue b/src/views/system/user/components/roleList.vue index d4138223..f8b14998 100644 --- a/src/views/system/user/components/roleList.vue +++ b/src/views/system/user/components/roleList.vue @@ -7,6 +7,7 @@ :close-on-click-modal="false" :close-on-press-escape="false" append-to-body + :show-close="false" :title="$t('system:userlist:roleList:title')" :before-close="cancel" > From 9bdb8f64b3b23ef2b0c9c4c0f049e01ff6e6d581 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 14:10:31 +0800 Subject: [PATCH 09/16] 1 --- src/views/email-recompose/index.vue | 1 - src/views/system/user/components/UserInfo.vue | 1 - src/views/system/user/components/roleList.vue | 1 - 3 files changed, 3 deletions(-) diff --git a/src/views/email-recompose/index.vue b/src/views/email-recompose/index.vue index 9a11ceb9..ba74eceb 100644 --- a/src/views/email-recompose/index.vue +++ b/src/views/email-recompose/index.vue @@ -95,7 +95,6 @@ export default { : 'zh' /* eslint-disable */ var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号 - console.log(!reg1.test(value)) if (!reg1.test(value)) { callback( lang === 'zh' diff --git a/src/views/system/user/components/UserInfo.vue b/src/views/system/user/components/UserInfo.vue index 84c03f80..6c21913b 100644 --- a/src/views/system/user/components/UserInfo.vue +++ b/src/views/system/user/components/UserInfo.vue @@ -300,7 +300,6 @@ export default { : 'zh' /* eslint-disable */ var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号 - console.log(!reg1.test(value)) if (!reg1.test(value)) { callback( lang === 'zh' diff --git a/src/views/system/user/components/roleList.vue b/src/views/system/user/components/roleList.vue index f8b14998..f79c7e92 100644 --- a/src/views/system/user/components/roleList.vue +++ b/src/views/system/user/components/roleList.vue @@ -168,7 +168,6 @@ export default { roles.push(item.UserTypeId) } }) - console.log(roles) this.$emit('update:roles', roles) this.$emit('update:visible', false) }, From b233535d9554b00feb6d16f77861852874299bae Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 14:47:12 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 9 + .../personnel-manage/components/staff.vue | 369 +++++++++++++++--- 2 files changed, 314 insertions(+), 64 deletions(-) diff --git a/src/api/trials.js b/src/api/trials.js index d3df4757..26bba548 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3922,4 +3922,13 @@ export function configTrialSPMInfo(data) { method: 'post', data }) +} + +// 项目添加角色修改权限 +export function updateTrialUserRole(data) { + return request({ + url: `/TrialMaintenance/updateTrialUserRole`, + method: 'put', + data + }) } \ No newline at end of file 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 5fb31630..4ddfcaaf 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 @@ -16,7 +16,12 @@ - - + + @@ -42,14 +52,20 @@ {{ $t('common:button:search') }}
- + {{ $t('common:button:reset') }} @@ -57,7 +73,9 @@ + > + + @@ -156,7 +195,11 @@ width="160" > @@ -168,25 +211,29 @@ width="160" > - + /> --> - + /> --> @@ -207,30 +256,60 @@ - From 7ed4dd7e24f104e31f56894910b6f590a94d7acc Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 14:51:36 +0800 Subject: [PATCH 11/16] 1 --- src/views/system/user/components/UserInfo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/user/components/UserInfo.vue b/src/views/system/user/components/UserInfo.vue index 6c21913b..1f8de2ec 100644 --- a/src/views/system/user/components/UserInfo.vue +++ b/src/views/system/user/components/UserInfo.vue @@ -281,7 +281,7 @@ export default { this.user.Roles.push(item.UserTypeId) } this.user.UserRoleList.push({ - UserTypeEnum: item.UserType, + UserTypeEnum: item.UserTypeEnum, UserTypeId: item.UserTypeId, IsUserRoleDisabled: item.IsUserRoleDisabled, UserTypeShortName: item.UserTypeShortName, From 9d3ba7eb578163d6c82154b0848f636b8f7c8234 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 25 Dec 2024 15:55:36 +0800 Subject: [PATCH 12/16] 1 --- .../trials-layout/components/trialsNavbar.vue | 1 - .../personnel-manage/components/site.vue | 2 +- .../components/staffExternalForm.vue | 2 +- .../personnel-manage/components/staffForm.vue | 158 ++++++++++++------ 4 files changed, 106 insertions(+), 57 deletions(-) diff --git a/src/views/trials/trials-layout/components/trialsNavbar.vue b/src/views/trials/trials-layout/components/trialsNavbar.vue index 48b0f80d..e8404a87 100644 --- a/src/views/trials/trials-layout/components/trialsNavbar.vue +++ b/src/views/trials/trials-layout/components/trialsNavbar.vue @@ -154,7 +154,6 @@ export default { }, created() { // this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer')) - console.log(this.$route.path, 'this.$route.path') this.changeRoute(this.$route) }, methods: { diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue index fed20e1a..8a7224b0 100644 --- a/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue +++ b/src/views/trials/trials-panel/setting/personnel-manage/components/site.vue @@ -412,7 +412,7 @@ > - +
{{ $t('trials:staff:table:name') }}: - + {{ $t('trials:staff:table:uid') }}: - + {{ $t('trials:staff:table:organization') }}: - + {{ $t('trials:staff:table:userType') }}: - + - + {{ $t('common:button:search') }} - + {{ $t('common:button:reset') }} - + {{ $t('common:button:add') }}
@@ -101,17 +139,25 @@ sortable="custom" min-width="100" /> - -