From 8dc06967c8381b957374338981fc2b7fcca07693 Mon Sep 17 00:00:00 2001 From: flower-string <2178503051@qq.com> Date: Tue, 11 Mar 2025 15:46:25 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=B7=BB=E5=8A=A0=E7=A6=BB?= =?UTF-8?q?=E8=81=8C=E7=94=B3=E8=AF=B7=E7=9A=84=E7=94=A8=E6=88=B7=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E6=A1=A3?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/oa/offboarding/add.vue | 20 +++++- .../src/views/system/user/profile/index.vue | 69 ++++++++++++++----- 2 files changed, 70 insertions(+), 19 deletions(-) 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 { } }; + +