Commit 937f786f by gao_yingdong

用户管理

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