济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
4.8 KiB

1 year ago
<template>
1 year ago
<div class="app-container" style="margin-top: 20px;">
1 year ago
<el-row :gutter="20">
<el-col :span="6" :xs="24">
<el-card class="box-card">
1 year ago
<div slot="header">
1 year ago
<span>个人信息</span>
</div>
<div style="height: 460px">
1 year ago
<div class="text-center">
<userAvatar :user="user" />
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="user" />用户名称
1 year ago
<div class="pull-right">{{ user.userName }}</div>
</li>
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="phone" />手机号码
1 year ago
<div class="pull-right">{{ user.phonenumber }}</div>
</li>
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="email" />用户邮箱
1 year ago
<div class="pull-right">{{ user.email }}</div>
</li>
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="tree" />所属部门
1 year ago
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
</li>
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="peoples" />所属角色
1 year ago
<div class="pull-right">{{ roleGroup }}</div>
</li>
<li class="list-group-item">
1 year ago
<svg-icon class="icon" icon-class="date" />创建日期
1 year ago
<div class="pull-right">{{ user.createTime }}</div>
</li>
</ul>
</div>
</el-card>
</el-col>
1 year ago
<el-col :span="18" :xs="24" class="box-card2">
1 year ago
<el-card>
1 year ago
<div slot="header">
1 year ago
<span>基本资料</span>
</div>
<el-tabs v-model="activeTab">
<el-tab-pane label="基本资料" name="userinfo">
<userInfo :user="user" />
</el-tab-pane>
<el-tab-pane label="修改密码" name="resetPwd">
<resetPwd :user="user" />
</el-tab-pane>
</el-tabs>
</el-card>
<el-card style="margin-top: 20px">
<div slot="header">
<span>个性化设置</span>
</div>
<el-form ref="form" label-width="120px">
<el-row :gutter="20">
<el-col :span="4">
<el-form-item label="通知弹窗:">
<el-switch
v-model="isNotify"
style="margin-top: -5px;"
active-color="#0BD"
inactive-color="#999"
active-value="on"
inactive-value="off"
@change="changeNotify"
>
</el-switch>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="通知语音播报:">
<el-switch
v-model="isSound"
style="margin-top: -5px;"
active-color="#0BD"
inactive-color="#999"
active-value="on"
inactive-value="off"
@change="changeSound"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
1 year ago
</el-col>
</el-row>
</div>
</template>
<script>
import userAvatar from "./userAvatar";
import userInfo from "./userInfo";
import resetPwd from "./resetPwd";
import { getUserProfile } from "@/api/system/user";
import Cookies from 'js-cookie'
1 year ago
export default {
name: "Profile",
1 year ago
components: { userAvatar, userInfo, resetPwd },
1 year ago
data() {
return {
user: {},
roleGroup: {},
postGroup: {},
activeTab: "userinfo",
isSound: 'on',
isNotify: 'on'
1 year ago
};
},
created() {
this.getUser();
},
mounted(){
this.isSound = Cookies.get('warning-sound') || 'on';
this.isNotify = Cookies.get('warning-notify') || 'on';
},
1 year ago
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
});
},
changeSound(){
Cookies.set('warning-sound', this.isSound)
},
changeNotify(){
Cookies.set('warning-notify', this.isNotify)
1 year ago
}
}
};
</script>
1 year ago
<style lang="scss">
@import "@screen/skin/blue/basic.scss";
.list-group{
.list-group-item{
color: $textMain;
border-color: $lineC03;
.icon{
margin-right: 6px;
}
}
}
</style>