Commit de4af155 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents dedecce7 04e21fe5
This diff is collapsed.
......@@ -58,12 +58,13 @@
<el-input v-model="user_data.userTypeName" :disabled="true"></el-input>
<el-button
v-if="(user_data.userType == 3 || user_data.userType == 4) && couldUp"
:class="option_btn"
class="option_btn"
@click="upLevel"
>升级为开发者</el-button>
<el-button
v-else-if="(user_data.userType == 3 || user_data.userType == 4) && !couldUp"
type="info"
class="option_btn_gray_dis"
disabled
>升级为开发者</el-button>
</el-form-item>
......@@ -184,6 +185,7 @@ export default {
},
data: () => ({
activeName: "0",
userId: "",
is_admin: 0,
user_data: {
accountNo: "",
......@@ -227,14 +229,15 @@ export default {
this.$api.user.getNowUser().then(response => {
if (response.data.success == 1) {
this.is_admin = response.data.data.is_admin;
this.getUserInfo(response.data.data.user_id);
this.userId = response.data.data.user_id;
this.getUserInfo();
} else {
console.log(response.data.errMsg);
}
});
},
getUserInfo(id) {
this.$api.user.getUserDetail({ id: id }).then(response => {
this.$api.user.getUserDetail({ id: this.userId }).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.user_data.accountNo = data.user_id;
......@@ -298,6 +301,7 @@ export default {
message: "修改个人信息成功",
type: "success"
});
this.getUserInfo();
} else {
this.$message({
message: "修改个人信息失败",
......@@ -333,6 +337,7 @@ export default {
type: "success"
});
this.diaPassWord = false;
this.getUserInfo();
} else {
this.$message({
message: "修改密码失败",
......@@ -342,20 +347,36 @@ export default {
});
},
resetKey() {
this.$api.authority
.resetUserKey({ user_id: this.user_data.accountNo })
.then(response => {
if (response.data.success == 1) {
this.$message({
message: "重置密钥成功",
type: "success"
this.$confirm("此操作将重置您的密钥, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
cancelButtonClass: "msg_btn_gray",
confirmButtonClass: "msg_btn",
type: "warning"
})
.then(() => {
this.$api.authority
.resetUserKey({ user_id: this.user_data.accountNo })
.then(response => {
if (response.data.success == 1) {
this.$message({
message: "重置密钥成功",
type: "success"
});
this.getUserInfo();
} else {
this.$message({
message: "重置密钥失败",
type: "error"
});
}
});
} else {
this.$message({
message: "重置密钥失败",
type: "error"
});
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消重置"
});
});
},
upLevel() {
......@@ -366,6 +387,7 @@ export default {
type: "success"
});
this.couldUp = false;
this.getUserInfo();
} else {
this.$message({
message: "申请升级开发者失败",
......@@ -458,9 +480,7 @@ export default {
}
.option_btn_gray_dis {
width: 124px;
background-color: #e3e5ef;
border-radius: 8px;
color: #0f2683;
}
.info_item {
width: 70%;
......@@ -586,4 +606,23 @@ export default {
line-height: 24px;
height: 24px;
}
.msg_btn {
width: 70px;
background-color: #495feb;
border-radius: 8px;
color: #f8f9fd;
}
.msg_btn:hover {
background-color: #596ffb;
}
.msg_btn_gray {
width: 70px;
background-color: #e3e5ef;
border-radius: 8px;
color: #0f2683;
}
.msg_btn_gray:hover {
background-color: #e8eaf4;
color: #0f2683;
}
</style>
\ No newline at end of file
......@@ -6,6 +6,9 @@ const general = {
logout(params) {
return axios.get(`/iam/api/logout?ReturnUrl=${encodeURIComponent(params.returnUrl)}`);
},
getNowMenu(params) {
return axios.get(`/apaas/backmgt/menu/user/menu?teamName=${params.teamName}`);
},
}
export default general;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment