pengjun 1 year ago
parent
commit
e490b1ecf1
  1. 27
      src/views/Home.vue

27
src/views/Home.vue

@ -49,7 +49,7 @@
<!--2级菜单--> <!--2级菜单-->
<template v-for="menu2 in menu1.treeChildren"> <template v-for="menu2 in menu1.treeChildren">
<el-menu-item :key="menu2.id" v-if="menu2.menuType == '1'" :index="menu2.id">{{ menu2.displayName <el-menu-item :key="menu2.id" v-if="menu2.menuType == '1'" :index="menu2.id">{{ menu2.displayName
}}</el-menu-item>
}}</el-menu-item>
</template> </template>
<template v-for="menu2 in menu1.treeChildren"> <template v-for="menu2 in menu1.treeChildren">
<el-submenu :popper-append-to-body="false" :key="menu2.id" v-if="menu2.menuType == '0'" <el-submenu :popper-append-to-body="false" :key="menu2.id" v-if="menu2.menuType == '0'"
@ -152,8 +152,8 @@
</div> </div>
<div> <div>
<!--通用本地参数设置--> <!--通用本地参数设置-->
<el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false" :append-to-body="true"
width="800px" height="600px">
<el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false"
:append-to-body="true" width="800px" height="600px">
<LocalConfig /> <LocalConfig />
</el-dialog> </el-dialog>
</div> </div>
@ -309,25 +309,28 @@ export default {
determine() { determine() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
if (this.form.oldPassWord != this.password) {
this.$message.warning("旧密码输入错误");
if (!this.form.oldPassWord) {
this.$message.warning("请输入旧密码");
} else if (this.confirmpassword != this.form.newPassWord) { } else if (this.confirmpassword != this.form.newPassWord) {
this.$message.warning("二次输入的密码不一致"); this.$message.warning("二次输入的密码不一致");
} else { } else {
postapi("/api/identity/users/updatepassword", this.form).then(
(res) => {
console.log("修改成功");
this.dialogVisible = false;
}
);
postapi("/api/identity/users/updatepassword", this.form)
.then(res => {
if (res.code > -1) {
console.log("修改成功");
this.dialogVisible = false;
}
});
} }
} }
}); });
}, },
// //
editpassword() { editpassword() {
this.form.oldPassWord = ""
this.confirmpassword = ""
this.form.newPassWord = ""
this.dialogVisible = true; this.dialogVisible = true;
console.log(this.password);
}, },
//退 //退
logout() { logout() {

Loading…
Cancel
Save