diff --git a/ruoyi-ui/src/views/oa/offboarding/add.vue b/ruoyi-ui/src/views/oa/offboarding/add.vue index 5de0d6f..7e3da68 100644 --- a/ruoyi-ui/src/views/oa/offboarding/add.vue +++ b/ruoyi-ui/src/views/oa/offboarding/add.vue @@ -18,7 +18,7 @@ - + { + return item.roleKey + }) + return dir.includes("admin") + }, + + // 获取用户信息 + getUserInfo() { + getUserProfile().then(res => { + this.user = res.data.user; + this.form.userId = this.user.userId; + console.log(this.user); + }) + }, // 文件状态改变时的处理 handleFileChange(file, fileList) { diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/ruoyi-ui/src/views/system/user/profile/index.vue index 70b9baa..63e3092 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/ruoyi-ui/src/views/system/user/profile/index.vue @@ -12,27 +12,39 @@ - 用户名称 + + 用户名称 + {{ user.userName }} - 手机号码 + + 手机号码 + {{ user.phonenumber }} - 用户邮箱 + + 用户邮箱 + {{ user.email }} - 所属部门 + + 所属部门 + {{ user.dept.deptName }} / {{ postGroup }} - 所属角色 + + 所属角色 + {{ roleGroup }} - 创建日期 + + 创建日期 + {{ user.createTime }} @@ -42,7 +54,9 @@ - 转正日期 + + 转正日期 + {{ onBoardingInfo.joiningDate }} @@ -51,10 +65,10 @@ 申请离职 - + 个人档案 - 查看档案 + 查看档案 @@ -78,15 +92,15 @@ - - + v-if="showFile" /> @@ -108,15 +122,14 @@ export default { roleGroup: {}, postGroup: {}, activeTab: "userinfo", - fileDrawerVisible: false, - onBoardingInfo: {} + showFile: false, + onBoardingInfo: {}, + hasDocument: false, }; }, created() { this.getUser(); - // 获取用户入职信息 - }, methods: { getUser() { @@ -126,14 +139,26 @@ export default { this.roleGroup = response.data.roleGroup; this.postGroup = response.data.postGroup; this.getOnBoardInfo(); + this.checkHasDocument(); }); }, async getOnBoardInfo() { const { data } = await getOnboarding(this.user.userId); this.onBoardingInfo = data; }, + + async checkHasDocument() { + const dir = this.user.roles.map(item => { + return item.roleKey + }) + + this.hasDocument = !dir.includes("admin") + }, + openFileDrawer() { - this.fileDrawerVisible = true; + console.log("打开文件抽屉"); + this.showFile = true; + console.log(this.showFile); }, // 跳转到申请转正页面 toApplyProbation() { @@ -148,3 +173,11 @@ export default { } }; + +