|
@@ -1,19 +1,3 @@ |
|
|
<!-- |
|
|
|
|
|
- Copyright (c) 2018-2025, lengleng All rights reserved. |
|
|
|
|
|
- |
|
|
|
|
|
- Redistribution and use in source and binary forms, with or without |
|
|
|
|
|
- modification, are permitted provided that the following conditions are met: |
|
|
|
|
|
- |
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, |
|
|
|
|
|
- this list of conditions and the following disclaimer. |
|
|
|
|
|
- Redistributions in binary form must reproduce the above copyright |
|
|
|
|
|
- notice, this list of conditions and the following disclaimer in the |
|
|
|
|
|
- documentation and/or other materials provided with the distribution. |
|
|
|
|
|
- Neither the name of the pig4cloud.com developer nor the names of its |
|
|
|
|
|
- contributors may be used to endorse or promote products derived from |
|
|
|
|
|
- this software without specific prior written permission. |
|
|
|
|
|
- Author: lengleng (wangiegie@gmail.com) |
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<div class="app-container calendar-list-container"> |
|
|
<div class="app-container calendar-list-container"> |
|
@@ -29,7 +13,7 @@ |
|
|
> |
|
|
> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<div class="grid-content bg-purple"> |
|
|
<div class="grid-content bg-purple"> |
|
|
<el-form-item label="头像"> |
|
|
|
|
|
|
|
|
<!-- <el-form-item label="头像"> |
|
|
<el-upload |
|
|
<el-upload |
|
|
:headers="headers" |
|
|
:headers="headers" |
|
|
:show-file-list="false" |
|
|
:show-file-list="false" |
|
@@ -40,20 +24,20 @@ |
|
|
<img v-if="ruleForm.avatar" id="avatar" :src="avatarUrl" class="avatar" /> |
|
|
<img v-if="ruleForm.avatar" id="avatar" :src="avatarUrl" class="avatar" /> |
|
|
<i v-else class="el-icon-plus avatar-uploader-icon" /> |
|
|
<i v-else class="el-icon-plus avatar-uploader-icon" /> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form-item> --> |
|
|
<el-form-item label="用户名" prop="username"> |
|
|
<el-form-item label="用户名" prop="username"> |
|
|
<el-input v-model="ruleForm.username" type="text" disabled /> |
|
|
<el-input v-model="ruleForm.username" type="text" disabled /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="手机号" prop="phone"> |
|
|
<el-form-item label="手机号" prop="phone"> |
|
|
<el-input v-model="ruleForm.phone" placeholder="验证码登录使用" /> |
|
|
|
|
|
|
|
|
<el-input v-model="ruleForm.phone" disabled placeholder="验证码登录使用" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
<el-form-item label="社交登录" prop="social"> |
|
|
<el-form-item label="社交登录" prop="social"> |
|
|
<a href="#" class="icon-weixin1" @click="handleClick('wechat')"></a>| |
|
|
<a href="#" class="icon-weixin1" @click="handleClick('wechat')"></a>| |
|
|
<a href="#" class="icon-qq" @click="handleClick('tencent')"></a> | |
|
|
<a href="#" class="icon-qq" @click="handleClick('tencent')"></a> | |
|
|
<a href="#" class="icon-gitee-fill-round" @click="handleClick('gitee')"></a> | |
|
|
<a href="#" class="icon-gitee-fill-round" @click="handleClick('gitee')"></a> | |
|
|
<a href="#" class="icon-C" @click="handleClick('osc')"></a> |
|
|
<a href="#" class="icon-C" @click="handleClick('osc')"></a> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-form-item> --> |
|
|
<el-form-item label="原密码" prop="password"> |
|
|
<el-form-item label="原密码" prop="password"> |
|
|
<el-input v-model="ruleForm.password" type="password" auto-complete="off" /> |
|
|
<el-input v-model="ruleForm.password" type="password" auto-complete="off" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@@ -116,6 +100,7 @@ export default { |
|
|
newpassword2: "", |
|
|
newpassword2: "", |
|
|
avatar: "", |
|
|
avatar: "", |
|
|
phone: "", |
|
|
phone: "", |
|
|
|
|
|
userId:'', |
|
|
}, |
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
phone: [{ required: false, validator: validatePhone, trigger: "blur" }], |
|
|
phone: [{ required: false, validator: validatePhone, trigger: "blur" }], |
|
@@ -155,13 +140,25 @@ export default { |
|
|
if (!valid) { |
|
|
if (!valid) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
editInfo(this.ruleForm).then((response) => { |
|
|
|
|
|
this.$notify.success("修改成功"); |
|
|
|
|
|
// 修改后注销当前token,重新登录 |
|
|
|
|
|
this.$store.dispatch("LogOut").then(() => { |
|
|
|
|
|
|
|
|
this.$api.api.resetPassword({ |
|
|
|
|
|
userId:this.ruleForm.userId, |
|
|
|
|
|
password:this.ruleForm.newpassword1 |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
// console.log(res); |
|
|
|
|
|
|
|
|
|
|
|
this.$notify.success("修改成功"); |
|
|
|
|
|
this.$store.dispatch("LogOut").then(() => { |
|
|
location.reload(); |
|
|
location.reload(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// editInfo(this.ruleForm).then((response) => { |
|
|
|
|
|
// this.$notify.success("修改成功"); |
|
|
|
|
|
// // 修改后注销当前token,重新登录 |
|
|
|
|
|
// this.$store.dispatch("LogOut").then(() => { |
|
|
|
|
|
// location.reload(); |
|
|
|
|
|
// }); |
|
|
|
|
|
// }); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
resetForm() { |
|
|
resetForm() { |
|
@@ -171,6 +168,7 @@ export default { |
|
|
this.ruleForm.username = this.userInfo.username; |
|
|
this.ruleForm.username = this.userInfo.username; |
|
|
this.ruleForm.phone = this.userInfo.phone; |
|
|
this.ruleForm.phone = this.userInfo.phone; |
|
|
this.ruleForm.avatar = this.userInfo.avatar; |
|
|
this.ruleForm.avatar = this.userInfo.avatar; |
|
|
|
|
|
this.ruleForm.userId = this.userInfo.userId; |
|
|
handleImg(this.userInfo.avatar, "avatar"); |
|
|
handleImg(this.userInfo.avatar, "avatar"); |
|
|
//判断是否选择了租户ID |
|
|
//判断是否选择了租户ID |
|
|
const TENANT_ID = getStore({ name: "tenantId" }); |
|
|
const TENANT_ID = getStore({ name: "tenantId" }); |
|
|