From 8022f7036945b75f82f2dfc43055623f81ed98f6 Mon Sep 17 00:00:00 2001 From: yxh <172933527@qq.com> Date: 星期五, 23 五月 2025 22:42:56 +0800 Subject: [PATCH] yxh --- src/views/system/user/profile/userInfo.vue | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/views/system/user/profile/userInfo.vue b/src/views/system/user/profile/userInfo.vue index 854b819..6e232b3 100644 --- a/src/views/system/user/profile/userInfo.vue +++ b/src/views/system/user/profile/userInfo.vue @@ -2,7 +2,7 @@ <el-form ref="form" :model="user" :rules="rules" label-width="80px"> <el-form-item label="鐢ㄦ埛鏄电О" prop="nickName"> <el-input v-model="user.nickName" maxlength="30" /> - </el-form-item> + </el-form-item> <el-form-item label="鎵嬫満鍙风爜" prop="phonenumber"> <el-input v-model="user.phonenumber" maxlength="11" /> </el-form-item> @@ -18,12 +18,19 @@ <el-form-item> <el-button type="primary" size="mini" @click="submit">淇濆瓨</el-button> <el-button type="danger" size="mini" @click="close">鍏抽棴</el-button> + <el-button + type="danger" + size="mini" + v-if="user.nickName == '瓒呯骇绠$悊鍛�'" + @click="getdepartment" + >鑾峰彇閮ㄩ棬淇℃伅</el-button + > </el-form-item> </el-form> </template> <script> -import { updateUserProfile } from "@/api/system/user"; +import { updateUserProfile, getdepartment } from "@/api/system/user"; export default { props: { @@ -70,6 +77,15 @@ close() { this.$store.dispatch("tagsView/delView", this.$route); this.$router.push({ path: "/index" }); + }, + getdepartment() { + getdepartment().then(res => { + if (res.code == 200) { + this.$modal.msgSuccess("鑾峰彇鎴愬姛"); + } else { + this.$modal.msgError(res.msg); + } + }); } } }; -- Gitblit v1.9.3