市场活动 市场活动 市场统计 线索管理 线索管理 线索统计 客户管理 客户管理 客户统计 交易管理 交易管理 交易统计 产品管理 产品管理 产品统计 字典管理 字典管理 字典统计 用户管理 用户管理 系统管理 系统管理 系统统计 {{ user.name }} 我的资料 修改密码 退出登录 @版权所有 2000-2099 旧约Alatus 深圳市龙华区MZJDQLHY第XX栋XX总部xx号
active-text-color="#ffd04b"
background-color="#334157"
class="el-menu-vertical-demo"
default-active="2"
style="border-right: solid 0px;"
:unique-opened="true"
text-color="#fff"
:collapse="isShowed"
:collapse-transition="false"
:router="true"
>
市场活动
市场活动
市场统计
线索管理
线索管理
线索统计
客户管理
客户管理
客户统计
交易管理
交易管理
交易统计
产品管理
产品管理
产品统计
字典管理
字典管理
字典统计
用户管理
用户管理
系统管理
系统管理
系统统计
{{ user.name }}
我的资料
修改密码
退出登录
@版权所有 2000-2099 旧约Alatus 深圳市龙华区MZJDQLHY第XX栋XX总部xx号
import { doGet } from "../http/httpRequest.js";
import { messageTip, getTokenName, removeToken, messageConfirm, later } from "../util/util.js";
export default {
name : "dashboard",
mounted(){
// 挂载时获取用户名
this.loadLoginName();
},
// 提供者生产者
provide(){
return {
// 提供了一个函数,要求必须是箭头函数
reload: () => {
this.isRouterAlive = false;
this.$nextTick(function(){
this.isRouterAlive = true;
});
}
}
},
methods : {
loadLoginName(){
if(window.localStorage.getItem(getTokenName())){
}
// 获取用户名
doGet("/api/login/info",{}).then((resp) => {
this.user = resp.data.data;
});
},
// 左侧菜单左右展开与折叠
showMenu(){
// 取反即可
this.isShowed = !this.isShowed;
},
// 退出登录
logOut(){
// 一样没有参数值,直接给个空的大括号就好
doGet("/api/logOut",{}).then(resp => {
if(resp.data.code === 200){
messageTip('退出成功,即将返回首页',"success");
// 退出成功
removeToken();
later("/");
}
else{
messageConfirm(resp.data.msg+",是否强制退出?","账号退出异常").then(() => {
messageTip('退出成功,即将返回首页',"success");
// 后端不起作用,我们就把前端这里存的删了先
removeToken();
later("/");
}).catch(() => {
messageTip("已取消强制退出","warning");
});
}
});
}
},
data(){
return {
isShowed : false,
// 登录的用户对象
user : {},
title : "@CRM管理系统",
// 控制右侧子路由内容是否显示
isRouterAlive : true
}
}
}
.el-dropdown{
float: right;
line-height: 225%;
}
.el-aside{
background-color: black;
}
.menuTitle{
color: white;
text-align: center;
height: 5%;
line-height: 225%;
}
.el-header{
background-color: azure;
height: 5%;
line-height: 225%;
}
.el-footer{
background-color: aliceblue;
height: 5%;
line-height: 225%;
text-align: center;
}
.rightContent{
/* 高度设置为计算高度,屏幕高度的100% */
height: calc(100vh);
}
.show{
/* 聚焦事件 */
cursor: pointer;
}
{{ userDetail.id }} {{ userDetail.loginAct }} {{ password }} {{ userDetail.name }} {{ userDetail.phone }} {{ userDetail.email }} {{ userDetail.accountNoExpired === 1 ? "是" : "否" }} {{ userDetail.credentialsNoExpired === 1 ? "是" : "否" }} {{ userDetail.accountNoLocked === 1 ? "是" : "否" }} {{ userDetail.accountEnabled === 1 ? "是" : "否" }} {{ userDetail.createByPO.createTime }} {{ userDetail.createByPO.name }} {{ userDetail.editByPO.editTime }} {{ userDetail.editByPO.name }} {{ userDetail.lastLoginTime }} {{ userDetail.roleList }} {{ userDetail.permissionList }}返 回
{{ userDetail.id }}
{{ userDetail.loginAct }}
{{ password }}
{{ userDetail.name }}
{{ userDetail.phone }}
{{ userDetail.email }}
{{ userDetail.accountNoExpired === 1 ? "是" : "否" }}
{{ userDetail.credentialsNoExpired === 1 ? "是" : "否" }}
{{ userDetail.accountNoLocked === 1 ? "是" : "否" }}
{{ userDetail.accountEnabled === 1 ? "是" : "否" }}
{{ userDetail.createByPO.createTime }}
{{ userDetail.createByPO.name }}
{{ userDetail.editByPO.editTime }}
{{ userDetail.editByPO.name }}
{{ userDetail.lastLoginTime }}
{{ userDetail.roleList }}
{{ userDetail.permissionList }}
返 回
import { doGet } from '../http/httpRequest';
import { messageTip } from '../util/util';
export default {
name:"userView",
mounted(){
this.loadUserDetail();
},
data(){
return {
// 用户详情对象
userDetail : {
createByPO : {},
editByPO : {}
},
password : "********"
}
},
methods : {
loadUserDetail(){
// 从当前路由中获取这个动态的ID
// this.$route.path是获取路径的方法
let id = this.$route.params.id;
doGet("/api/user/" + id,{}).then(resp => {
if(resp.data.code === 200){
this.userDetail = resp.data.data;
if(!this.userDetail.createByPO){
this.userDetail.createByPO = {};
}
if(!this.userDetail.editByPO){
this.userDetail.editByPO = {};
}
}
})
},
goBack(){
messageTip("返回成功","success");
this.$router.back();
}
}
}
.detail{
background-color: azure;
width: 100%;
padding-left: 1%;
}