Commit 937f786f by gao_yingdong

用户管理

parent ac4fee5c
......@@ -9,13 +9,16 @@
:cxUrl="cxUrl"
ref="rightContent"
@add="add"
@dele="dele"
@toInfor="toInfor"
@edit="edit"
@editMenu='editMenu'
@editMenu="editMenu"
@selectionChange="selectionChange"
></right-content>
<el-dialog
>
<template #btnGroup="scope">
<span style="margin-right: 16px" @click="edit(scope.scope)" class="edit">编辑</span>
<span @click="dele(scope.scope)" class="dele">删除</span>
</template>
</right-content>
<el-dialog
title="菜单管理"
:visible.sync="dialogVisible"
width="30%"
......@@ -41,7 +44,7 @@
<script>
import rightContent from "@c/ptCxForm_components.vue";
import { tree, grant,remove } from "@/api/userAuth/menu.js";
import { tree, grant, remove } from "@/api/userAuth/menu.js";
export default {
name: "queryMenu",
components: {
......@@ -79,7 +82,7 @@ export default {
{
label: "ID",
prop: "id",
toInfor: true
toInfor: true,
},
{
label: "菜单编号",
......@@ -113,12 +116,14 @@ export default {
},
selectedId: [],
selectedTree: [],
isPremission:false
isPremission: false,
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
this.isPremission = JSON.parse(sessionStorage.getItem('userInfo')).permission.findIndex(item => item == 'A0000')
this.isPremission = JSON.parse(
sessionStorage.getItem("userInfo")
).permission.findIndex((item) => item == "A0000");
this.getTree();
},
methods: {
......@@ -136,7 +141,7 @@ export default {
}
},
editMenu() {
debugger
debugger;
if (this.selectedId.length > 0) {
this.dialogVisible = true;
} else {
......
......@@ -9,14 +9,16 @@
:cxUrl="cxUrl"
ref="rightContent"
@add="add"
@dele="dele"
@toInfor="toInfor"
@edit="edit"
@selectionChange="selectionChange"
>
<template #listOperation="scope" v-if="isPremission">
<span class="hbyps" @click="editMenu(scope.scope)"> 菜单配置</span>
</template>
<template #btnGroup="scope">
<span style="margin-right: 16px" @click="edit(scope.scope)" class="edit">编辑</span>
<span @click="dele(scope.scope)" class="dele">删除</span>
</template>
</right-content>
<el-dialog
title="菜单管理"
......
......@@ -61,13 +61,24 @@
<div class="name">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="请输入旧密码: ">
<el-input placeholder="请输入旧密码" v-model="form.oldPassword"></el-input>
<el-input
placeholder="请输入旧密码"
v-model="form.oldPassword"
></el-input>
</el-form-item>
<el-form-item label="请输入新密码: ">
<el-input placeholder="请输入新密码" show-password v-model="form.newPassword"></el-input>
<el-input
placeholder="请输入新密码"
show-password
v-model="form.newPassword"
></el-input>
</el-form-item>
<el-form-item label="请确定新密码: ">
<el-input placeholder="请确定新密码" show-password v-model="form.newPassword1"></el-input>
<el-input
placeholder="请确定新密码"
show-password
v-model="form.newPassword1"
></el-input>
</el-form-item>
</el-form>
</div>
......@@ -82,7 +93,7 @@
<script>
import rightContent from "@c/ptCxForm_components.vue";
import { deleteUserNew, openUserXx } from "@/api/userAuth/addUser.js";
import { tree, insertUserRoles,updateUserMm } from "@/api/userAuth/role.js";
import { tree, insertUserRoles, updateUserMm } from "@/api/userAuth/role.js";
export default {
name: "queryUser",
components: {
......@@ -202,14 +213,16 @@ export default {
],
//全选
checkAll: false,
isPremission:false
isPremission: false,
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
this.$store.commit("user/SET_LeftMenu", this.leftMenus);
this.$store.commit("user/SET_Header", this.header);
this.isPremission = JSON.parse(sessionStorage.getItem('userInfo')).permission.findIndex(item => item == 'A0000')
this.isPremission = JSON.parse(
sessionStorage.getItem("userInfo")
).permission.findIndex((item) => item == "A0000");
this.getTree();
},
methods: {
......@@ -218,19 +231,18 @@ export default {
this.$set(this.form, "id", scope.row.id);
this.dialogVisibleMzxg = true;
},
submitMaa () {
if (this.form.newPassword == this.form.newPassword1 ) {
updateUserMm(this.form).then( res => {
submitMaa() {
if (this.form.newPassword == this.form.newPassword1) {
updateUserMm(this.form).then((res) => {
if (res.code == 200) {
this.dialogVisibleMzxg = false;
this.$message.success('密码修改成功!')
this.form = {}
this.$message.success("密码修改成功!");
this.form = {};
}
})
});
} else {
this.$message.error('两次密码输入不一样,请重新确定密码!')
this.form.newPassword1 = ''
this.$message.error("两次密码输入不一样,请重新确定密码!");
this.form.newPassword1 = "";
}
},
handleSwitch(obj) {
......@@ -447,6 +459,6 @@ export default {
}
/deep/.el-form-item__content {
margin: 0 0 0 10px !important;
}
}
}
</style>
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